Data processing method and device based on virtual character, equipment and storage medium

By automatically adding and synchronizing virtual character attribute information through enumeration values ​​and key-value pair arrays in memory data, the problem of cumbersome attribute information processing in virtual games is solved, improving data management efficiency and player control experience.

CN121016201APending Publication Date: 2025-11-28TENCENT TECH SHANGHAI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511478535.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-15
Publication Date
2025-11-28

AI Technical Summary

Technical Problem

In virtual games, when players add new features to their virtual characters, the existing technology for adding, storing, and synchronizing attribute information is cumbersome and needs to be simplified.

Method used

The existing and new attribute information of virtual characters is marked by enumeration values ​​in memory data. The automatic addition, data synchronization and storage of attribute fields are realized by using key-value pair arrays, including real-time, periodic and login time synchronization.

Benefits of technology

It simplifies the data processing flow of attribute information, improves data management efficiency and the player's control experience over virtual characters, and enables rapid updating and storage of attribute information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121016201A_ABST
    Figure CN121016201A_ABST
Patent Text Reader

Abstract

The invention discloses a data processing method and device based on a virtual character, equipment and a storage medium, and belongs to the field of data processing. The method is executed by a server and comprises the steps that memory data corresponding to a virtual character is obtained, the memory data comprises at least one enumeration value, the at least one enumeration value is used for marking existing attribute information associated with the virtual character, or the at least one enumeration value is used for adding at least one attribute field for the memory data, the at least one attribute field is used for marking newly-added attribute information associated with the virtual character; and performing data processing on at least one of the existing attribute information and the newly added attribute information according to the memory data. According to the method and the device, convenience is provided for storing and / or updating the attribute information of the virtual role based on the at least one enumeration value in the memory data, so that various data processing modes of the data corresponding to the attribute information are realized, and the complexity degree of related processes is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the field of data processing, and in particular to a data processing method and device based on a virtual role, a data processing apparatus based on a virtual role, and a storage medium. BACKGROUND

[0002] In a virtual game, a player can control a virtual role to explore, fight or perform other activities in a virtual scene, and the virtual role has one or more virtual functions, such as multiple fighting modes. When the player develops a new function of the virtual role, the corresponding attribute information of the virtual role usually needs to be added to record or update the relevant data of the function. At this time, the server needs to consider the cumbersome processes such as addition, storage and data synchronization of the attribute information, and simplifying the data processing process of the attribute information is a problem to be solved at present. SUMMARY

[0003] The present application provides a data processing method and device based on a virtual role, an apparatus based on a virtual role, and a storage medium, and the technical solutions are as follows.

[0004] According to an aspect of the present application, a data processing method based on a virtual role is provided, and the method is executed by a server, and the method comprises the following steps. Obtaining memory data corresponding to a virtual role, wherein the memory data comprises at least one enumeration value, the at least one enumeration value is used to mark existing attribute information associated with the virtual role, or the at least one enumeration value is used to add at least one attribute field to the memory data, and the at least one attribute field is used to mark new attribute information associated with the virtual role; According to the memory data, at least one of the existing attribute information and the new attribute information is processed.

[0005] According to an aspect of the present application, a data processing apparatus based on a virtual role is provided, and the apparatus comprises the following modules. An obtaining module is configured to obtain memory data corresponding to a virtual role, wherein the memory data comprises at least one enumeration value, the at least one enumeration value is used to mark existing attribute information associated with the virtual role, or the at least one enumeration value is used to add at least one attribute field to the memory data, and the at least one attribute field is used to mark new attribute information associated with the virtual role; A processing module is configured to process at least one of the existing attribute information and the new attribute information according to the memory data.

[0006] According to another aspect of the present application, a client is provided, which is used to implement the data processing method based on a virtual role as described in the above aspect.

[0007] According to another aspect of the present application, a computer storage medium is provided, and at least one computer program is stored in the computer readable storage medium, and the at least one computer program is loaded and executed by a processor to implement the virtual role-based data processing method according to the above aspect.

[0008] According to another aspect of the present application, a computer program product is provided, and the computer program product comprises a computer program stored in a computer readable storage medium; the computer program is read and executed by a processor of a computer device from the computer readable storage medium, so that the computer device executes the virtual role-based data processing method according to the above aspect.

[0009] The technical scheme provided by the embodiments of the present application has at least the following beneficial effects: Based on at least one enumeration value in the memory data, the existing attribute information of the virtual role can be recorded, or the new attribute information of the virtual role can be recorded, and then a plurality of processing modes of the data corresponding to the attribute information are realized. Based on this, the attribute information (existing attribute information and / or new attribute information) of the virtual role is processed quickly, which provides convenience for storage and / or updating, reduces the complexity of the related data processing process, not only realizes the automatic processing of the related data of the attribute information, but also simplifies the data processing process and improves the data management capability.

[0010] Specifically, the data processing of the attribute information of the virtual role includes but is not limited to one or more of the following: adding a new attribute field, data synchronization, and data storage. The addition of the attribute field is realized by the new enumeration value in the memory data. In the case that there is an unused enumeration value in the memory data, the new function of the virtual role is recorded by means of a key-value pair array. The data synchronization of the attribute field can include a plurality of cases, which are respectively the instant synchronization of the incremental data that has not been synchronized at the current time, the periodic synchronization of the incremental data, and the data synchronization at the login time of the virtual role. The one or more data that need to be synchronized are automatically determined by the existing enumeration value in the memory data, so as to realize the updating of the attribute information of the virtual role. The data storage of the attribute field can be understood as the persistent storage of the attribute information of the virtual role in the database, and the storage is automatically performed at the offline time or at a specified time when the virtual role is online. In summary, based on at least one enumeration value in the memory data, a plurality of data processing modes of the attribute information associated with the virtual role are realized, the related data processing process is simplified, the data management efficiency is improved to a certain extent, the attribute information of the virtual role is quickly updated, and the control experience of the player on the virtual role is indirectly improved. BRIEF DESCRIPTION OF DRAWINGS

[0011] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative effort based on these drawings.

[0012] Figure 1 is an architecture diagram of a computer system provided by an embodiment of the present application; Figure 2 is an architecture diagram of data processing provided by an embodiment of the present application; Figure 3 is a flowchart of a data processing method based on a virtual role provided by an embodiment of the present application; Figure 4 is a schematic diagram of a data structure provided by an embodiment of the present application; Figure 5 is a schematic diagram of a data structure provided by an embodiment of the present application; Figure 6 is a flowchart of a data processing method based on a virtual role provided by an embodiment of the present application; Figure 7 is a schematic diagram of a data structure provided by an embodiment of the present application; Figure 8 is a flowchart of a data processing method based on a virtual role provided by an embodiment of the present application; Figure 9 is a schematic diagram of a data structure provided by an embodiment of the present application; Figure 10 is a flowchart of a data processing method based on a virtual role provided by an embodiment of the present application; Figure 11 is a flowchart of a data processing method based on a virtual role provided by an embodiment of the present application; Figure 12 is a flowchart of a data processing method based on a virtual role provided by an embodiment of the present application; Figure 13 is a block diagram of a data processing apparatus based on a virtual role provided by an embodiment of the present application; Figure 14 is a structural block diagram of a computer device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0013] In order to make the purpose, technical solutions and advantages of the present application clearer, the embodiments of the present application will be further described in detail below with reference to the drawings.

[0014] The exemplary embodiments will be described in detail herein with reference to the attached drawings. The description of the exemplary embodiments is intended to apply to any embodiment of the application, unless specifically stated otherwise. It is to be understood that other embodiments can be utilized, and structural or procedural changes can be made without departing from the scope of the present application. Therefore, the following detailed description is not intended to be limiting.

[0015] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting. As used herein, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and / or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.

[0016] It is to be understood that the singular forms "a," "an," and "the" include plural referents unless the context clearly dictates otherwise. It will be further understood that the terms "comprises" and / or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.

[0017] It is to be understood that the singular forms "a," "an," and "the" include plural referents unless the context clearly dictates otherwise. It will be further understood that the terms "comprises" and / or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.

[0018] First, the related terms involved in the present application are introduced: Virtual scene: a virtual environment displayed (or provided) by an application when the application runs on a terminal. The virtual scene is implemented based on a virtual environment, and can also be referred to as a virtual world. In some embodiments, the virtual scene is displayed entirely on the terminal; in other embodiments, the virtual scene is displayed partially on the terminal, and the display content on the terminal switches following the player's point of view. The virtual scene can be a simulated world of the real world, a semi-simulated and semi-fictional three-dimensional world, or a purely fictional three-dimensional world. The virtual environment can be any one of a two-dimensional virtual environment, a 2.5-dimensional virtual environment, and a three-dimensional virtual environment, which is not limited in the present application. The following embodiments are exemplified based on the virtual environment being a three-dimensional virtual environment.

[0019] For example, the virtual environment includes a sky, a land, a sea, and the like, the land includes environmental elements such as plants, houses, and the like, and the user can control the virtual character to move in the virtual environment. Of course, the virtual environment also includes virtual objects, which can be interactive, such as virtual beds, virtual chairs, virtual lamps, virtual bathtubs, and the like, and the user can control the virtual character to lie on the virtual bed or sit on the virtual chair; the virtual objects can also be non-interactive, such as virtual trees, virtual stones, virtual house structures (which can include roofs, floors, columns, doors and windows, etc.), and the like. The virtual environment can also be used to simulate real environments under different weather conditions, such as sunny weather, rainy weather, foggy weather, or night weather, and the like. Various scene elements enhance the diversity and reality of the virtual environment.

[0020] Virtual character: an active object in a virtual environment, which can also be referred to as a virtual object. The active object can be at least one of a virtual person, a virtual animal, and a virtual cartoon character. Alternatively, when the virtual environment is a three-dimensional virtual environment, the virtual character can be a three-dimensional virtual model, each virtual character has its own shape and volume in the three-dimensional virtual environment, and occupies a part of the space in the three-dimensional virtual environment. Alternatively, the virtual character is a three-dimensional object constructed based on three-dimensional human skeleton technology, and the virtual character realizes different external appearances by wearing different skins. In some implementations, the virtual character can also be implemented in a 2.5-dimensional or 2-dimensional model, which is not limited in the embodiments of the present application. The master virtual character belongs to the virtual character, and can be considered as a virtual character controlled by the player, for example, the player enters the virtual scene on the first client and selects a virtual character to move in the virtual scene, and the selected virtual character is the master virtual character controlled by the player on the first client. It should be noted that in some virtual games, virtual characters corresponding to different camps are also set. For example, there are at least two camps in a virtual game, and a first camp and a second camp form an antagonistic relationship, and a virtual tower corresponding to the first camp and the second camp is set respectively, the virtual tower can attack the virtual character of the opposite camp, and also be attacked by the virtual character of the opposite camp.

[0021] Figure 1 An architecture diagram of a computer system provided by an example embodiment of the present application is shown. The computer system 100 can include a first terminal device 110, a server 120, and a second terminal device 130.

[0022] The first terminal device 110 is installed and runs a client 111 supporting a virtual environment, which can be a multiplayer online battle program. When the first terminal device 110 runs the client 111, a game interface of the client 111 is displayed on a screen of the first terminal device 110. The client 111 can be any one of a massively multiplayer online role-playing game (MMORPG), a battle royale shooting game, a virtual reality (VR) application, an augmented reality (AR) program, a three-dimensional map program, a virtual reality game, an augmented reality game, a first-person shooting (FPS) game, a third-person shooting (TPS) game, a multiplayer online battle arena (MOBA) game, and a simulation game (SLG). The first terminal device 110 is a terminal used by a first user 112, and the first user 112 uses the first terminal device 110 to control a first virtual character located in a virtual world to perform activities and operate virtual items possessed by the first virtual character. The first virtual character can be referred to as a virtual character of the first user 112, a virtual character controlled by the first user 112, etc. The first user 112 can perform operations such as assembling, disassembling, uninstalling, etc. on the virtual items possessed by the first virtual character, which are not limited by the present application. The activities of the first virtual character include, but are not limited to, at least one of moving, jumping, teleporting, releasing a skill, using an item, adjusting a body posture, crawling, walking, running, riding, flying, jumping, driving, picking up, shooting, damaging, and throwing.

[0023] The second terminal device 130 is installed with and runs a client 131 supporting a virtual environment, which can be a multiplayer online battle program. When the second terminal device 130 runs the client 131, a game interface of the client 131 is displayed on a screen of the second terminal device 130. The client can be any one of an MMORPG game, a MOBA game, a battle royale shooting game, a VR application, an AR program, a three-dimensional map program, a virtual reality game, an augmented reality game, an FPS, a TPS, and an SLG. The second terminal device 130 is a terminal used by a second user 132, and the second user 132 uses the second terminal device 130 to control a second virtual character located in a virtual world to perform activities and operate virtual items possessed by the second virtual character, the second virtual character can be referred to as a virtual character of the second user 132, a virtual character controlled by the second user 132, etc., and the activities of the second virtual character include but are not limited to at least one of moving, jumping, teleporting, releasing a skill, using an item, adjusting a body posture, crawling, walking, running, riding, flying, jumping, driving, picking up, shooting, damaging, and throwing.

[0024] Optionally, the user can select to enter different virtual environments; or, the user can select to randomly enter different virtual environments; or, the user can enter different virtual environments according to a random order preset by a developer. The virtual environment is designed by the developer in advance; or, the virtual environment is created by the user using a user-generated content (UGC) editor provided by the client.

[0025] Optionally, the first virtual character and the second virtual character are in the same virtual environment. Optionally, the first virtual character and the second virtual character can belong to the same camp, the same team, the same organization, have a friend relationship, or have temporary communication authority.

[0026] Optionally, the clients installed on the first terminal device 110 and the second terminal device 130 are the same, or the clients installed on the two terminals are the same type of clients on different operating system platforms (Android or IOS). The first terminal device 110 can be referred to as one of multiple terminals, and the second terminal device 130 can be referred to as another one of the multiple terminals, and the embodiment is only exemplified by the first terminal device 110. The device types of the first terminal device 110 and the second terminal device 130 are the same or different, and the device types include at least one of a smartphone, a tablet computer, an e-book reader, an MP3 player, an MP4 player, a laptop computer, and a desktop computer.

[0027] Figure 1Only two terminals are shown, but there are a plurality of other terminals 140 that can access the server 120 in different embodiments. Optionally, there is also one or more terminals 140 that are developer corresponding terminals, and a development and editing platform of a client supporting a virtual environment is installed on the terminals 140, and a developer can edit and update the client on the terminals 140, and an installation package in the updated client is transmitted to the server 120 through a wired or wireless network, and the first terminal device 110 can download the client installation package from the server 120 to implement updating of the client.

[0028] The server 120 includes at least one of a server, a plurality of servers, a cloud computing platform, and a virtualization center. The server 120 is configured to provide background services for the client 111. Optionally, the server 120 undertakes primary computing work, and the first terminal device 110 undertakes secondary computing work; or the server 120 undertakes secondary computing work, and the first terminal device 110 undertakes primary computing work; or the server 120 and the first terminal device 110 adopt a distributed computing architecture for collaborative computing.

[0029] Optionally, the server 120 includes a processor 121, a user account database 122, a battle service module 123, and a user-oriented input / output interface (I / O interface) 124. The processor 121 is configured to load instructions stored in the server 120, and process data in the user account database 122 and the battle service module 123. The user account database 122 is configured to store data of user accounts used by the first terminal device 110 and other terminals 140, such as an avatar of a user account, a name of a user account, a battle power index of a user account, and a service area in which a user account is located. The battle service module 123 is configured to provide a plurality of battle rooms for users to battle, such as 1V1 battles, 3V3 battles, 5V5 battles, and the like. The user-oriented I / O interface 124 is configured to establish communication with the first terminal device 110 and / or other terminals 140 through a wireless network or a wired network to exchange data.

[0030] The first terminal device 110, the second terminal device 130, and other terminals 140 are connected to the server 120 through a wireless network or a wired network.

[0031] In some embodiments, the first terminal device 110 and the second terminal device 130 send operation data of users in a game session to the server 120. The server 120 receives the operation data, processes the operation data to obtain a processing result, and sends the processing result to the first terminal device 110 and the second terminal device 130, respectively.

[0032] In some embodiments, players control virtual characters to explore, fight, or engage in other activities within a virtual environment, such as controlling the virtual character to unleash specific skills. Each skill of a virtual character uniquely corresponds to a specific attribute. Figure 2 The illustration shows a scenario diagram of a data processing method based on virtual characters provided in one embodiment of this application.

[0033] For example, client 210 is associated with a virtual character, and players can log in to the virtual character on client 210 and perform corresponding controls. The virtual character possesses one or more skills, each corresponding to associated attribute information. Server 220 needs to synchronize this attribute information with client 210; simultaneously, this attribute information is stored in database 230, and server 220 and database 230 perform data loading and / or storage of this attribute information. In some embodiments, the storage between server 220 and database 230 may optionally be implemented as persistent storage.

[0034] It should be noted that, Figure 2 Customer 210 in the middle can be realized as Figure 1 One of the first terminal device 110, the second terminal device 130, and other terminals 140. Figure 2 Server 220 in the middle can be implemented as Figure 1 The description of server 120 is as described above and will not be repeated here.

[0035] Based on the above, player control over virtual characters will cause changes to the attribute information associated with those characters, including but not limited to the addition, storage, and synchronization of attribute information. The server needs to consider the related processing flow of attribute information, such as data synchronization with the client logging into the virtual character, and the storage and loading of attribute information with the database. These data processing flows are quite complex; simplifying these processes is the problem this application aims to solve.

[0036] Figure 3 A flowchart illustrating a data processing method based on virtual characters according to an embodiment of this application is shown. The method is described by... Figure 1 The server shown is 120 or Figure 2 Taking server 220 as an example, the method includes: Step 320: Obtain the memory data corresponding to the virtual character.

[0037] The memory data includes at least one enumeration value, which is used to mark existing attribute information associated with the virtual character, or at least one enumeration value is used to add at least one attribute field to the memory data, which is used to mark newly added attribute information associated with the virtual character.

[0038] Memory Data is information used to store specified data in the server, and is implemented in the present application as attribute information of one or more functions of a virtual character. After a player logs in a virtual character through a client and controls the virtual character, the server performs relevant data processing of attribute information with the client based on Memory Data.

[0039] Due to the control of the virtual character by the player at different times, the virtual character has two different attribute information. In some embodiments, the virtual character acquires one or more functions at a historical time, such as the player controlling the virtual character at the last login time to acquire a low-level shooting skill, and the attribute information corresponding to the function can be understood as existing attribute information associated with the virtual character; in other embodiments, the player logs in and controls the virtual character on the client, at which time the virtual character already has some functions, and the player controls the virtual character to acquire a new function at the current time, such as the virtual character unlocking a high-level shooting skill after reaching a certain level, and the attribute information corresponding to the function can be understood as new attribute information associated with the virtual character.

[0040] It can also be understood that the existing attribute information associated with the virtual character is used to indicate one or more historical functions acquired by the virtual character at a historical time, and the new attribute information associated with the virtual character is used to indicate one or more new functions acquired by the virtual character at the current time. The historical functions and new functions both belong to the skills that can be used by the virtual character, including but not limited to at least one of moving, jumping, teleporting, releasing a skill, using a prop, adjusting a body posture, crawling, walking, running, riding, flying, jumping, driving, picking up, shooting, damaging, and throwing. The present application does not limit the historical functions and new functions possessed by the virtual character, and other activities implemented by the virtual character can be considered as a function, which will not be described in detail.

[0041] On this basis, at least one enumeration value included in the Memory Data has two functions according to different times and different states of the virtual character: The at least one enumeration value is used to mark the existing attribute information associated with the virtual character. Under this function, the at least one enumeration value should be a historical enumeration value that has been used in the Memory Data. The historical enumeration value can optionally correspond to a historical data value, and the historical data value is used to indicate the value that should be displayed by the historical function of the virtual character, such as the shooting damage value of 100 units corresponding to the display of the low-level shooting skill.

[0042] The at least one enumeration value is used to add at least one attribute field to the Memory Data, and the at least one attribute field is used to mark the new attribute information associated with the virtual character.

[0043] In this function, at least one enumeration value should be a new enumeration value not used in the memory data. That is, the enumeration value in this case is a blank value, which is used when the virtual character obtains one or more new functions. For example, the new function is a high-level shooting skill. The server can add an attribute field to the memory data through a new enumeration value, which is used to mark the new attribute information corresponding to the high-level shooting skill, i.e., the virtual character has a high-level shooting skill, and the shooting damage value is 500 units. Alternatively, the new function is a teleport skill, and the server adds an attribute field to the memory data, which is used to mark the new attribute information corresponding to the teleport skill, such as the virtual character has a teleport skill, and the teleport distance is 500 units.

[0044] According to step 320, after obtaining the memory data corresponding to the virtual character, the server should be able to obtain the attribute information associated with the virtual character, including the existing attribute information and / or the new attribute information. Among them, at the first moment when the server obtains the memory data, the new attribute information is the attribute information corresponding to one or more unknown functions of the virtual character, and its data record, storage and synchronization, etc. need to be processed according to the specific function obtained by the virtual character.

[0045] Step 340: According to the memory data, at least one of the existing attribute information and the new attribute information is processed.

[0046] The description of the existing attribute information and the new attribute information can be referred to the foregoing content, which will not be repeated.

[0047] In some embodiments, the attribute information of the virtual character is stored in the memory data in the form of a key-value pair array (enumeration value, data value), and the related data processing is realized through the key-value pair array. Among them, the key-value pair is a data unit composed of a unique identifier (Key) and associated data (Value), which can also be understood as a data unit composed of an enumeration value and a data value; array is a basic and core data structure in computer science, which is used to store a collection of elements of the same data type, and is accessed efficiently through indexing. The array can be understood as a finite sequence composed of n (n≥1) data elements of the same type; based on this, at least one key-value pair array included in the memory data can be understood as a finite element collection of the same data type in which the key is indexed and the corresponding data in the array is used as the value.

[0048] Referring to the foregoing content, in some embodiments, after obtaining the memory data, the server can obtain at least one key-value pair array, so as to obtain one or more data values corresponding to the enumeration value, and one data value is used to uniquely indicate one attribute information of the virtual character; then, the server can process the attribute information of the virtual character based on the memory data.

[0049] According to step 340, the data processing can include various data processing modes, as follows: • automatically adding an attribute field; In this case, at least one enumeration value is used to add at least one attribute field to the memory data. In the case where the virtual character acquires one or more new functions, the server automatically adds one or more attribute fields in the memory data. In some embodiments, the new attribute field can be implemented as an array of key-value pairs, thereby uniquely marking the attribute information of the new function for the virtual character.

[0050] The new attribute field includes a new enumeration value and a new data value, and is stored in the memory data in the form of an array of key-value pairs (new enumeration value, new data value). The new enumeration value is an enumeration value that has not been used in the memory data, and is used to mark the function number of the new function of the specified virtual character; the new data value is used to record the attribute information corresponding to the specified new function. For example, the new attribute field is (5, 200), the new enumeration value is the function number 5, and the new function of the virtual character is marked as the function with the number 5; the new data value is 200, which indicates that the attribute information corresponding to the function with the number 5 is 200. If the new function is a teleport skill, the attribute information of the teleport skill possessed by the virtual character is stored in the memory data in the form of a key-value pair array (5, 200), which can be understood as the function number of the teleport skill being 5, and the teleport distance being 200 units.

[0051] It should be noted that the new enumeration value should be different from all the enumeration values already used in the memory data, and its specific value should also be different from the values of the already used enumeration values. In some embodiments, the enumeration values in the memory data are sequentially marked with positive integers according to the acquisition order of the functions of the virtual character. For example, three enumeration values have been used in the memory data, with values of 1, 2, and 3, corresponding to the skills 1, 2, and 3 acquired by the virtual character in sequence. Subsequently, the player controls the virtual character to acquire a new skill 4, and a new enumeration value that has not been used in the memory data can be marked as 4, corresponding to the new skill 4, and the new data value corresponding to the new enumeration value is recorded as the attribute information corresponding to the new skill 4, thereby realizing the data processing mode of the new attribute field.

[0052] • data synchronization of attribute information; According to the foregoing, the attribute information includes existing attribute information and / or new attribute information, so that the data synchronization of the attribute information also has various implementation modes: In some embodiments, the data synchronization of the attribute information is implemented as instant synchronization of the incremental data that has not been synchronized at the current time; in other embodiments, the data synchronization of the attribute information is implemented as periodic synchronization of the incremental data. The server obtains at least one enumeration value after obtaining the memory data, and each enumeration value corresponds to an attribute information of the virtual role. During the time period in which the player controls the virtual role, the function possessed by the virtual role will change based on the operation of the player, such as the addition, upgrade, and downgrade of the damage skill, thereby causing the damage value corresponding to the damage skill to change.

[0053] For example, the virtual role possesses skill 1 and skill 2. At the first time, the damage value corresponding to skill 1 is 100, and the damage value corresponding to skill 2 is 200. At the second time, the damage value corresponding to skill 1 is still 100, but the player upgrades skill 2, thereby causing the damage value to increase to 500. At this time, the damage value 500 of skill 2 that has not been synchronized at the second time is the incremental data in this embodiment.

[0054] For the data synchronization of the incremental data, two modes of instant synchronization and periodic synchronization are optionally included. The time node for data synchronization is determined according to whether the active synchronization interface of the server is actively called by an external module. The external module is a server or an external device that needs to obtain attribute information outside the server. In some embodiments, the server actively calls the interface of the client that logs in the virtual role, and then determines whether the active synchronization interface of the server is actively called by an external module. In the case where the active synchronization interface is actively called by the external module, the incremental data is automatically synchronized instantaneously, that is, the incremental data is updated at the time of calling the interface. In the case where the active synchronization interface is not actively called by the external module, the incremental data is periodically synchronized, such as automatically updating the incremental data at the sending time corresponding to the next state synchronization frame. The state synchronization frame is used to indicate the attribute information update duration of the virtual role, for example, the attribute information is updated once within an interval. If the active synchronization interface is not actively called by the external module within the current interval, the incremental data is updated at the start time of the next interval.

[0055] It should be noted that the above examples are described based on the existing attribute information corresponding to the virtual role, and the data synchronization is specifically implemented as the update of the incremental data. If the newly added attribute information corresponding to the virtual role is exemplified, the data synchronization will be implemented as adding an attribute information, which will not be described herein.

[0056] The synchronization of the incremental data described above is performed during the time period in which the player controls the virtual role. The attribute information also needs to be synchronized at the login time of the virtual role, that is, the data synchronization of the attribute information can also be implemented as data synchronization at the login time of the virtual role.

[0057] In some embodiments, the memory data further comprises a synchronization index, which is used to indicate whether the client associated with the virtual role performs data synchronization of the specified attribute information. When the player logs in the virtual role on the client, the player can determine the specified enumeration value corresponding to the specified attribute information according to the synchronization index in the memory data, thereby realizing automatic data synchronization at the login time of the virtual role.

[0058] Automatic storage of attribute information.

[0059] To realize the foregoing data processing of the attribute information associated with the virtual role, the attribute information also needs to be stored, which refers to automatic persistent storage of the attribute information in the database. In one case, when the player controls the virtual role online, all attribute information is automatically updated and stored in the database at a specified time, such as after a preset time interval, or when the player autonomously selects a storage time of the attribute information. In another case, when the player ends the control of the virtual role, that is, at the offline time of the virtual role, the server automatically updates the attribute information and stores it in the database.

[0060] Optionally, if the player logs in the virtual role again, the server can load the updated memory data from the database and perform data synchronization with the client that logs in the virtual role. The data synchronization can be implemented in any of the foregoing examples, which is not limited in the present application.

[0061] In summary, the data processing method based on the virtual role provided in the embodiment can record the existing attribute information of the virtual role or record the new attribute information of the virtual role based on at least one enumeration value in the memory data, thereby realizing a plurality of processing modes of the data corresponding to the attribute information, realizing quick processing of the attribute information (existing attribute information and / or new attribute information) of the virtual role, providing convenience for storage and / or update, and reducing the complexity of the related data processing procedure. It can be understood that the embodiment of the present application not only realizes automatic processing of the related data of the attribute information, but also simplifies the data processing procedure and improves the data management capability of the server for the attribute information.

[0062] According to the foregoing, the data processing of the attribute information of the virtual role includes one or more of but is not limited to automatic addition of an attribute field, automatic synchronization of data, and automatic storage of data. Among them, the automatic addition of the attribute field is implemented by adding an enumeration value in the memory data. In the case that there is an unused enumeration value in the memory data, the added function of the virtual role is recorded in the form of a key-value pair array, which simplifies the addition process of the attribute field and enables the memory data to record more attribute information. The automatic synchronization of the data of the attribute field can include multiple cases, which are respectively the instant synchronization of incremental data that has not been synchronized at the current time, the periodic synchronization of incremental data, and the data synchronization at the login time of the virtual role. The one or more data that need to be synchronized are automatically determined by the existing enumeration value in the memory data, so as to realize the update and / or addition of the attribute information of the virtual role, so that the control of the virtual role by the player is more timely, and the control of the virtual role by the player can be quickly adjusted when the attribute information changes, thereby improving the efficiency of human-computer interaction. The automatic storage of the data of the attribute field can be understood as the persistent storage of the attribute information of the virtual role in the database, and the storage is automatically performed at the offline time of the virtual role or at a specified time when the virtual role is online. Thus, the attribute information is quickly stored in the database, and data loss is avoided.

[0063] In summary, in the embodiments of the present application, based on at least one enumeration value in the memory data, multiple data processing modes of the attribute information associated with the virtual role can be implemented, the related data processing process is simplified, the data management efficiency is improved to a certain extent, the attribute information of the virtual role is facilitated to be quickly updated, and the control experience of the virtual role by the player is indirectly improved.

[0064] It should be noted that the data processing modes involved in the above multiple embodiments can be implemented individually, sequentially or without implementation, or can be combined. Any combination of data processing modes is within the protection scope of the present application. The specific implementation can be determined according to the control of the virtual role, and the present application does not limit this. The multiple combined implementation modes will not be described again.

[0065] Data structure of memory data : According to the foregoing, the attribute information of the virtual role is stored in the memory data in the form of a key-value pair array (enumeration value, data value), and the related data processing is implemented by the key-value pair array. In this case, step 340 can be implemented as follows: According to at least one key-value pair array in the memory data, at least one of the existing attribute information and the added attribute information is processed. The i-th key-value pair array in the at least one key-value pair array comprises one enumeration value and one data value, the data value corresponds to the attribute information of the virtual character marked by the enumeration value, the enumeration value is different from the enumeration values in the other key-value pair arrays in the at least one key-value pair array, i is an integer greater than or equal to zero.

[0066] In some embodiments, the key-value pair is a data unit composed of an enumeration value and a data value, the key-value pair array refers to a limited element set of the same data type in the array, which is indexed by the key and composed of the corresponding data in the array, and the relevant description is referred to the foregoing.

[0067] Figure 4 And Figure 5 The schematic diagram of the data structure provided by one embodiment of the application is shown.

[0068] Referring to Figure 4 The data structure of the memory data comprises five key-value pair arrays, the key is the enumeration value involved in the application, the value is the data value involved in the application, that is, Figure 4 The memory data shown comprises five key-value pair arrays, each key-value pair array comprises one enumeration value and one data value, which are (1, value1), (2, value2), (3, value3), (4, value4) and (5, value5) respectively. According to the enumeration value and the data value in the key-value pair array, the enumeration value in the key-value pair array is unique, and the data value in the key-value pair array is unique. Figure 4 It can be obtained that the enumeration values in the five key-value pair arrays are different, that is, the enumeration values are unique in the same memory data and are used to uniquely mark the attribute information of the virtual character.

[0069] In some embodiments, the enumeration value is used to mark the function serial number of the function of the virtual character. Referring to Figure 5 The data value corresponding to the enumeration value 2 is 100. It can be understood that the function serial number of one function of the virtual character can be marked as 2, the value corresponding to the function is 100, and the function is taken as an example of the damage skill, the damage skill is marked as the skill with the serial number 2, and the damage value of the damage skill is 100 units.

[0070] Referring to Figure 4 And Figure 5 In some embodiments, the memory data comprises other information in addition to the enumeration value and the data value, such as the effective number, the notification marker array, and the unsynchronized client marker array, which are used to assist in implementing the related processing of the attribute information, which will be described in detail below, and will not be described here. In addition, different information in the memory data is stored in different positions in different cases, such as the enumeration value and the data value which are stored in the database, and the effective number which can be stored in the server.

[0071] In the case that the attribute information of the virtual role is stored in the form of a key-value pair array (enumeration value, data value) in the memory data, the related data processing is mainly implemented through the key-value pair array. According to the unique correspondence between the key-value pair array and the attribute information, the selection of the data processing mode is still based on the enumeration value, which specifically includes the following several data processing modes: Data processing mode one: automatically adding attribute field

[0072] In some embodiments, at least one enumeration value is used to add at least one attribute field to the memory data, and the data processing at least includes adding the attribute field. Referring to Figure 3 , Figure 6 A flowchart of a data processing method based on a virtual role provided by an embodiment of the present application is shown, and step 340 can be implemented as step 341: Step 341: In the case that the virtual role acquires one or more new functions, one or more attribute fields are added in the memory data, and each attribute field uniquely marks the attribute information corresponding to a new function through a key-value pair array.

[0073] According to the foregoing, the new function is a new skill acquired by the virtual role at the current time, which will bring an increase in attribute information. Based on at least one enumeration value existing in the memory data, one or more attribute fields are added, and the attribute information is uniquely marked through the key-value pair data.

[0074] In some embodiments, each attribute field includes a new enumeration value and a new data value, the new enumeration value is an enumeration value not yet used in the memory data, the new enumeration value is used to mark the function serial number of the specified new function, and the new data value is used to record the attribute information corresponding to the specified new function.

[0075] Referring to Figure 7 Taking that the virtual role acquires a new damage skill as an example, the data structure of the memory data includes multiple key-value pair arrays, and records multiple attribute information of the virtual role in the form of a (key, value) array. Among them, the first four key-value pair arrays are used to mark the existing attribute information associated with the virtual role, and the new enumeration value 5 in the last key-value pair array is not used. When the virtual role acquires a new damage skill, the last key-value pair array is enabled, the function serial number of the damage skill is marked as 5, and the damage value thereof is recorded through the new data value 100.

[0076] In some embodiments, according to the first acquisition time of the function of the virtual role, the corresponding attribute information is stored in the memory data in the form of a key-value pair array one by one, and the enumeration values in the key-value pair array are sorted in the order of positive integers one by one, thereby realizing the unique marking of the function associated with the virtual role, and avoiding the occurrence of the same function corresponding to two enumeration values. Further, when the existing attribute information corresponding to the existing function of the virtual role changes, the enumeration value corresponding to the existing function can be kept unchanged (i.e., the function number is unique), and only the data value corresponding to the enumeration value is automatically changed. The updating process can be regarded as data synchronization of attribute information, which can be referred to the examples in other parts of the application, which will be omitted here.

[0077] In summary, based on the existence of the newly added enumeration value in the memory data, the attribute information of the newly added function associated with the virtual role can be quickly recorded. Referring to Figure 7 For example, assuming that the name of the newly added function (which can be understood as a data service) is business_a (business_a data object), the following {key, value} data object is used to store the business_a data object; then, the attribute information of business_a is stored and marked in the data structure of the memory data by using the newly added enumeration value. After the newly added enumeration value is used, the number of key-value pair arrays also increases by 1, thereby realizing the addition of a position for the business_a data in the memory data.

[0078] Referring to Figure 7 When the virtual role obtains a newly added function business_a, the unused enumeration value in the memory data is marked as 5, and the data value of business_a is set to 100, thereby realizing the setting and storage of the newly added function in the memory data.

[0079] Data processing mode two: data synchronization of attribute information

[0080] In some embodiments, the attribute information includes existing attribute information and / or newly added attribute information. In this data processing manner, the data synchronization of at least one of the existing attribute information and / or the newly added attribute information also includes a plurality of data synchronization implementation manners of the attribute information: First, synchronization of incremental data that has not been synchronized at the current time ; Among them, the data synchronization of the incremental data can be selected from two implementation manners. In some embodiments, the data synchronization of the attribute information is realized as the instant synchronization of the incremental data; in other embodiments, the data synchronization of the attribute information is realized as the periodic synchronization of the incremental data.

[0081] Referring to Figure 3 , Figure 8A flowchart of the virtual role-based data processing method provided by one embodiment of the present application is shown. Step 340 can be implemented as step 342: Step 342: According to at least one enumeration value, the client associated with the virtual role performs data synchronization of the existing attribute information and / or the newly added attribute information. The attribute information for data synchronization is the incremental data that has not been synchronized by the client at the current time.

[0082] According to the foregoing, the server will obtain at least one enumeration value after obtaining the memory data, and each enumeration value corresponds to an attribute information of the virtual role. During the time period when the player controls the virtual role, the function possessed by the virtual role will change based on the operation of the player, such as the addition, upgrade, and downgrade of the damage skill, thereby causing the damage value corresponding to the damage skill to change. At this time, data synchronization of the attribute information is needed. Specifically, in this case, part of the attribute information of the virtual role may be changed, and these parts of the attribute information are the incremental data that needs to be synchronized.

[0083] Taking an example in which the memory data includes 5 enumeration values, during the process of the player controlling the virtual role, 3 data values corresponding to 3 functions need to be changed at the current time, and the 3 data values are the incremental data mentioned in step 342. According to step 342, the server can traverse the 5 enumeration values in the memory data, determine the 3 enumeration values that need to be synchronized, and obtain the data values corresponding to the 3 enumeration values, and synchronize them to the client where the virtual role is logged in.

[0084] In some embodiments, the memory data carries at least a first synchronization index, which is used to indicate whether to perform data synchronization of the incremental data with the client. It can be understood that the function of the first synchronization index is to determine the 3 enumeration values that need to be synchronized from the 5 enumeration values.

[0085] At this time, step 342 can be implemented as follows: in the case where the first synchronization index indicates that the data synchronization of the incremental data with the client is needed, one or more valid enumeration values corresponding to the incremental data are confirmed, and the data synchronization of the incremental data is performed according to the data values indexed by the one or more valid enumeration values.

[0086] Referring to Figure 4 and Figure 5 , the first synchronization index is implemented as a notification marker array ntf_value_arr in the data structure of the memory data. Specifically, if the notification marker array is yes, it means that the data synchronization of the incremental data corresponding to the array is needed; if the notification marker array is no, it means that the data synchronization is not needed. Referring to Figure 5 , based on the notification marker array corresponding to the enumeration value 2 being yes, the data synchronization of the data array (i.e., the data value value2) corresponding to the enumeration value 2 is needed.

[0087] Illustratively, the server also needs to confirm whether the enumeration value 2 is a valid enumeration value. Referring to Figure 4 and Figure 5 , the valid number can also be optionally included in the memory data, and then it is determined whether the enumeration value 2 is within the range of the valid number. If it is within the range, it is determined to be a valid enumeration value, and otherwise it is not determined to be a valid enumeration value, and at this time, data synchronization is not performed. It can also be understood that the data synchronization of the incremental data needs to meet two conditions: the enumeration value corresponding to the incremental data is a valid enumeration value, and the first synchronization index indicates that the server and the client can perform data synchronization.

[0088] Optionally, the time node of the data synchronization of the incremental data is determined according to whether the active synchronization interface of the server is actively called by an external module. The external module is the server or an external device other than the server that needs to obtain attribute information. In some embodiments, in the case where the active synchronization interface is actively called by the external module, the data synchronization of the incremental data is performed at the calling time, that is, the instant synchronization of the incremental data; in other embodiments, in the case where the active synchronization interface is not actively called by the external module, the data synchronization of the incremental data is performed at the sending time corresponding to the next state synchronization frame.

[0089] Among them, the state synchronization frame is used to indicate the attribute information update duration of the virtual role, that is, the periodic synchronization of the incremental data. In the embodiments of the application, the frame refers to a logical update time unit, which is used to ensure that all player clients perform the same game logic calculation at the same time, so as to realize the state consistency between multiple players. In some embodiments, the frame is the smallest time unit of logical update of the virtual game, which is usually divided by a fixed time length (such as 30 frames per second ≈ 33 ms / frame).

[0090] In some embodiments, the server actively calls the synchronization interface of the client logged in the virtual role, and then determines whether the active synchronization interface of the server is actively called by an external module. According to the foregoing, if the active synchronization interface of the server is actively called by the external module, for example, the virtual teammates of the virtual role are logged in on a mobile terminal (an implementation manner of the external module), at this time, the attribute information of the virtual role needs to be synchronized to the mobile terminal, and the mobile terminal can actively call the active synchronization interface of the server. After receiving the calling information, the server can synchronize the attribute information of the virtual role to the mobile terminal. In another case, the mobile terminal does not actively call the active synchronization interface. At this time, a timer can be set to enable the server to perform data synchronization at the sending time of the next state synchronization frame.

[0091] Second, data synchronization at the login time of the virtual character

[0092] The synchronization of the aforementioned incremental data is performed in a time period in which the player controls the virtual role, and the synchronization of the attribute information is also required at the login time of the virtual role, that is, the data synchronization of the attribute information can also be implemented as data synchronization at the login time of the virtual role.

[0093] Different from the first synchronization index, in some embodiments, the memory data carries at least a second synchronization index, which is used to indicate whether the data synchronization of the specified attribute information is performed with the client associated with the virtual role. For reference Figure 3 , Figure 9 A schematic diagram of a data structure provided by an embodiment of the present application is shown, Figure 10 A flowchart of a virtual role-based data processing method provided by an embodiment of the present application is shown, and step 340 can be implemented as step 343: Step 343: In the case of logging in the virtual role at the client, the specified enumeration value corresponding to the specified attribute information is determined according to the second synchronization index, and the data synchronization of the specified attribute information is performed with the client in the case that the specified enumeration value is a valid value.

[0094] For reference Figure 9 , the second synchronization index is implemented as an unsynchronized client marker array change_ntf_value_arr in the data structure of the memory data. According to Figure 9 The change of the unsynchronized client marker array before and after the construction of the synchronization content is shown, the enumeration values 1, 3, and 4 are determined as the enumeration values that need to be synchronized, and the data values corresponding to the enumeration values 1, 3, and 4 are the incremental data that need to be synchronized with the client.

[0095] Optionally, according to the second synchronization index, if there is a true value in the change_ntf_value_arr, a timer is set to make the server synchronize data with the client in the next state synchronization frame, and the markers in the change_ntf_value_arr are cleared after the data synchronization is completed, so as to be used next time.

[0096] In summary, according to one or more of the limiting conditions such as the first synchronization index, the second synchronization index, and whether the active synchronization interface of the server is actively called, the data synchronization of the attribute information associated with the virtual role can be implemented, and the synchronization process can be automatically implemented between the server and the client without the need for additional processing steps.

[0097] Data processing mode three: storage of attribute information

[0098] In order to implement the aforementioned data processing of the attribute information associated with the virtual role, it also needs to be stored, which can be understood as the persistent storage of the attribute information in the database.

[0099] In some embodiments, the attribute information includes existing attribute information and / or newly added attribute information. For reference Figure 3 , Figure 11 A flowchart of a data processing method based on a virtual role according to an embodiment of the present application is shown. Step 340 can be implemented as step 344. The embodiment of the present application can also optionally include step 350: Step 344: At a specified time when the virtual role is online or at a time when the virtual role is offline, update the memory data and automatically store the updated memory data in the database; When the player controls the virtual role online, all attribute information is automatically updated and stored in the database at a certain specified time, such as after a preset time interval, or the player autonomously selects the automatic storage time of the attribute information. Alternatively, after the player ends the control of the virtual role, that is, at the time when the virtual role is offline, the server automatically updates the attribute information and stores it in the database.

[0100] It can be understood that step 344 is the automatic persistent storage of the attribute information of the virtual role in the database. Through data updating at a specific time and automatic storage, the possibility of attribute information loss or update delay is reduced, the degree of automation of data processing is improved, and the data processing process is also simplified.

[0101] Step 350: In the case where the client associated with the virtual role logs in the virtual role, load the updated memory data from the database and synchronize the attribute information of the virtual role with the client.

[0102] According to the foregoing, the server persistently stores the memory data in the database at a specific time. Subsequently, if the player logs in the client associated with the virtual role again, the server can load the updated memory data from the database and synchronize it to the client, thereby realizing the rapid synchronization of the attribute information.

[0103] In some embodiments, the memory data carries at least an effective number.

[0104] For reference Figure 3 , Figure 12 A flowchart of a data processing method based on a virtual role according to an embodiment of the present application is shown. Step 340 can be implemented as step 345. The embodiment of the present application can also optionally include step 360: Step 345: In the case where the numerical value of at least one enumeration value is within the range of the effective number, perform data processing on at least one of the existing attribute information and the newly added attribute information; Step 360: In the case where the numerical value of at least one enumeration value is not within the range of the effective number, print an error log.

[0105] Reference Figure 4 、 Figure 5 、 Figure 7 and Figure 9 , the memory data also carries a valid number for determining whether the value of the enumeration is valid. For example, if the valid number is 5, if the value of the enumeration is any one of 1, 2, 3, 4, and 5, the enumeration value can be determined as a valid enumeration value; if the value of the enumeration exceeds the range of the valid number, such as the value of the enumeration is 6, the enumeration value is determined as an invalid enumeration value, and the server does not perform the data processing process and prints an error log.

[0106] In some embodiments, the data processing involved in the foregoing embodiments can only be performed when the enumeration value is a valid enumeration value (i.e., the value of the enumeration satisfies the condition that the value of the enumeration is within the range of the valid number). For example, if a new attribute field needs to be added, it is first necessary to determine whether the value of the unused enumeration is within the range of the valid number. For example, if the valid number is 5 and the value of the unused enumeration is 4, the addition of the attribute field can be performed at this time; if the value of the unused enumeration is 6, the server prints an error log and does not perform the corresponding processing process of adding the attribute field. For another example, if data synchronization of incremental data needs to be performed, it is also necessary to determine whether the value of the enumeration corresponding to the incremental data is within the range of the valid number. If it is within the range, the data synchronization is performed; if it is not within the range, an error log is printed. It should be noted that the relevant determination of the valid number in the data processing of the foregoing other embodiments is similar and will not be repeated.

[0107] In some embodiments, referring to the architecture diagram of data processing shown in Figure 2 , the server and the client and the database implement relevant data processing of attribute information of a virtual role. Still taking the {key, value} data object (such as business_a) as an example, a plurality of data processing modes can be optionally implemented as follows: 1) Add an enumeration.

[0108] An enumeration value is added to the enumeration mark of business_a for subsequent marking of business_a. After adding the enumeration, the maximum value of the mark array is also increased by 1, and a new position is added for the data of business_a in the memory / synchronization / persistent storage.

[0109] It can be understood that this part is the data processing mode of adding an attribute field as described above. The added enumeration is the enumeration value in the memory data as described above, and the enumeration value is used to add at least one attribute field to the memory data.

[0110] 2) Data structure of memory data.

[0111] In some embodiments, the attribute information of the virtual role is in the form of {key, value} in the memory data and the persistent storage. Referring to Figure 4 and Figure 5 , the data structure of the memory data includes the following: 21) The number of the existing service data, denoted as value_num (i.e. the effective number mentioned above), the value is related to the number of enumeration values, and this data exists in the memory and the persistent storage.

[0112] 22) The array-based data structure, with the key of business_a as the subscript index (i.e. the enumeration value mentioned above); and the value of business_a as the value of the corresponding index position, denoted as value_arr (i.e. the data value mentioned above). This data exists in the memory and the persistent storage.

[0113] 23) The array-based data structure, with the key of business_a as the subscript index, and whether business_a needs to be synchronized with the client as the value of the corresponding index position, denoted as ntf_value_arr (i.e. the first synchronization index mentioned above). This data exists in the memory and the persistent storage. After the player logs in, the data of the virtual role is loaded into the server memory, and the server determines which data in value_arr to synchronize to the client according to ntf_value_arr.

[0114] 24) The array-based data structure, with the key of business_a as the subscript index, and whether business_a has not been synchronized with the client as the value of the corresponding index position, denoted as change_ntf_value_arr (i.e. the second synchronization index mentioned above). This data exists in the memory but not in the persistent storage.

[0115] 3) Data settings of the memory data.

[0116] In some embodiments, the key of business_a is specified, and the value of business_a is set, i.e. the attribute information of the virtual role is recorded in the form of key-value pair array.

[0117] Illustratively, check if the key is within the size range of value_num and value_arr, if not within the size range of value_num and value_arr, print error log and return; if within the size range of value_num and value_arr, assign the value of business_a to the position indexed by the key of business_a in value_arr; at the same time, assign the "whether to notify the client" flag to the position indexed in ntf_value_arr, assign the "whether to notify the client" to the position indexed in change_ntf_value_arr; then, if there is a true value in change_ntf_value_arr, set the timer in the next state frame of the server for the position marked as true in the "to-be-notified array", synchronize the index and the corresponding value in value_arr to the client, and clear the flag in change_ntf_value_arr.

[0118] 4) Data acquisition of attribute information.

[0119] That is, specify the key of business_a, and acquire the value of business_a.

[0120] Illustratively, check if the key of business_a is within the size range of value_num and value_arr, if not within the size range of value_num and value_arr, print error log and return; if within the size range of value_num and value_arr, return the value at the position indexed by the key of business_a in value_arr.

[0121] 5) Active synchronization.

[0122] That is, it can be understood as sending the data increment (i.e., the aforementioned incremental data) that has been set but not synchronized to the client to the client.

[0123] Illustratively, traverse change_ntf_value_arr to obtain the index corresponding to the position with a true value, and notify the client of the index value and the data value in value_arr, which can also be understood as incremental synchronization.

[0124] 6) Full storage.

[0125] When the player is online or offline, persist the data in the memory to the database.

[0126] According to the value_num, value_arr, ntf_value_arr in the foregoing 2), the relevant data in the memory data is sent to the database for persistent storage.

[0127] 7) Full amount loading.

[0128] When the player logs in, the full amount of data is loaded from the persistent database into the memory.

[0129] Illustratively, when full amount loading is required, the value_num, value_arr, ntf_value_arr in the database are loaded into the memory; then the ntf_value_arr is traversed to obtain the index corresponding to the position where the value is true, and the index value and the data value in the value array are notified to the client, which can also be understood as initial value synchronization.

[0130] To sum up, the data processing method provided by the embodiments of the present application can effectively improve the data management capability for virtual roles, and can also improve the convenient development degree of other modules and improve the high degree of automation of data processing. Based on the method provided by the embodiments of the present application, the data management of the virtual role is integrated with data storage / data synchronization / data persistence, and the development of other modules only needs to declare new enumerations using existing interfaces, without the need to implement the logic of data storage / data synchronization / data persistence again.

[0131] In some embodiments, the data processing method provided by the embodiments of the present application eliminates the steps of adding attribute fields / synchronizing clients / persistent landing, increases the development convenience, and improves the convenience of in-memory storage / synchronization to the client / persistent storage of built-in type data in the game development process.

[0132] Specifically, the role data of the virtual role is stored in an array of a corresponding type in the form of a key-value pair, an access portal for setting / retrieving data is provided to other modules, and a switch for a synchronization client is provided to determine whether the data is synchronized to the client. Meanwhile, the method provided by the application can also realize active synchronization of the calling interface of the client. If an external module actively calls the active synchronization interface of the server, all data that is marked as needing to be synchronized to the client and has not been synchronized is immediately sent to the client for synchronization. If the synchronization interface is not actively called, the sending operation is automatically performed in the next state synchronization frame. Compared with the two data synchronization modes, the data synchronization process of the former is faster, and the number of synchronization steps of the latter is less. Meanwhile, the synchronization of the incremental data can also reduce the amount of data transmission. In addition, the application can also realize the persistent storage of the attribute information of the virtual role. The data in the memory does not need external intervention and automatically realizes the persistent storage and loading of the data, thereby greatly reducing the steps of data structure design / data structure conversion / persistence development in the development of external modules.

[0133] Figure 13 A structural block diagram of a virtual role-based data processing apparatus provided by an embodiment of the application is shown. The apparatus has the functions of implementing the above-mentioned virtual role-based data processing method examples, which can be implemented by hardware or corresponding software executed by hardware. The apparatus can be the server introduced above or be arranged in the server. As shown in the figure, the apparatus includes: Figure 13 The obtaining module 1320 is configured to obtain memory data corresponding to the virtual role, the memory data including at least one enumeration value, the at least one enumeration value being used to mark existing attribute information associated with the virtual role or the at least one enumeration value being used to add at least one attribute field to the memory data, the at least one attribute field being used to mark new attribute information associated with the virtual role. The processing module 1340 is configured to perform data processing on at least one of the existing attribute information and the new attribute information according to the memory data.

[0134] In some embodiments, the processing module 1340 is configured to perform data processing on at least one of the existing attribute information and the new attribute information according to at least one key-value pair array in the memory data; wherein the i-th key-value pair array in the at least one key-value pair array includes one enumeration value and one data value corresponding to the enumeration value, the one data value corresponding to attribute information marked by the one enumeration value in the virtual role, the numerical value of the one enumeration value being different from the numerical values of the enumeration values included in other key-value pair arrays in the at least one key-value pair array, and i is an integer not less than zero.

[0135] ​In some embodiments, the at least one enumeration value is used to add at least one attribute field to the memory data, and the data processing at least includes adding the at least one attribute field, and the processing module 1340 is configured to add one or more attribute fields in the memory data in a case where the virtual character acquires one or more added functions, and each attribute field uniquely marks attribute information corresponding to an added function by means of a key-value pair array.

[0136] In some embodiments, each attribute field includes an added enumeration value and an added data value, the added enumeration value is an enumeration value that has not been used in the memory data, and the added enumeration value is used to mark a function serial number of a specified added function, and the added data value is used to record attribute information corresponding to the specified added function.

[0137] In some embodiments, the data processing at least includes data synchronization of attribute information, the attribute information includes existing attribute information and / or added attribute information, and the processing module 1340 is configured to perform data synchronization of the existing attribute information and / or the added attribute information with the client associated with the virtual character according to the at least one enumeration value, and the attribute information subjected to the data synchronization is incremental data that has not been synchronized at a current time point.

[0138] In some embodiments, the memory data at least carries a first synchronization index, the first synchronization index is used to indicate whether to perform data synchronization of incremental data with the client, and the processing module 1340 is configured to, in a case where the first synchronization index indicates that the data synchronization of the incremental data with the client is to be performed, confirm one or more valid enumeration values corresponding to the incremental data, and perform the data synchronization of the incremental data according to data values indexed by the one or more valid enumeration values.

[0139] In some embodiments, a time node of the data synchronization of the incremental data is determined according to whether a proactive synchronization interface of the server is actively called by an external module, and the external module is the server or an external device other than the server and requiring to acquire attribute information.

[0140] In some embodiments, in a case where the proactive synchronization interface is actively called by the external module, the data synchronization of the incremental data is performed at a calling time point; and in a case where the proactive synchronization interface is not actively called by the external module, the data synchronization of the incremental data is performed at a sending time point corresponding to a next state synchronization frame, and the state synchronization frame is used to indicate an attribute information update duration of the virtual character.

[0141] In some embodiments, the data processing at least includes data synchronization of attribute information, the attribute information including existing attribute information and / or newly added attribute information, and the memory data at least carries a second synchronization index, the second synchronization index being used to indicate whether to perform data synchronization of specified attribute information with a client associated with the virtual role, the processing module 1340 being configured to, in a case where the client logs in the virtual role, determine a specified enumeration value corresponding to the specified attribute information according to the second synchronization index, and perform data synchronization of the specified attribute information with the client in a case where the specified enumeration value is a valid value.

[0142] In some embodiments, the data processing at least includes storage of attribute information, the attribute information including existing attribute information and / or newly added attribute information, and the processing module 1340 is further configured to, at a specified moment when the virtual role is online or at a moment when the virtual role is offline, update the memory data, and automatically store the updated memory data in the database.

[0143] In some embodiments, the processing module 1340 is further configured to, in a case where the client associated with the virtual role logs in the virtual role, load the updated memory data from the database, and synchronize attribute information of the virtual role with the client.

[0144] In some embodiments, the memory data at least carries a valid number, and the processing module 1340 is configured to, in a case where a value of the at least one enumeration value is within a range of the valid number, perform data processing on at least one of the existing attribute information and the newly added attribute information.

[0145] In some embodiments, the processing module 1340 is further configured to, in a case where the value of the at least one enumeration value is not within the range of the valid number, print an error log.

[0146] It should be noted that the specific limitations in the above one or more embodiments of the virtual role-based data processing apparatus can refer to the limitations of the virtual role-based data processing method described above, which will not be repeated here. The modules of the above apparatus can be realized by software, hardware and their combinations, and the modules can be embedded in the processor of the computer device or independent of the processor, or stored in the memory of the computer device in the form of software, so as to be called and executed by the processor.

[0147] The serial numbers of the above embodiments of the present application are only for description, and do not represent the advantages or disadvantages of the embodiments.

[0148] Figure 14A structural block diagram of a computer device 1400 provided by an example embodiment of the present application is shown. The computer device 1400 can be a portable mobile terminal, such as a smartphone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 (Moving Picture Experts Group Audio Layer IV) player. The computer device 1400 can also be referred to as a user device, a portable terminal, or other names. Generally, the computer device 1400 includes a processor 1401 and a memory 1402.

[0149] The processor 1401 can include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1401 can be implemented in at least one of a hardware form of a DSP (Digital Signal Processing), an FPGA (Field Programmable Gate Array), a PLA (Programmable Logic Array). The processor 1401 can also include a main processor and a coprocessor, the main processor being a processor for processing data in an awake state, also referred to as a CPU (Central Processing Unit), and the coprocessor being a low-power processor for processing data in a standby state. In some embodiments, the processor 1401 can be integrated with a GPU (Graphics Processing Unit) for rendering and drawing content required to be displayed by a display screen. In some embodiments, the processor 1401 can further include an AI (Artificial Intelligence) processor for processing computing operations related to machine learning.

[0150] The memory 1402 can include one or more computer-readable storage media, which can be tangible and non-transitory. The memory 1402 can also include a high-speed random access memory, and a non-volatile memory such as one or more disk storage devices, flash storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 1402 is used to store at least one instruction for being executed by the processor 1401 to implement a virtual role-based data processing method provided in the embodiments of the present application.

[0151] In some embodiments, the computer device 1400 can further include a peripheral device interface 1403 and at least one peripheral device. The processor 1401, the memory 1402 and the peripheral device interface 1403 can be connected through a bus or a signal line. Each peripheral device can be connected to the peripheral device interface 1403 through a bus, a signal line or a circuit board. Specifically, the peripheral device includes at least one of a radio frequency circuit 1404, a touch display screen 1405, a camera assembly 1406, an audio circuit 1407 and a power supply 1408.

[0152] The peripheral device interface 1403 can be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 1401 and the memory 1402. In some embodiments, the processor 1401, the memory 1402 and the peripheral device interface 1403 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 1401, the memory 1402 and the peripheral device interface 1403 can be implemented on a separate chip or circuit board, and the present embodiment is not limited in this regard.

[0153] The radio frequency circuit 1404 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 1404 communicates with a communication network and other communication devices through electromagnetic signals. The radio frequency circuit 1404 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. Optionally, the radio frequency circuit 1404 includes an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, etc. The radio frequency circuit 1404 can communicate with other terminals through at least one wireless communication protocol. The wireless communication protocol includes but is not limited to the World Wide Web, a metropolitan area network, an intranet, various generations of mobile communication networks (2G, 3G, 4G and 5G), a wireless local area network and / or a Wi-Fi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 1404 can also include NFC (Near Field Communication) related circuitry, which is not limited in the present application.

[0154] The touch display screen 1405 is configured to display a UI (User Interface). The UI can include graphics, text, icons, video, and any combination thereof. The touch display screen 1405 is further configured to capture touch signals on or above the surface of the touch display screen 1405. The touch signals can be input to the processor 1401 as control signals for processing. The touch display screen 1405 is configured to provide virtual buttons and / or virtual keyboard, also known as soft buttons and / or soft keyboard. In some embodiments, the touch display screen 1405 can be one, configured to set the front panel of the computer device 1400; in other embodiments, the touch display screen 1405 can be at least two, respectively configured to set different surfaces of the computer device 1400 or in a folding design; in some embodiments, the touch display screen 1405 can be a flexible display screen, configured to set a curved surface or a folding surface of the computer device 1400. Even, the touch display screen 1405 can also be configured to be an irregular shape other than a rectangle, i.e., a special-shaped screen. The touch display screen 1405 can be made of materials such as LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), etc.

[0155] The camera assembly 1406 is configured to capture images or videos. Optionally, the camera assembly 1406 includes a front camera and a rear camera. Generally, the front camera is configured to implement video calls or selfies, and the rear camera is configured to implement photo or video shooting. In some embodiments, the rear camera is at least two, respectively configured to be any one of a main camera, a depth-of-field camera, and a wide-angle camera, to implement the background blurring function by fusing the main camera and the depth-of-field camera, and to implement the panorama shooting and VR shooting functions by fusing the main camera and the wide-angle camera. In some embodiments, the camera assembly 1406 can further include a flash. The flash can be a single-color-temperature flash or a dual-color-temperature flash. The dual-color-temperature flash refers to a combination of a warm light flash and a cold light flash, which can be used for light compensation under different color temperatures.

[0156] The audio circuit 1407 is configured to provide an audio interface between a user and the computer device 1400. The audio circuit 1407 can include a microphone and a speaker. The microphone is configured to collect sound waves from the user and the environment, and convert the sound waves into an electrical signal input to the processor 1401 for processing, or to the radio frequency circuit 1404 for voice communication. The microphone can be multiple microphones arranged at different positions of the computer device 1400 for stereo sound collection or noise reduction. The microphone can also be an array microphone or an omnidirectional collection microphone. The speaker is configured to convert an electrical signal from the processor 1401 or the radio frequency circuit 1404 into sound waves. The speaker can be a conventional thin-film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can convert electrical signals into sound waves audible to humans, or sound waves inaudible to humans for ranging purposes. In some embodiments, the audio circuit 1407 can further include a headphone jack.

[0157] The power supply 1408 is configured to supply power to various components of the computer device 1400. The power supply 1408 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 1408 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. The wired rechargeable battery is a battery that is charged through a wired line, and the wireless rechargeable battery is a battery that is charged through a wireless coil. The rechargeable battery can also be used to support fast charging technology.

[0158] In some embodiments, the computer device 1400 further includes one or more sensors 1409. The one or more sensors 1409 include, but are not limited to, an acceleration sensor 1410, a gyroscope sensor 1411, a pressure sensor 1412, an optical sensor 1413, and a proximity sensor 1414.

[0159] The acceleration sensor 1410 can detect the acceleration magnitude in three coordinate axes of a coordinate system established by the computer device 1400. For example, the acceleration sensor 1410 can be used to detect the components of the gravitational acceleration in three coordinate axes. The processor 1401 can control the touch display 1405 to display a user interface in a landscape view or a portrait view according to the gravitational acceleration signals collected by the acceleration sensor 1410. The acceleration sensor 1410 can also be used for game or user motion data collection.

[0160] The gyroscope sensor 1411 can detect the body orientation and rotation angle of the computer device 1400, and the gyroscope sensor 1411 can cooperate with the acceleration sensor 1410 to collect the 3D action of the user on the computer device 1400. According to the data collected by the gyroscope sensor 1411, the processor 1401 can realize the following functions: action sensing (such as changing the UI according to the user's tilt operation), image stabilization when shooting, game control, and inertial navigation.

[0161] The pressure sensor 1412 can be arranged on the side frame of the computer device 1400 and / or the lower layer of the touch display screen 1405. When the pressure sensor 1412 is arranged on the side frame of the computer device 1400, the user's holding signal on the computer device 1400 can be detected, and left-hand or right-hand recognition or shortcut operation can be performed according to the holding signal. When the pressure sensor 1412 is arranged on the lower layer of the touch display screen 1405, the operable control on the UI interface can be controlled according to the user's pressure operation on the touch display screen 1405. The operable control includes at least one of a button control, a scroll bar control, an icon control, and a menu control.

[0162] The optical sensor 1413 is used to collect the ambient light intensity. In an embodiment, the processor 1401 can control the display brightness of the touch display screen 1405 according to the ambient light intensity collected by the optical sensor 1413. Specifically, when the ambient light intensity is high, the display brightness of the touch display screen 1405 is increased; when the ambient light intensity is low, the display brightness of the touch display screen 1405 is decreased. In another embodiment, the processor 1401 can also dynamically adjust the shooting parameters of the camera assembly 1406 according to the ambient light intensity collected by the optical sensor 1413.

[0163] The proximity sensor 1414, also known as a distance sensor, is usually arranged on the front of the computer device 1400. The proximity sensor 1414 is used to collect the distance between the user and the front of the computer device 1400. In an embodiment, when the proximity sensor 1414 detects that the distance between the user and the front of the computer device 1400 gradually decreases, the processor 1401 controls the touch display screen 1405 to switch from the bright screen state to the off-screen state; when the proximity sensor 1414 detects that the distance between the user and the front of the computer device 1400 gradually increases, the processor 1401 controls the touch display screen 1405 to switch from the off-screen state to the bright screen state.

[0164] Those skilled in the art can understand that the above structure does not constitute a limitation on the computer device 1400, and can include more or fewer components than the illustration, or combine certain components, or use different component arrangements.

[0165] The embodiment of the present application further provides a computer device, which comprises a processor and a memory, and the memory stores a computer program, the computer program is loaded and executed by the processor to realize the data processing method provided by the above method embodiments.

[0166] The embodiment of the present application further provides a computer readable storage medium, which stores a computer program, and the computer program is used to be executed by a processor to realize the data processing method provided by the above method embodiments.

[0167] The embodiment of the present application further provides a computer program product, which comprises a computer program, and the computer program is loaded and executed by a processor to realize the data processing method provided by the above method embodiments.

[0168] It should be understood that the "multiple" mentioned herein refers to two or more than two. The "and / or" describes the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B can represent the following three cases: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally represents that the associated objects before and after it are in an "or" relationship. In addition, the step numbers described herein only exemplarily show a possible execution order between steps, and in some other embodiments, the above steps can also be executed in a non-numbered order, such as simultaneously executing two steps with different numbers or executing two steps with different numbers in an order opposite to the illustration, and the embodiment of the present application does not limit this.

[0169] Those skilled in the art can understand that all or part of the steps of the above embodiments can be completed by hardware, or can be instructed by a program to complete relevant hardware, and the program can be stored in a computer readable storage medium, and the storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk.

[0170] The above is only an optional embodiment of the present application, and does not limit the present application, and any modification, equivalent switching, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A data processing method based on a virtual role, characterized by, The method is performed by a server, and the method comprises: acquiring memory data corresponding to the virtual character, the memory data comprising at least one enumeration value, the at least one enumeration value being used to mark existing attribute information associated with the virtual character or the at least one enumeration value being used to add at least one attribute field to the memory data, the at least one attribute field being used to mark new attribute information associated with the virtual character; performing data processing on at least one of the existing attribute information and the new attribute information according to the memory data.

2. The method of claim 1, wherein, The data processing on at least one of the existing attribute information and the new attribute information according to the memory data comprises: performing the data processing on at least one of the existing attribute information and the new attribute information according to at least one key-value pair array in the memory data; wherein an i-th key-value pair array in the at least one key-value pair array comprises one enumeration value and one data value, the one data value uniquely corresponding to attribute information in the virtual character marked by the one enumeration value, the one enumeration value being different from enumeration values in other key-value pair arrays in the at least one key-value pair array, and i is an integer not less than zero.

3. The method according to claim 1 or 2, characterized in that, The at least one enumeration value is used to add the at least one attribute field to the memory data, the data processing at least comprising an attribute field, and the data processing on at least one of the existing attribute information and the new attribute information according to the memory data comprises: in a case where the virtual character acquires one or more new functions, adding one or more attribute fields to the memory data, each attribute field uniquely marking attribute information corresponding to a new function through a key-value pair array.

4. The method of claim 3, wherein each attribute field comprises a new enumeration value and a new data value, the new enumeration value being an enumeration value not yet used in the memory data, the new enumeration value being used to mark a function serial number of a specified new function, and the new data value being used to record attribute information corresponding to the specified new function.

5. The method according to any one of claims 1 to 4, characterized in that, The data processing at least comprises data synchronization of attribute information, the attribute information comprising the existing attribute information and / or the new attribute information, and the data processing on at least one of the existing attribute information and the new attribute information according to the memory data comprises: performing data synchronization of the existing attribute information and / or the new attribute information with a client associated with the virtual character according to the at least one enumeration value, the attribute information subjected to data synchronization being incremental data not yet synchronized by the client at a current time.

6. The method of claim 5, wherein, The memory data at least carries a first synchronization index, the first synchronization index being used to indicate whether to perform data synchronization of the incremental data with the client, and the data synchronization of the existing attribute information and / or the new attribute information with the client associated with the virtual character according to the at least one enumeration value comprises: In a case that the first synchronization index indicates that the data synchronization of the incremental data is performed with the client, one or more valid enumeration values corresponding to the incremental data are confirmed, and the data synchronization of the incremental data is performed according to data values indexed by the one or more valid enumeration values.

7. The method of claim 5 or 6, wherein, A time node of the data synchronization of the incremental data is determined according to whether the active synchronization interface of the server is actively called by an external module, the external module being the server or an external device other than the server and requiring to obtain the attribute information.

8. The method of claim 7, wherein, In a case that the active synchronization interface is actively called by the external module, the data synchronization of the incremental data is performed at a calling time; In a case that the active synchronization interface is not actively called by the external module, the data synchronization of the incremental data is performed at a sending time corresponding to a next state synchronization frame, the state synchronization frame being used to indicate an attribute information update duration of the virtual role.

9. The method according to any one of claims 1 to 4, characterized in that, The data processing at least includes data synchronization of attribute information, the attribute information including the existing attribute information and / or the new attribute information, and the memory data at least carrying a second synchronization index, the second synchronization index being used to indicate whether data synchronization of specified attribute information is performed with a client associated with the virtual role, and the data processing of at least one of the existing attribute information and the new attribute information according to the memory data including: In a case that the client logs in the virtual role, a specified enumeration value corresponding to the specified attribute information is determined according to the second synchronization index, and in a case that the specified enumeration value is a valid value, the data synchronization of the specified attribute information is performed with the client.

10. The method of claim 2, wherein, The data processing at least includes storage of attribute information, the attribute information including the existing attribute information and / or the new attribute information, and the data processing of at least one of the existing attribute information and the new attribute information according to the memory data including: In a case that the virtual role is online at a specified time or in a case that the virtual role is offline, the memory data is updated, and the updated memory data is automatically stored in a database.

11. The method of claim 10, wherein, The method further includes: In a case that a client associated with the virtual role logs in the virtual role, the updated memory data is loaded from the database, and attribute information of the virtual role is synchronized with the client.

12. The method according to any one of claims 1 to 11, characterized in that, The memory data at least carries a valid number, and the data processing of at least one of the existing attribute information and the new attribute information according to the memory data including: In a case that a value of the at least one enumeration value is within a range of the valid number, the data processing of at least one of the existing attribute information and the new attribute information is performed.

13. The method of claim 12, wherein, The method further includes: In a case that the value of the at least one enumeration value is not within the range of the valid number, an error log is printed.

14. A virtual character-based data processing apparatus, characterized by comprising: The apparatus includes: An acquisition module is configured to acquire memory data corresponding to the virtual character, the memory data including at least one enumeration value, the at least one enumeration value being used to mark existing attribute information associated with the virtual character or the at least one enumeration value being used to add at least one attribute field to the memory data, the at least one attribute field being used to mark new attribute information associated with the virtual character. A processing module is configured to perform data processing on at least one of the existing attribute information and the new attribute information according to the memory data.

15. A computer device, comprising: The computer device includes a processor and a memory, the memory storing a computer program, the computer program being loaded and executed by the processor to implement the data processing method according to any one of claims 1 to 13.

16. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, the computer program being used to be executed by a processor to implement the data processing method according to any one of claims 1 to 13.

17. A computer program product, characterised in that, The computer program product includes a computer program, the computer program being loaded and executed by a processor to implement the data processing method according to any one of claims 1 to 13.