<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article  PUBLIC "-//NLM//DTD Journal Publishing DTD v3.0 20080202//EN" "http://dtd.nlm.nih.gov/publishing/3.0/journalpublishing3.dtd"><article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="3.0" xml:lang="en" article-type="research article"><front><journal-meta><journal-id journal-id-type="publisher-id">IIM</journal-id><journal-title-group><journal-title>Intelligent Information Management</journal-title></journal-title-group><issn pub-type="epub">2160-5912</issn><publisher><publisher-name>Scientific Research Publishing</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="doi">10.4236/iim.2023.156020</article-id><article-id pub-id-type="publisher-id">IIM-129307</article-id><article-categories><subj-group subj-group-type="heading"><subject>Articles</subject></subj-group><subj-group subj-group-type="Discipline-v2"><subject>Computer Science&amp;Communications</subject></subj-group></article-categories><title-group><article-title>
 
 
  Based on Socket IO + Unity Building the Metaverse of &lt;i&gt;Dream of the Red Chamber&lt;/i&gt;
 
</article-title></title-group><contrib-group><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Ziqian</surname><given-names>Rong</given-names></name><xref ref-type="aff" rid="aff1"><sub>1</sub></xref><xref ref-type="corresp" rid="cor1"><sup>*</sup></xref></contrib></contrib-group><aff id="aff1"><label>1</label><addr-line>School of Electronics and Computer Science, University of Southampton, Southampton, UK</addr-line></aff><pub-date pub-type="epub"><day>24</day><month>11</month><year>2023</year></pub-date><volume>15</volume><issue>06</issue><fpage>426</fpage><lpage>441</lpage><history><date date-type="received"><day>23,</day>	<month>October</month>	<year>2023</year></date><date date-type="rev-recd"><day>24,</day>	<month>November</month>	<year>2023</year>	</date><date date-type="accepted"><day>27,</day>	<month>November</month>	<year>2023</year></date></history><permissions><copyright-statement>&#169; Copyright  2014 by authors and Scientific Research Publishing Inc. </copyright-statement><copyright-year>2014</copyright-year><license><license-p>This work is licensed under the Creative Commons Attribution International License (CC BY). http://creativecommons.org/licenses/by/4.0/</license-p></license></permissions><abstract><p>
 
 
  The Metaverse of 
  <em>Dream of the Red Chamber</em> has a natural fit with Unity + Socket.IO, both in virtual space and functional design. Using Unity, you can generate and build the foundation of the Metaverse of 
  <em>Dream of the Red Chamber</em>: virtual reality, including real-time dynamic internal generation and external loading of virtual characters, scenes, and various other elements, and can achieve various controls over these elements without delay. The Metaverse space built by Unity has full immersion and diversity; Socket.IO realizes Internet connection, Unity C# script creates Socket.IO client, Unity + Socket.IO connection realizes interpersonal communication, thus jointly realizing digital identity management in the Metaverse of 
  <em>Dream of the Red Chamber</em>. Including virtual identity registration, Unity to achieve login authentication, digital avatar unique distribution; jointly create a network social space including games, business transactions, friends and entertainment, and provide corresponding safety information management for it, which is enough to reflect the special code of conduct and civilization ecology in the Metaverse. In short, Unity + Socket.IO can build a complete system of the Metaverse of 
  <em>Dream of the Red Chamber</em> from the digital technology level.
 
</p></abstract><kwd-group><kwd>Metaverse</kwd><kwd> Features</kwd><kwd> Virtual Reality</kwd><kwd> Digital Identity</kwd><kwd> Digital Avatar</kwd><kwd> Social Network</kwd></kwd-group></article-meta></front><body><sec id="s1"><title>1. The Origin of the Metaverse of Dream of the Red Chamber</title><sec id="s1_1"><title>1.1. Meta-Universalization Analysis of Dream of the Red Chamber</title><p>Dream of the Red Chamber is renowned for its exquisite literary art, profound character descriptions, and rich cultural connotations, and is considered one of the greatest novels in Chinese literature. It represents the peak of Chinese literature, integrating various literary forms such as poetry, opera, prose, and poetry. Its connotation is only rich, naturally forming a vast and colorful universe of Paul’s universe, but people’s understanding and perception of it are very limited. There may be many reasons, but the main reason is that traditional reading methods require high literacy from readers, which means that for people with shallow life experience and low literary literacy, they may not understand or appear boring (<xref ref-type="fig" rid="fig1">Figure 1</xref>). So, using modern and innovative means of expression, this great work is presented, allowing everyone to easily enter, experience, quickly perceive, and communicate with the characters described in the book at zero distance, or even transform into a certain character, experiencing the story described in the book, which is the Metaverse of Dream of the Red Chamber. The corresponding changes that are clearly foreseeable after the Metaverse transformation are also a powerful driving force for the birth of the Metaverse of Dream of the Red Chamber (<xref ref-type="fig" rid="fig2">Figure 2</xref>) [<xref ref-type="bibr" rid="scirp.129307-ref1">1</xref>] .</p></sec><sec id="s1_2"><title>1.2. The Functional Design of the Metaverse of Dream of the Red Cham ber</title><p>As a vast and complex system, the Metaverse must possess corresponding complex functions. Roblox is the first company to incorporate the functional requirements of the Metaverse into its prospectus. Roblox proposed eight key features of</p><p>the Metaverse, which are actually essential functions that the Metaverse must possess: Identity, Friends, Immersive, Low Friction, Variety, Anywhere, Economy, and Civilization. The same goes for the Metaverse of Dream of the Red Chamber. From initial design, to construction and implementation, to running testing and verification, efforts must be made to achieve these functions, thus presenting the fundamental characteristics of the true Metaverse [<xref ref-type="bibr" rid="scirp.129307-ref2">2</xref>] (<xref ref-type="fig" rid="fig3">Figure 3</xref>).</p></sec><sec id="s1_3"><title>1.3. The Spatial Composition of the Metaverse of Dream of the Red Cham ber</title><p>The space of the Metaverse of Dream of the Red Chamber consists of two main parts: the scenes described in the original works and the Redology (academic field devoted the study of Dream of the Red Chamber) Society Forum (a virtual academic forum for the study of Dream of the Red Chamber). There are many opinions in the academic and folk circles regarding the layout of the former, which is the scene depicted in the Dream of the Red Chamber. In addition, the description of the scene in the original works is limited to textual descriptions, which inherently leaves a lot of room for imagination. The research results of Redology that are most in line with the description of the original works Dream of the Red Chamber (Cheng Gao Edition) are adopted here (<xref ref-type="fig" rid="fig4">Figure 4</xref>). The latter is a virtual experience space constructed by developers based on the Metaverse ray of Dream of the Red Chamber (<xref ref-type="fig" rid="fig5">Figure 5</xref>), but there is actually no fixed sample [<xref ref-type="bibr" rid="scirp.129307-ref3">3</xref>] .</p></sec><sec id="s1_4"><title>1.4. The Workflow of the Metaverse of Dream of the Red Chamber</title><p>The Metaverse of Dream of the Red Chamber itself is in working condition at all times, and there are no frequent and complicated processes. What this refers to is the client’s entry into the Metaverse of Dream of the Red Chamber and the various tasks that are usually carried out after entry, and they need to strictly follow the prescribed procedures. Otherwise, either you will not be able to enter the Metaverse, or after entering the Metaverse, you will not be able to obtain full physical enjoyment and effective social interaction. Of course, you will not be able to obtain ideal economic benefits in the Metaverse (<xref ref-type="fig" rid="fig6">Figure 6</xref>) [<xref ref-type="bibr" rid="scirp.129307-ref4">4</xref>] .</p></sec></sec><sec id="s2"><title>2. The Foundation of Building the Metaverse of Dream of the Red Chamber: Virtual Reality</title><p>The foundation of the Metaverse is virtual and augmented reality technology, which allows users to interact with the digital environment. Virtual reality provides a complete digital experience, while augmented reality overlays digital content in the real world. More often than not, the Metaverse is reflected at the level of virtual reality.</p><p>Although Dream of the Red Chamber belongs to literary works, depicting people and objects that do not exist in reality, it can also be virtual and make the experience feel real, and can form a complete world. However, virtual reality is different from simulation, it is not just a restoration of the original existence in reality. It can be an artistic creation, and the basic elements that make up this works of art are very rich, and the types are also diverse. Unity3D mainly constructs virtual reality in the Metaverse of Dream of the Red Chamber through the following methods (<xref ref-type="fig" rid="fig7">Figure 7</xref>) [<xref ref-type="bibr" rid="scirp.129307-ref5">5</xref>] .</p><sec id="s2_1"><title>2.1. Unity Generating Virtual Reality Elements</title><sec id="s2_1_1"><title>2.1.1. Dynamically Generating Virtual Characters</title><p>The exclusive virtual characters depicted in the book Dream of the Red Chamber in the Metaverse of Dream of the Red Chamber are limited, which inevitably leads to situations where people entering the Metaverse of Dream of the Red Chamber need to temporarily generate virtual avatars when choosing them, and</p><p>they need to change certain characteristics of the generated characters to ensure their uniqueness. The general idea for dealing with this situation is to prepare a character in advance for cloning, which is wearing a code that can dynamically change during the operation of the Metaverse. When logging into the Metaverse, determine whether the character corresponding to the virtual avatar code of the login belongs to the character in Dream of the Red Chamber. If so, activate the character; if not, activate the backup clone object, clone it using the Instantiate function, and replace the headband encoding with the current virtual avatar encoding [<xref ref-type="bibr" rid="scirp.129307-ref6">6</xref>] .</p></sec><sec id="s2_1_2"><title>2.1.2. Dynamically Loading External Materials</title><p>The ecology of the Metaverse of Dream of the Red Chamber is constantly changing, but these changing elements cannot be imported in advance, which requires dynamically loading from external sources. Unity3D provides corresponding methods (functions) for different element types (<xref ref-type="table" rid="table1">Table 1</xref>).</p></sec></sec><sec id="s2_2"><title>2.2. Integrating External Virtual Reality Elements in Unity3D</title><p>The virtual reality elements of the Metaverse of Dream of the Red Chamber still rely more on the Unity3D environment and are imported from outside through interactive operations. After importing, it is usually necessary to perform secondary editing on these elements. For example, redefining image accuracy, defining animation clips, and so on. Orderly place the imported elements into the scene, configure the lighting, and define the corresponding parameters of lighting/environment. In this way, the most basic work of virtual reality in the Metaverse of Dream of the Red Chamber is basically completed.</p></sec><sec id="s2_3"><title>2.3. Control of Virtual Reality Elements in Unity3D</title><sec id="s2_3_1"><title>2.3.1. Control of Characters</title><p>Including the behavior of characters in the Metaverse of Dream of the Red Chamber, such as walking, running, speaking, etc., there are two main control methods used by Unity3D: One is to continuously change the position and angle of the character; the other way is to activate the animation attached to the character. There are generally two methods for implementing control: manual intervention and intelligent (AI) computing. The exact method used depends on the specific situation. For example, during the fair seasons in the Metaverse of Dream of the Red Chamber, it is very natural to use AI in social activities to find a target partner among the crowd. Usually, changes in subjective perspective are achieved through manual intervention [<xref ref-type="bibr" rid="scirp.129307-ref7">7</xref>] .</p><p>In Unity, there are multiple methods to achieve different types of character perspective control. These methods can be selected based on the activity needs in the Metaverse of Dream of the Red Chamber (<xref ref-type="table" rid="table2">Table 2</xref>).</p></sec><sec id="s2_3_2"><title>2.3.2. Control of Non-Character-Type Elements</title><p>In the Metaverse of Dream of the Red Chamber, the non-character elements include all the elements outside the characters, such as the visible sceneries, props, equipment and devices that satisfy various somatic external connections, and the</p><table-wrap id="table1" ><label><xref ref-type="table" rid="table1">Table 1</xref></label><caption><title> List of methods used for Unity3D dynamically loading of external elements</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >Element Type</th><th align="center" valign="middle" >Load Method or Component</th><th align="center" valign="middle" >Code Example</th></tr></thead><tr><td align="center" valign="middle" >Model</td><td align="center" valign="middle" >AssetBundle</td><td align="center" valign="middle" >AssetBundle bundle = www.assetBundle; GameObject model = bundle.LoadAsset (&quot;Model&quot;)</td></tr><tr><td align="center" valign="middle" >video</td><td align="center" valign="middle" >VideoPlayer</td><td align="center" valign="middle" >videoPlayer.url = E:/HLMYYZ/Resouces/Moveis/Ycxqng.mp4;</td></tr><tr><td align="center" valign="middle" >Audio</td><td align="center" valign="middle" >AudioClip/www</td><td align="center" valign="middle" >audioClip = www.GetAudioClip(false); audioSource.clip = audioClip;</td></tr><tr><td align="center" valign="middle" >image</td><td align="center" valign="middle" >Texture2D/Material/www</td><td align="center" valign="middle" >Texture2D texture = new Texture2D(1, 1); www.LoadImageIntoTexture(texture); Material material = new Material (Shader.Find(&quot;Standard&quot;)); material.mainTexture = texture;</td></tr><tr><td align="center" valign="middle" >text</td><td align="center" valign="middle" >String/www</td><td align="center" valign="middle" >WWW www = new WWW(textURL; string textData = www.text;</td></tr></tbody></table></table-wrap><table-wrap id="table2" ><label><xref ref-type="table" rid="table2">Table 2</xref></label><caption><title> Unity3D’s method of controlling the character’s perspective in virtual reality</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >Character Perspective Type</th><th align="center" valign="middle" >Method Characteristics</th></tr></thead><tr><td align="center" valign="middle" >First Person Perspective</td><td align="center" valign="middle" >This is achieved by controlling the position and rotation of the camera.</td></tr><tr><td align="center" valign="middle" >Third Person Perspective</td><td align="center" valign="middle" >Game characters can be seen, but not through the character’s eyes.</td></tr><tr><td align="center" valign="middle" >Free Perspective</td><td align="center" valign="middle" >Freely switch and adjust the perspective, switching between first and third person.</td></tr><tr><td align="center" valign="middle" >Fixed Perspective</td><td align="center" valign="middle" >Fixed camera position and rotation.</td></tr><tr><td align="center" valign="middle" >Mouse-controlled Perspective</td><td align="center" valign="middle" >Control the direction of the viewing angle by moving the mouse.</td></tr></tbody></table></table-wrap><p>various digital media (text, images, animation, video, audio) that are integrated into the Metaverse. The control of these elements is quite complex and flexible. Along with the iterative updating of related hardware and software technologies, the corresponding specific control methods will also be upgraded and improved (<xref ref-type="table" rid="table3">Table 3</xref>).</p></sec></sec><sec id="s2_4"><title>2.4. Satisfaction in Immersion and Diversity</title><p>The Metaverse of Dream of the Red Chamber is based on the content of literary works, with an artistic foundation that transcends reality, and therefore has an infinite space for imagination. However, this is not enough, there should also be a lot of freedom and diversity beyond reality. For example, spatial transfer, changes in perspective, diversity in the presentation style of interactive objects, and infinite related expansion of content [<xref ref-type="bibr" rid="scirp.129307-ref8">8</xref>] .</p><p>The immersion of the Metaverse of Dream of the Red Chamber includes two aspects: immersion and immersive experience. Starting from entering the Metaverse of Dream of the Red Chamber, everyone views the world from a subjective perspective (first person perspective), and is able to fully control their body and engage in various behaviors they want, just like being in the real world. This is the sense of substitution. In the real world, everyone is in a certain environment no matter when or where they are. Entering the Metaverse of Dream of the Red</p><table-wrap id="table3" ><label><xref ref-type="table" rid="table3">Table 3</xref></label><caption><title> List of Unity3D’s control for the non-character-type elements in the Metaverse of Dream of the Red Chamber</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >Element Type</th><th align="center" valign="middle"  colspan="2"  >Control Content</th><th align="center" valign="middle" >Control Method</th></tr></thead><tr><td align="center" valign="middle"  rowspan="5"  >3D models and animations</td><td align="center" valign="middle"  colspan="2"   rowspan="5"  >changes in the scene and various prop model properties (position, orientation, size); changes in model materials: type replacement, parameter changes; changes in shader and texture related parameters.</td><td align="center" valign="middle" >using rigid bodies and physics engines</td></tr><tr><td align="center" valign="middle" >direct transformation operation</td></tr><tr><td align="center" valign="middle" >script control</td></tr><tr><td align="center" valign="middle" >navigation system</td></tr><tr><td align="center" valign="middle" >interpolation and interpolators</td></tr><tr><td align="center" valign="middle"  rowspan="2"  >animation</td><td align="center" valign="middle" >2D</td><td align="center" valign="middle"  rowspan="2"  >scene elements, such as doors, tables, chairs, images in mirrors, and various changes in themselves; interactive entertainment projects, such as “Knowing More Characters of Dream of the Red Chamber”, etc.</td><td align="center" valign="middle"  rowspan="2"  >animator</td></tr><tr><td align="center" valign="middle" >3D</td></tr><tr><td align="center" valign="middle"  rowspan="3"  >video</td><td align="center" valign="middle"  colspan="2"   rowspan="3"  >including content that needs to be presented in video format.</td><td align="center" valign="middle" >video player component</td></tr><tr><td align="center" valign="middle" >video clip</td></tr><tr><td align="center" valign="middle" >texture: video content as texture</td></tr></tbody></table></table-wrap><p>Chamber also requires this feeling: always being in the world depicted in Dream of the Red Chamber.</p></sec></sec><sec id="s3"><title>3. Realizing Free-Barrier Real-time Communication in the Metaverse of Dream of the Red Chamber</title><sec id="s3_1"><title>3.1. Socket.IO for Realization of Internet Connectivity</title><p>The Metaverse of Dream of the Red Chamber is usually an online digital environment, so a stable internet connection is needed to support user interaction.</p><p>Socket.IO is a popular cross platform real-time communication library used to achieve real-time connections in internet applications. It is built on WebSocket technology and provides high-level abstraction and convenient APIs for internet connectivity. After installing the Socket.IO library, you can create a Socket.IO server. In Node.js, use the Socket.IO library to create a server:</p><p>const io = require('socket.io')(server);</p><p>io.on('connection', (socket) =&gt; {</p><p>console.log('A user connected');</p></sec><sec id="s3_2"><title>3.2. The Client Terminal of the Socket.IO Created by the Unity C# Script</title><p>Through Socket.IO for the Metaverse of Dream of the Red Chamber to prepare the network environment, but does not mean that you can immediately enter the network interaction state, but also need to in the Unity front-end application, the introduction of Socket.IO client library, in order to establish a connection with the Socket.IO server. After the successful connection, the Metaverse can really operate. Using C# as an example, the using Socket.IO Client directive provides access to Socket.IO client functionality, which can be used to establish a Socket.IO connection and communicate in real-time in C#. The library Socket.IO Client can help you establish a connection with the Socket.IO server and send or receive data [<xref ref-type="bibr" rid="scirp.129307-ref9">9</xref>] .</p></sec><sec id="s3_3"><title>3.3. Unity + Socket.IO Connection for Realizing Interpersonal Communi Cation</title><p>When the Socket.IO client application starts, it attempts to connect to the Socket.IO server. After a successful connection, the client and server can send messages and events to each other.</p><p>// Send the message to the server</p><p>socket.emit(‘chat message’, ‘Hello, world! ‘);</p><p>// Listens for messages sent by the server</p><p>socket.on(‘chat message’, (message) =&gt; {</p><p>console.log(‘Received message: ‘ + message);</p><p>});</p><p>On both the client and server side, you can define message and event handlers to communicate over the connection. For example, you can define an event to handle the sending and receiving of a chat message (<xref ref-type="fig" rid="fig8">Figure 8</xref>).</p><p>The Metaverse of Dream of the Chamber is an attempt to provide a completely realistic experience world, and a very important guarantee for this realism is low latency, that is, the speed of data from the client to the server and back again. The better the network status, the faster the server response; The smaller the number of users, the lower the latency. In games that require quick reactions, such as competitive and RPG battles, latency has a significant impact on the game. Technically, it is possible to control the number of people, coordinate the execution of transactions, simplify the presentation of data, and reference efficient algorithms or programming ideas [<xref ref-type="bibr" rid="scirp.129307-ref10">10</xref>] .</p></sec></sec><sec id="s4"><title>4. The management of Digital Virtual Identity in the Metaverse</title><sec id="s4_1"><title>4.1. The Uniqueness Principle of Digital Virtual Identity Registration</title><p>When entering the Metaverse of Dream of the Red Chamber, everyone will</p><p>receive a digital identity after successfully logging in, which corresponds to a digital code. This code is unique and scientifically and rationally designed. It not only follows the prevailing rules in the industry, but also meets the individual needs of the Metaverse itself. The code is composed of several intervals of legal characters, and each interval corresponds to a special meaning (attribute), such as the digital person’s occupation, gender, technical expertise, etc. As far as a single interval is concerned, most of them are not unique, but the final code formed after combination is unique. The encoding of digital identity is not freely chosen by those who enter the Metaverse, but is automatically completed by the Metaverse digital identity registration process. This processing is also to ensure the strict and orderly uniqueness of digital identity encoding. The principle of uniqueness of digital identity is crucial, and everyone who enters the Metaverse must strictly abide by it, because it is the prerequisite to ensure to orderly operate and manage the Metaverse (<xref ref-type="fig" rid="fig9">Figure 9</xref>).</p></sec><sec id="s4_2"><title>4.2. The Login Authentication of Digital Identity and Digital Avatars Im plemented by Unity</title><p>Digital identity is a human attribute in the Metaverse and is concealed, so it requires a recognizable digital image, which is a digital avatar. A digital avatar is a digital person with unique characteristics. The digital human avatars in the Metaverse are characters mentioned in the book Dream of the Red Chamber or virtual characters exclusive to the Metaverse. However, the avatar is not necessarily exclusive to the identity corresponding to a certain identity code. In other</p><p>words, although the virtual identity code in the Metaverse is unique and is generally fixed for the life entering the Metaverse, the image corresponding to this identity may be different from the last time someone entered the Metaverse. It is different, and the image (digital person) may have been used by someone else before. This is different from the one-to-one correspondence between each person’s identity code (ID card) and physical body in the real world. However, this does not prevent each digital person appearing in the Metaverse of Dream of the Red Chamber from maintaining unique characteristics. Although the difference sometimes seems small, there is actually a difference. Digital avatars (digital people) are the basis for creating a sense of life and a humanistic atmosphere in the Metaverse, and are therefore the first step in building a complete ecology of the Metaverse.</p></sec><sec id="s4_3"><title>4.3. The Management of Identity Registration and Login for Digital Virtual Characters</title><p>The process of using the Unity + Socket.IO method to realize the Metaverse identity registration is: Unity completes the identity registration, and then Unity sends a request to save relevant information to the server-side Socket.IO. Socket.IO immediately saves the registration information in the corresponding data text (such as Json) on the server side after responding to the request. The purpose of login authentication in the Metaverse of Dream of the Red Chamber is to ensure the legality of the identity of the person entering. Only those who are legal can enter the Metaverse, which can provide relevant benefits and assign corresponding digital incarnations accordingly.</p><p>Following the above description on the implementation of the virtual identity registration function of the Metaverse. The client login operation is implemented by Unity. When the client operation is completed, a login information comparison request is sent to the server-side Socket.IO. After Socket.IO responds to the request; it immediately reads the registration information data text on the server side and compares the data. If the comparison is successful, the client enters the Metaverse; otherwise, a login error is displayed, and then the login UI is entered again (<xref ref-type="fig" rid="fig1">Figure 1</xref>0).</p><p>Strict control of digital identity registration and login, such as avoiding duplication of registration information, input of illegal characters, etc., is a key technical guarantee and work link to ensure the uniqueness of digital identity.</p></sec><sec id="s4_4"><title>4.4. The Management of Digital Identity Information in the Metaverse</title><p>The Metaverse of Dream of the Red Chamber realizes the management of virtual character identity information, including the addition, deletion, retrieval, summary, output and other aspects of related information. The addition of virtual identity is actually completed when the virtual identity is registered, and it is only listed and read in the information management UI, so other operations are</p><p>implemented in the information management UI. The UI is opened in two cases: one is automatically opened in the Metaverse according to the statistical results of the registrant’s activity index (for example, it is found that a registrant’s activity index is lower than the specified minimum activity index), and the other is opened regularly or irregularly by the Metaverse manager because of management needs [<xref ref-type="bibr" rid="scirp.129307-ref9">9</xref>] .</p><p>Technically, the above-mentioned virtual identity information management UI and related information management operations are all implemented by Unity. The reading of the original information, the completion of editing (the information management operation is completed), and the saving of the latest information are jointly completed by Unity + Socket.IO: Unity sends a request to Socket.IO for asking to read the corresponding text (such as Json) of the registration information, and Socket.IO responds and feeds back relevant data to Unity. After receiving the data, Unity will present it in the UI through format conversion. After the management work is completed, Unity sends a request to Socket.IO to save information. After responding to, Socket.IO saves the latest information in the relevant text (directly overwriting the original text) (<xref ref-type="fig" rid="fig1">Figure 1</xref>1).</p></sec></sec><sec id="s5"><title>5. Management and Maintenance of the Ecological Information of the Metaverse Civilization</title><p>Dream of the Red Chamber is an encyclopedia. The Metaverse constructed on this basis is an all-encompassing virtual world. Therefore, the management and</p><p>maintenance of civilized ecological information is a complex process involving many aspects, including data management, security, compliance, etc.</p><sec id="s5_1"><title>5.1. Data Management and Analysis</title><p>Establish an effective data management system, including collection, storage, processing and analysis of ecological information of the Metaverse of Dream of the Red Chamber. This can help monitor and evaluate the functioning of various parts of the Metaverse and support the decision-making process.</p></sec><sec id="s5_2"><title>5.2. Security and Privacy Protection</title><p>Ensure data security in the Metaverse of Dream of the Red Chamber and take appropriate measures to protect users’ private information. This can include security measures such as encryption technology, access control and authentication.</p></sec><sec id="s5_3"><title>5.3. Compliance and Supervision</title><p>Comply with relevant laws and regulations, including data protection laws and privacy regulations. Establish data management and processing procedures that comply with regulatory requirements to ensure compliance with legal requirements during the data management process.</p></sec><sec id="s5_4"><title>5.4. Community Engagement and Communication</title><p>Establish good communication channels with the Metaverse community of Dream of the Red Chamber, understand their needs and feedback, and actively participate in community activities. This helps build trust and support and promotes a good community atmosphere and development.</p></sec><sec id="s5_5"><title>5.5. Technological Innovation and Development</title><p>Actively adopt new technologies and solutions, including artificial intelligence, blockchain and big data analysis, to improve the efficiency and effectiveness of the ecological information management of the Metaverse of Dream of the Red Chamber.</p></sec><sec id="s5_6"><title>5.6. Improve the Advance and Retreat Mechanism</title><p>Enabling social interaction requires real-time communication technology and user interface design and exit management. Among them, real-time communication is handled by Socket.IO, and the user interface is implemented using Unity. Entering the Metaverse of Dream of the Red Chamber is not restricted by location. Everyone can use the terminal to enter and exit the Metaverse anytime and anywhere. However, the Metaverse will not let people exit easily, and there will be strict exit management: when the client behaves to exit the Metaverse of Dream of the Red Chamber (essentially exiting the Unity UI), Unity sends exit information to Socket.IO, and Socket.IO immediately implements the mechanism for handling disconnection will be started, specific events will be triggered, and the aftermath of client exit will be completed: client online information update, virtual identity avatar hiding, etc. [<xref ref-type="bibr" rid="scirp.129307-ref11">11</xref>] .</p></sec></sec><sec id="s6"><title>Conflicts of Interest</title><p>The author declares no conflicts of interest regarding the publication of this paper.</p></sec><sec id="s7"><title>Cite this paper</title><p>Rong, Z.Q. (2023) Based on Socket IO + Unity Building the Metaverse of Dream of the Red Chamber. Intelligent Information Management, 15, 426-441. https://doi.org/10.4236/iim.2023.156020</p></sec></body><back><ref-list><title>References</title><ref id="scirp.129307-ref1"><label>1</label><mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Li</surname><given-names> H. </given-names></name>,<etal>et al</etal>. (<year>2020</year>)<article-title>Digital Review of Dream of the Red Chamber and Enlightenment of Blockchain</article-title><source> Dream of the Red Chamber</source><volume> 3</volume>,<fpage> 83</fpage>-<lpage>102</lpage>.<pub-id pub-id-type="doi"></pub-id></mixed-citation></ref><ref id="scirp.129307-ref2"><label>2</label><mixed-citation publication-type="other" xlink:type="simple">Zhang, J.Y. and Bu, Y.F. (2022) Construction of Meta-Universe Reading Scene from the Perspective of Availability. Publishing Angle, 18, 44-50.</mixed-citation></ref><ref id="scirp.129307-ref3"><label>3</label><mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Xia</surname><given-names> J.W. </given-names></name>,<etal>et al</etal>. (<year>2023</year>)<article-title>Features, Risks and Governance Principles of Meta-Universe</article-title><source> Search</source><volume> 5</volume>,<fpage> 68</fpage>-<lpage>73</lpage>.<pub-id pub-id-type="doi"></pub-id></mixed-citation></ref><ref id="scirp.129307-ref4"><label>4</label><mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Ji</surname><given-names> D.Y. </given-names></name>,<etal>et al</etal>. (<year>2023</year>)<article-title>Features of Digital Twins and Their Relationship with the Meta-Universe</article-title><source> Robotics Technology and Application</source><volume> 2</volume>,<fpage> 7</fpage>-<lpage>11</lpage>.<pub-id pub-id-type="doi"></pub-id></mixed-citation></ref><ref id="scirp.129307-ref5"><label>5</label><mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Yuan</surname><given-names> X.Q. </given-names></name>,<etal>et al</etal>. (<year>2023</year>)<article-title>Analysis of Three-Dimensional Image Space Narrative Features in the Context of Meta-Universe</article-title><source> Journal of Hunan University (Social Science Edition)</source><volume> 3</volume>,<fpage> 80</fpage>-<lpage>87</lpage>.<pub-id pub-id-type="doi"></pub-id></mixed-citation></ref><ref id="scirp.129307-ref6"><label>6</label><mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Xie</surname><given-names> X.L. </given-names></name>,<etal>et al</etal>. (<year>2023</year>)<article-title>Knowledge Sharing Behavior and Driving Factors of Academic Virtual Community under the Enabling of Meta-Universe</article-title><source> Library Work and Research</source><volume> 10</volume>,<fpage> 3</fpage>-<lpage>12</lpage>.<pub-id pub-id-type="doi"></pub-id></mixed-citation></ref><ref id="scirp.129307-ref7"><label>7</label><mixed-citation publication-type="other" xlink:type="simple">Huang, W., Xia, C.J. and Tie, Z. (2023) Digital Memory in the Meta-Universe: Digital Memory Value of “Virtual Digital Person”. Library Forum, 154-161.</mixed-citation></ref><ref id="scirp.129307-ref8"><label>8</label><mixed-citation publication-type="other" xlink:type="simple">Wu, W.Y. and Wang, X. (2023) The Ethical Dilemma and Transcendence of Digital Identity Construction. Learning and Practice, 6, 30-38.</mixed-citation></ref><ref id="scirp.129307-ref9"><label>9</label><mixed-citation publication-type="other" xlink:type="simple">He, Y. and Zhang, C.Y. (2020) Design and Implementation of Neurofeedback Intervention System Based on Unity. Computer Science, 47, 579-583.</mixed-citation></ref><ref id="scirp.129307-ref10"><label>10</label><mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Chen</surname><given-names> X.Q. </given-names></name>,<etal>et al</etal>. (<year>2016</year>)<article-title>Real-Time Communication between Server and Browser Based on Socket.IO Framework</article-title><source> Yangtze River Engineering: Journal of Changjiang Institute of Technology</source><volume> 1</volume>,<fpage> 31</fpage>-<lpage>32</lpage>.<pub-id pub-id-type="doi"></pub-id></mixed-citation></ref><ref id="scirp.129307-ref11"><label>11</label><mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Lin</surname><given-names> L. </given-names></name>,<etal>et al</etal>. (<year>2023</year>)<article-title>Building a Dual Mechanism for Protecting Sensitive Personal Information in the Meta-Universe</article-title><source> Contemporary Communication</source><volume> 2</volume>,<fpage> 99</fpage>-<lpage>103</lpage>.<pub-id pub-id-type="doi"></pub-id></mixed-citation></ref></ref-list></back></article>