Data processing method and device, electronic equipment and storage medium

CN122912491APending Publication Date: 2026-10-16TENCENT TECH SHANGHAI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510424976.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-07
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

[0003]鉴于上述问题,本申请实施例提出了一种数据处理方法、装置、电子设备及存储介质,以解决相关技术中管理进程的存档开销过大,导致管理进程的其他功能不可用,以及导致存档失败问题

Benefits of technology

[0054] In this application's solution, the target archiving process is responsible for merging the target virtual character's role relationship data and basic role data, and then archiving them to the requesting database. This is done by the management process, significantly reducing the computational overhead of archiving virtual character data for the management process and the amount of data it needs to process. This reduces the likelihood of the management process becoming unusable due to excessive archiving pressure. Furthermore, the larger basic role data package does not need to pass through the management process; instead, the management process sends the smaller role relationship data to the first scene process. This effectively solves the problem of the management process becoming unusable due to excessive memory consumption caused by the large amount of basic role data package.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122912491A_ABST
    Figure CN122912491A_ABST
Patent Text Reader

Abstract

The application discloses a data processing method and device, electronic equipment and storage medium, comprising: a first scene process receives a character archive request initiated by a management process for a target virtual character; the first scene process refers to a scene process carrying a first virtual scene where the target virtual character is located; the basic character packaging data of the target virtual character is added to the character archive request; the character archive request is forwarded to a target archive process, so that the target archive process merges the character relationship packaging data and the basic character packaging data carried by the character archive request in response to the character archive request, and stores the character full data of the target virtual character obtained by merging into a database. The scheme of the application can effectively solve the problem of excessive computing overhead of the management process caused by character data archiving.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and more specifically, to a data processing method, apparatus, electronic device, and storage medium. Background Technology

[0002] In the server-side of the game application, a management process and a scene process run. The management process is responsible for global services, such as login, switching virtual scenes, and archiving the character data of virtual characters. The scene process is responsible for carrying the specific virtual scene. In related technologies, when the character data of virtual characters needs to be archived, the management process handles the archiving-related matters. When there are a large number of virtual characters, the archiving overhead of the management process is too large, which leads to the unavailability of other functions of the management process and causes archiving failure. Summary of the Invention

[0003] In view of the above problems, embodiments of this application propose a data processing method, apparatus, electronic device and storage medium to solve the problem that the excessive archiving overhead of the management process in the related art leads to the unavailability of other functions of the management process and causes archiving failure.

[0004] Firstly, a data processing method is provided, including:

[0005] The first scene process receives a character archive request initiated by the management process for the target virtual character; the first scene process refers to the scene process that carries the first virtual scene where the target virtual character is located; the character archive request includes the character relationship packaged data of the target virtual character obtained by the management process;

[0006] The basic character package data of the target virtual character is added to the character archive request; the basic character package data of the target virtual character is obtained by packaging the basic character data stored for the target virtual character in the first scene process;

[0007] The character save request is forwarded to the target save process, so that the target save process responds to the character save request by merging the character relationship package data and the basic character package data carried in the character save request, and storing the full character data of the target virtual character obtained by merging into the database.

[0008] Secondly, a data processing method is provided, including:

[0009] The management process packages the role relationship data stored in its own memory for the target virtual character to obtain the packaged role relationship data of the target virtual character;

[0010] Based on the character relationship packaging data of the target virtual character, a character archive request for the target virtual character is sent to the first scene process. This causes the first scene process to add the basic character packaging data of the target virtual character to the character archive request and then forward the character archive request to the target archive process. The first scene process refers to the scene process that carries the first virtual scene where the target virtual character is located.

[0011] Receive the character save success response returned by the target save process; wherein, the character save success response is sent by the target save process after merging the character relationship package data and the basic character package data carried in the character save request, and storing the full character data of the target virtual character obtained by merging into the database.

[0012] Thirdly, a data processing device is provided for use in a first scenario process, the data processing device comprising:

[0013] The first receiving module is used to receive a character archiving request initiated by the management process for a target virtual character; the first scene process refers to the scene process that carries the first virtual scene where the target virtual character is located; the character archiving request includes the character relationship packaged data of the target virtual character obtained by packaging on the management process;

[0014] An add module is used to add the basic character package data of the target virtual character to the character archive request; the basic character package data of the target virtual character is obtained by packaging the basic character data stored for the target virtual character in the first scene process;

[0015] The forwarding module is used to forward the character save request to the target save process, so that the target save process responds to the character save request by merging the character relationship package data and the basic character package data carried in the character save request, and storing the merged full data of the target virtual character in the database.

[0016] In some embodiments, the data processing apparatus further includes:

[0017] The fourth receiving module is used to receive a scene departure request initiated by the management process for the target virtual character;

[0018] The processing module is configured to, in response to the scene departure request, remove the target virtual character from the first virtual scene, and create a transmission context based on the basic character packaging data of the target virtual character; the transmission context stores the basic character packaging data of the target virtual character.

[0019] The second sending module is configured to return a scene departure response to the management process based on the identification information of the transmission context and the first process address of the first scene process, so that the management process sends a scene entry request to the second scene process based on the identification information and the first process address carried in the scene departure response, and after receiving a scene entry failure response returned by the second scene process, sends a character save request for the target virtual character to the first scene process; wherein, the scene entry failure response is used to indicate that the target game character failed to enter the second virtual scene, and the second scene process refers to the scene process responsible for the second virtual scene.

[0020] In some embodiments, adding a module includes modules configured as follows:

[0021] Obtain the basic character package data of the target virtual character from the transmission context, and add the basic character package data of the target virtual character to the character archive request.

[0022] In some embodiments, the scene entry request sent by the management process to the second scene process carries the role relationship packaged data of the target virtual character; the data processing device further includes:

[0023] The fifth receiving module is used to receive a data request initiated by the second scene process based on the identification information of the transmission context and the address of the first process;

[0024] The third sending module is used to respond to the data request, obtain the basic character package data of the target virtual character from the transmission context, and send the basic character package data of the target virtual character to the second scene process, so that the second scene process executes the character entry processing logic for the target virtual character based on the basic character package data of the target virtual character and the character relationship package data of the target virtual character carried in the scene entry request.

[0025] In some embodiments, the character save request is initiated by the management process after determining that the save time for the target virtual character has been reached; the data processing device further includes:

[0026] The reading module is used to read the basic character data stored for the target virtual character from the memory of the first scene process;

[0027] The basic character data packaging module is used to package the basic character data to obtain the basic character packaged data of the target virtual character.

[0028] Fourthly, a data processing apparatus is provided for use in managing processes, the data processing apparatus comprising:

[0029] The packaging module is used to package the role relationship data stored in the memory of the management process for the target virtual character, and obtain the role relationship packaged data of the target virtual character;

[0030] The first sending module is used to send a character archive request for the target virtual character to the first scene process based on the character relationship package data of the target virtual character. This allows the first scene process to add the basic character package data of the target virtual character to the character archive request and then forward the character archive request to the target archive process. The first scene process refers to the scene process that carries the first virtual scene where the target virtual character is located.

[0031] The second receiving module is used to receive the character saving success response returned by the target saving process; wherein, the character saving success response is sent by the target saving process after merging the character relationship package data and the basic character package data carried in the character saving request, and storing the full character data of the target virtual character obtained by merging into the database.

[0032] In some embodiments, the data processing apparatus further includes:

[0033] The acquisition module is used for the management process to acquire the transmission instruction of the target virtual character, wherein the transmission instruction indicates that the target virtual character is transmitted from the first virtual scene to the second virtual scene;

[0034] The fourth sending module is used to send a scene departure request for the target virtual character to the first scene process in response to the transmission instruction.

[0035] The sixth receiving module is used to receive the scene departure response returned by the first scene process; the scene departure response is generated by the first scene process in response to the scene departure request, removing the target virtual character from the first game scene, and creating a transmission context based on the basic character data of the target virtual character, and then generating the response based on the identifier information of the transmission context and the first process address of the first scene process.

[0036] The fifth sending module is used to, in response to the scene departure response, send a scene entry request for the target virtual character to the second scene process according to the identification information and the first process address; the second scene process refers to the scene process that carries the second game scene;

[0037] The seventh receiving module is used to receive the scene entry failure response returned by the second scene process;

[0038] Correspondingly, the packaging module is configured as follows:

[0039] In response to the scene entry failure response, the management process packages the role relationship data stored in its own memory for the target virtual character to obtain the target virtual character's packaged role relationship data.

[0040] In some embodiments, the scene entry request carries the role relationship package data of the target virtual character;

[0041] The data processing apparatus further includes:

[0042] The eighth receiving module is used to receive a successful entry response from the second scene process; the successful entry response is returned by the second scene process after executing the character entry processing logic for the target virtual character based on the basic character package data of the target virtual character and the character relationship package data of the target virtual character, and determining that the target virtual character has successfully entered the second virtual scene; the second scene process obtains the basic character package data of the target virtual character from the transmission context based on the identification information of the transmission context and the first process address;

[0043] The notification module is used to notify the first scene process to release the transmission context in response to the successful entry into the scene.

[0044] In some embodiments, the packaging module is configured as follows:

[0045] In response to the target virtual character's save time being reached, the management process packages the role relationship data stored for the target virtual character in its own memory to obtain the target virtual character's packaged role relationship data.

[0046] In some embodiments, the first transmitting module includes:

[0047] The acquisition unit is used to acquire process load information for each archived process;

[0048] The target archiving process determination unit is used to select an archiving process whose process load is lower than a load threshold from among a plurality of archiving processes as the target archiving process based on the process load information of each archiving process.

[0049] The request encapsulation unit is used to encapsulate the character relationship package data of the target virtual character and the process identifier of the target archive process to obtain a character archive request for the target virtual character.

[0050] The sending unit is used to send a character save request for the target virtual character to the first scene process.

[0051] Fifthly, an electronic device is provided, comprising: a processor; and a memory storing computer-readable instructions, wherein when the computer-readable instructions are executed by the processor, the data processing method described above is implemented.

[0052] In a sixth aspect, a computer-readable storage medium is provided, on which computer-readable instructions are stored, which, when executed by a processor, implement the data processing method described above.

[0053] In a seventh aspect, a computer program product is provided, including computer instructions that, when executed by a processor, implement the data processing method described above.

[0054] In this application's solution, the target archiving process is responsible for merging the target virtual character's role relationship data and basic role data, and then archiving them to the requesting database. This is done by the management process, significantly reducing the computational overhead of archiving virtual character data for the management process and the amount of data it needs to process. This reduces the likelihood of the management process becoming unusable due to excessive archiving pressure. Furthermore, the larger basic role data package does not need to pass through the management process; instead, the management process sends the smaller role relationship data to the first scene process. This effectively solves the problem of the management process becoming unusable due to excessive memory consumption caused by the large amount of basic role data package. Attached Figure Description

[0055] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.

[0056] Figure 1A The diagram above illustrates the architecture of a game server in related technologies.

[0057] Figure 1B An exemplary flowchart of archiving character data in related technologies is shown.

[0058] Figure 1C An exemplary flowchart of another method for archiving character data is shown.

[0059] Figure 1D An exemplary schematic diagram of the architecture of a game server applicable to the scheme of this application is shown.

[0060] Figure 1E This is a schematic diagram illustrating an application scenario of this application according to an embodiment of this application.

[0061] Figure 2 This is a flowchart illustrating a data processing method according to an embodiment of this application.

[0062] Figure 3 This is a flowchart illustrating a data processing method according to another embodiment of this application.

[0063] Figure 4 This is a flowchart illustrating a data processing method according to another embodiment of this application.

[0064] Figure 5 This is a flowchart illustrating a data processing method according to another embodiment of this application.

[0065] Figure 6 This is a flowchart illustrating the process of entering a second virtual scene for a target virtual character, according to an embodiment of this application.

[0066] Figure 7 This is a flowchart illustrating a data processing method according to another embodiment of this application.

[0067] Figure 8 This is a flowchart illustrating a data processing method according to another embodiment of this application.

[0068] Figure 9 This is a flowchart illustrating a data processing method according to another embodiment of this application.

[0069] Figure 10 This is a block diagram of a data processing apparatus according to an embodiment of the present application.

[0070] Figure 11 This is a block diagram of a data processing apparatus according to another embodiment of this application.

[0071] Figure 12 A schematic diagram of the structure of a computer system suitable for implementing the electronic device of the present application is shown. Detailed Implementation

[0072] The embodiments of this application are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application.

[0073] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of the present application, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present application without creative effort are within the scope of protection of the present application.

[0074] In the following description, the terms "first" and "second" are used merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first" and "second" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.

[0075] In this document, "multiple" refers to two or more. "And / or" describes the relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following associated objects are in an "or" relationship. In the following description, references to "some embodiments or some embodiment methods" describe a subset of all possible embodiments. However, it is understood that "some embodiments" can be the same subset or different subsets of all possible embodiments and can be combined with each other without conflict.

[0076] First, the terms used in this application will be explained:

[0077] MMORPG (Massive Multiplayer Online Role-Playing Game): A type of online game in which players take on the role of a fictional character and control many of that character's activities.

[0078] Map: refers to a virtual scene within the game where players can experience the game.

[0079] Context: refers to related states or data during transaction processing.

[0080] In games with a large number of virtual characters (such as massively multiplayer online role-playing games, MMORPGs), the data volume of multiple virtual characters is very large. Virtual character data includes equipment data, item data, skill data, quest data, fashion data, achievement data, event data, battlefield data, equipment enhancement data, skill data, companion data, etc. In the game, it is necessary to save the virtual character data to the database every once in a while.

[0081] In related technologies, the game server deploys management processes and scene processes. Figure 1A The diagram illustrates an architecture of a game server in related technologies. The game server includes a management process (also known as a world process) and a scene process (also known as a scene process). Figure 1A The example illustrates Scene Process I and Scene Process II. The management process is responsible for functions such as account login, virtual scene creation, map load balancing, and role data archiving, while the scene process is responsible for carrying the specific map (which can also be understood as a virtual scene).

[0082] For a virtual character, its total character data is divided into two parts. One part is basic character data maintained by the gameplay modules within the scene progression, such as the character's equipment, items, skills, and quests. The other part is character relationship data maintained by the gameplay modules within the management process, such as friend data and mentor-apprentice relationship data. In game applications, basic character data accounts for a much larger proportion of the total character data, exceeding 90%.

[0083] As described above, the management process is responsible for archiving the character data of virtual characters. Although the full character data in the process's memory is packaged and then transferred for archiving, the total size of the full character data for a single virtual character in the process's memory can typically reach 3MB, and even after packaging, it averages 200KB. Due to the large number of virtual characters, the overhead of the management process for archiving the full character data is very high, especially when there are a large number of virtual characters.

[0084] Figure 1B An exemplary flowchart illustrates a related technology in which a management process periodically archives all role data. Taking virtual role A as an example, assuming that the virtual scene where virtual role A resides is maintained by scene process I, the process of periodically archiving all role data of virtual role A includes:

[0085] ① The management process periodically (e.g., every 3 minutes) sends a character data archiving request to the scene process I where the virtual character A is located.

[0086] ②Scene process I packages the basic character data of virtual character A in the memory of scene process I to obtain the basic character package data of virtual character A.

[0087] ③Scene process I sends the basic role package data of virtual role A to the management process.

[0088] ④ After receiving the basic role package data of virtual role A, the management process merges the role relationship data of virtual role A stored in the management process's memory with the basic role data of virtual role A to obtain the full role data of virtual role A.

[0089] ⑤ The management process requests the database to archive all role data for virtual role A.

[0090] exist Figure 1B and Figure 1C In the diagram, white-filled tiles represent basic character packaged data, and dark gray-filled tiles represent character relationship packaged data; tiles composed of white-filled and dark gray-filled tiles represent the full character data.

[0091] Figure 1C An exemplary flowchart illustrates a process in related technologies where a management process archives all character data when a virtual character needs to be transferred. Similarly, taking virtual character A as an example, suppose virtual character A needs to be transferred from virtual scene B1 to virtual scene B2, where virtual scene B1 is maintained by scene process I, and virtual scene B2 is maintained by scene process II. Figure 1C As shown, the process of archiving all character data of virtual character A includes:

[0092] S1, when a virtual character needs to be transferred from virtual scene B1 to virtual scene B2, the management process sends a request to scene process I for the character to leave the scene.

[0093] S2, Scene Process I removes virtual character A from virtual scene B1 and packages the basic character data of virtual character A stored in Scene Process I to obtain the basic character package data of virtual character A.

[0094] S3, Scene process I sends a leave scene response to the management process, which carries the basic role package data of virtual role A.

[0095] S4, the management process merges the role relationship data of virtual role A stored in its own memory with the basic role data of virtual role A to obtain the full role data of virtual role A;

[0096] S5, the management process requests the database to archive all role data of virtual role A.

[0097] S6, the management process sends a scene entry request to scene process II based on the full role data of virtual role A; correspondingly, scene process II executes the processing logic for virtual role to enter virtual scene.

[0098] S7, in scene process II, after confirming that virtual character A has been added to virtual scene B2, return a scene entry success response to the management process.

[0099] From the above Figure 1B and Figure 1C As can be seen, the scene process needs to package the basic character data and send it to the management process. The management process then merges the two parts of the character data before initiating an save request. Saving the full set of virtual character data requires the management process to merge the two parts of the virtual character data and then request the database to write it. When there are many virtual characters, the amount of character data that the management process needs to handle for saving is large. The computational overhead of the management process is high when saving character data, and the save processing logic of the management process can easily become a performance bottleneck. Furthermore, the management process is also responsible for account login and virtual scene management functions. Therefore, if the management process is overloaded due to save processing, it will not only cause save failures but also cause some players to fail to log in and be unable to switch virtual scenes. Based on this, the solution proposed in this application is presented.

[0100] This application proposes a scheme to split the character archiving service. That is, the character data archiving function, which is the responsibility of the management process, is separated from the management process, and an additional target archiving process is deployed. The target archiving process is responsible for the archiving logic of the character data of each virtual character, while the management process is no longer responsible for the archiving logic of the character data of virtual characters. In this way, the amount of data that the management process needs to process during the character data archiving process can be greatly reduced, the computational overhead of the management process can be reduced, and the probability of archiving failure can be reduced.

[0101] Figure 1D An exemplary schematic diagram of the game server architecture applicable to the solution of this application is shown, such as... Figure 1D As shown, in addition to running management and scene processes, the game server also runs an save process. This save process can interact with the scene process and the database to save the character data of the virtual characters. It's worth noting that there is no limit to the number of save processes deployed on the game server. Figure 1D Only one example is shown in the text.

[0102] Figure 1EFigure 1 is a schematic diagram illustrating an application scenario of this application according to an embodiment. As shown in Figure 1, the application scenario includes a server 110 and a database 120 for storing role data. The server 110 can run a management process, a scene process, and an archive process. The first scene process running in the server 110 receives a role archive request initiated by the management process for a target virtual role. The first scene process refers to the scene process that carries the first virtual scene where the target virtual role is located. The role archive request includes the role relationship packaged data of the target virtual role obtained by packaging on the management process. Then, the first scene process in the server 110 adds the basic role packaged data of the target virtual role to the role archive request. The basic role packaged data of the target virtual role is obtained by packaging the basic role data stored for the target virtual role in the first scene process. Subsequently, the first scene process in the server 110 can forward the role archive request to the target archive process, so that the target archive process responds to the role archive request by merging the role relationship packaged data and the basic role packaged data carried in the role archive request, and storing the merged full role data of the target virtual role in the database.

[0103] Server 110 provides services to game application clients. For example, server 110 can handle game gameplay logic, game login, game team formation, and during a game session, it is responsible for switching virtual scenes (i.e., transferring from one virtual scene to another) between virtual characters controlled by each client. Server 110 can be a single physical server, a server cluster consisting of multiple physical servers, or a distributed system.

[0104] In this application, the scene process, management process, and archiving process may run on different servers, or they may run on the same server, or two of the processes may run on the same server; no specific limitation is made here.

[0105] The implementation details of the technical solutions in the embodiments of this application are described in detail below:

[0106] Figure 2 This is a flowchart illustrating a data processing method according to an embodiment of this application. The method can be implemented interactively by an electronic device hosting a management process, an electronic device hosting a first scene process, and an electronic device hosting a target archive process. The management process, the first scene process, and the target archive process can be at least two processes running on different electronic devices, or all three processes can be running on the same electronic device, or all three processes can be running on different electronic devices. The electronic device can be a server, such as a game server for a game application. (See also...) Figure 2 As shown, the method includes at least steps 210 to 240, which are described in detail below:

[0107] Step 210: The first scene process receives a character archive request initiated by the management process for the target virtual character; the first scene process refers to the scene process that carries the first virtual scene where the target virtual character is located; the character archive request includes the character relationship packaged data of the target virtual character obtained by packaging on the management process.

[0108] As described above, the management process is responsible for functions such as virtual scene management (e.g., virtual scene creation and switching), map load balancing, player login verification, management of player account information, and execution of gameplay rules (e.g., task completion conditions, skill effects, etc.). The management process maintains / stores character relationship data for each virtual character, including gameplay-related data such as the character's friends and mentor / apprentice relationships.

[0109] A scene process is responsible for the physical environment of a specific virtual scene, as well as the interaction logic between the virtual character and the player. Different scene processes are responsible for different virtual scenes, and the virtual scenes they carry can be independent of each other. In some embodiments, one scene process can carry one virtual scene (also called a map), or one scene process can carry multiple virtual scenes, depending on the granularity of virtual scene division in the game application.

[0110] In summary, the management process is the global hub of the game application server, focusing on global affairs such as account management (player management) and virtual scene switching; the scene process is the scene execution unit, responsible for interacting with the virtual scene (map), responding to player-triggered operations, and dynamically loading virtual characters.

[0111] The target virtual character refers to a virtual character whose character data needs to be archived. Any character participating in the game can be the target virtual character in this application. Among them, the virtual character can be a player character (i.e., a virtual character controlled by a player).

[0112] The first virtual scene refers to the virtual scene where the target virtual character is located. Correspondingly, the first scene process refers to the scene process that carries the first virtual scene. In other words, the scene data of the first virtual scene is carried and maintained by the first scene process. For example, the first virtual scene is updated in accordance with the actions of the virtual character located in the first virtual scene.

[0113] As described above, the management process maintains the role relationship data of virtual characters. Therefore, when it is necessary to archive a target virtual character, the management process can read the target virtual character's role relationship data from its own memory and package it to obtain the target virtual character's packaged role relationship data. The packaging process involves converting the data into a format suitable for transmission; for example, it could involve compressing the data or converting it to a serialization format.

[0114] When the management process determines that a target virtual character needs to be archived, it packages the target virtual character's role relationship data to obtain the target virtual character's packaged role relationship data. Then, it requests the target virtual character's packaged role relationship data and encapsulates the target virtual character's role identifier to obtain a role archive request for the target virtual character. This role archive request includes the target virtual character's packaged role relationship data and the target virtual character's role identifier. After that, it sends the corresponding role archive request for the target virtual character to the first scene process.

[0115] In some embodiments, the management process may store a list of virtual characters corresponding to each virtual scene in multiple virtual scenes it manages. Each list of virtual characters for a virtual scene includes a character identifier indicating the virtual character currently located in that virtual scene. The management process also maintains a correspondence between virtual scenes and scene processes, which indicates the scene identifier of the virtual scene each scene process is responsible for hosting. Therefore, the management process can determine the first scene process responsible for the first virtual scene where the target virtual character resides, based on the list of virtual characters corresponding to each virtual scene in the multiple virtual scenes it manages and the correspondence between virtual scenes and scene processes.

[0116] Step 220: The first scene process adds the basic character package data of the target virtual character to the character archive request; the basic character package data of the target virtual character is obtained by packaging the basic character data stored for the target virtual character in the first scene process.

[0117] For the scene process that carries the virtual scene, the scene process also maintains the basic character data of each virtual character in the virtual scene maintained by the scene process. As described above, the basic character data of a virtual character may include the virtual character's equipment data, prop data, skill data, task data, etc.

[0118] In the context of a scene, the basic character data of a virtual character refers to the character data related to the virtual character maintained by the gameplay processing logic in the scene process. In other words, it is the character data related to the virtual character that the gameplay processing logic in the scene process needs to use. Since the gameplay processing logic in different game applications is different, the basic character data of the virtual character stored in the scene process of different game applications may be different.

[0119] Step 230: The first scene process forwards the character save request to the target save process.

[0120] It is understandable that this character save request includes the target virtual character's character relationship package data and the target virtual character's base character package data. The target save process refers to the process responsible for saving the character data.

[0121] In some embodiments, if there are multiple available archiving processes, the first scene process may randomly select an available archiving process as the target archiving process and forward the character archiving request for the target virtual character to the target archiving process.

[0122] In other embodiments, a correspondence between scene processes and save processes can be pre-defined. The save process corresponding to a scene process is responsible for saving character data for the virtual characters in the virtual scene carried by that scene process. Based on this, the save process corresponding to the first scene process can be used as the target save process. This is equivalent to pre-allocating save processes to each scene process, reducing the probability of any single save process experiencing excessive load.

[0123] In some embodiments, the management process can also allocate a target archiving process. In this case, the role archiving request initiated by the management process for the target virtual character may also include the process identifier of the allocated target archiving process. The process identifier may be a process address. In this way, the first scene process can send a role archiving request for the target virtual character to the target archiving process indicated by the process identifier in the role archiving request.

[0124] Step 240: In response to the character save request, the target save process merges the character relationship package data and the basic character package data carried in the character save request, and stores the merged full data of the target virtual character in the database.

[0125] By merging the character relationship packaged data and the basic character packaged data carried in the character archive request, the full character data of the target virtual character can be obtained. Then, a character archive request can be sent to the database according to the full character data of the target virtual character, so that the database responds to the character archive request and writes the full character data of the target virtual character into the database, thereby realizing the data archiving of the target virtual character.

[0126] In this application's solution, the target archiving process is responsible for merging the target virtual character's role relationship data and basic role data, and then archiving them to the requesting database. This is done by the management process, significantly reducing the computational overhead of archiving virtual character data for the management process and the amount of data it needs to process. This reduces the likelihood of other functions of the management process becoming unavailable due to excessive archiving pressure. Furthermore, the larger basic role data package does not need to pass through the management process; instead, the management process sends the smaller role relationship data to the first scene process. This effectively solves the problem of the management process becoming unavailable due to excessive memory consumption caused by the large basic role data package. Additionally, in this application, the management process still initiates the role archiving request initiated by the target virtual character, ensuring that the management process manages the archiving status of the target virtual character's role data.

[0127] Figure 3 This is a flowchart illustrating a data processing method according to another embodiment of this application, such as... Figure 3 As shown, prior to step 210, the method further includes the following steps 310-320:

[0128] Step 310: The management process packages the role relationship data stored in its own memory for the target virtual character to obtain the packaged role relationship data of the target virtual character.

[0129] In some embodiments, the management process can set the save time for each virtual character in the virtual scene it manages. Then, in response to reaching the save time of the target virtual character, the management process packages the character relationship data stored in its memory for the target virtual character to obtain the character relationship data of the target virtual character. The save time set for each virtual character can be set according to actual needs. For example, multiple save times set for a virtual character can be at equal intervals, thus achieving the goal of saving the character data of the virtual character at regular intervals. In some embodiments, the last save time and the save interval of each virtual character can also be maintained. Thus, if the time interval between the current time and the last save time of the target virtual character reaches the save interval of the target virtual character, it can be determined that the save time of the target virtual character has been reached.

[0130] In some embodiments, the management process may also package the role relationship data stored in its own memory for the target virtual character after determining that the target virtual character fails to enter the second virtual scene from the first virtual scene, to obtain the target virtual character's packaged role relationship data.

[0131] Step 320: The management process packages data according to the role relationships of the target virtual character and sends a role archive request for the target virtual character to the first scene process.

[0132] In some embodiments, considering that the management process may request character archiving after the target virtual character's archiving time has been reached, or after the target virtual character fails to enter another different virtual scene from the first virtual scene, different identifiers can be added to the character archiving request to indicate the different reasons for the character archiving request for the target virtual character. For example, if the character archiving request is initiated because the target virtual character's archiving time has been reached, a first identifier is added to the character archiving request; if the character archiving request is initiated because the target virtual character fails to enter another different virtual scene from the first virtual scene, a second identifier is added to the character archiving request. The first identifier and the second identifier are different, for example, the first identifier is 1 and the second identifier is 0, which is not specifically limited here.

[0133] In some embodiments, the management process can also be responsible for managing the archiving processes. The management process can maintain the process load information of each archiving process in real time. The process load information of an archiving process is used to indicate the amount of resources consumed by that archiving process. In this case, such as... Figure 4 As shown, step 320 may include:

[0134] Step 410: The management process obtains the process load information of each archived process.

[0135] In some embodiments, the management process can receive the process load information reported by each archive process through a heartbeat connection with each archive process, and the management process can store the process load information of each archive process accordingly.

[0136] Step 420: The management process selects an archive process whose process load is lower than the load threshold from among the multiple archive processes based on the process load information of each of the archive processes as the target archive process.

[0137] In some embodiments, the load threshold can be set according to actual needs, and different virtual characters can share the same load threshold. In some embodiments, the load threshold can be determined based on the minimum amount of resources (e.g., minimum amount of memory) required to archive the character data of a virtual character. This ensures that when the process load of an archiving process is lower than the load threshold, the amount of available resources on that archiving process exceeds the minimum amount of resources, thereby ensuring that the target archiving resource has sufficient resources to archive the character data of the target virtual character and reducing the probability of archiving failure.

[0138] In other embodiments, considering that the data volume of full character data for different virtual characters may vary significantly—for example, virtual characters with rich skills, attributes, and equipment typically have larger full character data volumes, while those with simpler skills and attributes have smaller full character data volumes—a load threshold can be set for each type of virtual character. If the process load of an archiving process is lower than the load threshold corresponding to the character type of a virtual character, it indicates that the remaining available resources of that archiving process exceed the minimum resource requirement for archiving the full character data of that virtual character. Correspondingly, in this case, the management process can obtain the load threshold corresponding to the target character type (assuming it's the target character type) and, based on the process load information of the archiving processes, select an archiving process whose process load is lower than the load threshold corresponding to the target character type from among multiple archiving processes as the target archiving process.

[0139] It is worth mentioning that the character types mentioned above are categorized according to the minimum amount of resources required to archive the full character data of different virtual characters.

[0140] In some embodiments, if there are multiple archive processes with process load below the load threshold, one archive process can be randomly selected as the target archive process from among these multiple archive processes with process load below the load threshold; in other embodiments, the archive process with the lowest process load can be selected from among these multiple archive processes with process load below the load threshold as the target archive process.

[0141] In other embodiments, the management process selects an archiving process with available resources exceeding a resource threshold from among the multiple archiving processes based on the process load information of each archiving process. This resource threshold may be no less than the minimum resource amount required to archive the character data of the virtual character.

[0142] Step 430: The management process encapsulates the role relationship package data of the target virtual character and the process identifier of the target archiving process into a request to obtain a role archiving request for the target virtual character.

[0143] In other words, the character archive request for the target virtual character includes the character relationship package data of the target virtual character and the process identifier of the target archive process. Thus, after the first scene process receives the character archive request for the target virtual character, it can determine the archive process to which the character archive request should be forwarded. That is, the character archive request is forwarded to the target archive process so that the target archive process can be responsible for processing the archiving of the character data for the target virtual character.

[0144] In some embodiments, the process identifier of the target archiving process may be the process address of the target archiving process. In other embodiments, the process identifier may also be other information that can uniquely identify the target archiving process, and no specific limitation is made here.

[0145] Step 440: The management process sends a character save request for the target virtual character to the first scene process.

[0146] In the above embodiments, the management process selects an archiving process with a process load below the load threshold as the target archiving process based on the process load information of each archiving process. The process identifier of the target archiving process is encapsulated in the character archiving request so that the target archiving process can respond to the character archiving request for the target virtual character. Since the process load of the target archiving process is below the load threshold, the situation where archiving fails due to excessive load of the target archiving process can be reduced.

[0147] Please continue reading. Figure 3After step 240, the method further includes: step 330, receiving a character saving success response returned by the target saving process; wherein, the character saving success response is sent by the target saving process after merging the character relationship packaged data and the basic character packaged data carried in the character saving request, and storing the merged full data of the target virtual character in the database.

[0148] In other words, after the target archiving process requests the database to archive all the character data of the target virtual character, if the target archiving process receives an archiving success message returned by the database, the target archiving process returns a character archiving success response to the management process. This character archiving success response is used to indicate that the character data of the target virtual character has been successfully archived.

[0149] In some embodiments, if the character relationship packaged data and the basic character packaged data are compressed, the target archiving process can decompress the character relationship packaged data to obtain the corresponding character relationship data, and decompress the basic character packaged data to obtain the corresponding basic character data; then, the character relationship data and basic character data of the target virtual character are merged to obtain the full character data of the target virtual character. The decompression process is the reverse of the packaging process described above.

[0150] In this application, the management process initiates the character save request initiated by the target virtual character. This ensures that the management process can manage the save status of the target virtual character's character data, and facilitates the management process to manage the save progress and status of each virtual character in a timely manner.

[0151] Figure 5 This is a flowchart illustrating a data processing method according to another embodiment of this application, such as... Figure 5 As shown, it includes:

[0152] Step 501: The management process obtains the teleportation instruction of the target virtual character, which instructs the target virtual character to be teleported from the first virtual scene to the second virtual scene.

[0153] In some embodiments, the teleportation command for the target virtual character may be generated by the client of the player controlling the target virtual character. For example, in response to detecting a teleportation operation that teleports the target virtual scene from a first virtual scene to a second virtual scene, the client of the player controlling the target virtual character sends a teleportation command for the target virtual character to the management process.

[0154] In some embodiments, the client of the player controlling the target virtual character may send a teleportation command for the target virtual character to the management process in response to the target virtual character's state in the first virtual scene meeting the teleportation conditions for teleportation to the second virtual scene.

[0155] In other words, the teleportation command requesting the target virtual character to be teleported from the first virtual scene to the second virtual scene can be generated in response to a player-triggered operation, or it can be automatically generated by the gameplay logic within the game application when the corresponding teleportation conditions are met. The first virtual scene and the second virtual scene are different virtual scenes. Furthermore, the first virtual scene and the second virtual scene can be independent of each other, meaning that they do not share a common virtual scene area.

[0156] Step 502: In response to the transmission command, the management process sends a scene departure request for the target virtual character to the first scene process. The scene departure request includes the character identifier of the target virtual character.

[0157] Step 503: In response to the scene leave request, the first scene process removes the target virtual character from the first virtual scene and creates a transmission context based on the basic character packaging data of the target virtual character; the transmission context stores the basic character packaging data of the target virtual character.

[0158] After receiving a scene departure request, the first scene process reads the basic character data of the target virtual character from the memory of the first scene process, packages the read basic character data of the target virtual character to obtain the basic character package data of the target virtual character, and creates a transmission context based on the basic character package data of the target virtual character. The transmission context stores the basic character package data of the target virtual character.

[0159] Furthermore, in response to the scene leave request, the first scene process deletes the basic character data of the target virtual character from its memory, thereby removing the target virtual character from the first virtual scene. It is understood that after the target virtual character is removed from the first virtual scene, the corresponding target virtual character will not be displayed in the game interface of the player's client in the first virtual scene.

[0160] Step 504: The first scene process returns a scene departure response to the management process based on the identification information of the transmission context and the first process address of the first scene process.

[0161] The first process address refers to the process address of the first scene process. The identification information of the transmission context is used to uniquely identify the transmission context. In some embodiments, the identification information of the transmission context may be the role identifier of the target virtual character, but it is not limited to this.

[0162] The scene leave response is used to indicate that the target virtual character has left the first virtual scene, that is, the target virtual character has been removed from the first virtual scene.

[0163] Step 505: In response to the scene departure response, the management process sends a scene entry request for the target virtual character to the second scene process based on the identification information and the first process address; the second scene process refers to the scene process that hosts the second game scene.

[0164] The scene entry request for the target virtual character is used to request that the target virtual character be added to the second virtual scene. The scene entry request includes the identification information of the transmission context and the first process address.

[0165] In some embodiments, the management process may also, in response to a scene departure response, read the role relationship data of the target virtual character from the memory of the management process, package the role relationship data of the target virtual character to obtain the role relationship packaged data of the target virtual character, and then encapsulate the transmission context identification information, the first process address and the role relationship packaged data of the target virtual character into a request to obtain a scene entry request for the target virtual character.

[0166] Step 506: In response to the scene entry request, the second scene process performs the process of entering the second virtual scene for the target virtual character.

[0167] The process of entering the second virtual scene for the target virtual character involves loading the target virtual character's character data into the second scene process and rendering the target virtual character in the second virtual scene. Since the scene entry request for the target virtual character includes the identification information of the transmission context and the address of the first process, the second scene process can request the basic character package data of the target virtual character from the first scene process based on the first process address.

[0168] Figure 6 This is a flowchart illustrating the process of entering a second virtual scene for a target virtual character according to an embodiment of this application, such as... Figure 6 As shown, it includes:

[0169] Step 610: The second scene process initiates a data request to the first scene process based on the identifier information of the transmission context and the address of the first process. The address of the first process serves as the destination address of the data request.

[0170] Step 620: The first scene process receives a data request initiated by the second scene process.

[0171] Step 630: In response to the data request, the first scene process obtains the basic character package data of the target virtual character from the transmission context;

[0172] Step 640: The first scene process sends the basic character package data of the target virtual character to the second scene process.

[0173] Since the data request includes identification information of the transmission context, the first scenario process can locate the transmission context based on the identification information of the transmission context after receiving the data request.

[0174] Step 650: The second scene process executes the character entry processing logic for the target virtual character based on the basic character packaging data of the target virtual character and the character relationship packaging data of the target virtual character carried in the scene entry request.

[0175] The second scene process can decompress the basic character package data of the target virtual character to obtain the basic character data of the target virtual character, and decompress the character relationship data of the target virtual character to obtain the character relationship data of the target virtual character. Finally, the basic character data and the character relationship data of the target virtual character are merged to obtain the full character data of the target virtual character.

[0176] Afterwards, the second scene process can load the full character data of the target virtual character into the second scene process and render the target virtual character in the second virtual scene. In addition, the second scene process can also configure environmental parameters related to the target virtual character in the second virtual scene, such as the position of the target virtual character in the second virtual scene.

[0177] Step 507: The second scenario process returns a scenario entry failure response to the management process.

[0178] Considering that during the execution of the character entry processing logic for the target virtual character in the second scene process, the second scene process may not be able to load the full character data of the target virtual character into the second scene process due to insufficient available resources, such as insufficient available memory, or the time for rendering the target virtual character in the second virtual scene may time out. In this case, it indicates that the target virtual character has failed to enter the second virtual scene, and the second scene process shall send an entry failure response to the management process. The entry failure response is used to indicate that the target virtual character has failed to enter the second virtual scene.

[0179] Step 508: In response to the scene entry failure response, the management process packages the role relationship data stored in its own memory for the target virtual character to obtain the target virtual character's packaged role relationship data.

[0180] Step 320: The management process packages data according to the role relationships of the target virtual character and sends a role archive request to the first scene process.

[0181] Step 220: The first scene process adds the basic character package data of the target virtual character to the character archive request.

[0182] As described above, since the target virtual character has been removed from the first virtual scene in step 503, the basic character data of the target virtual character has been deleted from the memory of the first scene process. Therefore, in this case, it is necessary to obtain the basic character package data of the target virtual character from the transport context created by the first scene process and add the basic character package data of the target virtual character to the character archive request.

[0183] In some embodiments, the character save request may carry a second marker, which is used to indicate that the character save request was initiated when entering a new virtual scene failed. Correspondingly, after receiving the character save request, if the first scene process determines that the character save request carries the second marker, it will locate the basic character package data of the target virtual character from the created transport context, based on the character identifier of the target virtual character (which may be obtained from the character save request), and obtain the basic character package data of the target virtual character from the transport context created for the transport of the target virtual character.

[0184] Step 220: The first scene process adds the basic character package data of the target virtual character to the character archive request.

[0185] Step 230: The first scene process forwards the character save request to the target save process.

[0186] Step 240: In response to the character save request, the target save process merges the character relationship package data and the basic character package data carried in the character save request, and stores the merged full data of the target virtual character in the database.

[0187] Step 330: Receive a successful character save response from the target save process; wherein, the successful character save response is sent by the target save process after merging the character relationship packaged data and the basic character packaged data carried in the character save request, and storing the merged full data of the target virtual character in the database.

[0188] The above embodiment enables the archiving of all character data when a virtual character is transferred from one virtual scene to another, or when the virtual character fails to enter a new virtual scene. This is achieved through the cooperation of the first scene process, the management process, and the archiving process. During this process, the management process does not need to perform data merging and archiving logic. Instead, the management process sends its smaller character relationship data to the first scene process. Then, the first scene process sends its larger basic character data, along with the character relationship data from the management process, to the target archiving process. The target archiving process is responsible for archiving all character data into the database. This significantly reduces the computational overhead of the management process during the archiving process. Furthermore, since the character archiving request is initiated by the management process, it ensures the management process's control over the archiving status, facilitating timely responses from the management process.

[0189] Figure 7 This is a flowchart illustrating, according to an embodiment of this application, the archiving of character data for a target virtual character when it is necessary to transmit the target virtual character. Figure 7 In this scenario, it's necessary to transfer virtual character A from virtual scene B1 to virtual scene B2. Virtual scene B1 is handled by scene process I, while virtual scene B2 is handled by scene process II. Figure 7 As shown, it includes:

[0190] Step 701: The management process sends a scene departure request to scene process I. This scene departure request indicates that virtual character A needs to leave virtual scene B1.

[0191] Step 702: Scene process I removes virtual character A from virtual scene B1 and packages the basic character package data of virtual character A.

[0192] Step 703: Scene process I creates a transport context, which stores the basic character package data of virtual character A.

[0193] Step 704: Scene process I sends a scene departure response to the management process. This scene departure response includes a context identifier of the transmission context, which can be used to locate the transmission context data.

[0194] Step 705: After receiving the scene departure response, the management process initiates a scene entry request to scene process II based on the context identifier and the process address of scene process I.

[0195] Step 706, Scene Process II handles the character entry process. The character entry process can be found above. Figure 6 Description of the corresponding embodiments.

[0196] Step 707: Scene Process II sends an entry failure response to the management process. If, at this time, the character fails to enter the virtual scene B2 due to insufficient resources or other reasons, Scene Process II will send an entry failure response to the management process.

[0197] Step 708: The management process packages the role relationship data of virtual character A and sends a role archive request to scene process I. The role archive request includes the packaged role relationship data of virtual character A.

[0198] Because virtual character A failed to enter virtual scene B2 in scene process II at this time, there is no character data. Only the basic character package data of virtual character A is still stored in scene process I.

[0199] Step 709: Scene process I obtains the basic character package data of virtual character A from the transmission context, adds the basic character package data of virtual character A to the character save request, and then forwards the character save request to the save process.

[0200] Step 710: After receiving the character save request, the save process merges the data to obtain the full character data of virtual character A, and requests the database to write the full character data of virtual character A.

[0201] Step 711: After the database is successfully archived, the archiving process returns a role archiving success response to the management process.

[0202] Figure 7 For implementation details of each step in the corresponding embodiment, please refer to the above text. Figure 5 The descriptions of the corresponding steps in the corresponding embodiments will not be repeated here. Based on Figure 7 The process shown demonstrates how, in the event that a virtual character fails to enter a new virtual scene, the entire character data of the virtual character is archived into the database using the management process, the original scene process, and the archiving process.

[0203] In some embodiments, when a virtual character needs to be transferred and entry into a new virtual scene fails, after the full character data of the virtual character is archived into the database, the management process can notify the second scene process, which can then read the latest full character data of the virtual character (e.g., the target virtual character) from the database. Based on the read full character data of the target virtual character, the target virtual character can be reloaded into the second virtual scene to ensure that the target virtual character can successfully enter the second virtual scene.

[0204] In some embodiments, after the target virtual character fails to be transferred to a new virtual scene and all the character data of the target virtual character is archived to the database, the management process can notify the first scene process to release the transfer context created for the target virtual character, that is, delete the transfer context.

[0205] Figure 8 This is a flowchart illustrating a data processing method according to another embodiment, such as... Figure 8 As shown, after step 506, if the second scene process determines that the target virtual character has successfully entered the second virtual scene, the method further includes the following steps 810-820:

[0206] Step 810: The management process receives a successful entry response from the second scene process. The successful entry response is returned by the second scene process after executing the character entry processing logic for the target virtual character based on the basic character package data and the character relationship package data of the target virtual character, and confirming that the target virtual character has successfully entered the second virtual scene. The second scene process obtains the basic character package data of the target virtual character from the transmission context based on the identification information of the transmission context and the first process address.

[0207] Step 820: In response to the successful entry into the scene, the management process notifies the first scene process to release the transmission context.

[0208] In other words, if the target virtual character needs to be teleported to a new virtual scene (e.g., a second virtual scene), and the target virtual character is successfully teleported to the second virtual scene, there is no need to additionally archive the full character data of the target virtual character. Timely character archiving can be triggered later, preventing the loss of virtual character data. This avoids archiving every time a virtual character needs to be teleported; archiving only occurs when teleportation fails, reducing the computational overhead of overall server-side archiving.

[0209] In some embodiments, after the management process receives a successful entry response from the second scene process, if the management process maintains a list of roles corresponding to each virtual scene, the management process further adds the target virtual role to the role list corresponding to the second virtual scene. In some embodiments, the management process can remove the target virtual role from the role list corresponding to the first virtual scene upon receiving a scene exit response from the first scene process for the target virtual role.

[0210] Figure 9 This is a flowchart illustrating a data processing method according to another embodiment of this application, such as... Figure 9 As shown, it includes:

[0211] Step 901: In response to the target virtual character's save time being reached, the management process packages and obtains the target virtual character's character relationship data. The management process reads the target virtual character's character relationship data from its own memory and packages it to obtain the target virtual character's character relationship data.

[0212] Step 902: The management process sends a character archiving request to the first scene process based on the character relationship package data of the target virtual character. The character archiving request includes the character relationship package data of the target virtual character and the character identifier of the target virtual character.

[0213] Step 903: The first scene process packages and obtains the basic character packaging data of the target virtual character. The character save request is initiated by the management process after determining that the save time for the target virtual character has been reached;

[0214] In this scenario, upon receiving a character save request for the target virtual character, the first scene process reads the basic character data stored for the target virtual character from its own memory; packages the basic character data to obtain the target virtual character's packaged basic character data; and adds this packaged basic character data to the character save request. In other words, in this case, the first scene process, in response to the character save request for the target virtual character, reads the basic character data stored for the target virtual character from its own memory.

[0215] In some embodiments, after receiving a character save request for a target virtual character, if the first scene process determines that the character save request carries a first flag (i.e., indicating that the character save request was initiated when the save time has been reached), the first scene process reads the basic character data stored for the target virtual character from the memory of the first scene process. If it determines that the character save request carries a second flag (i.e., indicating that the character save request was initiated because the virtual character failed to enter a new virtual scene), the first scene process obtains the basic character package data of the target virtual character from the transmission context for transmitting the target virtual character.

[0216] Step 904: The first scene process adds the basic character package data of the target virtual character to the character archive request and forwards the character archive request to the target archive process.

[0217] Step 905: After receiving the character save request, the target save process merges the data to obtain the full character data of the target virtual character. The specific implementation process of step 905 is similar to that described above and will not be repeated here.

[0218] Step 906: The target archiving process requests the database to archive all character data of the target virtual character.

[0219] Step 907: If the database returns a success message for saving the game, the target saving process returns a success response for saving the role to the management process.

[0220] Through the above embodiments, when the corresponding archiving time is reached, the full character data of the target virtual character is archived to the database using the management process, the first scene process, and the archiving process. In this embodiment, the management process is responsible for initiating the character archiving request and sending the character data on the management process to the first scene process. Then, the first scene process sends the full character data to the target archiving process, which is responsible for archiving. This significantly reduces the computational overhead of the management process in archiving the character data and greatly reduces the impact of excessive archiving computational overhead on other functions handled by the management process.

[0221] The following describes an apparatus embodiment of this application, which can be used to perform the methods described in the above embodiments of this application. For details not disclosed in the apparatus embodiments of this application, please refer to the method embodiments described in the above embodiments of this application.

[0222] Figure 10 This is a block diagram of a data processing apparatus according to an embodiment of this application, applied to a first scene process, such as... Figure 10 As shown, the data processing apparatus includes:

[0223] The first receiving module 1010 is used to receive a character archiving request initiated by the management process for a target virtual character; the first scene process refers to the scene process that carries the first virtual scene where the target virtual character is located; the character archiving request includes the character relationship packaged data of the target virtual character obtained by packaging on the management process;

[0224] The module 1020 is used to add the basic character package data of the target virtual character to the character archive request; the basic character package data of the target virtual character is obtained by packaging the basic character data stored for the target virtual character in the first scene process;

[0225] Forwarding module 1030 is used to forward the character save request to the target save process, so that the target save process responds to the character save request by merging the character relationship packaged data and the basic character packaged data carried in the character save request, and storing the merged full character data of the target virtual character in the database.

[0226] In some embodiments, the data processing apparatus further includes:

[0227] The fourth receiving module is used to receive a scene departure request initiated by the management process for the target virtual character;

[0228] The processing module is configured to, in response to the scene departure request, remove the target virtual character from the first virtual scene, and create a transmission context based on the basic character packaging data of the target virtual character; the transmission context stores the basic character packaging data of the target virtual character.

[0229] The second sending module is configured to return a scene departure response to the management process based on the identification information of the transmission context and the first process address of the first scene process, so that the management process sends a scene entry request to the second scene process based on the identification information and the first process address carried in the scene departure response, and after receiving a scene entry failure response returned by the second scene process, sends a character save request for the target virtual character to the first scene process; wherein, the scene entry failure response is used to indicate that the target game character failed to enter the second virtual scene, and the second scene process refers to the scene process responsible for the second virtual scene.

[0230] In some embodiments, the added module 1020 includes components configured as follows:

[0231] Obtain the basic character package data of the target virtual character from the transmission context, and add the basic character package data of the target virtual character to the character archive request.

[0232] In some embodiments, the scene entry request sent by the management process to the second scene process carries the role relationship packaged data of the target virtual character; the data processing device further includes:

[0233] The fifth receiving module is used to receive a data request initiated by the second scene process based on the identification information of the transmission context and the address of the first process;

[0234] The third sending module is used to respond to the data request, obtain the basic character package data of the target virtual character from the transmission context, and send the basic character package data of the target virtual character to the second scene process, so that the second scene process executes the character entry processing logic for the target virtual character based on the basic character package data of the target virtual character and the character relationship package data of the target virtual character carried in the scene entry request.

[0235] In some embodiments, the character save request is initiated by the management process after determining that the save time for the target virtual character has been reached; the data processing device further includes:

[0236] The reading module is used to read the basic character data stored for the target virtual character from the memory of the first scene process;

[0237] The basic character data packaging module is used to package the basic character data to obtain the basic character packaged data of the target virtual character.

[0238] Figure 11 This is a block diagram of a data processing apparatus according to another embodiment of the present application. The data processing apparatus can be applied to management processes, such as... Figure 11 As shown, the data processing apparatus includes:

[0239] Packaging module 1110 is used to package the role relationship data stored in the memory of the management process for the target virtual role to obtain the role relationship packaged data of the target virtual role;

[0240] The first sending module 1120 is used to send a character archive request for the target virtual character to the first scene process according to the character relationship package data of the target virtual character, so that the first scene process adds the basic character package data of the target virtual character to the character archive request and then forwards the character archive request to the target archive process; the first scene process refers to the scene process that carries the first virtual scene where the target virtual character is located.

[0241] The second receiving module 1130 is used to receive a character saving success response returned by the target saving process; wherein, the character saving success response is sent by the target saving process after merging the character relationship packaged data and the basic character packaged data carried in the character saving request, and storing the merged full data of the target virtual character in the database.

[0242] In some embodiments, the data processing apparatus further includes:

[0243] The acquisition module is used for the management process to acquire the transmission instruction of the target virtual character, wherein the transmission instruction indicates that the target virtual character is transmitted from the first virtual scene to the second virtual scene;

[0244] The fourth sending module is used to send a scene departure request for the target virtual character to the first scene process in response to the transmission instruction.

[0245] The sixth receiving module is used to receive the scene departure response returned by the first scene process; the scene departure response is generated by the first scene process in response to the scene departure request, removing the target virtual character from the first game scene, and creating a transmission context based on the basic character data of the target virtual character, and then generating the response based on the identifier information of the transmission context and the first process address of the first scene process.

[0246] The fifth sending module is used to, in response to the scene departure response, send a scene entry request for the target virtual character to the second scene process according to the identification information and the first process address; the second scene process refers to the scene process that carries the second game scene;

[0247] The seventh receiving module is used to receive the scene entry failure response returned by the second scene process;

[0248] Correspondingly, the packaging module 1110 is configured as follows:

[0249] In response to the scene entry failure response, the management process packages the role relationship data stored in its own memory for the target virtual character to obtain the target virtual character's packaged role relationship data.

[0250] In some embodiments, the scene entry request carries the role relationship package data of the target virtual character;

[0251] The data processing apparatus further includes:

[0252] The eighth receiving module is used to receive a successful entry response from the second scene process; the successful entry response is returned by the second scene process after executing the character entry processing logic for the target virtual character based on the basic character package data of the target virtual character and the character relationship package data of the target virtual character, and determining that the target virtual character has successfully entered the second virtual scene; the second scene process obtains the basic character package data of the target virtual character from the transmission context based on the identification information of the transmission context and the first process address;

[0253] The notification module is used to notify the first scene process to release the transmission context in response to the successful entry into the scene.

[0254] In some embodiments, the packaging module 1110 is configured as follows:

[0255] In response to the target virtual character's save time being reached, the management process packages the role relationship data stored for the target virtual character in its own memory to obtain the target virtual character's packaged role relationship data.

[0256] In some embodiments, the first transmitting module 1120 includes:

[0257] The acquisition unit is used to acquire process load information for each archived process;

[0258] The target archiving process determination unit is used to select an archiving process whose process load is lower than a load threshold from among a plurality of archiving processes as the target archiving process based on the process load information of each archiving process.

[0259] The request encapsulation unit is used to encapsulate the character relationship package data of the target virtual character and the process identifier of the target archive process to obtain a character archive request for the target virtual character.

[0260] The sending unit is used to send a character save request for the target virtual character to the first scene process.

[0261] Figure 12 A schematic diagram of a computer system suitable for implementing the embodiments of this application is shown. It should be noted that... Figure 12 The computer system 1200 of the illustrated electronic device is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of this application. This electronic device can be used to execute the data processing method provided in the application, and it can be a server, such as a server running a scene process, a server running a management process, etc.

[0262] like Figure 12 As shown, the computer system 1200 includes a Central Processing Unit (CPU) 1201, which can perform various appropriate actions and processes, such as executing the methods described in the above embodiments, based on programs stored in Read-Only Memory (ROM) 1202 or programs loaded from storage portion 1208 into Random Access Memory (RAM) 1203. The RAM 1203 also stores various programs and data required for system operation. The CPU 1201, ROM 1202, and RAM 1203 are interconnected via a bus 1204. An Input / Output (I / O) interface 1205 is also connected to the bus 1204.

[0263] The following components are connected to I / O interface 1205: an input section 1206 including a keyboard, mouse, etc.; an output section 1207 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 1208 including a hard disk, etc.; and a communication section 1209 including a network interface card such as a LAN (Local Area Network) card, modem, etc. The communication section 1209 performs communication processing via a network such as the Internet. A drive 1210 is also connected to I / O interface 1205 as needed. Removable media 1211, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 1210 as needed so that computer programs read from them can be installed into storage section 1208 as needed.

[0264] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 1209, and / or installed from removable medium 1211. When the computer program is executed by central processing unit (CPU) 1201, it performs various functions defined in the system of this application.

[0265] It should be noted that the computer-readable medium shown in the embodiments of this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such transmitted data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.

[0266] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. Each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0267] The units described in the embodiments of this application can be implemented in software or hardware, and the described units can also be located in a processor. The names of these units do not necessarily limit the specific unit itself.

[0268] In another aspect, this application also provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiments; or it may exist independently and not assembled into the electronic device. The aforementioned computer-readable storage medium carries computer-readable instructions that, when executed by a processor, implement the methods in any of the above embodiments.

[0269] In the embodiments of this application, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal. It can be implemented wholly or partially using software, hardware (e.g., processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that functions as a whole.

[0270] According to one aspect of the embodiments of this application, a computer program product is provided, the computer program product including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and executes the computer instructions, causing the computer device to perform the methods of any of the above embodiments.

[0271] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of this application, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0272] Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause an electronic device (such as a personal computer, server, touch terminal, or network device, etc.) to execute the methods according to the embodiments of this application.

[0273] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the embodiments disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein.

[0274] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.

Claims

1. A data processing method, characterized in that, include: The first scene process receives a character save request initiated by the management process for the target virtual character; The first scene process refers to the scene process that carries the first virtual scene where the target virtual character is located; the character archive request includes the character relationship packaged data of the target virtual character obtained by packaging on the management process; Add the basic character package data of the target virtual character to the character archive request; The basic character packaging data of the target virtual character is obtained by packaging the basic character data stored for the target virtual character in the first scene process; The character save request is forwarded to the target save process, so that the target save process responds to the character save request by merging the character relationship package data and the basic character package data carried in the character save request, and storing the full character data of the target virtual character obtained by merging into the database.

2. The method according to claim 1, characterized in that, Before the first scene process receives a character save request initiated by the management process for the target virtual character, the method further includes: Receive a scene exit request initiated by the management process for the target virtual character; In response to the scene departure request, the target virtual character is removed from the first virtual scene, and a transmission context is created based on the target virtual character's basic character packaging data; the transmission context stores the target virtual character's basic character packaging data. Based on the identification information of the transmission context and the first process address of the first scene process, a scene departure response is returned to the management process, so that the management process sends a scene entry request to the second scene process based on the identification information and the first process address carried in the scene departure response, and after receiving a scene entry failure response returned by the second scene process, sends a character save request for the target virtual character to the first scene process; wherein, the scene entry failure response is used to indicate that the target game character failed to enter the second virtual scene, and the second scene process refers to the scene process responsible for the second virtual scene.

3. The method according to claim 2, characterized in that, Adding the basic character package data of the target virtual character to the character archive request includes: Obtain the basic character package data of the target virtual character from the transmission context, and add the basic character package data of the target virtual character to the character archive request.

4. The method according to claim 2, characterized in that, The scene entry request sent by the management process to the second scene process carries the character relationship package data of the target virtual character. After returning a scene departure response to the management process based on the identifier information of the transmission context and the first process address of the first scene process, the method further includes: Receive a data request initiated by the second scenario process based on the identification information of the transmission context and the address of the first process; In response to the data request, the basic character package data of the target virtual character is obtained from the transmission context and sent to the second scene process, so that the second scene process executes the character entry processing logic for the target virtual character based on the basic character package data of the target virtual character and the character relationship package data of the target virtual character carried in the scene entry request.

5. The method according to claim 1, characterized in that, The character save request is initiated by the management process after determining that the save time for the target virtual character has been reached; Before adding the base character package data of the target virtual character to the character archive request, the method further includes: Read the basic character data stored for the target virtual character from the memory of the first scene process; The basic character data is packaged to obtain the basic character packaged data of the target virtual character.

6. A data processing method, characterized in that, include: The management process packages the role relationship data stored in its own memory for the target virtual character to obtain the packaged role relationship data of the target virtual character; Based on the character relationship packaging data of the target virtual character, a character archive request for the target virtual character is sent to the first scene process. This causes the first scene process to add the basic character packaging data of the target virtual character to the character archive request and then forward the character archive request to the target archive process. The first scene process refers to the scene process that carries the first virtual scene where the target virtual character is located. Receive the character save success response returned by the target save process; wherein, the character save success response is sent by the target save process after merging the character relationship package data and the basic character package data carried in the character save request, and storing the full character data of the target virtual character obtained by merging into the database.

7. The method according to claim 6, characterized in that, Before the management process packages the role relationship data stored in its own memory for the target virtual character to obtain the packaged role relationship data of the target virtual character, the method further includes: The management process obtains the teleportation command of the target virtual character, and the teleportation command instructs the target virtual character to be teleported from the first virtual scene to the second virtual scene; In response to the transmission command, a scene departure request for the target virtual character is sent to the first scene process; Receive a scene departure response returned by the first scene process; the scene departure response is generated by the first scene process in response to the scene departure request, removing the target virtual character from the first game scene, and creating a transmission context based on the basic character data of the target virtual character, and then generating the response based on the identifier information of the transmission context and the first process address of the first scene process. In response to the scene departure response, a scene entry request for the target virtual character is sent to the second scene process based on the identification information and the first process address; the second scene process refers to the scene process that carries the second game scene. Receive the scene entry failure response returned by the second scene process; The management process packages the role relationship data stored in its own memory for the target virtual character to obtain the target virtual character's packaged role relationship data, including: In response to the scene entry failure response, the management process packages the role relationship data stored in its own memory for the target virtual character to obtain the target virtual character's packaged role relationship data.

8. The method according to claim 7, characterized in that, The scene entry request carries the character relationship package data of the target virtual character; After responding to the scene departure response and sending a scene entry request for the target virtual character to the second scene process based on the identification information and the first process address, the method further includes: The system receives a successful entry response from the second scene process. This successful entry response is returned by the second scene process after executing character entry processing logic for the target virtual character based on the basic character package data and the character relationship package data of the target virtual character, and confirming that the target virtual character has successfully entered the second virtual scene. The second scene process obtains the basic character package data of the target virtual character from the transmission context based on the identification information of the transmission context and the first process address. In response to the successful entry into the scene, the first scene process is notified to release the transmission context.

9. The method according to claim 6, characterized in that, The management process packages the role relationship data stored in its own memory for the target virtual character to obtain the target virtual character's packaged role relationship data, including: In response to the target virtual character's save time being reached, the management process packages the role relationship data stored for the target virtual character in its own memory to obtain the target virtual character's packaged role relationship data.

10. The method according to any one of claims 6 to 9, characterized in that, The step of packaging data based on the character relationships of the target virtual character and sending a character archive request for the target virtual character to the first scene process includes: Obtain process load information for each archived process; Based on the process load information of each of the archiving processes, select one archiving process whose process load is lower than the load threshold from among the multiple archiving processes as the target archiving process; The character relationship data of the target virtual character and the process identifier of the target archiving process are packaged together to form a request, thereby obtaining a character archiving request for the target virtual character. Send a character save request for the target virtual character to the first scene process.

11. A data processing apparatus, characterized in that, The data processing device, applied to the first scenario process, includes: The first receiving module is used to receive a character archiving request initiated by the management process for a target virtual character; the first scene process refers to the scene process that carries the first virtual scene where the target virtual character is located; the character archiving request includes the character relationship packaged data of the target virtual character obtained by packaging on the management process; An add module is used to add the basic character package data of the target virtual character to the character archive request; the basic character package data of the target virtual character is obtained by packaging the basic character data stored for the target virtual character in the first scene process; The forwarding module is used to forward the character save request to the target save process, so that the target save process responds to the character save request by merging the character relationship package data and the basic character package data carried in the character save request, and storing the merged full data of the target virtual character in the database.

12. A data processing apparatus, characterized in that, The data processing device, used in the management process, includes: The packaging module is used to package the role relationship data stored in the memory of the management process for the target virtual character, and obtain the role relationship packaged data of the target virtual character; The first sending module is used to send a character archive request for the target virtual character to the first scene process based on the character relationship package data of the target virtual character. This allows the first scene process to add the basic character package data of the target virtual character to the character archive request and then forward the character archive request to the target archive process. The first scene process refers to the scene process that carries the first virtual scene where the target virtual character is located. The second receiving module is used to receive the character saving success response returned by the target saving process; wherein, the character saving success response is sent by the target saving process after merging the character relationship package data and the basic character package data carried in the character saving request, and storing the full character data of the target virtual character obtained by merging into the database.

13. An electronic device, characterized in that, include: processor; A memory storing computer-readable instructions that, when executed by the processor, implement the method as described in any one of claims 1-10.

14. A computer-readable storage medium storing computer-readable instructions thereon, characterized in that, When the computer-readable instructions are executed by a processor, the method as described in any one of claims 1-10 is implemented.

15. A computer program product comprising computer instructions, characterized in that, When the computer instructions are executed by the processor, they implement the method of any one of claims 1-10.