Unreal engine based object data serialization and deserialization system and method

By leveraging Unreal Engine's reflection mechanism and delimiter processing, efficient serialization and deserialization of object data are achieved, resolving the inefficiency and instability of manual processing methods, improving the reliability of data processing and system stability, and ensuring data integrity and the reliability of scene recovery.

CN119806486BActive Publication Date: 2025-10-24CCCC WUHAN CHI HENG INT ENG CONSULTING CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411745617.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-02
Publication Date
2025-10-24
Estimated Expiration
2044-12-02

AI Technical Summary

Technical Problem

Existing technologies for processing object data in Unreal Engine rely on manual data processing methods that are time-consuming, labor-intensive, and prone to errors, leading to data inconsistency and system instability, making it difficult to meet the needs for efficient storage and retrieval of large-scale object data.

Method used

The Unreal Engine's reflection mechanism is used to obtain object metadata, perform serialization conversion of class name and attribute data, distinguish between dynamic and static type processing, and assemble string data with delimiters. Combined with data optimization and compression techniques, efficient storage is achieved. During deserialization, string data is split with delimiters, and differential processing and attribute assignment are performed to ensure object reconstruction and scene restoration.

Benefits of technology

It improves the reliability of object data processing and system stability, reduces data storage space usage, ensures data integrity and the reliability of scene reconstruction, and enhances development efficiency and system operating efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119806486B_ABST
    Figure CN119806486B_ABST
Patent Text Reader

Abstract

The application discloses an Unreal Engine-based object data serialization system, an Unreal Engine-based object data deserialization system, an Unreal Engine-based object data serialization method, an Unreal Engine-based object data deserialization method and an Unreal Engine-based object data serialization and deserialization verification method, wherein the Unreal Engine-based object data serialization system comprises a first acquisition module configured to acquire metadata of objects in a scene through a reflection mechanism of an Unreal Engine; and a serialization module configured to assemble class name data in string data of each object and attribute data in string data of the corresponding object to obtain the string data of each object. Through unified object data serialization processing, data optimization and deserialization processing, efficient access and state management of the object are realized.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data processing, in particular to an object data serialization and deserialization system and method based on Unreal Engine. BACKGROUND

[0002] In the field of computers, with the continuous development of information technology, Unreal Engine has become one of the most advanced game engines with its powerful real-time rendering capabilities, high-fidelity image quality, developer-friendly editing tools, and complete functional modules. Unreal Engine not only occupies a large market in the field of game production, but also is widely used in game development, virtual reality, digital twin and many other industries and fields.

[0003] At present, in the software development process, developers need to handle a large amount of object data, and the traditional manual data processing method has been difficult to meet the development needs. When processing objects with complex hierarchical structure and diversified attributes, a large amount of repetitive code usually needs to be written to handle the serialization and deserialization logic of different types of objects, which not only consumes time and effort, but also easily causes data inconsistency or state loss problems, affecting the reliability and stability of the system.

[0004] In order to avoid the problems of data loss, object state error and system performance degradation caused by human operation errors in the object data serialization and deserialization process, the technical personnel in the field have been seeking an automatic object data management method in order to efficiently handle the storage and reading of large-scale object data, improve the development efficiency, reduce human errors, and ensure the integrity, consistency of object data and the stability of system operation. SUMMARY

[0005] The purpose of the present application is to provide an object data serialization and deserialization system and method based on Unreal Engine, which provides unified object data acquisition, serialization processing, data optimization and deserialization processing, realizes efficient access and state management of objects, and solves the problems of large workload, easy error and data inconsistency in manual data processing method, improves the reliability of object data processing, the stability of system operation and the development efficiency.

[0006] The object data serialization system based on Unreal Engine designed by the present application to achieve one of the above purposes, which is characterized by comprising:

[0007] The first acquisition module is configured to acquire metadata of each object in the scene through the reflection mechanism of the Unreal Engine;

[0008] The serialization module is configured to sequentially serialize class name data in metadata of each object to obtain class name data in string data of each object; traverse attribute data in the metadata of each object to obtain attribute name, attribute type and attribute value of the attribute data of each object; serialize the attribute name, attribute type and attribute value of the attribute data to obtain the attribute data in the string data of each object; and assemble the class name data in the string data of each object and the attribute data in the string data of the corresponding object to obtain the string data of each object, and add a separator between two adjacent strings in the string data of each object.

[0009] Further, the system described above further comprises a serialization submodule; the serialization submodule is configured to determine the state type of state data in the metadata of each object, when the state data in the metadata of an object is determined to be of a dynamic type, then according to the state data, modify the class name data and / or the attribute data in the metadata of the dynamic type object based on the attribute change of the dynamic object to obtain the class name data and the attribute data in the metadata of the modified dynamic type object, serialize the class name data and the attribute data in the metadata of the modified dynamic type object to obtain the class name data and the attribute data in the string data of the dynamic type object, assemble the class name data in the string data of the dynamic type object and the attribute data in the string data of the corresponding object to obtain the string data of the dynamic type object, and add a dynamic type object mark in the string data of the dynamic type object; when the state data in the metadata of an object is of a static type, serialize the class name data and the attribute data in the metadata of the static type object to obtain the class name data and the attribute data in the string data of the static type object; and assemble the class name data in the string data of the static type object and the attribute data in the string data of the corresponding object to obtain the string data of the static type object, and add a dynamic type object mark in the string data of the dynamic type object.

[0010] Further, the system described above further comprises a data optimization module; the data optimization module is configured to perform storage optimization on the string data of each object, including: judging the string data of each object, if the attribute value of the attribute data in the string data of an object is different from the default value of the attribute value, then storing the attribute data in the string data of the object; if the attribute value of the attribute data in the string data of an object is the same as the default value of the attribute value, then not storing the attribute data in the string data of the object; if the attribute data in the string data of multiple objects is the same, then storing the attribute data in the string data of the object once; if the string data of an object is greater than a threshold value, then compressing the string data of the object, and storing the compressed data corresponding to the string data of the object.

[0011] The object data serialization method based on Unreal Engine for realizing the third purpose is designed by the application, and has the special property that it comprises the following steps:

[0012] The metadata of each object in the scene is obtained through the reflection mechanism of Unreal Engine;

[0013] The class name data in the metadata of each object is sequentially serialized and converted to obtain the class name data in the string data of each object; the attribute data in the metadata of each object is traversed to obtain the attribute name, attribute type and attribute value of the attribute data of each object; the attribute name, attribute type and attribute value of the attribute data are serialized and converted to obtain the attribute data in the string data of each object; the class name data in the string data of each object and the attribute data in the string data of the corresponding object are assembled to obtain the string data of each object, and a delimiter is added between two adjacent strings in the string data of each object.

[0014] The object data deserialization system based on Unreal Engine for realizing the third purpose is designed by the application, and has the special property that it comprises:

[0015] The second obtaining module is configured to sequentially split the string data of each object into a plurality of substring data according to the delimiters as boundaries, and traverse the substring data to obtain the class name data, attribute data and type mark of the string data of each object;

[0016] The deserialization module is configured to sequentially deserialize and restore the class name data of the string data of each object to obtain the class name data in the metadata of each object; split the attribute data in the string data of each object to obtain the attribute name, attribute type and attribute value contained in the attribute data in the string data of each object, and deserialize and restore the attribute name, attribute type and attribute value contained in the attribute data to obtain the attribute data in the metadata of each object;

[0017] The recovery module is configured to construct each object in the scene according to the class name data in the metadata of each object, and set the attributes of each object according to the attribute name, attribute type and attribute value of the attribute data in the metadata of each object to obtain a scene comprising each object and corresponding attributes.

[0018] Further, the system described above further comprises: a deserialization submodule; the deserialization submodule is configured to determine the type mark in the metadata of each object, when the type mark in the string data of the object is a dynamic type, modify the class name data and the attribute data in the string data of the dynamic type object based on the attribute change of the dynamic object according to the class name data and the attribute data in the string data of the current dynamic type object, obtain the modified class name data and the attribute data in the string data of the dynamic type object, and deserialize the modified class name data and the attribute data in the string data of the dynamic type object to obtain the class name data and the attribute data in the metadata of the dynamic type object; when the type mark in the string data of the object is a static type, deserialize the class name data and the attribute data in the string data of the static type object to obtain the class name data and the attribute data in the metadata of the static type object.

[0019] Further, the recovery module comprises:

[0020] A scene construction unit is configured to create each object according to the class name data in the metadata of each object.

[0021] An attribute setting unit is configured to assign values to the corresponding attributes of each object according to the attribute name, the attribute type and the attribute value in the attribute data in the metadata of each object, and obtain a scene containing each object and the corresponding attributes.

[0022] The object data deserialization method based on Unreal Engine designed for the fourth aspect of the present application has the speciality that it comprises the following steps:

[0023] The string data of each object is sequentially split into a plurality of substring data according to the delimiter, and the substring data is traversed to obtain the class name data, the attribute data and the type mark of the string data of each object.

[0024] The class name data of the string data of each object is sequentially deserialized to obtain the class name data in the metadata of each object, the attribute data in the string data of each object is split to obtain the attribute name, the attribute type and the attribute value contained in the attribute data in the string data of each object, and the attribute name, the attribute type and the attribute value contained in the attribute data are deserialized to obtain the attribute data in the metadata of each object.

[0025] Each object in the scene is constructed according to the class name data in the metadata of each object, and the attributes of each object are set according to the attribute name, the attribute type and the attribute value of the attribute data in the metadata of each object, and a corresponding scene containing each object is obtained.

[0026] The verification method for object data serialization and deserialization based on the Unreal Engine and designed for the fifth aspect of the above-mentioned purposes has the speciality that it comprises the following steps:

[0027] Obtaining the metadata of each object in the scene through the reflection mechanism of the Unreal Engine;

[0028] Serializing and converting the class name data in the metadata of each object in sequence to obtain the class name data in the string data of each object; traversing the attribute data in the metadata of each object to obtain the attribute name, attribute type and attribute value of the attribute data of each object; serializing and converting the attribute name, attribute type and attribute value of the attribute data to obtain the attribute data in the string data of each object; assembling the class name data in the string data of each object and the attribute data in the string data of the corresponding object to obtain the string data of each object, and adding a separator between the adjacent two strings in the string data of each object;

[0029] Calculating the checksum of the string data of each object to obtain a first checksum;

[0030] Splitting the string data of each object into a plurality of substring data according to the separator in sequence, and traversing the substring data to obtain the class name data, attribute data and type mark of the corresponding string data of each object;

[0031] Deserializing and restoring the class name data of the string data of each object in sequence to obtain the class name data in the metadata of each object; splitting the attribute data in the string data of each object to obtain the attribute name, attribute type and attribute value contained in the attribute data in the string data of each object, and deserializing and restoring the attribute name, attribute type and attribute value contained in the attribute data to obtain the attribute data in the metadata of each object;

[0032] Calculating the checksum of the metadata of each object to obtain a second checksum;

[0033] Comparing the first checksum with the second checksum, if the first checksum is equal to the second checksum, confirming the data integrity of the serialization and deserialization process; if the first checksum is not equal to the second checksum, re-serializing and deserializing.

[0034] The present application has the following beneficial effects:

[0035] (1) The object data serialization and deserialization system and method based on Unreal Engine, through the reflection mechanism of Unreal Engine, the metadata of each object in the scene is obtained, avoiding the instability caused by direct access to object data. In the serialization process, the system respectively serializes the class name data and attribute data, and adds a separator between the strings to ensure the accuracy of data conversion. Serialization also distinguishes between dynamic and static types, judges the state data through the serialization submodule, and uses corresponding processing for different types, improving the adaptability of the system to different types of objects. The data optimization module effectively reduces the occupation of data storage space by comparing attribute values with default values, storing the same attribute data once, and using various optimization methods such as large data compression, improving the running efficiency of the system.

[0036] (2) The object data serialization and deserialization system and method based on Unreal Engine, through the second acquisition module, the serialized string data is split, based on the separator, the data is divided into several sub-strings, and the class name data, attribute data and type mark are extracted through iteration. In the deserialization process, the deserialization submodule differentiates and processes different types of objects. Through the scene construction unit and attribute setting unit in the recovery module, the restoration of the object and the assignment of the attribute are realized, ensuring the integrity of each object and its attribute in the scene, providing reliable guarantee for the scene reconstruction in Unreal Engine.

[0037] (3) The object data serialization and deserialization system and method based on Unreal Engine, by verifying the first checksum of the string data of each object in the serialization process, and then calculating the second checksum after deserialization, the data integrity of the whole process is confirmed by comparing the values of the two checksums. It can find errors that may occur in the data conversion process, and ensure the accuracy of the data by re-executing the serialization and deserialization process. It can accurately restore each object and its attribute in the scene, further ensuring the integrity of the data. BRIEF DESCRIPTION OF DRAWINGS

[0038] Figure 1 The module schematic diagram of one specific embodiment of the object data serialization system based on Unreal Engine of the present application is shown.

[0039] Figure 2 The flowchart of one specific embodiment of the object data serialization method based on Unreal Engine of the present application is shown.

[0040] Figure 3 The module schematic diagram of one specific embodiment of the object data deserialization system based on Unreal Engine of the present application is shown.

[0041] Figure 4A flowchart showing one embodiment of a Unreal Engine-based object data deserialization method of the present application is shown.

[0042] Figure 5 A flowchart showing one embodiment of a Unreal Engine-based object data serialization and deserialization verification method of the present application is shown. DETAILED DESCRIPTION

[0043] In order to enable a more clear understanding of the above-mentioned purposes, features and advantages of the present application, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.

[0044] In the following description, a large number of specific details are set forth in order to facilitate a thorough understanding of the present application. However, the present application can be implemented in many different ways than those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the present application, therefore, the present application is not limited to the specific implementation disclosed below.

[0045] As Figures 1 to 5 shown, the embodiments of the present application provide a Unreal Engine-based object data serialization system, a Unreal Engine-based object data serialization method, a Unreal Engine-based object data deserialization system and a Unreal Engine-based object data deserialization system, and the embodiments of the present application also provide an electronic device. The embodiments are described one by one in the following.

[0046] Embodiment 1

[0047] The present embodiment discloses a Unreal Engine-based object data serialization system, which comprises:

[0048] A first acquisition module is configured to acquire metadata of each object in a scene through a reflection mechanism of a Unreal Engine;

[0049] A serialization module is configured to sequentially serialize and convert class name data in the metadata of each object to obtain class name data in string data of each object; traverse attribute data in the metadata of each object to obtain attribute names, attribute types and attribute values of the attribute data of each object; serialize and convert the attribute names, attribute types and attribute values of the attribute data to obtain the attribute data in the string data of each object; and assemble the class name data in the string data of each object and the attribute data in the string data of the corresponding object to obtain the string data of each object, and add a separator between two adjacent strings in the string data of each object.

[0050] Based on the above system, optionally, the system further comprises: a serialization submodule; the serialization submodule is used for judging the state data in the metadata of each object, when the state data in the metadata of an object is judged as a dynamic type, then according to the state data, the class name data and / or the attribute data in the metadata of the dynamic type object are modified based on the attribute change of the dynamic object, to obtain the class name data and the attribute data in the metadata of the modified dynamic type object, the class name data and the attribute data in the metadata of the modified dynamic type object are serialized and converted to obtain the class name data and the attribute data in the string data of the dynamic type object; the class name data in the string data of the dynamic type object and the attribute data in the string data of the corresponding object are assembled to obtain the string data of the dynamic type object, and a dynamic type object mark is added in the string data of the dynamic type object; when the state data in the metadata of an object is a static type, then the class name data and the attribute data in the metadata of the static type object are serialized and converted to obtain the class name data and the attribute data in the string data of the static type object; the class name data in the string data of the static type object and the attribute data in the string data of the corresponding object are assembled to obtain the string data of the static type object, and a dynamic type object mark is added in the string data of the dynamic type object.

[0051] Based on the above system, optionally, the system further comprises: a data optimization module; the data optimization module is used for storing and optimizing the string data of each object, including: judging the string data of each object, if the attribute value of the attribute data in the string data of an object is different from the default value of the attribute value, then storing the attribute data in the string data of the object; if the attribute value of the attribute data in the string data of an object is the same as the default value of the attribute value, then not storing the attribute data in the string data of the object; if the attribute data in the string data of multiple objects is the same, then storing the attribute data in the string data once; if the string data of an object is greater than a threshold value, then compressing the string data of the object, and storing the compressed data corresponding to the string data of the object.

[0052] Through the cooperation of the above components, the metadata of each object in the scene is obtained through the reflection mechanism of the Unreal Engine, wherein the metadata of each object includes: class name data, attribute data, and state data of the object; the class name data in the metadata of each object and the attribute are serialized and converted to obtain the class name data in the string data of each object; the attribute name, attribute type, and attribute value of the attribute data of each object are obtained by traversing the attribute data in the metadata of each object; the attribute name and attribute type of the attribute data are serialized and converted, and the attribute values are converted according to the types, for example: for integer attribute values, the attribute values are directly converted into strings; for list type attribute values, each child element is converted into a string in turn by recursively traversing the child elements; the attribute data in the string data of each object is obtained; the class name data in the string data of each object and the attribute data of the corresponding object in the string data are assembled to obtain the string data of each object; not only the conventional static object data can be processed, but also the attribute changes of dynamic objects can be captured and serialized in real time during the serialization process, ensuring the integrity and accuracy of the serialized data. Through the storage optimization strategy, for the high-repetitive string data, such as the string containing a large number of same characters and the attribute set stored by default, selective storage is performed; for the string data of the object greater than the threshold value, the string data of the object is lossless or lossy compressed, and the compression algorithm includes: Zlib, LZ4, Deflate, JPEG, Vorbis, and MP3; the data storage space is effectively reduced, and the running efficiency of the system is improved.

[0053] Embodiment 2

[0054] The embodiment discloses an object data serialization method based on an Unreal Engine, and the method comprises the following steps:

[0055] Step 1: obtaining the metadata of each object in the scene through the reflection mechanism of the Unreal Engine;

[0056] It should be noted that the metadata of each object can be a three-dimensional model, a picture, a text, and a video, etc.

[0057] Step 2: sequentially serializing and converting the class name data in the metadata of each object to obtain the class name data in the string data of each object; traversing the attribute data in the metadata of each object to obtain the attribute name, attribute type, and attribute value of the attribute data of each object; serializing and converting the attribute name, attribute type, and attribute value of the attribute data to obtain the attribute data in the string data of each object; assembling the class name data in the string data of each object and the attribute data in the string data of the corresponding object to obtain the string data of each object, and adding a separator between the adjacent two strings in the string data of each object.

[0058] It should be noted that the string data of each object can be data encoded in JSON or XML format; the format of serialized data is consistent on Windows, Mac, Android and iOS platforms, ensuring data consistency.

[0059] Embodiment 3

[0060] The embodiment discloses an Unreal Engine-based object data deserialization system, which comprises:

[0061] A second acquisition module is configured to sequentially split the string data of each object into a plurality of substring data according to the delimiters, and obtain the class name data, the attribute data and the type mark of the string data of each object by traversing the substring data.

[0062] A deserialization module is configured to sequentially deserialize the class name data of the string data of each object to obtain the class name data in the metadata of each object, and split the attribute data in the string data of each object to obtain the attribute name, the attribute type and the attribute value contained in the attribute data, and deserialize the attribute name, the attribute type and the attribute value contained in the attribute data to obtain the attribute data in the metadata of each object.

[0063] A recovery module is configured to construct each object in a scene according to the class name data in the metadata of each object, set the attributes of each object according to the attribute name, the attribute type and the attribute value of the attribute data in the metadata of each object, and obtain a scene containing each object and corresponding attributes.

[0064] Based on the above system, the system can further comprise a deserialization submodule, which is configured to judge the type mark in the metadata of each object, when the type mark in the string data of an object is a dynamic type, modify the class name data and the attribute data in the string data of the dynamic type object based on the attribute change of the dynamic object according to the class name data and the attribute data in the string data of the current dynamic type object, obtain the modified class name data and attribute data in the string data of the dynamic type object, and deserialize the modified class name data and attribute data in the string data of the dynamic type object to obtain the class name data and the attribute data in the metadata of the dynamic type object; when the type mark in the string data of an object is a static type, deserialize the class name data and the attribute data in the string data of the static type object to obtain the class name data and the attribute data in the metadata of the static type object.

[0065] Specifically, the recovery module comprises:

[0066] a scene construction unit configured to create each object in the scene according to the class name data in the metadata of each object;

[0067] an attribute setting unit configured to assign values to the corresponding attributes of each object according to the attribute name, attribute type and attribute value in the attribute data in the metadata of each object, to obtain a scene containing each object and the corresponding attributes.

[0068] Through the cooperation of the above components, the string data is split into structured substring data by the delimiter, and the class name data, attribute data and type tag information of the object are extracted through traversal operation. According to different data types, the corresponding deserialization is performed, the data in the form of string is restored to the metadata of the object through the reflection mechanism, and the object reconstruction and attribute assignment are realized through the cooperation of the scene construction unit and the attribute setting unit, and the scene restoration is completed. It provides effective technical support for the loading and state restoration of scene data in Unreal Engine.

[0069] Embodiment 4

[0070] The embodiment discloses an object data deserialization system based on Unreal Engine, which comprises the following steps:

[0071] Step 1, the string data of each object is split into several substring data according to the delimiter, and the class name data, attribute data and type tag of the string data of each object are obtained by traversing the substring data;

[0072] Step 2, the class name data of the string data of each object is deserialized to obtain the class name data in the metadata of each object; the attribute data in the string data of each object is split to obtain the attribute name, attribute type and attribute value contained in the attribute data in the string data of each object, and the attribute name, attribute type and attribute value contained in the attribute data are deserialized to obtain the attribute data in the metadata of each object;

[0073] Step 3, according to the class name data in the metadata of each object, the objects in the scene are constructed, and the attributes of each object are set according to the attribute name, attribute type and attribute value of the attribute data in the metadata of each object, to obtain the corresponding scene containing each object.

[0074] It should be noted that the string data of each object is deserialized to obtain the metadata of each object. The string data of each object will be restored to a data format that can be processed by a computer, so as to perform subsequent scene recovery operations.

[0075] For example, if the property data in the string data of each object contains description information of the scene, the deserialization process will convert the data into a computer understandable format, such as a structure, an object, or a variable.

[0076] The metadata of each object contains parameters related to each element of the scene, such as lighting, shadows, camera position, etc. These parameters are matched to the parameters required by the rendering engine of the scene. This ensures consistency and quality of rendering. For example, if the rendering engine requires the position of the sun in the scene and lighting information, this information must be extracted from the string data of each object and matched to the parameters of the rendering engine. The material information of the object is extracted from the string data of each object, including texture, color, reflection properties, etc. This information will be used to ensure that the objects in the scene appear correctly. For example, if the scene description contains a tree, the scene material extraction will include the texture and color properties of the leaves and trunk. Finally, using the corrected rendering parameters, the scene can be rendered. This includes generating images, rendering animations, processing sound, etc. to present the final interactive scene, which the user will be able to interact with the rendered scene.

[0077] Embodiment 5

[0078] The embodiment discloses a verification method for object data serialization and deserialization based on Unreal Engine, which comprises the following steps:

[0079] Step 1: Obtain the metadata of each object in the scene through the reflection mechanism of Unreal Engine;

[0080] Step 2: sequentially serialize the class name data in the metadata of each object to obtain the class name data in the string data of each object; traverse the attribute data in the metadata of each object to obtain the attribute name, attribute type and attribute value of the attribute data of each object; serialize the attribute name, attribute type and attribute value of the attribute data to obtain the attribute data in the string data of each object; assemble the class name data in the string data of each object and the attribute data in the string data of the corresponding object to obtain the string data of each object, and add a delimiter between the adjacent two strings in the string data of each object;

[0081] Step 3: Calculate the checksum of the string data of each object to obtain a first checksum

[0082] Step 4: split the string data of each object into several substring data according to the delimiter, and traverse the substring data to obtain the class name data, attribute data and type mark of the corresponding string data of each object;

[0083] Step 5, the class name data of the string data of each object is deserialized to obtain the class name data in the metadata of each object; the attribute data in the string data of each object is split to obtain the attribute name, attribute type and attribute value contained in the attribute data in the string data of each object, and the attribute name, attribute type and attribute value contained in the attribute data are deserialized to obtain the attribute data in the metadata of each object;

[0084] Step 6, the checksum of the metadata of each object is calculated to obtain a second checksum;

[0085] Step 7, the first checksum and the second checksum are compared, if the first checksum and the second checksum are equal, the data integrity of the serialization and deserialization process is confirmed, if the first checksum and the second checksum are not equal, the serialization and deserialization are re-performed.

[0086] Embodiment 6

[0087] The embodiment discloses a computer program product, for example, computer program instructions, when executed by a computer, the operation of the computer can invoke or provide the method and / or technical solutions according to the present application. Those skilled in the art should understand that the form of computer program instructions in computer readable medium includes but is not limited to source file, executable file, installation package file and the like, and accordingly, the way of computer program instructions executed by computer includes but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer readable medium can be any available computer readable storage medium or communication medium accessible to the computer. Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above described program and module can refer to the corresponding process description in the foregoing method embodiment, which will not be described here.

[0088] The algorithms and displays provided herein are not inherently related to any particular computer, virtual system, or other apparatus. Various general purpose systems can be used with these teachings, with or without accompanying software. Those skilled in the art will recognize that structures embodied by these descriptions might be subjected to numerous modifications, and yet be enabled to provide the functionality described herein. In this regard, the present application is not limited to any particular programming language or type of computer or virtual system. It will be appreciated that there are many models of virtual and physical computer into which the described embodiments can be implemented. Furthermore, the disclosed present application is not intended to be limited to any particular programming language or type of computer or virtual system. It will be appreciated that there are many models of virtual and physical computer into which the described embodiments can be implemented.

[0089] In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the application can be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been described in detail in order to avoid obscuring the understanding of this description.

[0090] Similarly, it is to be understood that the embodiments of the present application can be readily combined with one another, and / or with other devices / disclosures, to produce further embodiments of the application that are not specified but are within the scope of the present disclosure. Similarly, it is to be understood that, in this disclosure, certain features, structures, methods, concepts, or even entire embodiments of the application have been shown and / or described as blocks or means in order to simplify the figures and to improve the legibility of the drawings and the description. However, this structural depiction is merely exemplary and that implementation of the present application can have the features shown and / or described in various form.

[0091] Program code for carrying out methods of the present disclosure can be written in any combination of one or more programming languages. The program code can execute entirely on a computing device, a server, a cloud computing device, a mobile device, a personal computer, a workstation, a mainframe computer, a distributed computing system, a virtual system, or other programmable data processing apparatus, to produce a machine, such that the program code when executed by the machine produces the functions / operations specified in the flowcharts and / or block diagrams. The program code can be embodied in a computer-readable medium, which can be a non-transitory medium, a machine-readable medium, a removable storage medium, a hard-wired medium, a memory, a computer-readable storage medium, or any other medium that is not a transitory signal. The program code can be executed by one or more processors, controllers, or other processing devices to produce a machine, such that the program code, when executed by the machine, causes the machine to perform the functions / operations specified in the flowcharts and / or block diagrams. The program code can be written in any combination of one or more programming languages, including an object- oriented programming language and / or procedural programming language. The program code can execute entirely on a user's computer, a server computer, a cloud computing device, a mobile device, a personal computer, a workstation, a mainframe computer, a distributed computing system, a virtual system, or other programmable data processing apparatus, to produce a machine, such that the program code, when executed by the machine, produces the functions / operations specified in the flowcharts and / or block diagrams. The program code can also be implemented in substantially any computer- readable medium for use by or in connection with an instruction execution system, such as a computer, processor, or processor core, to produce a machine, such that the program code, when executed by the machine, causes the machine to perform the functions / operations specified in the flowcharts and / or block diagrams. Accordingly, one such disclosed aspect can comprise a computer program product. The computer program product can have instructions stored on a non-transitory medium, which when executed by a machine, cause the machine to perform the functions / operations specified in the flowcharts and / or block diagrams. The program code can be provisioned to a general purpose computer, a server, a cloud computing device, a mobile device, a personal computer, a workstation, a mainframe computer, a distributed computing system, a virtual system, or other programmable data processing apparatus, such that the program code, when executed by the machine, causes the machine to produce a machine, such that the program code, when executed by the machine, causes the machine to perform the functions / operations specified in the flowcharts and / or block diagrams. The program code can also be implemented in substantially any computer-readable medium for use by or in connection with an instruction execution system, such as a computer, processor, or processor core, to produce a machine, such that the program code, when executed by the machine, causes the machine to perform the functions / operations specified in the flowcharts and / or block diagrams. Accordingly, one such disclosed aspect can comprise a computer program product. The computer program product can have instructions stored on a non-transitory medium, which when executed by a machine, cause the machine to perform the functions / operations specified in the flowcharts and / or block diagrams.

[0092] The algorithms and displays presented herein are not inherently related to any particular computer, virtual system, or other apparatus. Various general purpose systems can also be used with programs in accordance with the teachings herein, or it can prove convenient to construct more specialized apparatus to perform the required method steps. The required structure for a variety of these systems will be apparent from the description above. In addition, the present application is not intended to be limited to any particular programming language. It will be appreciated that a variety of programming languages can be used to implement the teachings of the application as described herein, and any references below to specific languages are provided for disclosure of enablement of the best mode of the application.

[0093] In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the application can be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been described in detail in order to avoid obscuring the understanding of this description.

[0094] Similarly, it is to be understood that the embodiments of the application can alter the sequence of steps or procedures for carrying out the described features of the application. Thus, the above-described embodiments of the application are merely meant as illustrations of the aspects of the application and are not meant as limitations of the scope of the application which is defined by the claims.

Claims

1. A Unreal Engine based object data serialization system, characterized in that, The application comprises the following steps: A first acquisition module is configured to acquire metadata of each object in a scene through a reflection mechanism of the Unreal Engine; A serialization module is configured to sequentially serialize class name data in the metadata of each object to obtain class name data in string data of each object; Attribute name, attribute type and attribute value of attribute data in the metadata of each object are obtained by traversing the attribute data; The attribute name, attribute type and attribute value of the attribute data are serialized to obtain attribute data in the string data of each object; the class name data in the string data of each object and the attribute data in the string data of the corresponding object are assembled to obtain the string data of each object, and a separator is added between two adjacent strings in the string data of each object; A data optimization module is configured to judge the string data of each object; if the attribute value of the attribute data in the string data of an object is different from a default value of the attribute value, the attribute data in the string data of the object is stored; if the attribute value of the attribute data in the string data of the object is the same as the default value of the attribute value, the attribute data in the string data of the object is not stored; if the attribute data in the string data of a plurality of objects is the same, the attribute data in the string data stored once is stored; if the string data of an object is greater than a threshold value, the string data of the object is compressed, and compressed data corresponding to the string data of the object is stored.

2. The Unreal Engine-based object data serialization system of claim 1, wherein, The application further comprises the following steps: A serialization submodule is configured to perform state type judgment on state data in the metadata of each object; when the state data in the metadata of an object is judged as a dynamic type, the class name data and / or attribute data in the metadata of the dynamic type object are modified based on attribute changes of the dynamic object according to the state data, to obtain modified class name data and attribute data in the metadata of the dynamic type object; the modified class name data and attribute data in the metadata of the dynamic type object are serialized to obtain class name data and attribute data in string data of the dynamic type object; The class name data in the string data of the dynamic type object and the attribute data in the string data of the corresponding object are assembled to obtain string data of the dynamic type object, and a dynamic type object marker is added in the string data of the dynamic type object; when the state data in the metadata of an object is a static type, the class name data and attribute data in the metadata of the static type object are serialized to obtain class name data and attribute data in string data of the static type object; the class name data in the string data of the static type object and the attribute data in the string data of the corresponding object are assembled to obtain string data of the static type object, and a static type object marker is added in the string data of the static type object. The application comprises the following steps:

3. A serialization method using the Unreal Engine-based object data serialization system of claim 1, characterized by, Metadata of each object in a scene is acquired through a reflection mechanism of the Unreal Engine; Class name data in the metadata of each object is sequentially serialized to obtain class name data in string data of each object; ​ Traverse attribute data in the metadata of each object to obtain attribute names, attribute types and attribute values of the attribute data of each object; Serializing transform the attribute names, attribute types and attribute values of the attribute data to obtain attribute data in the string data of each object; assemble the class name data in the string data of each object and the attribute data in the string data of the corresponding object to obtain the string data of each object, and add a delimiter between two adjacent strings in the string data of each object.

4. A Unreal Engine based object data deserialization system, characterized in that, Comprise: The second acquisition module is used for splitting the string data of each object into a plurality of substring data according to the delimiter as a boundary, and traversing the substring data to obtain class name data, attribute data and type markers of the string data of each object; The deserialization module is used for deserializing the class name data of the string data of each object in sequence to obtain the class name data in the metadata of each object; splitting the attribute data in the string data of each object to obtain attribute names, attribute types and attribute values contained in the attribute data in the string data of each object, and deserializing the attribute names, attribute types and attribute values contained in the attribute data to obtain the attribute data in the metadata of each object; The deserialization submodule is used for judging the type markers in the metadata of each object; when the type marker in the string data of an object is a dynamic type, modifying the class name data and the attribute data in the string data of the dynamic type object based on the attribute change of the dynamic object according to the class name data and the attribute data in the string data of the current dynamic type object to obtain the modified class name data and the attribute data in the string data of the dynamic type object, and deserializing the modified class name data and the attribute data in the string data of the dynamic type object to obtain the class name data and the attribute data in the metadata of the dynamic type object; when the type marker in the string data of an object is a static type, deserializing the class name data and the attribute data in the string data of the static type object to obtain the class name data and the attribute data in the metadata of the static type object; The recovery module is used for constructing each object in a scene according to the class name data in the metadata of each object, setting attributes of each object according to the attribute names, attribute types and attribute values of the attribute data in the metadata of each object, and obtaining a scene containing each object and corresponding attributes.

5. The Unreal Engine-based object data unmarshaling system of claim 4, wherein, The recovery module comprises: The scene construction unit is used for creating corresponding objects according to the class name data in the metadata of each object; The attribute setting unit is used for assigning values to corresponding attributes of each object according to the attribute names, attribute types and attribute values of the attribute data in the metadata of each object, and obtaining a scene containing each object and corresponding attributes.

6. A deserialization method using the Unreal Engine-based object data deserialization system of claim 4, characterized by, Comprise the following steps: Split the string data of each object into a plurality of substring data according to the delimiter as a boundary, and traverse the substring data to obtain class name data, attribute data and type markers of the corresponding string data of each object; The class name data of the string data of each object is deserialized in sequence to obtain the class name data in the metadata of each object; the attribute data in the string data of each object is split to obtain the attribute name, attribute type and attribute value contained in the attribute data in the string data of each object, and the attribute name, attribute type and attribute value contained in the attribute data are deserialized to obtain the attribute data in the metadata of each object; According to the class name data in the metadata of each object, each object in the scene is constructed, and the attributes of each object are set according to the attribute name, attribute type and attribute value of the attribute data in the metadata of each object, to obtain the corresponding scene containing each object.

7. A method for verifying Unreal Engine-based object data serialization and deserialization, characterized in that, The method comprises the following steps: Obtaining the metadata of each object in the scene through the reflection mechanism of the Unreal Engine; The class name data in the metadata of each object is serialized in sequence to obtain the class name data in the string data of each object; The attribute data in the metadata of each object is traversed to obtain the attribute name, attribute type and attribute value of the attribute data of each object; The attribute name, attribute type and attribute value of the attribute data are serialized to obtain the attribute data in the string data of each object; the class name data in the string data of each object and the attribute data in the string data of the corresponding object are assembled to obtain the string data of each object, and a delimiter is added between adjacent two strings in the string data of each object; The checksum of the string data of each object is calculated to obtain a first checksum; The string data of each object is split into a plurality of substring data according to the delimiter, and the substring data is traversed to obtain the class name data, attribute data and type mark of the corresponding string data of each object; The class name data of the string data of each object is deserialized in sequence to obtain the class name data in the metadata of each object; the attribute data in the string data of each object is split to obtain the attribute name, attribute type and attribute value contained in the attribute data in the string data of each object, and the attribute name, attribute type and attribute value contained in the attribute data are deserialized to obtain the attribute data in the metadata of each object; The checksum of the metadata of each object is calculated to obtain a second checksum; The first checksum and the second checksum are compared, if the first checksum and the second checksum are equal, the data integrity of the serialization and deserialization process is confirmed; if the first checksum and the second checksum are not equal, the serialization and deserialization are re-performed.

8. A computer program product comprising a computer program or instructions, characterized in that, The instructions in the computer program product are executed by the processor of the electronic device to enable the electronic device to perform the serialization method of the object data serialization system based on the Unreal Engine as claimed in claim 3, or perform the deserialization method of the object data deserialization system based on the Unreal Engine as claimed in claim 6, or perform the verification method of the serialization and deserialization of the object data based on the Unreal Engine as claimed in claim 7.

Citation Information

Patent Citations

  • Object serializing method, object deserializing method, device and system

    CN101661391A