Object data processing method, device and storage medium

By using attribute mapping objects constructed with scripting and object-oriented programming languages ​​in the data processing system, the problems of high data update costs and poor synchronization are solved, multi-terminal data sharing and consistency are achieved, and resource consumption and costs are reduced.

CN117224968BActive Publication Date: 2026-06-26TENCENT TECHNOLOGY (SHENZHEN) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TENCENT TECHNOLOGY (SHENZHEN) CO LTD
Filing Date
2022-06-06
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

The existing data update and synchronization system sets up separate update systems and schemes for different data sides, resulting in high data update costs and poor synchronization.

Method used

The first data processing terminal receives object data update requests, is built based on a scripting language, and calls the target attribute mapping object of the second data processing terminal. The second data processing terminal is built based on an object-oriented programming language, and the target attribute mapping object is instantiated based on the target description file and is used to describe the modeling information of member objects to achieve data updates and synchronization.

Benefits of technology

It enables data sharing and consistency across different programming language endpoints, significantly reducing update resource consumption and costs, and improving data synchronization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117224968B_ABST
    Figure CN117224968B_ABST
Patent Text Reader

Abstract

The application provides an object data processing method and device and a storage medium, relates to the technical field of Internet, can be applied to various scenes such as cloud technology, artificial intelligence, intelligent transportation and auxiliary driving, is applied to an object data processing system including a first data processing end and a second data processing end, and the method comprises the following steps: the first data processing end receives an object data update request, the object data update request carries a member object identifier and member update data of a target member object, the first data processing end is constructed based on a script language; the first data processing end calls a target attribute mapping object in the second data processing end based on the member object identifier of the target member object, the second data processing end is constructed based on an object-oriented programming language; and the second data processing end performs data update on the target attribute mapping object according to the member update data. The application can reduce the update resource occupation and cost, and improve data synchronization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of Internet technology, and in particular to an object data processing method, apparatus and storage medium. Background Technology

[0002] During program execution, updated object data is generated. To ensure the normal operation of program tasks, this object data needs to be updated promptly in the program's data service system. For example, during game program execution, multiple clients generate a large amount of updated object data, requiring each client's data to be updated in the data service system, necessitating multi-client data interaction. The data service system may run multiple runtime environments, correspondingly requiring multiple data sides. Existing data update and synchronization systems typically set up separate data update systems and schemes for different data sides, resulting in high data update costs and poor data update synchronization. Summary of the Invention

[0003] This application provides an object data processing method, apparatus, and storage medium that can solve the problems of high data update cost and poor data update synchronization in related technologies.

[0004] On one hand, this application provides an object data processing method applied to a data service system, the data service system including a first data processing terminal and a second data processing terminal, the method including:

[0005] The first data processing terminal receives an object data update request, which carries the member object identifier and member update data of the target member object. The first data processing terminal is built based on a scripting language.

[0006] The first data processing terminal calls the target attribute mapping object in the second data processing terminal based on the member object identifier of the target member object. The second data processing terminal is built based on an object-oriented programming language. The target attribute mapping object is obtained by instantiating the attribute mapping class based on the target description file. The target description file is used to describe the modeling information of at least one member object. The attribute mapping class represents the modeling generalization result of the at least one member object. The at least one member object includes the target member object.

[0007] The second data processing terminal updates the target attribute mapping object based on the member update data.

[0008] On the other hand, an object data processing system is provided, the system including a first data processing terminal and a second data processing terminal;

[0009] The first data processing terminal is used to receive an object data update request, which carries a member object identifier and member update data of a target member object. The first data processing terminal is built based on a scripting language. Based on the member object identifier of the target member object, the second data processing terminal calls a target attribute mapping object. The second data processing terminal is built based on an object-oriented programming language. The target attribute mapping object is obtained by instantiating an attribute mapping class based on a target description file. The target description file is used to describe the modeling information of at least one member object. The attribute mapping class represents the modeling generalization result of the at least one member object, and the at least one member object includes the target member object.

[0010] The second data processing terminal is used to update the target attribute mapping object based on the member update data.

[0011] On the other hand, a computer device is provided, the device including a processor and a memory, the memory storing at least one instruction or at least one program, the at least one instruction or the at least one program being loaded and executed by the processor to implement the object data processing method as described above.

[0012] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction or at least one program is stored therein, the at least one instruction or the at least one program being loaded and executed by a processor to implement the object data processing method as described above.

[0013] On the other hand, a server is provided, the server including a processor and a memory, the memory storing at least one instruction or at least one program, the at least one instruction or the at least one program being loaded and executed by the processor to implement the object data processing method as described above.

[0014] On the other hand, a computer program product or computer program is provided, which includes computer instructions that, when executed by a processor, implement the object data processing method as described above.

[0015] The object data processing method, apparatus, device, storage medium, server, computer program, and computer program product provided in this application have the following technical effects:

[0016] The technical solution of this application receives an object data update request through a first data processing terminal. The object data update request carries the member object identifier and member update data of the target member object. The first data processing terminal is built based on a scripting language. The first data processing terminal calls a target attribute mapping object in a second data processing terminal based on the member object identifier of the target member object. The second data processing terminal is built based on an object-oriented programming language. The target attribute mapping object is obtained by instantiating an attribute mapping class based on a target description file. The target description file describes the modeling information of at least one member object, and the attribute mapping class represents the generalization result of modeling at least one member object, including the target member object. The second data processing terminal updates the target attribute mapping object according to the member update data. Thus, the second data processing terminal can update data simply by calling the attribute mapping object of the first data processing terminal, thereby achieving data sharing and consistency across different programming language terminals, significantly reducing update resource consumption and costs, and improving data synchronization. Attached Figure Description

[0017] To more clearly illustrate the technical solutions and advantages in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 This is a schematic diagram of an application environment provided in an embodiment of this application;

[0019] Figure 2 This is a flowchart illustrating an object data processing method provided in an embodiment of this application;

[0020] Figure 3 This is a schematic diagram of a ULM provided in an embodiment of this application;

[0021] Figure 4 This is a flowchart illustrating another object data processing method provided in an embodiment of this application;

[0022] Figure 5 This is another ULM schematic diagram provided in the embodiments of this application;

[0023] Figure 6 This is a flowchart illustrating another object data processing method provided in an embodiment of this application;

[0024] Figure 7 This is a flowchart illustrating another object data processing method provided in an embodiment of this application;

[0025] Figure 8 This is a flowchart illustrating another object data processing method provided in an embodiment of this application;

[0026] Figure 9 This is a flowchart illustrating another object data processing method provided in an embodiment of this application;

[0027] Figure 10 This is a schematic diagram of an object data update process provided in an embodiment of this application;

[0028] Figure 11 This is a schematic diagram of the framework of an object data processing system provided in an embodiment of this application;

[0029] Figure 12 This is a hardware structure block diagram of an electronic device for an object data processing method provided in an embodiment of this application. Detailed Implementation

[0030] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0031] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or server that comprises a series of steps or sub-modules is not necessarily limited to those steps or sub-modules explicitly listed, but may include other steps or sub-modules not explicitly listed or inherent to such processes, methods, products, or devices.

[0032] Please see Figure 1 , Figure 1 This is a schematic diagram of an application environment provided in an embodiment of this application, such as... Figure 1 As shown, the application environment may include at least terminal 01 and server 02. In practical applications, terminal 01 and server 01 can be directly or indirectly connected via wired or wireless communication, and this application does not impose any restrictions on this.

[0033] In this embodiment, terminal 01 may include physical devices such as smartphones, desktop computers, tablets, laptops, digital assistants, augmented reality (AR) / virtual reality (VR) devices, smart voice interaction devices, smart home appliances, smart wearable devices, and in-vehicle terminal devices, and may also include software running on the physical device, such as applications.

[0034] In this embodiment, server 02 can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.

[0035] Specifically, cloud technology refers to a managed technology that unifies hardware, software, and network resources within a wide area network (WAN) or local area network (LAN) to achieve data computation, storage, processing, and sharing. It distributes computing tasks across a resource pool composed of numerous computers, enabling various application systems to access computing power, storage space, and information services as needed. The network providing these resources is called the "cloud." Artificial intelligence cloud services are generally also known as AIaaS (AI as a Service). This is currently a mainstream service model for artificial intelligence platforms. Specifically, AIaaS platforms break down several common AI services and provide them as independent or packaged services in the cloud. This service model is similar to opening an AI-themed marketplace: all developers can access and use one or more AI services provided by the platform through API interfaces. Some experienced developers can also use the AI ​​framework and AI infrastructure provided by the platform to deploy and maintain their own dedicated cloud AI services.

[0036] Specifically, the servers mentioned above may include physical devices, such as network communication submodules, processors, and memory, as well as software running on the physical devices, such as applications.

[0037] In this embodiment of the application, the server 02 can run an object data processing system, including a first data processing terminal and a second data processing terminal, to provide object data processing services. The terminal 01 can run a target program, such as a client of a game application, to send object data update requests to the server 02 and receive target synchronization data sent by the server 02.

[0038] Furthermore, it is understandable that Figure 1 The example shown is merely an application environment for an object data processing method. This application environment may include more or fewer nodes, and this application does not impose any restrictions on it.

[0039] The application environment involved in this application embodiment, or the terminal 01 and server 02 in the application environment, can be a distributed system formed by connecting clients and multiple nodes (any form of computing device accessing the network, such as servers and terminals) through network communication. The distributed system can be a blockchain system, which can provide the aforementioned object data processing services and data storage services, etc.

[0040] The following describes an object data processing method based on the aforementioned application environment. This application's embodiments can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, smart transportation, and assisted driving. Please refer to... Figure 2 , Figure 2 This is a flowchart illustrating an object data processing method provided in an embodiment of this application. This specification provides method operation steps as shown in the embodiments or flowcharts, but based on conventional or non-inventive labor, more or fewer operation steps may be included. The order of steps listed in the embodiments is merely one possible execution order among many, and does not represent the only possible execution order. In actual system or server products, the method can be executed sequentially according to the embodiments or drawings, or in parallel (e.g., in a parallel processor or multi-threaded processing environment). The above object data processing method is applied to an object data processing system, which runs on a server side, such as... Figure 2 As shown, the method may include the following steps S201-S205.

[0041] S201: The first data processing terminal receives an object data update request.

[0042] In this embodiment, the object data processing system includes a first data processing terminal and a second data processing terminal. The first and second data processing terminals can be physical devices corresponding to the target program or virtual machines corresponding to the target program. Specifically, the first data processing terminal is built based on a scripting language, and the second data processing terminal is built based on an object-oriented programming language. The object-oriented programming language includes C++ (C++ object-oriented language), and the scripting language includes LUA. Correspondingly, the first data processing terminal can be built based on LUA, corresponding to the LUA side, and the second data processing terminal can be built based on C++, corresponding to the C++ side.

[0043] Specifically, an object data update request can be generated by the terminal when the target program generates update data for the target member object during its execution. This request carries the member object identifier and the updated member data. Specifically, the object data processing system can receive the object data update request sent by the terminal through a first data processing segment and / or a second data processing terminal. The target member object can be an object associated with a manipulated object during the execution of the target program. Each manipulated object can be associated with a member object group, which includes at least one member object. For example, if the target program is a game program, the manipulated object can be a game character, and the target member object can be an object associated with the game character, such as the game character's inventory items, character status, character skills, and character quests.

[0044] S203: The first data processing end calls the target attribute mapping object in the second data processing end based on the member object identifier of the target member object.

[0045] Specifically, the target attribute mapping object is obtained by instantiating the attribute mapping class based on the target description file. The target description file is the modeling file of the target program, used to describe the modeling information of at least one member object. In some embodiments, the target description file can be an XML file.

[0046] In some cases, the target description file can be used to describe the modeling information of at least one member object associated with a manipulated object, where the at least one member object includes the target member object. In other cases, the target description file can be used to describe the modeling information of member objects associated with multiple manipulated objects. The attribute mapping object is associated with the manipulated object identifier, which is the object name or object ID of the manipulated object, etc. The first data processing end determines the manipulated object to which the target member object belongs based on the member object identifier of the target member object, and then calls the target attribute mapping object associated with the manipulated object identifier.

[0047] The target description file is used to define the attribute data format and data synchronization method of the target member object. The modeling information in the target description file includes, but is not limited to, the manipulation object identifier, member object identifier, member attribute information, file description information, and data synchronization information. The member object identifier can be the object name or object ID of the member object, etc. The member attribute information includes, but is not limited to, the member object type, etc. The data synchronization information includes, but is not limited to, the data synchronization method, the database table name to which the member object belongs, and the database fields, etc. The data synchronization method can include the synchronization client method and the synchronization database method, etc.

[0048] In one embodiment, the target program is a game program. The game world corresponding to the target program is modeled, and the modeled member objects are described based on XML format to obtain an XML-formatted target description file. The target description file describes the member object type, member object identifier, synchronization client method, and synchronization database method of the member objects. The following XML code snippet introduces the file description data type of the target description file. Among them, the control object AvatarProp corresponding to the target description file has version information in the first line and namespace in the third line. These two lines are mainly meta information. Lines five to nine describe the Flag information, which is the data synchronization method. The name indicates the name of the Flag, and the value indicates the meaning of the Flag. Three values ​​are supported: OWN_CLIENT, PERSISTENT, and OTHER_CLIENTS, which respectively indicate synchronization to the client itself, synchronization to the database, and synchronization to other clients corresponding to the data system. These three values ​​can be used simultaneously. For example, in the sixth line, the OWN_PERSISTENT tag means synchronization to the client itself and synchronization to the database.

[0049] Furthermore, lines 11 to 28 define the control object type and data table of the control object AvatarProp, as well as the member object types, member object identifiers, database fields, and data synchronization methods for multiple member objects. Specifically, `class` defines the object name of the control object as AvatarProp, `dbtable` specifies the database table name to which the control object belongs, `name` specifies the object name of the member object of the control object, `type` specifies the object type, which can be uint32, uint64, int32, int64, or string, or a custom type such as G6PropertyMap, `flag` specifies the data synchronization method of the member object, and `default` specifies its default value. For member objects with a custom control object type, the map information of the member object also needs to be specified, including key-value mapping pairs, where the key is an object type other than the custom type, and the value can be any of the above object types, as shown in lines 24 to 27, which all include key-value mapping pairs.

[0050]

[0051]

[0052] In this embodiment, the first data processing terminal pre-stores a predefined base class and an attribute mapping class. The predefined base class is a basic class that defines multiple basic interfaces, such as setting attribute names, description class names, and description class types. It can also provide a preset serialization interface. The attribute name can be assigned to the member object name, the description class name can be assigned to the manipulated object name, and the description class type can be assigned to the manipulated object type. The attribute mapping class inherits from the predefined base class and represents the modeling generalization result of at least one member object. In some embodiments, the attribute mapping class represents the modeling generalization result of at least one member object associated with a custom type of manipulated object, specifically describing the map information of the member object, etc. The attribute mapping class can hold multiple instances of the predefined base class. In some embodiments, the first data processing terminal also pre-stores an attribute value class, which inherits from the predefined base class. This attribute value class represents the modeling generalization result of at least one member object associated with a non-custom type of manipulated object, specifically describing the member object's other member attribute types besides the map information, etc. The attribute value class is a template class, and the template parameters can be uint32, uint64, int32, int64, or string, etc.

[0053] In one embodiment, please refer to Figure 3 , Figure 3 The diagram illustrates a UML (Unified Modeling Language) representation, showing a predefined base class (PropBase), a property map class (PropMap), and a property value class (PropValue). As shown, PropBase defines basic interfaces such as Property name and descriptor, and also provides a serialization interface. PropMap and PropValue inherit from PropBase. PropMap describes Map information and custom type properties in XML description files. A PropMap can hold multiple instances of PropBase, recorded in `items_`. PropValue is a template class used to represent properties other than Maps and custom types. Template parameters can be uint32, uint64, int32, int64, or string, etc.

[0054] Based on some or all of the above implementation methods, in some embodiments, the modeling information also includes file description information, and the second data processing terminal also pre-stores a preset description class. Correspondingly, before S203, the method also includes a step of generating a file description object. Please refer to [link / reference]. Figure 4 Specifically, this includes the following S301-S305.

[0055] S301: The second data processing end extracts the file description information of the target description file based on the preset description class, and obtains the description information extraction result.

[0056] S303: The second data processing end creates a file description instance corresponding to the target description file based on a preset description class.

[0057] S305: The second data processing end writes the extracted description information into the file description instance to obtain the file description object.

[0058] Specifically, the preset description class is a reflection class of the attribute mapping class. This preset description class can be a singleton. Based on this preset description class, the target description file is read to extract file description information from the modeling information in the target description file. The extracted description information results are then created, and corresponding file description instances are created. After assigning values ​​to the file description instances based on the extracted description information results, a file description object is obtained. This file description object is used to construct the necessary information during the data update and synchronization process. The file description object provides reflection information to the attribute mapping object corresponding to the attribute mapping class.

[0059] In one embodiment, please refer to Figure 5 , Figure 5 The diagram illustrates another UML representation, showing a predefined descriptor class and a file descriptor class (PropDescriptor) that inherits from the predefined descriptor class (PropDescriptorMgr). The file descriptor object is an instance of the file descriptor class, generated based on the singleton class PropDescriptorMgr. The PropDescriptorMgr singleton class processes the predefined XML descriptor file, examines it, extracts the file descriptor information, creates a PropDescriptor instance, and populates it with the aforementioned file descriptor information. As shown, PropDescriptorMgr holds a property named descriptor_ (i.e., PropDescriptor), which is a Map. Its key is the Property class name from the XML descriptor file, such as "AvatarProp" in line 11 of the aforementioned code snippet, and its value is the PropDescriptor instance. Here, the PropDescriptor class is equivalent to the descriptor class of the XML descriptor file and also to the reflection class of the property mapping object.

[0060] In some embodiments, an empty attribute mapping object can be associated with a target mapping object reference to achieve data sharing; please refer to the relevant documentation. Figure 6 The method also includes the following steps S401-S407.

[0061] S401: The first data processing end obtains the file description object from the second data processing end.

[0062] S403: The first data processing end generates a mapping object creation request for the second data processing end based on the file description object.

[0063] S405: The second data processing end responds to the mapping object creation request and creates an empty attribute mapping object.

[0064] S407: The second data processing end associates the empty attribute mapping object with the target mapping object reference.

[0065] Specifically, after obtaining the target description file, the first data processing end and the second data processing end can read the target description file respectively. The first data processing end does not need to generate a file description class. When the creation of the target attribute mapping object is triggered by the first data processing end, it obtains the file description object corresponding to the target description file from the second data processing end, and requests the second data processing end to create an empty attribute mapping object corresponding to the attribute mapping class through a mapping object creation request. At the same time, it provides a reference to the target mapping object to the second data server, so that the second data server can establish an association between the empty attribute mapping object and the target mapping object reference. Here, the target mapping object reference can be a pointer, and the association processing can be to bind the pointer to the empty attribute mapping object. In this way, data sharing is realized between the first data processing end and the second data processing end, and the first data processing end can assign values ​​or modify data on the attribute mapping object based on the target mapping object reference.

[0066] In practical applications, the target attribute mapping object can be obtained from either the first data processing end or the second data processing end. Modeling information includes the member object identifier and member attribute information for each member object; please refer to the relevant documentation. Figure 7 The method also includes the following steps S501-S503.

[0067] S501: The first data processing end extracts the member object identifier and member attribute information of the modeling information to obtain the first attribute extraction result.

[0068] S503: The first data processing end writes the extracted first attribute extraction result into an empty attribute mapping object through the target mapping object reference, and obtains the target attribute mapping object.

[0069] Specifically, the first data processing end identifies member objects and extracts member attribute information from the target description file. Based on the extracted first attribute results, it assigns values ​​to an empty attribute mapping object through a target mapping object reference to generate a target attribute mapping object. In essence, the first data processing end provides a data writing interface, which points to the target attribute mapping object based on the target mapping object reference. When the first data processing end receives an object data update request, it can request the second data processing end to update the data of the target attribute mapping object.

[0070] It should be noted that after binding the empty attribute mapping object to the target mapping object reference, information can also be extracted from the target description file through the second data processing terminal, and the extracted attribute extraction results can be assigned to the empty attribute mapping object to generate the target attribute mapping object.

[0071] In one embodiment, please refer to Figure 10 The process for updating object data can be as follows: the first data processing end and the second data processing end read the XML description file respectively; the first data processing end creates a PropDescriptor object (file description object); the first data processing end obtains the PropDescriptor object from the second data processing end; it sends a mapping object creation request and provides a reference to the target mapping object to the second data processing end; the second data processing end creates an empty PropMap object (property mapping object) and binds the empty PropMap object to the reference to the target mapping object; the first data processing end assigns a value to the empty PropMap object, and the first data processing end passes the received member update data into the PropMap object; the second data processing end modifies the PropMap object based on the passed member update data.

[0072] Understandably, in this process, the first data processing end requests the second data processing end to create a PropMap object. The first data processing end can then reference this PropMap object. When the second data processing end needs to update data, it requests modification of the PropMap object. The PropDescriptor object generated by the second data processing end is shared between the two ends, and the first data processing end does not need to generate a PropertyClass wrapper class; it only provides an interface. Data updates are implemented on the second data processing end.

[0073] In other embodiments, the target attribute mapping object can be associated with a target mapping object reference. Accordingly, before S203, please refer to... Figure 8 The method also includes the following steps S601-S603.

[0074] S601: The second data processing end extracts the member object identifier and member attribute information from the target description file based on the attribute mapping class to obtain the second attribute extraction result.

[0075] S603: The second data processing end instantiates the attribute mapping class based on the second attribute extraction result to obtain the target attribute mapping object.

[0076] S605: The second data processing end associates the target attribute mapping object with the target mapping object reference of the first data processing end.

[0077] Specifically, the second data processing end can create an empty attribute mapping object corresponding to the attribute mapping class based on the target description file. Then, it assigns the second attribute extraction results, including member object identifiers and member attribute information, extracted from the target description file to the empty attribute mapping object, thereby obtaining the target attribute mapping object. Finally, it associates the assigned target attribute mapping object with the target mapping object reference to achieve data sharing.

[0078] Specifically, the first data processing end can update the data of member objects through the attribute mapping object of the second data processing end. After obtaining the target description file, the first data processing end reads the target description file, creates a target mapping object reference corresponding to the target description file, and passes the target mapping object reference to the first data processing end so that the first data processing end binds the target attribute mapping object and the target mapping object reference. This allows the first data processing end and the second data processing end to share the member object data stored in the target attribute mapping object and to jointly update the member object data.

[0079] S205: The second data processing end updates the target attribute mapping object based on the member update data.

[0080] In this embodiment of the application, the first data processing terminal calls the target attribute mapping object of the second data processing terminal through the aforementioned target mapping object reference, and passes the member update data to the second data processing terminal based on the target mapping object reference, so that the second data processing terminal writes the member update data into the target attribute mapping object.

[0081] In summary, the second data processing end can update data by calling the attribute mapping object of the first data processing end, thereby achieving data sharing and consistency between different programming language ends, significantly reducing update resource consumption and costs, and improving data synchronization.

[0082] In practical applications, the method also includes S701: The first data processing end encapsulates and objectifies the modeling information in the target description file to obtain the attribute encapsulation class.

[0083] Specifically, the attribute encapsulation class inherits from the attribute mapping class and is used to define an object data caching interface for at least one member object. The object data caching interface can be configured one-to-one with each member object. Through this interface, the object data of the corresponding member object stored in the cache can be directly read without performing data traversal and lookup, achieving fast access to data storage and optimizing data query and update performance.

[0084] Understandably, the object data of member objects is still stored in the property mapping object. The property wrapper class defines the caching interface corresponding to the object data of each member object, but does not store the data itself. Specifically, the above S701 can be executed through the preset code generation tool. The property wrapper class is a mapping from the target description file format to the object-oriented programming language, including the fields defined in the target description file. The preset code generation tool iterates through the target description file line by line to extract and assign values ​​to the fields.

[0085] Thus, by using target description files, such as XML-formatted file description data types, the member type information, member object name, data synchronization method, etc. of member objects are described, realizing data modeling of the program's runtime environment, such as modeling the game world. Then, by instantiating and encapsulating the data in the target description file, corresponding file description objects and attribute mapping objects are generated for multi-terminal calls, realizing data storage, data update, and data synchronization. It not only supports single-terminal development and data processing, such as CPP or Lua, but also supports multi-terminal (such as CPP / Lua) hybrid development and data processing solutions. This is beneficial for multi-terminal program development and operation, reduces development costs and data processing costs during operation, and improves data processing efficiency. It is especially suitable for game programs that tend to be developed using languages ​​such as Lua and CPP.

[0086] In one embodiment, the preset code generation tool generates a CPP class name after reading the Property class field of the XML description file. When it reads the Member name field, it generates the member object name. Then, when it reads the type field, it generates the corresponding object type. This process continues until the entire XML description file is read, thereby generating the attribute encapsulation class. If the default field is read, an initial value is assigned to the member object. If the flag field is read, the corresponding data synchronization interface is generated.

[0087] In one embodiment, the second data processing terminal is built based on the C++ language. Taking the aforementioned XML description file code segment as an example, the preset code generation tool generates an attribute wrapper class for "AvatarProp" based on this code segment. This class provides Get_XXX and Set_XXX methods to set the attribute values ​​of the wrapper class instance. Specifically, a portion of the code segment of the attribute wrapper class for "AvatarProp" is shown below.

[0088] class AvatarProp:public g6::game::PropMap{

[0089] public:

[0090] AvatarProp());

[0091] virtual~AvatarProp(){}

[0092] static g6::game::PropPtr Create();

[0093] uint32_t Get envid(){return envid_->GetValue();}

[0094] void Set envid(uint32_t);

[0095] uint64 t Get customid0){return customid->GetValueO;}

[0096] void Set customid(uint64 t);

[0097] uint64 t Get id(){return id->GetValue();}

[0098] void Set_id(uint64_t);

[0099] int32 t Get level(){return level->GetValue();}

[0100] void Set level(int32_t);

[0101] int32_t Get_sex(){return sex_->GetValue();}

[0102] void Set_sex(int32_t);

[0103] int32_t Get race(){return race->GetValue();}

[0104] void Set_race(int32_t);

[0105] int32_t Get_career(){return career_->GetValue();}

[0106] void Set_career(int32_t);

[0107] int32_t Get_exp(){return exp_->GetValue();}

[0108] void Set_exp(int32_t);

[0109] int32_t Get_hp(){return hp_->GetValue();}

[0110] void Set_hp(int32_t);

[0111] int32_t Get_mp(){return mp_->GetValue();}

[0112] void Set_mp(int32_t);

[0113] std::string Get name(){return name_->GetValue();}

[0114] void Set_nane(std::string);

[0115] int32_t Get state(){return state->GetValue();}

[0116] void Set_state(int32_t);

[0117] std::shared_ptr <g6::game::propmap>Get aistate map(){return aistatemap;}

[0118] int32 t Get aistate map(int32 t):

[0119] void Set aistate map(int32 t,int32 t);

[0120] void Del_aistate_map(int32_t);

[0121] std::shared_ptr <g6::game::propmap>Get_bag(){return bag_;}

[0122] std::shared ptr <itemprop>Get bag(uint64_t);

[0123] void Set bag(uint64_t,std::shared_ptr <itemprop>);

[0124] void Del bag(uint64_t);

[0125] std::shared_ptr <g6::game::propmap>Get_attribute_map(){returnattribute_map_;}

[0126] int32_t Get attribute map(int32_t);

[0127] In one embodiment, referring to the figure, the ULM diagram also shows a property wrapper class (PropertyClass), which is generated based on a preset code generation tool. Here, xml_item1 and xml_item2 are defined object data caching interfaces, providing fast access to cached data. The object data still resides in PropMap, improving data query performance. The PropertyClass class is a wrapper class generated by the code generation tool; its object data and methods are still provided by its parent class, PropMap.

[0128] Specifically, the preset description class can be a reflection class of the attribute encapsulation class, providing reflection information for the attribute encapsulation object, so as to manipulate the entire object data processing system through the file description instance of the attribute encapsulation class and the preset description class. In one embodiment, please refer to... Figure 5 In the diagram, the AbstractPropClass class is used to refer to the PropertyClass class, which holds an instance of the PropDescriptor class.

[0129] Based on the above technical solution, an attribute-based data update and synchronization scheme is used. Its underlying implementation supports protobuf serialization and deserialization, ensuring high performance and low space consumption during synchronization. The upper layer is an attribute mapping object, generated through description files in formats such as XML, facilitating modeling for developers. For attribute mapping object synchronization, it can be used on both C++ and Lua platforms, making it more suitable for application development scenarios, such as game development, and helping to reduce development costs. This solution can be quickly ported to any game engine or software system, greatly expanding the applicability of object data processing systems. Furthermore, this solution supports automatic synchronization of object data, such as synchronization of Map data types, client-side synchronization, and database synchronization, offering flexible synchronization methods at low cost.

[0130] Based on some or all of the above methods, in this embodiment of the application, the method further includes a data synchronization scheme, and correspondingly, the target description file also includes data synchronization configuration information; after S205, please refer to Figure 9 The method also includes the following S801-S803.

[0131] S801: The second data processing end calls the serialization interface to serialize the member update data and obtain the target synchronization data.

[0132] S803: The second data processing end sends the target synchronization data to the data synchronization end based on the data synchronization configuration information.

[0133] In practical applications, the data synchronization endpoint can include, but is not limited to, the database endpoint, its own client, and other clients. The data synchronization configuration information includes the data synchronization endpoint for the target member object. After assigning and modifying values ​​to the target attribute mapping class based on the member update data, the preset serialization interface is automatically called to serialize the member update data. According to the settings in the data synchronization configuration information, the target synchronization data can be sent to the data synchronization queue, and then periodically synchronized to the database endpoint or client, or in response to the synchronization request from the data synchronization endpoint, the target synchronization data in the data synchronization queue can be sent to the data synchronization endpoint.

[0134] Understandably, when the second data processing end receives an object data update request, it can directly update the object data in the target attribute mapping object.

[0135] Furthermore, the first data processing end can also create corresponding attribute mapping objects without needing to create file description objects and attribute encapsulation classes. Specifically, the first data processing end creates an empty attribute mapping object corresponding to the target description file based on a pre-stored attribute mapping class, and assigns values ​​to the empty attribute mapping object based on the extracted attribute result data to obtain the target attribute mapping object. The first data processing end binds its own target attribute mapping object and the target attribute mapping object of the second data processing end through the target mapping object reference. The target attribute mapping objects on both ends have the same lifecycle, achieving object data sharing. In one embodiment, the first data processing end is a Lua end, and the second data processing end is a CPP end. After the CPP end creates the attribute mapping object, it actively calls a function and passes in a CPP object reference to execute the Lua method. After the Lua end obtains the CPP object reference, it binds the Lua mapping object reference with the CPP object reference passed in from the CPP end, thus ensuring that both CPP and Lua reference the same attribute mapping object, thereby making the object data on both ends consistent.

[0136] In one embodiment, the first data processing end is a LUA end, and the code segment of the attribute mapping object generated by the LUA end itself is shown below.

[0137] G6Log.LogDebug("=========test property begin==============")

[0138] self:G6InitProperty(PropMap("AvatarProp"))

[0139] self.prop = self:G6GetProps()

[0140] self.prop.customid = 201;

[0141] self.prop.id = 100;

[0142] self.prop.level = 100;

[0143] self.prop.hp = 120;

[0144] self.prop.state = 221;

[0145] self.prop::SetOwner(self);

[0146] As shown in the code snippet, assigning a value to `self.prop` assigns a value to the property mapping object on the LUA side. Data updates and synchronization are performed based on rules defined in the XML description file. Reference binding with the C++ side can be achieved using `SetOwner` on the Lua side, allowing both sides to share the property mapping object's data.

[0147] In summary, this solution can be integrated as a plugin into various program data processing systems. It can be applied to any game genre, offering rapid integration, easy configuration and deployment, and requires no dependence on other external systems or specific engines. Furthermore, this solution is simple to use, has a low learning curve, and boasts superior performance, meeting the data synchronization needs of numerous clients and a large number of member objects while conserving hardware resources. In addition, this solution is compact and lightweight, allowing for rapid portability to any game development system, expanding the application boundaries of the data processing system. For example, when developing a large-scale game, compared to using UE, the integration cost of this solution is very low; it only requires including the header file and compiling, without cumbersome configuration or other dependencies. It is simple to use, offers excellent data processing performance, and can meet the data synchronization needs of large-scale multiplayer online games.

[0148] This application also provides an object data processing system 800, such as... Figure 11 As shown, the system includes a first data processing terminal 10 and a second data processing terminal 20.

[0149] The first data processing terminal is used to receive object data update requests, which carry the member object identifier and member update data of the target member object. The first data processing terminal is built based on a scripting language. The second data processing terminal is used to call the target attribute mapping object in the second data processing terminal based on the member object identifier of the target member object. The second data processing terminal is built based on an object-oriented programming language. The target attribute mapping object is obtained by instantiating the attribute mapping class based on the target description file. The target description file is used to describe the modeling information of at least one member object. The attribute mapping class represents the modeling generalization result of at least one member object. At least one member object includes the target member object.

[0150] The second data processing terminal is used to update the target attribute mapping object based on the member update data.

[0151] In some embodiments, the first data processing end is further used to: encapsulate and objectify the modeling information in the target description file to obtain an attribute encapsulation class, which inherits from the attribute mapping class and is used to define an object data caching interface for at least one member object.

[0152] In some embodiments, the modeling information also includes file description information, and the second data processing terminal is further used for: before the first data processing terminal calls the target attribute mapping object of the second data processing terminal based on the member object identifier of the target member object, extracting the file description information of the target description file based on a preset description class to obtain the description information extraction result, wherein the preset description class is a reflection class of the attribute mapping class; creating a file description instance corresponding to the target description file based on the preset description class; and writing the description information extraction result into the file description instance to obtain a file description object.

[0153] In some embodiments, the first data processing terminal is further configured to obtain a file description object corresponding to the target description file from the second data processing terminal, generate a mapping object creation request for the second data processing terminal based on the file description object, and generate a target mapping object reference corresponding to the target description file based on the modeling information.

[0154] Correspondingly, the second data processing end is also used to respond to the mapping object creation request, create an empty attribute mapping object corresponding to the attribute mapping class, and associate the empty attribute mapping object with the target mapping object reference.

[0155] In some embodiments, the target description file further includes member object identifiers and member attribute information; the first data processing end is used to extract the member object identifiers and member attribute information from the modeling information to obtain the first attribute extraction result; and by referencing the target mapping object, the extracted first attribute extraction result is written into an empty attribute mapping object to obtain the target attribute mapping object.

[0156] In some embodiments, the modeling information includes the member object identifier and member attribute information of each member object; the second data processing terminal is also used to extract the member object identifier and member attribute information from the target description file based on the attribute mapping class before the first data processing terminal calls the target attribute mapping object of the second data processing terminal based on the member object identifier of the target member object, to obtain the second attribute extraction result; and to instantiate the attribute mapping class according to the second attribute extraction result to obtain the target attribute mapping object.

[0157] In some embodiments, the second data processing end is further configured to: instantiate the attribute mapping class based on the second attribute extraction result and obtain the target attribute mapping object, and then associate the target attribute mapping object with the target mapping object reference of the first data processing end, wherein the target mapping object reference is a reference corresponding to the target description file generated by the first data processing end based on the modeling information.

[0158] In some embodiments, the target description file also includes data synchronization configuration information; the second data processing end is also used to call the serialization interface to serialize the member update data after updating the target attribute mapping object according to the member update data to obtain target synchronization data; and to send the target synchronization data to the data synchronization end based on the data synchronization configuration information.

[0159] In some embodiments, the object-oriented programming language includes CPP, and the scripting language includes LUA.

[0160] It should be noted that the above system embodiments and method embodiments are based on the same implementation methods.

[0161] This application provides an object data processing device. The identification device can be a terminal or a server. The object data processing device includes a processor and a memory. The memory stores at least one instruction or at least one program. The at least one instruction or at least one program is loaded and executed by the processor to implement the object data processing method provided in the above method embodiments.

[0162] Memory is used to store software programs and modules. The processor executes these stored software programs and modules to perform various functional applications and data processing. Memory can primarily consist of a program storage area and a data storage area. The program storage area stores the operating system, application programs required for functionality, etc.; the data storage area stores data created based on device usage, etc. Furthermore, memory can include high-speed random access memory (RAM) and non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, memory can also include a memory controller to provide the processor with access to the memory.

[0163] The methods and embodiments provided in this application can be executed in electronic devices such as mobile terminals, computer terminals, servers, or similar computing devices. Figure 12 This is a hardware structure block diagram of an electronic device for an object data processing method provided in an embodiment of this application. For example... Figure 12 As shown, the electronic device 900 can vary significantly due to different configurations or performance. It may include one or more Central Processing Units (CPUs) 910 (CPUs 910 may include, but are not limited to, microprocessors such as MCUs or programmable logic devices such as FPGAs), a memory 930 for storing data, and one or more storage media 920 (e.g., one or more mass storage devices) for storing application programs 923 or data 922. The memory 930 and storage media 920 may be temporary or persistent storage. The program stored in the storage media 920 may include one or more modules, each module including a series of instruction operations on the electronic device. Furthermore, the CPU 910 may be configured to communicate with the storage media 920 and execute a series of instruction operations in the storage media 920 on the electronic device 900. The electronic device 900 may also include one or more power supplies 960, one or more wired or wireless network interfaces 950, one or more input / output interfaces 940, and / or one or more operating systems 921, such as Windows Server. TM Mac OS X TM Unix TM Linux™, FreeBSD™, etc.

[0164] The input / output interface 940 can be used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the electronic device 900. In one example, the input / output interface 940 includes a network interface controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the input / output interface 940 may be a radio frequency (RF) module for wireless communication with the Internet.

[0165] Those skilled in the art will understand that Figure 12 The structure shown is for illustrative purposes only and does not limit the structure of the electronic device described above. For example, the electronic device 900 may also include... Figure 12 The more or fewer components shown, or having the same Figure 12 The different configurations shown.

[0166] Embodiments of this application also provide a computer-readable storage medium, which can be disposed in an electronic device to store at least one instruction or at least one program related to implementing an object data processing method in the method embodiment. The at least one instruction or the at least one program is loaded and executed by the processor to implement the object data processing method provided in the above method embodiment.

[0167] Optionally, in this embodiment, the storage medium may be located at at least one of the multiple network servers in a computer network. Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0168] According to one aspect of this application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various alternative implementations described above.

[0169] As can be seen from the embodiments of the object data processing method, apparatus, device, server, terminal storage medium, and program product provided in this application, the technical solution of this application receives an object data update request through a first data processing terminal. The object data update request carries the member object identifier of the target member object and member update data. The first data processing terminal is built based on a scripting language. The first data processing terminal calls the target attribute mapping object in the second data processing terminal based on the member object identifier of the target member object. The second data processing terminal is built based on an object-oriented programming language. The target attribute mapping object is obtained by instantiating an attribute mapping class based on a target description file. The target description file is used to describe the modeling information of at least one member object. The attribute mapping class represents the modeling generalization result of at least one member object, and at least one member object includes the target member object. The second data processing terminal updates the target attribute mapping object according to the member update data. In this way, the second data processing terminal can update the data by calling the attribute mapping object of the first data processing terminal, thereby realizing data sharing and data consistency on different programming language terminals, significantly reducing update resource consumption and cost, and improving data synchronization.

[0170] It should be noted that the order of the embodiments described above is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. Furthermore, the above description focuses on specific embodiments of this application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims can be performed in a different order than that shown in the embodiments and still achieve the desired results. Additionally, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired results. In some implementations, multitasking and parallel processing are also possible or may be advantageous.

[0171] The various embodiments in this application are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the device, equipment, and storage medium embodiments are basically similar to the method embodiments, so the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0172] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware, or by a program instructing the relevant hardware to implement them. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.

[0173] The above are merely preferred embodiments of this application and are not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application. < / itemprop> < / itemprop>

Claims

1. An object data processing method, applied to an object data processing system, the object data processing system comprising a first data processing terminal and a second data processing terminal, characterized in that, The method includes: The first data processing terminal receives an object data update request, which carries the member object identifier and member update data of the target member object. The first data processing terminal is built based on a scripting language. The first data processing terminal calls the target attribute mapping object in the second data processing terminal based on the member object identifier of the target member object. The second data processing terminal is built based on an object-oriented programming language. The target attribute mapping object is obtained by instantiating the attribute mapping class based on the target description file. The target description file is used to describe the modeling information of at least one member object. The attribute mapping class represents the modeling generalization result of the at least one member object. The at least one member object includes the target member object. The second data processing terminal updates the target attribute mapping object based on the member update data.

2. The method according to claim 1, characterized in that, The method further includes: The first data processing end encapsulates and objectifies the modeling information in the target description file to obtain an attribute encapsulation class. The attribute encapsulation class inherits from the attribute mapping class and is used to define the object data cache interface of the at least one member object.

3. The method according to claim 1, characterized in that, The modeling information also includes file description information. Before the first data processing terminal calls the target attribute mapping object of the second data processing terminal based on the member object identifier of the target member object, the method further includes: The second data processing end extracts the file description information of the target description file based on a preset description class to obtain the description information extraction result. The preset description class is the reflection class of the attribute mapping class. The second data processing terminal creates a file description instance corresponding to the target description file based on the preset description class; The second data processing end writes the extracted description information into the file description instance to obtain a file description object.

4. The method according to claim 3, characterized in that, The method further includes: The first data processing terminal obtains the file description object corresponding to the target description file from the second data processing terminal; The first data processing terminal generates a mapping object creation request for the second data processing terminal based on the file description object; The first data processing terminal generates a target mapping object reference corresponding to the target description file based on the modeling information; In response to the mapping object creation request, the second data processing terminal creates an empty attribute mapping object corresponding to the attribute mapping class; The second data processing terminal associates the empty attribute mapping object with the target mapping object reference.

5. The method according to claim 4, characterized in that, The modeling information includes the member object identifier and member attribute information for each member object; the method further includes: The first data processing terminal extracts the member object identifier and member attribute information from the modeling information to obtain the first attribute extraction result; The first data processing terminal writes the extracted first attribute extraction result into the empty attribute mapping object through the target mapping object reference, thereby obtaining the target attribute mapping object.

6. The method according to claim 1, characterized in that, The modeling information includes the member object identifier and member attribute information of each member object; before the first data processing terminal calls the target attribute mapping object of the second data processing terminal based on the member object identifier of the target member object, the method further includes: The second data processing end extracts the member object identifier and member attribute information from the target description file based on the attribute mapping class to obtain the second attribute extraction result; The second data processing terminal instantiates the attribute mapping class based on the second attribute extraction result to obtain the target attribute mapping object.

7. The method according to claim 6, characterized in that, After instantiating the attribute mapping class based on the second attribute extraction result at the second data processing end to obtain the target attribute mapping object, the method further includes: The second data processing terminal associates the target attribute mapping object with the target mapping object reference of the first data processing terminal. The target mapping object reference is a reference generated by the first data processing terminal based on the modeling information that corresponds to the target description file.

8. The method according to any one of claims 1-7, characterized in that, The target description file also includes data synchronization configuration information; after the second data processing terminal updates the target attribute mapping object according to the member update data, the method further includes: The second data processing end calls the serialization interface to serialize the member update data to obtain the target synchronization data; The second data processing terminal sends the target synchronization data to the data synchronization terminal based on the data synchronization configuration information.

9. An object data processing system, characterized in that, The system includes a first data processing terminal and a second data processing terminal; The first data processing terminal is used to receive object data update requests. The object data update requests carry the member object identifier and member update data of the target member object. The first data processing terminal is built based on a scripting language. And a target attribute mapping object in the second data processing terminal is invoked based on the member object identifier of the target member object. The second data processing terminal is built based on an object-oriented programming language. The target attribute mapping object is obtained by instantiating an attribute mapping class based on a target description file. The target description file is used to describe the modeling information of at least one member object. The attribute mapping class represents the modeling generalization result of the at least one member object. The at least one member object includes the target member object. The second data processing terminal is used to update the target attribute mapping object based on the member update data.

10. A computer-readable storage medium, characterized in that, The storage medium stores at least one instruction or at least one program segment, which is loaded and executed by a processor to implement the object data processing method as described in any one of claims 1-8.

11. A computer device, characterized in that, The device includes a processor and a memory, the memory storing at least one instruction or at least one program, the at least one instruction or the at least one program being loaded and executed by the processor to implement the object data processing method as described in any one of claims 1-8.

12. A computer program product or computer program, characterized in that, The computer program product or computer program includes computer instructions that, when executed by a processor, implement the object data processing method as described in any one of claims 1-8.