Object processing method and computing device

By using the serialization order to determine the serialization number and pointer field encoding in the object graph, segmented processing of the object graph is achieved, which solves the end-to-end latency problem caused by object graph serialization/deserialization and improves processing efficiency and transmission efficiency.

WO2025001416A1PCT designated stage expired Publication Date: 2025-01-02CLOUD INTELLIGENCE ASSETS HOLDING (SINGAPORE) PTE LTD

Patent Information

Application Number
PCT/CN2024/087009
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-06-26
Filing Date
2024-04-10
Publication Date
2025-01-02

AI Technical Summary

Technical Problem

In existing technologies, the serialization/deserialization of object graphs results in significant end-to-end latency, impacting processing efficiency, especially in microservice scenarios where request response times are excessively long during cyclic calls.

Method used

By utilizing the serialization order of objects in the object graph to determine the serialization number and using it as a pointer field to encode data, objects and sub-objects are associated according to the serialization order to generate serialized data of some objects, reducing graph traversal operations and realizing segmented processing of the object graph.

Benefits of technology

It reduces end-to-end latency, improves transmission efficiency, reduces the complexity of the serialization/deserialization process, and ensures a better user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024087009_02012025_PF_FP_ABST
    Figure CN2024087009_02012025_PF_FP_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide an object processing method and a computing device. The method comprises: according to the serialization sequence of second objects associated with a first object in an object graph, determining the serialization numbers of the second objects; using the serialization numbers of the second objects as pointer field coded data of the first object; according to the serialization sequence of different objects in the object graph, determining at least some of objects to be serialized; on the basis of value field coded data and pointer field coded data of the at least some of objects, generating serialized data of the at least some of objects; and transmitting the serialized data to a receiving end, the receiving end being used for obtaining the object graph taking into account the anti-serialization result of at least one piece of serialized data corresponding to the object graph. The technical solution provided by the embodiments of the present application reduces end-to-end delay and improves processing efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Object processing method and computing device

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on June 26, 2023, with application number 202310761011.0 and invention name “Object Processing Method and Computing Device”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The embodiments of the present application relate to the field of computer technology, and in particular to an object processing method and a computing device. Background Art

[0003] To facilitate cross-platform storage and network transmission, objects must be serialized and deserialized. Serialization converts objects into transmittable bytes, while deserialization converts bytes back into objects. A group of related objects constitutes an object graph. When serializing any object, if it is associated with other objects, these objects will also be serialized. Therefore, practical applications involve serialization and deserialization of object graphs.

[0004] The data format of each object in the object graph in memory usually includes a value field and a pointer field. The value field stores the object data, while the pointer field stores the memory address of the sub-object associated with each object. In some cases, when serializing the object graph, the encoded data of each object needs to be temporarily stored in the cache. At this time, since the pointer field stores the memory address of the sub-object, the memory address needs to be encoded as the relative offset of the sub-object in the cache. After the object graph is fully encoded, the generated serialized data is sent to the receiving end. During the process of deserialization to restore the object graph, the pointer field encoded data in the serialized data, that is, the relative offset, is decoded into the memory address after deserialization.

[0005] However, this processing method in some of the situations described above results in a large end-to-end delay, which affects processing efficiency.

[0006] Summary of the Invention

[0007] The embodiments of the present application provide an object processing method and a computing device to solve the technical problem in related technologies that end-to-end delay is large and affects processing efficiency.

[0008] In a first aspect, an embodiment of the present application provides an object processing method, including: determining the serialization number of a second object associated with a first object in an object graph according to the serialization order of the second object; using the serialization number of the second object as the pointer domain encoding data of the first object; determining at least part of the objects to be serialized in the object graph according to the serialization order of different objects in the object graph; generating serialization data of at least part of the objects based on the value domain encoding data and pointer domain encoding data of the at least part of the objects; transmitting the serialization data to a receiving end; the receiving end is used to obtain the object graph in combination with the deserialization result of at least one serialization data corresponding to the object graph.

[0009] In a second aspect, an embodiment of the present application provides an object processing method, including: obtaining serialized data transmitted by a sending end; the serialized data is generated based on the value domain encoding data and pointer domain encoding data of at least part of the objects in the object graph; the pointer domain encoding data is the serialization number of the associated sub-object; the serialized data is deserialized to determine the memory address of at least part of the object, and the value domain data corresponding to the value domain encoding data of at least part of the object; the value domain data corresponding to at least part of the objects are written into their respective memory addresses; in combination with at least one serialized data corresponding to the object graph, the memory address of the sub-object associated with the pointer encoding data of any object is written as pointer domain data into the memory address of the object.

[0010] In a third aspect, an embodiment of the present application provides a computing device comprising a processing component and a storage component; the storage component stores one or more computer instructions; the one or more computer instructions are used to be called and executed by the processing component to implement the object processing method described in the first aspect above or to implement the object processing method described in the second aspect above.

[0011] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium storing a computer program. When the computer program is executed by a computer, the object processing method described in the first aspect above or the object processing method described in the second aspect above is implemented.

[0012] These and other aspects of the present application will become more readily apparent from the description of the following embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] In the accompanying drawings, unless otherwise specified, the same reference numerals throughout the multiple drawings represent the same or similar components or elements. These drawings are not necessarily drawn to scale. It should be understood that these drawings only depict some embodiments disclosed in this application and should not be construed as limiting the scope of this application.

[0014] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following is a brief introduction to the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0015] FIG1 shows a system architecture diagram in which the technical solution of an embodiment of the present application is applied.

[0016] FIG2 shows a flow chart of an embodiment of an object processing method provided by the present application.

[0017] FIG3 shows a schematic diagram of an object association relationship in a practical application according to an embodiment of the present application.

[0018] 4A to 4C are schematic diagrams showing predetermined data formats in a practical application of an embodiment of the present application.

[0019] 4D to 4F are schematic diagrams showing serialized data in a practical application of an embodiment of the present application.

[0020] FIG4G shows a schematic diagram of metadata association in an actual application of an embodiment of the present application.

[0021] FIG5 shows a flowchart of another embodiment of an object processing method provided by the present application.

[0022] FIG6A shows a schematic diagram of a memory data format in a practical application of an embodiment of the present application.

[0023] FIG6B shows a schematic diagram of serialization / deserialization operations in a practical application of an embodiment of the present application.

[0024] FIG7 shows a schematic structural diagram of an embodiment of an object processing device provided by the present application.

[0025] FIG8 shows a schematic structural diagram of another embodiment of an object processing device provided by the present application.

[0026] FIG9 shows a schematic structural diagram of an embodiment of a computing device provided by the present application. DETAILED DESCRIPTION

[0027] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.

[0028] In some of the processes described in the specification and claims of this application and the above-mentioned figures, multiple operations that appear in a specific order are included, but it should be clearly understood that these operations may not be executed in the order in which they appear in this document or may be executed in parallel. The serial numbers of the operations, such as 101, 102, etc., are only used to distinguish between different operations, and the serial numbers themselves do not represent any order of execution. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel. It should be noted that the descriptions of "first", "second", etc. in this document are used to distinguish different messages, devices, modules, etc., and do not represent a sequential order, nor do they limit "first" and "second" to being different types.

[0029] The technical solutions of the embodiments of the present application can be applied to application scenarios for serialization / deserialization of object graphs, especially application scenarios involving serialization / deserialization in public clouds.

[0030] End-to-end latency caused by serialization and deserialization is crucial for user experience and processing performance. For example, in microservices, multiple microservices often involve cyclical calls. A request from one microservice to another may require the second microservice to call other services for processing before responding. Since calls between microservices involve object transfer, end-to-end latency in these cyclical call scenarios can lead to longer request response times. Therefore, reducing end-to-end latency and improving transmission efficiency have become technical challenges facing those skilled in the art.

[0031] During the implementation of this application, the inventors discovered that, in the current serialization process for object graphs, after all objects are serialized and written to the cache, it is necessary to traverse all objects to determine the relative offsets of their sub-objects and then encode the pointer field data of each object as these relative offsets. After the receiving end obtains the serialized data of the object graph and deserializes all objects, it is necessary to traverse all objects and then decode the relative offsets of each object into the memory addresses obtained by deserialization. This process is often time-consuming, resulting in end-to-end latency. In order to reduce end-to-end delay and improve processing efficiency, the inventors proposed the technical solution of the present application after a series of studies. In the embodiment of the present application, the serialization number corresponding to the serialization order is used as the pointer field encoding data, and the serialization order is used to associate objects and sub-objects. Compared with the relative offset method, there is no need to traverse all objects to determine the relative offset of the sub-object. Therefore, the graph traversal operation can be reduced and the operation complexity can be reduced, which helps to reduce end-to-end delay and improve transmission efficiency. Moreover, by associating objects and sub-objects using the serialization order, some objects can be serialized / deserialized without waiting for all objects to be processed, which can further reduce end-to-end delay and improve transmission efficiency.

[0032] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without making creative efforts are within the scope of protection of this application.

[0033] FIG1 shows a diagram of a system architecture to which the technical solution of an embodiment of the present application can be applied. The system architecture may include a transmitting end 101 and a receiving end 102 .

[0034] In actual applications, the sending end 101 and the receiving end 102 can be a client, a server, or an application in the server, etc. Although the sending end or the receiving end is represented in the form of a server in Figure 1, it can be understood that the present application is not limited to this.

[0035] The transmitting end 101 and the receiving end 102 may be connected via a network. The network provides a medium for a communication link between the transmitting end 101 and the receiving end 102. The network may include various connection types, such as wired or wireless communication links or fiber optic cables.

[0036] The interactive communication process between the sending end 101 and the receiving end 102 involves network transmission of an object graph, and the network transmission of the object graph involves serialization / deserialization processing.

[0037] When the sending end 101 or the receiving end 102 is implemented as a client, the client can be a browser, an APP (Application), or a web application such as an H5 (HyperText Markup Language 5, Hypertext Markup Language 5th edition) application, or a light application (also known as a mini-program, a lightweight application) or a cloud application, etc. The client can be deployed in an electronic device and needs to rely on the device to run or certain apps in the device to run, etc.

[0038] When the sending end 101 or the receiving end 102 is implemented as a server, the server can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. The server can also be a server of a distributed system, or a server integrated with a blockchain. The server can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology.

[0039] It should be understood that the number of transmitting terminals and receiving terminals in FIG1 is merely illustrative and any number of transmitting terminals and receiving terminals may be provided according to implementation requirements.

[0040] It should be noted that the embodiments of the present application may involve the use of user data. In actual applications, user-specific personal data can be used in the scheme described herein within the scope permitted by applicable laws and regulations, subject to the requirements of applicable laws and regulations of the country where the user is located (for example, with the user's explicit consent, effective notification to the user, etc.).

[0041] The implementation details of the technical solution of the embodiment of the present application are described in detail below.

[0042] FIG2 is a flowchart of an embodiment of an object processing method provided by an embodiment of the present application. The technical solution of this embodiment is executed by the sending end. The method may include the following steps 201 to 205 .

[0043] 201: Determine a serialization number of the second object according to a serialization order of the second object associated with the first object in the object graph.

[0044] An object graph may include multiple objects with an association relationship. When one object is associated with (or points to) another object, for the sake of convenience of distinction, in the embodiment of the present application, the other object is also referred to as a sub-object of the object.

[0045] When serializing an object graph, you can start from the first object in the object graph and serialize each object in turn, that is, encode it. Therefore, based on the relationship between multiple objects in the object graph, you can determine the serialization order of each object.

[0046] The first object may refer to any object currently encoded in the object graph, and the second object may refer to any sub-object associated with the first object.

[0047] The serialization number corresponding to the first object can be determined based on the serialization order of the first object. Different serialization orders result in different serialization numbers. The serialization number can be represented, for example, as an integer character, starting with, for example, 0 or 1, to indicate the first object to be serialized. Of course, the serialization number can also be represented by other character types and is not limited to starting with 0 or 1. This application does not impose any restrictions on this.

[0048] For ease of understanding, assume that the object graph includes eight objects: A, B, C, D, E, F, G, and H. Assume that object A is the first serialized object. The association relationship between the eight objects can be shown in Figure 3, where the arrows in Figure 3 indicate the other objects referenced by an object.

[0049] Object A is the first serialized object, and the serialization number corresponding to object A is 0.

[0050] Object A is associated with two child objects: Object B and Object D. Based on the order of appearance or data type of Object B and Object D in the code call of Object A, it can be determined that Object B is the next serialized object and Object D is the next serialized object after Object B. Therefore, the serialization number of Object B is 1 and the serialization number of Object D is 2.

[0051] Object B is associated with one object: Object F, whose serialization number is 3.

[0052] By analogy, object D is associated with one object: object E, then the serialization number of object E is 4.

[0053] Object F is associated with one object: object D. Since object D has been serialized, its serialization number is 2.

[0054] Object E is associated with two objects: Object B and Object G. Since Object B has been serialized, its serialization number is 1, and the serialization code of Object G is 5.

[0055] Object G is associated with two objects: object B and object H. Object B has been serialized and its serialization number is 1. The serialization code of object H is 6.

[0056] Object H is associated with two objects: G and object C. Object G has been serialized and its serialization number is 5. The serialization code of object C is 7.

[0057] Object C is associated with three objects: object A, object G, and object H. The serialization code of object A is 0, the serialization code of object G is 5, and the serialization code of object H is 6.

[0058] Combined with the above description, the serialization order of the eight objects is: A→B→D→F→E→G→H→C.

[0059] It should be noted that the serialization order of each object can be determined one by one during the serialization process of the object graph and does not need to be determined in advance. The above description is only for the convenience of understanding.

[0060] 202: Use the serialization number of the second object as the pointer field encoding data of the first object.

[0061] In memory, each object typically consists of an object header and instance data. Instance data can include at least one value field and at least one pointer field, which represents the memory address of the sub-object. During serialization, encoding is required for both the value field and the pointer field.

[0062] The object header information of each object in memory can generally include, for example, a Mark Word (the object's own runtime data) and a Klass Pointer (a type pointer). The object header information of each object, as well as the position and type corresponding to at least one value field and at least one pointer field included in the instance data of each object, can be pre-registered as metadata and stored on different terminals. The position and type corresponding to at least one value field and at least one pointer field included in the instance data of each object can be represented in bitmap form, for example, 00110, where 0 represents the position corresponding to the value field and 1 represents the position corresponding to the pointer field.

[0063] In the embodiment of the present application, the serialization order can be used to associate an object with its sub-objects. Therefore, the pointer field data corresponding to the second object in the first object can be modified to the serialization number of the second object as the pointer field encoding data.

[0064] Taking the eight objects corresponding to Figure 3 as an example, the pointer field data corresponding to object B in object A is encoded as serialization number 1, and the pointer field data corresponding to object D is encoded as serialization number 2, that is, the pointer field encoding data of object A is 1 and 2, and so on; the pointer field encoding data of object B is 3; the pointer field encoding data of object D is 4; the pointer field encoding data of object F is 2; the pointer field encoding data of object E is 1 and 5; the pointer field encoding numbers of object G include 1 and 6; the pointer field encoding data of object H include 5 and 7; the pointer field encoding data of object C include 0, 5 and 6.

[0065] 203: Determine at least part of the objects to be serialized in the object graph according to the serialization order of different objects in the object graph.

[0066] 204: Generate serialized data of at least a portion of the object based on the value field encoding data and the pointer field encoding data of at least a portion of the object.

[0067] In some implementations, all objects in the object graph may be used as objects to be serialized, so that serialized data can be generated based on the value field encoding data and pointer field encoding data of all objects.

[0068] In other embodiments, since the embodiments of the present application use serialization order to associate objects and sub-objects, there is no need to wait for the encoding of all objects in the object to be completed. A piece of serialized data can be generated based on the value domain encoding data and pointer domain encoding data of some objects.

[0069] Therefore, an object graph can correspond to at least one serialized data.

[0070] Among them, the value range encoding data of each object can be obtained by encoding the value range data to reduce the data transmission volume, etc. Of course, the value range data can also be directly used as value range encoding data, etc., and this application does not limit this.

[0071] The serialized data may also include header encoding information generated based on the object header information of each object. The header encoding information of each object may be associated with the metadata of each object, and may be specifically associated with the metadata pointer of each object, and the metadata pointer may point to the stored metadata of each object. The metadata of each object may include the object header information and the corresponding position and type of the value field and pointer field.

[0072] The header encoding information can use any identification information associated with the metadata pointer. The header encoding information and the corresponding metadata pointer can be stored in a type table, and the type table can be pre-registered and stored in different terminals, so that the serialized data can only include the header encoding information of each object.

[0073] In addition, the serialized data may also include at least one graph attribute information corresponding to at least part of the objects. The at least one graph attribute information may, for example, include one or more of the graph size and the number of objects. The at least one graph attribute information may be used to instruct the receiving end to allocate corresponding memory space, etc., wherein the graph size refers to the memory size occupied.

[0074] Therefore, in one embodiment, serialized data can be generated based on the value field encoding data, pointer field encoding data, header encoding data, and at least one graph attribute information of at least a portion of the object. The data format of this serialized data can be implemented in various ways. Details will be described in the following embodiments.

[0075] 205: Transmit the serialized data to the receiving end.

[0076] The serialized data can be transmitted to the receiving end as soon as it is generated. In particular, each serialized data can be transmitted to the receiving end as soon as it is generated to reduce cache usage, etc.

[0077] The receiving end may obtain the object graph by deserializing the result of at least one serialized data corresponding to the object graph.

[0078] In the above serialized data, the value domain encoded data can be deserialized into value domain data, and the pointer encoded data can be used to establish a mapping relationship between memory address, offset address and pointer encoded data. The mapping relationship corresponding to at least one serialized data can find the memory address mapped by the pointer encoded data, and use the memory address mapped by the pointer encoded data as the pointer domain data for deserializing the pointer encoded data. The specific deserialization process will be introduced in detail in the following embodiments.

[0079] In this embodiment, the serialization number corresponding to the serialization order is used as the pointer field encoding data, and the serialization order is used to associate objects and sub-objects. Compared with the relative offset method, the graph traversal operation can be reduced and the operation complexity can be reduced, which helps to reduce end-to-end delay and improve transmission efficiency. Moreover, by associating objects and sub-objects using the serialization order, the object graph can be segmented, and at least part of the objects can be serialized / deserialized without waiting for all objects to be processed, which can further reduce end-to-end delay and improve transmission efficiency.

[0080] As can be seen from the above description, serialized data can be generated based on the value domain encoding data and pointer domain encoding data of some objects. When performing serialization processing, the encoding result of each object needs to be temporarily stored in a cache. Therefore, in one embodiment, determining at least some of the objects to be serialized according to the serialization order of different objects in the object graph may include: writing the value domain encoding data and pointer domain encoding data of the first object into a first cache according to the serialization order of different objects in the object graph; when the first cache reaches a predetermined cache size or the number of objects written reaches a predetermined number, using the objects written into the first cache as at least some of the objects to be serialized.

[0081] That is, when encoding each object, the value field encoding data and pointer field encoding data of the first object may be written into the first cache, and the header encoding information of the first object may also be written into the first cache.

[0082] The first cache is a cache used for serialization processing at the receiving end.

[0083] If the first cache reaches a predetermined cache size or the number of objects written reaches a predetermined number, all objects written in the first cache may be used as at least part of the objects to be serialized to generate a segment of serialized data.

[0084] The predetermined cache size or predetermined number can be determined in combination with the maximum cache size of the sending end or the receiving end to avoid data overflow problems, etc.; or it can be determined in combination with actual delay requirements, etc., which is not limited in this application.

[0085] In this embodiment, when the cache size occupied by the encoded objects reaches a predetermined cache size or the number of objects reaches a predetermined number, serialized data is generated and promptly sent to the receiving end, allowing the first cache to continue serializing the remaining objects. Each object is encoded in a serialization order, and the encoding result is written to the first cache. The encoding result may include value field encoding data, pointer field encoding data, and header encoding data.

[0086] As another embodiment, the method may further include: segmenting the object graph according to the serialization order of different objects in the object graph, combined with a predetermined cache size or a predetermined number of objects, to obtain multiple sub-object graphs.

[0087] That is, the object graph can first be divided into a predetermined number of objects according to a predetermined cache size, and then into multiple sub-objects. For example, the object graph containing eight objects corresponding to the schematic diagram shown in Figure 3 can be divided into two sub-object graphs according to the serialization order: A→B→D→F and E→G→H→C. The serialization order between the multiple sub-object graphs can also be determined according to the object serialization order.

[0088] Illustratively, the above-mentioned determination of the serialization number of the second object according to the serialization order of the second object associated with the first object in the object graph may include: determining the serialization number of the second object according to the serialization order of the second object associated with the first object in the first sub-object graph; the above-mentioned determination of at least part of the objects to be serialized according to the serialization order of different objects in the object graph may include: taking at least one object included in the first sub-object graph as at least part of the objects to be serialized.

[0089] That is, all pairs included in the first sub-object graph are taken as at least partial objects to be serialized.

[0090] The first sub-object graph may refer to any sub-object graph. There are multiple implementations for determining the first sub-object graph: in one implementation, the next first sub-object graph to be serialized may be determined in response to a data transfer operation on a previous second sub-object graph.

[0091] The data transmission operation refers to a processing operation of transmitting serialized data to a receiving end.

[0092] That is, after the serialized data generated by the previous sub-object graph is transmitted to the receiving end, the next sub-object graph is the first sub-object graph according to the serialization order.

[0093] In another implementation, multiple sub-object graphs may be processed in parallel, so that any sub-object graph may be used as the first sub-object graph. In the case of parallel processing, the serialization order of different objects in the object graph may be predetermined.

[0094] In yet another implementation, in response to a determination that a time duration for a previous second object graph to be determined as a sub-object graph to be serialized is greater than a predetermined time duration, a next first sub-object graph to be serialized is determined.

[0095] That is, after the previous sub-object graph is determined as the sub-object graph to be serialized, after a predetermined time, the next sub-object graph can be processed. In this implementation, the serialization order of different objects in the object graph can also be predetermined.

[0096] In addition, the present application is not limited to the above-mentioned implementation methods. For example, in response to the encoding completion operation for the last object in the previous second sub-object graph, the next first sub-object graph to be serialized is determined.

[0097] As can be seen from the above description, a predetermined data format for serialized data can be pre-set. The predetermined data format can be implemented in multiple ways, and can include the head position, pointer field position, value field position, attribute position, etc. corresponding to each object.

[0098] Therefore, in some embodiments, generating serialized data of at least part of the objects based on the value domain encoding data and pointer domain encoding data of at least part of the objects may include: writing the value domain encoding data corresponding to at least part of the objects into the corresponding value domain positions in the predetermined data format; writing the pointer domain encoding data corresponding to at least part of the objects into the corresponding pointer domain positions in the predetermined data format; writing the header encoding information corresponding to at least part of the objects into the corresponding head positions in the predetermined data format; the header encoding information is used to associate metadata; and writing at least one graph attribute information corresponding to at least part of the objects into the attribute position in the predetermined data format.

[0099] Among them, the predetermined data format can be implemented in multiple ways, and the head position and value range position of each object can be arranged in sequence and combined together; of course, the head position, value range position and pointer field position of each object can also be combined together, and the value range position and pointer field position can be consistent with the layout method in the memory. Of course, the value range position can be arranged first and then the pointer field position can be arranged to perform a combination, etc.

[0100] The attribute position can be arranged at the front of the predetermined data format, and then each object can be arranged in sequence according to the serialization order; of course, the attribute position can also be arranged at the end of the predetermined data format, etc.

[0101] For ease of understanding, Figures 4A, 4B, and 4C illustrate three predetermined data formats, taking three objects ABC as an example, where H represents the head position, P represents the pointer field position, V represents the value field position, and T represents the value position. Of course, the present application is not limited to this.

[0102] In addition, as another implementation method, in some embodiments, based on the value domain encoding data and pointer domain encoding data of at least part of the objects, generating serialized data of at least part of the objects includes: combining the value domain encoding data and header encoding data corresponding to each object to obtain a value domain encoding array; combining the pointer domain encoding data corresponding to at least part of the objects to obtain a pointer domain encoding array; combining at least one graph attribute information corresponding to at least part of the objects to obtain an attribute encoding array; and using the value domain encoding array, pointer domain encoding array, and attribute encoding array as serialized data.

[0103] The header coded data and range coded data of each object can be permuted and combined to obtain the target coded data of each object. The target coded data corresponding to at least some of the objects can then be permuted and combined in serialization order to form a range coded array. Similarly, the pointer coded data and at least one graph attribute information can also be combined to obtain an array. The serialized data can also be composed of three arrays and transmitted to a receiving end, etc.

[0104] For ease of understanding, Figure 4D shows an implementation of serialized data corresponding to the object graph in Figure 3, including value-domain encoded data, pointer-domain data, and an array of attribute encodings. In the figure, classID represents header encoding information, and V represents value-domain encoded data.

[0105] Furthermore, when the object graph is divided into A→B→D→F and E→G→H→C, Figure 4E shows the serialized data of the sub-object A→B→D→F, including the corresponding value domain encoding data, pointer domain data, and attribute encoding array. And Figure 4F shows the serialized data corresponding to the sub-object graph E→G→H→C, including the corresponding value domain encoding data, pointer domain data, and attribute encoding array.

[0106] Furthermore, as described above, the serialized data can include header encoding information (classID) generated based on each object's object header information. Each object's header encoding information can be associated with each object's metadata, specifically, with each object's metadata pointer. The metadata pointer can point to each object's stored metadata. Each object's metadata can include the object header information, as well as the location and type corresponding to the value and pointer fields. Figure 4G shows a schematic diagram of the association between header encoding information and metadata.

[0107] After the serialized data is transmitted to the receiving end, the receiving end can perform deserialization processing to restore the object graph. As shown in Figure 5, it is a flowchart of another embodiment of an object processing method provided in an embodiment of the present application. The technical solution of this embodiment is executed by the receiving end. The technical solution of the present application is introduced from the perspective of deserialization processing. The method may include the following steps 501 to 504.

[0108] 501: Get the serialized data transmitted by the sender.

[0109] The serialized data may be generated based on the value domain encoding data and pointer domain encoding data of at least part of the objects in the object graph; the pointer domain encoding data is the serialization number of the associated sub-object.

[0110] The specific method of generating the serialized data can be found in the embodiment shown in FIG2 , and will not be described in detail here.

[0111] 502: Deserialize the serialized data to determine the memory addresses of at least part of the objects and the range data corresponding to the range-encoded data of at least part of the objects.

[0112] 503: Write the range data corresponding to at least some of the objects into their respective memory addresses.

[0113] As can be seen from the above description, an object graph can generate at least one serialized data. The receiving end can deserialize each serialized data it receives without waiting for all the serialized data.

[0114] The receiving end performs deserialization processing and needs to allocate appropriate space in the memory to store the object. Therefore, the memory addresses of at least part of the object in the memory can be determined, and the range data corresponding to the range encoded data can also be obtained.

[0115] In addition, since the serialized data can also include header encoding information of each object, pointer encoding data of each object and at least one graph attribute information, the header encoding information, pointer encoding data and at least one graph attribute information can also be obtained through deserialization processing.

[0116] The metadata of each object can be obtained based on the header encoding information, and thus the value domain and the location and type of the pointer domain of each object, as well as the object header information, can be known based on the metadata of each object.

[0117] Thus, the range data of each object can be written to the range position of its corresponding memory address according to the metadata of each object. At the same time, the object header information can also be written to the object header position in the memory address.

[0118] 504: In combination with at least one serialized data corresponding to the object graph, write the memory address of the sub-object associated with the pointer encoding data of any object as pointer field data into the memory address of the object.

[0119] Because pointer-encoded data is implemented using serialized numbers, during deserialization, the pointer-domain encoded data for each object needs to be modified to the memory address of its associated sub-object in memory. In the case of segmented serialization of the object graph, since the sub-object associated with an object in one serialized data may be in the next serialized data, and the next serialized data may not have been transmitted yet, the memory address of the sub-object may not yet be determined. Therefore, the pointer-domain position in the memory address of each object can be left empty, or it can be filled with pointer-domain encoded data. By waiting for all serialized data to be received, and then combining all serialized data of the object graph, the memory address of any sub-object associated with any object's pointer-encoded data can be determined and written as pointer-domain data to the memory address of the object, specifically the pointer-domain position in the memory address. The value domain position and pointer domain position can be determined based on metadata.

[0120] In this embodiment, the serialization number corresponding to the serialization order is used as the pointer field encoding data, and the serialization order is used to associate objects and sub-objects. Compared with the relative offset method, the graph traversal operation can be reduced and the operation complexity can be reduced, which helps to reduce end-to-end delay and improve transmission efficiency. Moreover, by associating objects and sub-objects using the serialization order, the object graph can be segmented, and at least part of the objects can be serialized / deserialized without waiting for all objects to be processed, which can further reduce end-to-end delay and improve transmission efficiency.

[0121] In some embodiments, in the case of segmented serialization of an object graph, a sub-object associated with an object in one serialized data set may be in the next serialized data set, and the next serialized data set may not yet be transmitted. Therefore, the memory address of the sub-object may not yet be determined. For each serialized data set, a mapping relationship between pointer encoding data, memory address, and offset address can be recorded; therefore, the method may further include: determining the mapping relationship between pointer encoding data, memory address, and offset address corresponding to at least some of the objects.

[0122] The above-mentioned combination of at least one serialized data corresponding to the object graph and writing the memory address of the sub-object associated with the pointer encoding data of any object as pointer field data into the memory address of the object includes: determining the memory address of the sub-object associated with the pointer encoding data of any object according to the mapping relationship corresponding to at least one serialized data; and writing the memory address of the sub-object as pointer field data into the memory address of the object.

[0123] Among them, since the pointer domain encoded data corresponds to the serialization number, each serialization number can identify an object. Therefore, the mapping relationship can include a first correspondence between the serialization number of each object and its memory address, and a second correspondence between the memory address of each object and its pointer domain encoded data, and the offset address of the sub-object pointed to by the pointer domain encoded data relative to the memory address.

[0124] By combining the second correspondences between different serialized data, the memory address of each object in the first correspondence can be calculated. The offset address corresponding to one serialized data may be determined by combining it with the next serialized data. In this case, the offset address can be left blank. After deserializing the next serialized data, the offset address can be determined, and the memory address can be calculated.

[0125] To facilitate understanding, in some embodiments, determining the memory addresses corresponding to at least some of the objects may include: for a first object in at least some of the objects, determining the memory address of the second object based on the memory address of the first object and the offset address of the second object associated with the first object relative to the first object.

[0126] The first object may refer to any object in at least some objects, and is named as the first object for the convenience of description. The second object is a sub-object of the first object.

[0127] The above-mentioned determination of the mapping relationship between the pointer encoding data, object address and offset address corresponding to at least some of the objects may include: determining the serialization numbers corresponding to at least some of the objects; and determining the mapping relationship between the pointer encoding data, memory address and offset address based on the serialization number corresponding to the pointer encoding data of the first object.

[0128] Among them, the serialization order and deserialization order of at least some objects are the same, the serialization data is generated by the encoding data of at least some objects according to their respective serialization order, and the deserialization processing can be performed in the same order. Therefore, the serialization numbers corresponding to at least some objects can be determined according to the deserialization order.

[0129] When the serialization number of the first object is determined, a first correspondence can be established between the serialization number and the memory address of the first object. The offset address of the second object in memory relative to the first object pointed to by the pointer-encoded data of the first object can be determined, and the memory address of the second object is equal to the memory address of the first object + the offset address of the second object. Therefore, a second correspondence can be established between the serialization number, memory address, and offset address corresponding to the pointer-encoded data.

[0130] To facilitate recording and searching, the above-mentioned first correspondence and second correspondence can be recorded in different mapping tables. Therefore, in some embodiments, determining the mapping relationship between the pointer encoding data, the memory address and the offset address based on the serialization number corresponding to the pointer encoding data of the first object includes: saving the serialization number corresponding to the memory address of the first object in the address mapping table; saving the serialization number corresponding to the pointer encoding data of the first object, the object address of the first object and the offset address of the second object in the pointer mapping table.

[0131] The serialization number corresponding to the pointer encoding data of the first object points to the second object.

[0132] In one embodiment, an address mapping table of corresponding size may be created in advance based on the number of objects in at least one graph attribute information corresponding to at least part of the objects, and a pointer mapping table of corresponding size may be created based on the number of pointer field encoding data.

[0133] The above-mentioned determination of the memory address of the sub-object associated with the pointer encoding data of any object based on the mapping relationship corresponding to at least one serialized data includes: searching the address mapping table and the pointer mapping table corresponding to at least one serialized data, and determining the memory address of the sub-object associated with the pointer encoding data of any object.

[0134] In some embodiments, the above-mentioned deserialization of serialized data to determine the memory addresses of at least part of the objects and the range data corresponding to the range encoding data of at least part of the objects may include: deserializing the serialized data to obtain at least one graph attribute information, the range data corresponding to the range encoding data of at least part of the objects contained in the serialized data, and header encoding information; allocating memory space for at least part of the objects according to at least one graph attribute information; searching for metadata indexed by the header encoding information of at least part of the objects; and determining the memory data format corresponding to at least part of the objects based on the metadata.

[0135] Then, writing the range data corresponding to at least some of the objects into the respective memory addresses may include: writing the range data corresponding to at least some of the objects into the range positions of the respective memory addresses according to the memory data format.

[0136] The above-mentioned combination of at least one serialized data corresponding to the object graph and writing the memory address of the sub-object associated with the pointer encoding data of any object as pointer field data into the memory address of the object may include: combining at least one serialized data corresponding to the object graph, and writing the memory address of the sub-object associated with the pointer encoding data of any object as pointer field data into the pointer field position in the memory address of the object according to the memory data format.

[0137] In addition, the object header information indexed by the header encoding information is written to the object header position in the memory data format, etc.

[0138] In one embodiment, memory space may be allocated for at least some of the objects according to the graph size in at least one graph attribute information, and then the memory addresses corresponding to at least some of the objects in the memory space may be determined according to the memory data formats corresponding to at least some of the objects and the serialization order of at least some of the objects.

[0139] For ease of understanding, taking the object graph corresponding to the schematic diagram shown in Figure 3 as an example, assuming that the predetermined number is 4, according to the serialization order of different objects in the object graph, after writing A→B→D→F in the first cache, the first serialized data can be generated based on the value domain encoding data and pointer domain encoding data of A→B→D→F, as shown in Figure 4E. After that, E→G→H→C can be serialized to generate the second serialized data shown in Figure 4F.

[0140] After the receiving end receives the first serialized data, it can deserialize it, create an address mapping table and a pointer mapping table, and save the serialization number corresponding to the memory address of each object to the address mapping table, and save the serialization number corresponding to the pointer encoding data of each object, the memory address of each object, and the offset address of the sub-object pointed to by the pointer encoding data of each object to the pointer mapping table.

[0141] After receiving the second sequence data, the receiving end may perform the same operation to obtain the address mapping table and the pointer mapping table.

[0142] Table 1 below shows an implementation of the address mapping table corresponding to the first serialized data:

[0143] Among them, Addr-A represents the memory address of object A, Addr-B represents the memory address of object B, Addr-D represents the memory address of object D, and Addr-F represents the memory address of object F.

[0144] Table 2 below shows an implementation of the pointer mapping table for the first serialized data:

[0145] Among them, offsetA1 represents the offset address of the first sub-object of object A (that is, object B), offsetA2 represents the offset address of the second sub-object of object A (that is, object D), offsetB1 represents the offset address of the first sub-object of object B; offsetD1 represents the offset address of the first sub-object of object D; offsetF1 represents the offset address of the first sub-object of object F.

[0146] Table 3 below shows an implementation of the address mapping table corresponding to the second serialized data:

[0147] Among them, Addr-E represents the memory address of object E, Addr-G represents the memory address of object G, Addr-H represents the memory address of object H, and Addr-C represents the memory address of object C.

[0148] Table 4 below shows an implementation of the second pointer mapping table for serializing the number of households winning bets:

[0149] Among them, offsetE1 represents the offset address of the first sub-object of object A, offsetE2 represents the offset address of the second sub-object of object E; offsetG1 represents the offset address of the first sub-object of object G, offsetG2 represents the offset address of the second sub-object of object G; offsetH1 represents the offset address of the first sub-object of object H, offsetH2 represents the offset address of the second sub-object of object H; offsetH3 represents the offset address of the third sub-object of object H; offsetC1 represents the offset address of the first sub-object of object C, offsetC2 represents the offset address of the second sub-object of object C.

[0150] Combining Tables 1 to 4, we can see that Object A is the first object to be deserialized. Its corresponding serialization number can be 0. When it is first written to memory space, its corresponding memory address (Addr-A) can be determined. Object B is a child object of Object A and is the next object to be deserialized after Object A. Object B's serialization number is 1. When written to memory space, Object B's offset address relative to Object A (offsetA1) can be determined. Object B's memory address (Addr-B) is equal to Object A's memory address (Addr-A) plus Object B's offset address (offsetA1).

[0151] The serialization number 4 of object E corresponds to the memory address (Addr-D) of object D and the offset address (offsetD1) of the sub-object of object D. The serialization number 4 identifies the serialization order of the sub-object. The memory address (Addr-D) of object D plus the offset address (offsetD1) of the sub-object of object D is the memory address (Addr-E) of the sub-object corresponding to the serialization number 4.

[0152] Since the first serialized data does not include object E corresponding to serialization number 4, the memory address (Addr-E) and offset address (offsetD1) of object E cannot be determined. Therefore, the memory address (Addr-D) and offset address (offsetD1) of object E can be determined by combining the deserialization result of the second serialized data, and then filled in Table 2 and Table 3.

[0153] Finally, by querying Tables 1 to 4, the pointer field encoding data of each object can be modified to the memory address corresponding to the corresponding serialization number, and the memory address can be written into the pointer field position in the memory address corresponding to each object, thereby finally obtaining the object graph after deserialization.

[0154] FIG6A shows the memory data format of an object in the deserialized object graph. The metadata used to indicate the value range and pointer field location and type in this object is assumed to be represented by a bitmap of "01100," where 0 represents the value range at that location, and 1 represents the pointer field at that location. The corresponding memory data format is shown in FIG6 . In the memory data format, H represents the object header location, V represents the value range location, and P represents the pointer field location. The pointer field data written at the pointer field location is the memory address of the associated child object, and can be the same as the memory data format at the sending end.

[0155] Furthermore, FIG6B illustrates a schematic diagram of the segmented serialization / deserialization operation of an object graph. Referring to FIG6B , it can be seen that the sending end can perform serialization processing 60 based on a portion of the object, thereby generating a serialized data. Each serialized data generated can be transmitted to the receiving end. The receiving end can deserialize each serialized data received 61 without having to wait for the entire serialized data. Finally, the pointer field data is updated 62 based on the entire received serialized data, thereby restoring the object graph.

[0156] Through the technical solution of the embodiments of the present application, the object serialization / deserialization order is used to replace the relative offset in the traditional serialization encoding to associate the object and its sub-objects, eliminating the limitation that deserialization must wait for the serialization to be fully completed and the entire serialization buffer to be fully received before deserialization can begin. The overlapping implementation of serialization, network transmission and deserialization is achieved, and the need to modify the relative offset during the serialization process is eliminated, thereby reducing the end-to-end delay of serialization / deserialization, improving processing efficiency, and ensuring user experience.

[0157] In an embodiment of the present application, a transmitting end determines, for any object in an object graph, i.e., a first object, a serialization number of the second object based on the serialization order of the second object associated with the first object; uses the serialization number of the second object as pointer field coded data of the first object; determines at least a portion of the objects to be serialized according to the serialization order of different objects in the object graph; generates serialized data of the at least a portion of the objects based on the value field coded data and the pointer field coded data of the at least a portion of the objects; and transmits the serialized data to a receiving end; the receiving end is configured to obtain the object graph by combining the deserialization results of at least one serialized data corresponding to the object graph; by using the serialization number corresponding to the serialization order as the pointer field coded data and associating objects and sub-objects using the serialization order, compared to using a relative offset method, there is no need to traverse all objects to determine the relative offset of the sub-object, thereby reducing graph traversal operations and reducing operational complexity, thereby helping to reduce end-to-end latency and improve transmission efficiency. Moreover, by associating objects and sub-objects using the serialization order, some objects can be serialized / deserialized without waiting for all objects to be processed, thereby further reducing end-to-end latency and improving processing efficiency.

[0158] Figure 7 is a structural schematic diagram of an embodiment of an object processing device provided by an embodiment of the present application, and the device may include: a number determination module 701, used to determine the serialization number of the second object according to the serialization order of the second object associated with the first object in the object graph; a pointer encoding module 702, used to use the serialization number of the second object as the pointer field encoding data of the first object; an object determination module 703, used to determine at least part of the objects to be serialized in the object graph according to the serialization order of different objects in the object graph; a data generation module 704, used to generate serialized data of at least part of the objects based on the value field encoding data and pointer field encoding data of at least part of the objects; a data transmission module 705, used to transmit the serialized data to a receiving end; the receiving end is used to obtain the object graph in combination with the deserialization result of at least one serialized data corresponding to the object graph.

[0159] In some embodiments, the object determination module may specifically write the value domain encoding data and pointer domain encoding data of the first object into the first cache according to the serialization order of different objects in the object graph; when the first cache reaches a predetermined cache size or the number of objects written reaches a predetermined number, the objects written into the first cache are used as at least part of the objects to be serialized.

[0160] In some embodiments, the device may further include: an object partitioning module, configured to segment the object graph according to the serialization order of different objects in the object graph, combined with a predetermined cache size or a predetermined number of objects, to obtain multiple sub-object graphs; the pointer encoding module may specifically determine the serialization number of the second object based on the serialization order of the second object associated with the first object in the first sub-object graph; and the object determination module may specifically take at least one object contained in the first sub-object graph as at least a portion of the object to be serialized.

[0161] In some embodiments, the data generation module specifically: writes the value domain encoding data corresponding to at least some of the objects into the corresponding value domain positions in the predetermined data format; writes the pointer domain encoding data corresponding to at least some of the objects into the corresponding pointer domain positions in the predetermined data format; writes the header encoding information corresponding to at least some of the objects into the corresponding head positions in the predetermined data format; the header encoding information is used to associate metadata; and writes at least one graph attribute information corresponding to at least some of the objects into the attribute positions in the predetermined data format.

[0162] In some embodiments, the data generation module may specifically: combine the value domain encoding data and header encoding information corresponding to at least some of the objects to obtain a value domain encoding array; combine the pointer domain encoding data corresponding to at least some of the objects to obtain a pointer domain encoding array; combine at least one graph attribute information corresponding to at least some of the objects to obtain an attribute encoding array; and use the value domain encoding array, pointer domain encoding array, and attribute encoding array as serialized data.

[0163] In some embodiments, the apparatus may further include: an object graph determination module configured to determine, in response to a data transfer operation on a previous second sub-object graph, a next first sub-object graph to be serialized; or, to process multiple sub-object graphs in parallel and use any one of the sub-object graphs as the first sub-object graph; or, to determine, in response to a determination that the previous second object graph is determined as a sub-object graph to be serialized for a duration greater than a predetermined duration, a next first sub-object graph to be serialized.

[0164] The object processing device shown in FIG7 can execute the object processing method described in the embodiment shown in FIG2 , and its implementation principle and technical effects are not further described. The specific manner in which the various modules and units of the object processing device in the above embodiment perform operations has been described in detail in the embodiment of the method, and will not be further elaborated here.

[0165] Figure 8 is a structural schematic diagram of another embodiment of an object processing device provided by an embodiment of the present application, and the device may include: a data acquisition module 801, used to acquire serialized data transmitted by the sender; the serialized data is generated based on the value domain encoding data and pointer domain encoding data of at least part of the objects in the object graph; the pointer domain encoding data is the serialization number of the associated sub-object; a deserialization module 802, used to deserialize the serialized data to determine the memory address of at least part of the objects, and the value domain data corresponding to the value domain encoding data of at least part of the objects; a data writing module 803, used to write the value domain data corresponding to at least part of the objects into their respective memory addresses; and in combination with at least one serialized data corresponding to the object graph, write the memory address of the sub-object associated with the pointer encoding data of any object as pointer domain data into the memory address of the object.

[0166] In some embodiments, the device may also include: a relationship recording module, used to determine the mapping relationship between pointer encoding data, memory address and offset address corresponding to at least some objects; the data writing module can specifically determine the memory address of the sub-object associated with the pointer encoding data of any object based on the mapping relationship corresponding to at least one serialized data; and write the memory address of the sub-object as pointer domain data into the memory address of the object.

[0167] In some embodiments, the deserialization module determines the memory addresses corresponding to at least some of the objects, which may include: for a first object in at least some of the objects, determining the memory address of the second object based on the memory address of the first object and the offset address of the second object associated with the first object relative to the first object; the relationship recording module may specifically: determine the serialization numbers corresponding to at least some of the objects; and determine the mapping relationship between the pointer encoding data, the memory address and the offset address based on the serialization number corresponding to the pointer encoding data of the first object.

[0168] In some embodiments, the relationship recording module determines the mapping relationship between the pointer encoding data, the memory address and the offset address based on the serialization number corresponding to the pointer encoding data of the first object, including: saving the serialization number corresponding to the memory address of the first object in the address mapping table; saving the serialization number corresponding to the pointer encoding data of the first object, the object address of the first object and the offset address of the second object in the pointer mapping table; the data writing module determines the memory address of the sub-object associated with the pointer encoding data of any object based on the mapping relationship corresponding to at least one serialized data, including: searching the address mapping table and the pointer mapping table corresponding to at least one serialized data, and determining the memory address of the sub-object associated with the pointer encoding data of any object.

[0169] In some embodiments, the deserialization module specifically allocates memory space for at least some objects according to at least one graph attribute information; searches for metadata indexed by header encoding information of at least some objects; determines the memory data format corresponding to at least some objects based on the metadata; the data writing module writes the value domain data corresponding to at least some objects into their respective memory addresses, including: writing the value domain data corresponding to at least some objects into the value domain position of their respective memory addresses according to the memory data format; the data writing module writes the memory address of the sub-object associated with the pointer encoding data of any object as pointer domain data into the memory address of the object in combination with at least one serialized data corresponding to the object graph, including: writing the memory address of the sub-object associated with the pointer encoding data of any object as pointer domain data into the pointer domain position in the memory address of the object according to the memory data format.

[0170] The object processing device shown in FIG8 can execute the object processing method described in the embodiment shown in FIG5 , and its implementation principle and technical effects are not described in detail here. The specific manner in which each module and unit of the object processing device in the above embodiment performs operations has been described in detail in the embodiment of the method, and will not be elaborated on here.

[0171] An embodiment of the present application also provides a computing device, as shown in Figure 9, which may include a storage component 901 and a processing component 902; the storage component 901 stores one or more computer instructions, wherein the one or more computer instructions are called and executed by the processing component 902 to implement the object processing method shown in Figure 2 or the object processing method shown in Figure 5.

[0172] Of course, a computing device may also include other components, such as input / output interfaces, display components, communication components, etc.

[0173] The input / output interface provides an interface between the processing component and peripheral interface modules, which may be output devices, input devices, etc. The communication component is configured to facilitate wired or wireless communication between the computing device and other devices.

[0174] The processing component may include one or more processors to execute computer instructions to complete all or part of the steps in the above method. Of course, the processing component may also be implemented as one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above method.

[0175] The storage component is configured to store various types of data to support operations at the terminal. The storage component can be implemented by any type of volatile or non-volatile memory device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.

[0176] It should be noted that the computing device can be a physical device or an elastic computing host provided by a cloud computing platform, etc. It can be implemented as a distributed cluster consisting of multiple servers or terminal devices, or as a single server or a single terminal device.

[0177] The above-mentioned computing device can also be specifically implemented as an electronic device. The electronic device can refer to a device used by the user and has the computing, Internet access, communication and other functions required by the user, such as a mobile phone, tablet computer, personal computer, wearable device, etc.

[0178] The present application also provides a computer-readable storage medium storing a computer program. When executed by a computer, the computer program can implement the object processing method of the embodiment shown in FIG. 2 or the object processing method of the embodiment shown in FIG. 5 . The computer-readable medium can be included in the electronic device described in the above embodiments, or it can exist independently and not be incorporated into the electronic device.

[0179] The present application also provides a computer program product, comprising a computer program carried on a computer-readable storage medium. When executed by a computer, the computer program can implement the object processing method of the embodiment shown in FIG. 2 or the object processing method of the embodiment shown in FIG. 5 . In such an embodiment, the computer program can be downloaded and installed from a network and / or installed from a removable medium. When executed by a processor, the computer program performs the various functions defined in the system of the present application.

[0180] It should be noted that the embodiments of the present application may involve the use of user data. In actual applications, user-specific personal data can be used in the scheme described herein within the scope permitted by applicable laws and regulations, subject to the requirements of applicable laws and regulations of the country where the user is located (for example, with the user's explicit consent, effective notification to the user, etc.).

[0181] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0182] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.

[0183] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, or of course, by hardware. Based on this understanding, the above technical solution, in essence, or the part that contributes to the relevant technology, can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or certain parts of the embodiments.

[0184] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. An object processing method, comprising: Determine the serialization number of the second object according to the serialization order of the second object associated with the first object in the object graph; Using the serialization number of the second object as pointer field encoding data of the first object; Determining at least part of the objects to be serialized in the object graph according to the serialization order of different objects in the object graph; Generate serialized data of at least part of the object based on the value domain encoded data and the pointer domain encoded data of at least part of the object; The serialized data is transmitted to a receiving end; the receiving end is used to obtain the object graph by combining a deserialization result of at least one serialized data corresponding to the object graph.

2. The method according to claim 1, wherein: The determining, according to the serialization order of different objects in the object graph, at least part of the objects to be serialized comprises: Writing the value domain encoded data and the pointer domain encoded data of the first object into the first cache according to the serialization order of different objects in the object graph; When the first cache reaches a predetermined cache size or the number of objects written reaches a predetermined number, the objects written into the first cache are used as at least part of the objects to be serialized.

3. The method according to claim 1, wherein: Also includes: According to the serialization order of different objects in the object graph, combined with a predetermined cache size or a predetermined number of objects, the object graph is segmented to obtain multiple sub-object graphs; The determining the serialization number of the second object according to the serialization order of the second object associated with the first object in the object graph comprises: Determine a serialization number of the second object according to a serialization order of the second object associated with the first object in the first sub-object graph; The determining, according to the serialization order of different objects in the object graph, at least part of the objects to be serialized comprises: At least one object included in the first sub-object graph is used as at least a portion of the object to be serialized.

4. The method according to claim 1, wherein: The generating the serialized data of at least part of the object based on the value domain coded data and the pointer domain coded data of at least part of the object comprises: Writing the value range encoding data corresponding to at least part of the objects into the corresponding value range positions in the predetermined data format; Writing the pointer field encoding data corresponding to at least part of the objects into the corresponding pointer field positions in the predetermined data format; Writing header coding information corresponding to at least some of the objects into corresponding header positions in the predetermined data format; the header coding information is used to associate metadata; At least one graph attribute information corresponding to at least part of the object is written into the attribute position in the predetermined data format.

5. The method according to claim 1, wherein: The generating the serialized data of at least part of the object based on the value domain coded data and the pointer domain coded data of at least part of the object comprises: Combining the range coded data and the header coded information respectively corresponding to at least some of the objects to obtain a range coded array; Combining the pointer domain coded data corresponding to at least some of the objects to obtain a pointer domain coded array; Combining at least one graph attribute information corresponding to at least part of the objects to obtain an attribute coding array; The value domain encoding array, the pointer domain encoding array and the attribute encoding array are used as serialized data.

6. The method according to claim 3, wherein: Also includes: In response to a data transfer operation on a previous second sub-object graph, determining a next first sub-object graph to be serialized; Alternatively, the multiple sub-object graphs are processed in parallel, and any one of the sub-object graphs is used as the first sub-object graph; Alternatively, in response to the determination that the time length of the previous second object graph being determined as the sub-object graph to be serialized is greater than a predetermined time length, the next first sub-object graph to be serialized is determined.

7. An object processing method, comprising: Get the serialized data transmitted by the sender; The serialized data is generated based on the value domain coded data and the pointer domain coded data of at least part of the objects in the object graph; the pointer domain coded data is the serialized number of the associated sub-object; Deserialize the serialized data to determine the memory addresses of at least part of the objects and the range data corresponding to the range encoded data of at least part of the objects; Writing the range data corresponding to at least some of the objects into respective memory addresses; In combination with at least one serialized data corresponding to the object graph, the memory address of the sub-object associated with the pointer encoding data of any object is written into the memory address of the object as pointer field data.

8. The method according to claim 7, wherein: Also includes: Determine a mapping relationship between pointer encoding data, memory addresses, and offset addresses corresponding to at least some of the objects; The step of writing the memory address of a sub-object associated with the pointer encoding data of any object as pointer domain data into the memory address of the object in combination with at least one serialized data corresponding to the object graph comprises: Determine the memory address of the sub-object associated with the pointer encoding data of any object according to the mapping relationship respectively corresponding to the at least one serialized data; The memory address of the sub-object is written as pointer field data into the memory address of the object.

9. The method according to claim 8, wherein: Determining the memory addresses corresponding to at least some of the objects includes: For a first object in the at least some of the objects, determining a memory address of the second object according to a memory address of the first object and an offset address of a second object associated with the first object relative to the first object; Determining the mapping relationship between the pointer encoding data, the object address and the offset address respectively corresponding to at least part of the objects includes: Determine serialization numbers corresponding to at least some of the objects respectively; According to the serialization number corresponding to the pointer encoding data of the first object, a mapping relationship between the pointer encoding data, the memory address and the offset address is determined.

10. The method according to claim 9, wherein: Determining the mapping relationship between the pointer encoding data, the memory address, and the offset address according to the serialization number corresponding to the pointer encoding data of the first object includes: The memory address of the first object corresponds to the serial number stored in the address mapping table; The serialization number corresponding to the pointer encoding data of the first object, the object address of the first object and the offset address of the second object are stored in a pointer mapping table in correspondence with each other; The determining, according to the mapping relationship respectively corresponding to the at least one serialized data, the memory address of the sub-object associated with the pointer encoding data of any object comprises: The address mapping table and the pointer mapping table respectively corresponding to the at least one serialized data are searched to determine the memory address of the sub-object associated with the pointer encoding data of any object.

11. The method according to claim 8, wherein: The deserialization of the serialized data to determine the memory addresses of at least part of the objects and the range data corresponding to the range encoded data of at least part of the objects respectively include: Deserialize the serialized data to obtain at least one graph attribute information, range data corresponding to the range coded data of at least part of the objects contained in the serialized data, and header coding information; Allocating memory space for at least part of the objects according to the at least one graph attribute information; Searching for metadata indexed by header encoding information of at least part of the object; Determining, based on the metadata, memory data formats corresponding to at least some of the objects respectively; Writing the range data corresponding to at least some of the objects into respective memory addresses comprises: Writing the range data corresponding to at least some of the objects into the range positions of their respective memory addresses according to the memory data format; The step of writing the memory address of a sub-object associated with the pointer encoding data of any object as pointer domain data into the memory address of the object in combination with at least one serialized data corresponding to the object graph comprises: In combination with at least one serialized data corresponding to the object graph, the memory address of the sub-object associated with the pointer encoding data of any object is written as pointer field data into the pointer field position in the memory address of the object in accordance with the memory data format.

12. A computing device, comprising a processing component and a storage component; the storage component stores one or more computer instructions; the one or more computer instructions are used to be called and executed by the processing component to implement the object processing method as described in any one of claims 1 to 6 or to implement the object processing method as described in any one of claims 7 to 11.

13. A computer-readable storage medium storing a computer program, wherein when the computer program is executed by a computer, the object processing method according to any one of claims 1 to 6 or the object processing method according to any one of claims 7 to 11 is implemented.

Citation Information

Patent Citations

  • Java object serialization method and system

    CN105335156A

  • Data processing method and system

    CN113946453A

  • Object processing method and computing device

    CN116760421A

  • Controlling Service Functions

    US20180165338A1

Cited By

  • Object serialization method and device, electronic equipment and computer storage medium

    CN121387289A