File merging method and device, computing equipment, storage medium and program product

By generating a node object mapping table and analyzing the differences and conflicts, the problem of low prefab merging efficiency in cross-platform game engine projects was solved, and accuracy and efficiency were improved.

CN120821703APending Publication Date: 2025-10-21SHANGHAI HODE INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510919836.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-03
Publication Date
2025-10-21

AI Technical Summary

Technical Problem

In cross-platform game engine projects, the existing prefab merging method cannot accurately restore the organizational structure of game objects, resulting in low merging efficiency and low accuracy, and unable to finely divide non-common parts.

Method used

By generating a node object mapping table, analyzing the differences and conflicts between non-shared node objects and shared node objects, automatically modifying the differences, and recording the conflicts for processing by the merging end, a merged prefab is generated.

Benefits of technology

It achieves precise analysis and automated modification, improves merging accuracy, avoids confusion of benchmark objects, reduces the amount of modified content on the merging end, and improves merging efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120821703A_ABST
    Figure CN120821703A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a file merging method and device. The method comprises the following steps: obtaining a plurality of to-be-combined prefabricated parts; performing file processing on the plurality of prefabricated members to generate a plurality of corresponding node object mapping tables; analyzing and processing the plurality of node object mapping tables, determining a first difference part and / or a first conflict part corresponding to non-common node objects, and determining a second difference part and / or a second conflict part corresponding to non-common attributes of common node objects; automatically modifying the first node object mapping table according to the first difference part and the second difference part, and recording a log file according to the first conflict part and the second conflict part so that the merging end can modify the first node object mapping table according to the log file; and generating a combined prefabricated member according to the modified first node object mapping table. According to the method and the device, the node object mapping table is utilized to realize merging, so that the difference part and the conflict part are accurately determined, and the merging accuracy is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of Internet technology, and specifically to a file merging method, apparatus, computing device, storage medium, and program product. Background Art

[0002] In a large-scale cross-platform game engine project, there are often thousands or even tens of thousands of prefabs (Prefab files). When different teams or branches develop prefabs simultaneously, it is often necessary to merge different versions directly. Currently, there are two common merging methods: 1) Merging prefabs normally as text files through tools such as Git; 2) Manual merging, using one party's modified version as the basis and re-making the other party's changes completely manually on this basis. However, the above merging methods are not only inaccurate and unable to restore the actual organizational structure of game objects, resulting in completely unusable effects in the project, but also unable to finely divide non-shared parts, resulting in low merging efficiency. Summary of the Invention

[0003] In view of the above problems, the present application is proposed to provide a file merging method, apparatus, computing device, computer storage medium and computer program product that overcome the above problems or at least partially solve the above problems.

[0004] According to one aspect of an embodiment of the present application, a file merging method is provided, including:

[0005] Acquire multiple prefabricated parts to be merged, where the multiple prefabricated parts include: a first prefabricated part, a second prefabricated part, and a third prefabricated part;

[0006] Performing file processing on the plurality of prefabricated parts respectively to generate a plurality of corresponding node object mapping tables, the plurality of node object mapping tables including: a first node object mapping table, a second node object mapping table and a third node object mapping table;

[0007] Analyzing and processing the plurality of node object mapping tables to determine a first difference portion and / or a first conflict portion corresponding to the non-common node objects, and determining a second difference portion and / or a second conflict portion corresponding to the non-common attributes of the common node objects;

[0008] Automatically modifying the first node object mapping table according to the first difference part and the second difference part, and recording a log file according to the first conflict part and the second conflict part so that the merging end can modify the first node object mapping table according to the log file;

[0009] Generate a merged prefab according to the modified first node object mapping table.

[0010] Furthermore, analyzing and processing the plurality of node object mapping tables to determine the first difference portion and / or the first conflict portion corresponding to the non-common node objects, and determining the second difference portion and / or the second conflict portion corresponding to the non-common attributes of the common node objects further includes:

[0011] Compare and analyze multiple node object mapping tables to determine non-shared node objects and shared node objects;

[0012] For the non-common node object, determining a first difference part and / or a first conflict part according to object information corresponding to the non-common node object;

[0013] For the shared node objects, the attribute values ​​of the shared node objects are parsed to determine the second difference portion and / or the second conflict portion corresponding to the non-shared attributes.

[0014] Furthermore, determining the first difference part and / or the first conflict part according to the object information corresponding to the non-common node object further includes:

[0015] The object information corresponding to the non-shared node object is matched with a preset object difference rule and / or a preset object conflict rule, and a first difference part and / or a first conflict part is determined according to the matching result.

[0016] Furthermore, parsing the attribute values ​​of the shared node objects to determine the second difference portion and / or the second conflict portion corresponding to the non-shared attributes further includes:

[0017] Based on the attribute value type of the shared node object, performing corresponding parsing processing on the attribute value of the shared node object to determine the non-shared attribute corresponding to the shared node object;

[0018] A second difference portion and / or a second conflict portion is determined according to the attribute values ​​of the non-common attributes.

[0019] Furthermore, determining the second difference portion and / or the second conflict portion according to the attribute values ​​of the non-common attributes further includes:

[0020] The attribute value of the non-common attribute is matched with a preset attribute difference rule and / or a preset attribute conflict rule, and a second difference part and / or a second conflict part is determined according to the matching result.

[0021] Furthermore, based on the attribute value type of the shared node object, performing corresponding parsing processing on the attribute value of the shared node object, and determining the non-shared attribute corresponding to the shared node object further includes:

[0022] If the attribute value of the shared node object is of dictionary type, recursively execute the following method: determine the shared attributes and non-shared attributes of the child node objects at each level until the child node object has non-shared attributes or the attribute value of the child node object is of the basic data type;

[0023] If the attribute value of the child node object is the basic data type, the attribute values ​​of the child node objects are compared to see if they are the same; if the comparison result is not completely the same, it is determined to be a non-shared attribute corresponding to the shared node object.

[0024] Furthermore, based on the attribute value type of the shared node object, performing corresponding parsing processing on the attribute value of the shared node object, and determining the non-shared attribute corresponding to the shared node object further includes:

[0025] If the attribute value of the shared node object is of the basic data type, compare whether the attribute values ​​of the shared node objects are the same;

[0026] If the comparison result is not completely the same, it is determined to be a non-shared attribute corresponding to the shared node object.

[0027] Furthermore, based on the attribute value type of the shared node object, performing corresponding parsing processing on the attribute value of the shared node object, and determining the non-shared attribute corresponding to the shared node object further includes:

[0028] If the attribute value of the shared node object is of array type, determine whether the array element is structured data and has a unique identifier;

[0029] If the array element is structured data and has a unique element identifier, then an element mapping table is constructed based on the unique element identifier, and the following method is recursively executed: determining the common attributes and non-common attributes of each level of the array element until the array element has a non-common attribute or the attribute value of the array element is the basic data type;

[0030] If the attribute value of the array element is a basic data type, the attribute values ​​of the array elements are compared to see if they are the same; if the comparison result is not completely the same, it is determined to be a non-shared attribute corresponding to the shared node object.

[0031] Furthermore, the method also includes: if the array element is structured data or basic data type without a unique identifier, converting the array element into a string value, determining the maximum common subsequence corresponding to the string value, and determining the non-common attributes corresponding to the common node object based on the maximum common subsequence.

[0032] Furthermore, performing file processing on the plurality of prefabricated parts respectively to generate corresponding plurality of node object mapping tables further includes:

[0033] Structuring multiple prefabricated parts to generate corresponding multiple file structure objects;

[0034] Node data serialization is performed on multiple file structure objects to generate corresponding multiple node object mapping tables.

[0035] According to another aspect of an embodiment of the present application, a file merging device is provided, including:

[0036] an acquisition module, adapted to acquire a plurality of prefabricated parts to be combined, the plurality of prefabricated parts comprising: a first prefabricated part, a second prefabricated part, and a third prefabricated part;

[0037] A first processing module is adapted to perform file processing on the plurality of prefabricated parts respectively, and generate a plurality of corresponding node object mapping tables, wherein the plurality of node object mapping tables include: a first node object mapping table, a second node object mapping table, and a third node object mapping table;

[0038] a determination module adapted to analyze and process the plurality of node object mapping tables, determine a first difference portion and / or a first conflict portion corresponding to the non-common node objects, and determine a second difference portion and / or a second conflict portion corresponding to the non-common attributes of the common node objects;

[0039] a second processing module, adapted to automatically modify the first node object mapping table according to the first difference part and the second difference part, and record a log file according to the first conflict part and the second conflict part so that the merging end can modify the first node object mapping table according to the log file;

[0040] The generating module is adapted to generate a merged prefab according to the modified first node object mapping table.

[0041] According to another aspect of an embodiment of the present application, a computing device is provided, comprising: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other via the communication bus;

[0042] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute operations corresponding to the above-mentioned file merging method.

[0043] According to another aspect of the embodiments of the present application, a computer storage medium is provided, in which at least one executable instruction is stored. The executable instruction enables a processor to perform operations corresponding to the above-mentioned file merging method.

[0044] According to another aspect of the embodiments of the present application, a computer program product is provided, comprising at least one executable instruction, wherein the executable instruction enables a processor to perform operations corresponding to the above-mentioned file merging method.

[0045] According to the file merging method and device provided in the embodiments of the present application, by processing the multiple prefabricated parts to be merged into corresponding node object mapping tables, it is convenient to subsequently determine the comparison objects, achieve precise analysis, improve the merging accuracy, avoid the problem of confusion in the alignment of reference objects when comparing differences caused by order adjustment in plain text such as Git, and achieve the restoration of the true organizational structure of game objects, overcoming the effect of being completely unusable in the project; by determining the difference part and the conflicting part, it is convenient to perform automatic modification according to the difference part, and perform targeted intervention according to the conflicting part, thereby reducing the amount of content modified on the merging end, thereby effectively improving the merging efficiency.

[0046] The above description is only an overview of the technical solution of the embodiment of the present application. In order to more clearly understand the technical means of the embodiment of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the embodiment of the present application more obvious and easy to understand, the specific implementation method of the embodiment of the present application is specifically listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Various other advantages and benefits will become apparent to those skilled in the art upon reading the detailed description of the preferred embodiment below. The accompanying drawings are for illustration purposes only and are not to be considered as limiting the embodiments of the present application. The same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0048] Figure 1A A schematic diagram of a process of a file merging method according to an embodiment of the present application is shown;

[0049] Figure 1B A schematic diagram of the relationship between multiple prefabricated parts;

[0050] Figure 2A A schematic diagram showing a flow chart of a file merging method according to another embodiment of the present application is shown;

[0051] Figure 2B Flowchart for object / attribute processing;

[0052] Figure 2C A sub-flowchart for attribute processing of common node objects;

[0053] Figure 3 A structural block diagram of a file merging device according to an embodiment of the present application is shown;

[0054] Figure 4 A schematic structural diagram of a computing device according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0055] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0056] First, the terms involved in one or more embodiments of the present application are explained.

[0057] Unity: is a powerful cross-platform game engine widely used in game development, film and television production, architectural design, automotive industry, virtual reality (VR) and augmented reality (AR).

[0058] Prefab: A reusable game object template that can contain any type of object in the scene, including all its components, properties, and sub-object hierarchies. It is essentially a multi-document text file implemented in YAML syntax, that is, a text file contains multiple segments of YAML data, each segment is a node object. Prefab is also called a prefab;

[0059] YAML: A format for serializing data, commonly used in configuration files, data exchange, and various applications;

[0060] Git: A commonly used project version management tool that can merge versions of code and other text files.

[0061] The inventors of this application have discovered that the current conventional merging method has the following shortcomings:

[0062] 1) Prefab files are actually structured files, not just text files. When Git and other tools merge code or other text files, they find the longest common subsequence in rows. The subsequences don't have to be continuous, but the order must be consistent. This is reasonable for code and ordinary text, because inconsistent order means different meanings, and Git can find the differences between them. However, for Prefabs, this consistent order is not guaranteed. Changes in organizational order often occur in the following situations:

[0063] a. Drag and drop the nodes of the Prefab in a different order in the Unity editor without affecting the actual display effect or logic. Then save the file, the order of the nodes in the Prefab file will change.

[0064] b. The order of attributes within each node is also irrelevant. After adding, deleting, or modifying attribute names, or simply adjusting the order of object attributes in the game, the order of the content presented in the Prefab will also change;

[0065] c. There are some array structures in the node. The order of these contents may change completely when different versions are adjusted, so the order of the corresponding text in the Prefab will not correspond;

[0066] d. Often, there are numerous instances where the node structure is identical, with only a few different attribute values. These differing attribute values ​​often include a special value, which is each node's unique identifier. From a plain text perspective, this appears to be a normal line of content change, and automated merge tools like Git will apply this change as the new version. However, this is a fundamental error, as different unique identifiers represent different nodes, effectively comparing two incorrect objects. If this change is applied, the content of one node will be overwritten by the content of another, a completely undesirable behavior.

[0067] These changes in the order of the prefab file itself are reflected in the text order of the prefab file itself, but have no practical impact when the prefab is actually used. This is because the prefab is actually a serialization of in-game objects, organized according to the object structure. Different objects are designated as nodes, each with its own unique identifier. Each object can have its own parent and child nodes, and these nodes reference each other through unique identifiers. These inter-referenced nodes ultimately form a tree-like structure of in-game elements. However, the order of the nodes themselves is meaningless when the prefab file is serialized into objects and can be adjusted at will. However, when tools like Git compare and merge these prefabs, traditional comparison methods cause the alignment baseline to be disrupted, resulting in a large number of incorrect changes and conflicts. This leads to an unexpected large number of incorrect structural changes being archived during the automatic merge. These incorrect prefabs cannot restore the true organizational structure of the game objects, resulting in completely unusable results in the project.

[0068] 2) In large projects, there are a huge number of Prefab files, and manual merging is a huge and tedious task. Moreover, as the number of iterations of multiple versions increases, the difficulty of merging increases further.

[0069] To address the above shortcomings, the inventors of this application have proposed a file merging solution. The following describes the file merging process in conjunction with specific embodiments:

[0070] Figure 1A A schematic diagram of a file merging method according to an embodiment of the present application is shown. Figure 1A As shown, the method includes the following steps:

[0071] Step S101 : obtaining a plurality of prefabricated parts to be combined, where the plurality of prefabricated parts include: a first prefabricated part, a second prefabricated part, and a third prefabricated part.

[0072] Specifically, a file merging interface can be provided to the merging end, and the merging operation or triggered merging instruction performed by the merging end in the file merging interface can be monitored to determine the multiple prefabs selected or uploaded by the merging end, thereby obtaining the multiple prefabs to be merged. The multiple prefabs mainly include: a first prefab, a second prefab, and a third prefab, wherein the first prefab is a basic prefab, and the second prefab and the third prefab are developed by different teams or different branches based on the first prefab. The relationship between the multiple prefabs is as follows: Figure 1B shown.

[0073] For example, the first prefab is the prefab corresponding to version 1.0 of a game developed by a game developer. A certain agent is the agent for this game and develops game 1.0.2 based on the prefab corresponding to version 1.0 developed by the game developer. The prefab corresponding to version 1.0 is called the second prefab. Later, the game developer upgrades the game to version 2.0. The prefab corresponding to version 2.0 is called the third prefab. The agent needs to upgrade game 1.0.2 to the latest version 2.0 developed by the game developer, which requires merging all changes made by the game developer from version 1.0 to version 2.0. Therefore, all changes from the first prefab to the third prefab need to be merged. This is just a simple example of the scenarios of the first, second, and third prefabs. Other scenarios are possible and are not specifically limited here. Therefore, the second prefab can also be called the target prefab, and the third prefab can also be called the third prefab, which merges all changes from the first prefab to the third prefab.

[0074] In this embodiment, the second prefab and the third prefab are both evolved from the first prefab and have a common reference, so a three-way merge can be achieved and automatic decision-making can be made when differences are encountered.

[0075] Step S102 : performing file processing on the plurality of prefabricated parts respectively to generate a plurality of corresponding node object mapping tables, wherein the plurality of node object mapping tables include: a first node object mapping table, a second node object mapping table and a third node object mapping table.

[0076] Specifically, prefabs include any type of object in the scene, including all its components, properties, and sub-object hierarchies. Therefore, by parsing each prefab, node objects can be extracted. Node objects have unique node object identifiers, which can be used to generate multiple node object mapping tables. The node object mapping table is a mapping relationship structure corresponding to the node object's unique identifier FileID and the node object itself. The above multiple node object mapping tables mainly include: a first node object mapping table, a second node object mapping table, and a third node object mapping table.

[0077] By processing prefabs into corresponding node object mapping tables, it is easier to determine the comparison objects later and achieve accurate analysis, avoiding the problem of confusion in the alignment of benchmark objects when comparing differences caused by order adjustments in plain text methods such as Git.

[0078] Step S103 , analyzing and processing multiple node object mapping tables to determine first difference parts and / or first conflict parts corresponding to non-shared node objects, and second difference parts and / or second conflict parts corresponding to non-shared attributes of shared node objects.

[0079] A shared node object refers to a node object that exists in multiple node object mapping tables, while a non-shared node object refers to a node object that only exists in some prefabs when comparing multiple prefabs, but not in all prefabs.

[0080] A shared attribute refers to an attribute that exists in all compared shared node objects and has exactly the same attribute value; a non-shared attribute refers to an attribute that does not remain consistent in all compared shared node objects, including the following two categories: existence difference: some shared node objects contain the attribute, while other shared node objects do not; value difference: all objects contain the attribute, but the attribute values ​​are different.

[0081] The main thing here is to compare the node objects of multiple node object mapping tables one by one, and compare the attribute values ​​of the node objects one by one, and further determine the node objects and non-shared node objects shared by multiple node object mapping tables, as well as the shared attributes and non-shared attributes of the shared node objects through comparison analysis, and then determine the first difference part and / or the first conflict part corresponding to the non-shared node objects by determining the above information, and determine the second difference part and / or the second conflict part corresponding to the non-shared attributes of the shared node objects. Among them, the difference part refers to the inconsistent part of the non-shared node objects or non-shared attributes that can be processed automatically, and the conflict part refers to the part that cannot be directly merged through the automation rules and requires the intervention of the merging end to resolve.

[0082] By determining the differences and conflicts, automatic modifications based on the differences can be implemented, thereby improving merging efficiency. By recording the conflicts in log files, the amount of content that needs to be processed on the merging end can be greatly reduced.

[0083] Step S104 , automatically modifying the first node object mapping table according to the first difference part and the second difference part, and recording a log file according to the first conflict part and the second conflict part for the merging end to modify the first node object mapping table according to the log file.

[0084] Specifically, after determining the first difference part and the second difference part, the first node object mapping table can be automatically modified according to the first difference part and the second difference part. Here, the modification basis for modifying the first node object mapping table will be automatically determined in combination with the first difference part and the second difference part, thereby realizing an automated modification strategy and reducing the amount of content modified on the merging end; after determining the first conflict part and the second conflict part, it can be determined that this part of the content cannot be modified automatically and the merging end needs to intervene. Therefore, a log file can be recorded according to the first conflict part and the second conflict part, and the log file can be returned to the merging end for the merging end log file to modify the first node object mapping table, thereby completing all modifications to the first node object mapping table.

[0085] Step S105 : generating a merged prefab according to the modified first node object mapping table.

[0086] A node topology structure is constructed based on the modified first node object mapping table, and node objects are instantiated layer by layer according to the mapping relationship; for each node object, its attribute data is dynamically configured according to the attribute merging result recorded in the first node object mapping table; when a node object has nested child objects, child node objects are recursively generated through depth-first traversal and mounted to the parent node object level; after completing the instantiation of all node objects, the root node and its complete subtree structure are serialized into a recognizable prefab, thereby obtaining a merged prefab.

[0087] It should be noted that the file merging method provided in this embodiment can also merge more than three prefabs. When merging more than three prefabs, the merging is performed based on the three prefabs. For example, a prefab is randomly selected from the remaining prefabs, excluding the first prefab and the second prefab as the target prefab, to be merged as the third prefab. In the next merge, the prefab that completed the previous merge becomes the second prefab, and the third prefab is still selected from the remaining prefabs. Therefore, when merging more than three prefabs, the first prefab remains fixed, the second prefab is updated after each merge, and the third prefab is different each time.

[0088] For example, four prefabricated parts need to be merged, which can be referred to as prefabricated part 1, prefabricated part 2, prefabricated part 3, and prefabricated part 4. Prefabricated part 2, prefabricated part 3, and prefabricated part 4 are all evolved based on prefabricated part 1. Then, prefabricated part 1 can be called the first prefabricated part. Assuming that the second prefabricated part is prefabricated part 2, when merging, prefabricated part 1, prefabricated part 2, and prefabricated part 3 are first merged according to the method provided in this embodiment to generate prefabricated part 5. Then, prefabricated part 1, prefabricated part 5, and prefabricated part 4 are merged according to the method provided in this embodiment to obtain the final merged prefabricated part.

[0089] In addition, two prefabricated parts may be merged, and the case of merging two prefabricated parts refers to the case where the first prefabricated part and the second prefabricated part are the same.

[0090] According to the file merging method provided in the embodiment of the present application, by processing the multiple prefabricated parts to be merged into corresponding node object mapping tables, it is convenient to subsequently determine the comparison objects, achieve precise analysis, improve the merging accuracy, avoid the problem of confusion in the alignment of reference objects when comparing differences caused by order adjustment in plain text such as Git, and achieve the restoration of the true organizational structure of game objects, overcoming the effect of being completely unusable in the project; by determining the difference part and the conflicting part, it is convenient to perform automated modifications based on the difference part, and perform targeted intervention based on the conflicting part, reducing the amount of content modified on the merging end, thereby effectively improving the merging efficiency.

[0091] Figure 2A A flowchart of a file merging method according to another embodiment of the present application is shown in FIG. Figure 2A As shown, the method includes the following steps:

[0092] Step S201 : obtaining a plurality of prefabricated parts to be combined, where the plurality of prefabricated parts include: a first prefabricated part, a second prefabricated part, and a third prefabricated part.

[0093] Specifically, a file merging interface can be provided to the merging end, and the merging operations performed or the triggered merging instructions performed by the merging end in the file merging interface can be monitored. The merging end can provide metadata corresponding to multiple prefabs to locate the physical storage paths of multiple prefabs in the resource library, open each prefab in binary mode through the file API, and use direct reading without cache to ensure data integrity, thereby loading multiple prefabs into a file stream.

[0094] Other implementation processes can refer to Figure 1A Step S101 in the illustrated embodiment will not be described in detail here.

[0095] Step S202 : Structuring the plurality of prefabricated parts to generate a corresponding plurality of file structure objects, where the plurality of file structure objects include: a first file structure object, a second file structure object, and a third file structure object.

[0096] Specifically, multiple prefabs are converted into UTF-8 encoded YAML text data streams respectively, and then the corresponding YAML text data streams are deserialized through a YAML parsing library (such as UnityEngine.YAML or standard YamlDotNet), mainly lexical analysis and syntax parsing, and the YAML tags are converted into an abstract syntax tree (AST). Then, object mapping, structure reconstruction and reference relationship parsing are performed based on the AST, and finally corresponding multiple file structure objects are generated. The multiple file structure objects include: a first file structure object, a second file structure object and a third file structure object.

[0097] In this embodiment, the prefab file is processed from the perspective of structured objects. The order of different objects, as well as the order of attributes within the same object, does not affect the object itself. This avoids the situation where other tools such as Git identify a large number of invalid changes (these changes have no actual effect on the prefab file) due to inconsistent order when identifying changes. Merging based on these invalid changes is equivalent to comparing and merging different objects, and the merge result is inevitably chaotic.

[0098] Step S203: perform node data serialization processing on the multiple file structure objects to generate corresponding multiple node object mapping tables.

[0099] Specifically, each file structure object is processed, and each node data in each file is dynamically serialized into a node object, thereby generating multiple node object mapping tables. The node object mapping table is a mapping relationship structure of [the node unique identifier FileID and the node itself].

[0100] More specifically, after deserializing to obtain multiple file structure objects, the file structure objects are atomically disassembled: 1. Deep traversal extraction: recursively access all node data blocks (including nested child nodes) in the file structure, and treat each node as an independent processing unit; 2. Dynamic instantiation: Generate corresponding class instances based on the node type through the reflection mechanism, and fully inject the original attribute data; then, based on the generated node object set, generate a node object identifier, and create a dictionary to implement the mapping of node object identifier → node object.

[0101] 2) The multiple YAML data segments within the Prefab file are deserialized into multiple node objects. Their unique IDs are used to create a dataset. The shared components of the multiple versions are screened out and recursively compared and merged. For other nodes that are not shared by multiple parties, a three-way merge is performed. Identical objects are identified based on their unique identifiers, and then compared and merged individually. This avoids the problem of misaligned base objects when comparing differences due to order adjustments in plain text methods like Git.

[0102] Step S204 : performing comparative analysis on multiple node object mapping tables to determine non-shared node objects and shared node objects.

[0103] Specifically, multiple node object mapping tables are aligned according to the node object unique identifiers, so that non-shared node objects and shared node objects can be identified by the node object identifiers. For example, it is determined whether the same node identifier exists in multiple node object mapping tables. If so, it can be determined to be a shared node object; if some of them exist, it can be determined to be a non-shared node object. In this way, all non-shared node objects and all shared node objects in multiple node object mapping tables can be found.

[0104] In addition, the first node object mapping table can be compared with the second node object mapping table to find out the node objects newly added and the node objects deleted in the second node object mapping table relative to the first node object mapping table, and the first node object mapping table can be compared with the third node object mapping table to find out the node objects newly added and the node objects deleted in the third node object mapping table relative to the first node object mapping table, thereby determining the non-shared node objects.

[0105] Step S205 : for the non-shared node object, determine the first difference part and / or the first conflict part according to the object information corresponding to the non-shared node object.

[0106] When there are non-shared node objects, it means that the non-shared node objects do not exist simultaneously in multiple node object mapping tables. The non-shared node objects do not exist simultaneously, which can be further divided into two situations: differences and conflicts. The following briefly lists the differences and conflicts of non-shared node objects:

[0107] The differences are as follows: a node object exists in the first node object mapping table and the third node object mapping table, but the node object is deleted in the second node object mapping table; or, a node object exists in the first node object mapping table and the second node object mapping table, but the node object is deleted in the third node object mapping table; or, a node object does not exist in the first node object mapping table, but exists in the second node object mapping table and the third node object mapping table, etc. There may also be other differences, which will not be elaborated here.

[0108] The conflict situations are as follows: if a node object exists in the first node object mapping table, but the node object is deleted in the second node object mapping table, and any attribute of the node object is modified in the third node object mapping table, then this part is considered to be the conflicting part; or, if a node object exists in the first node object mapping table, and any attribute of the node object is modified in the second node object mapping table, and the node object is deleted in the third node object mapping table, then this part is considered to be the conflicting part; or, if a node object does not exist in the first node object mapping table, but the node object is added to the second node object mapping table and the third node object mapping table, but the attribute value of any attribute of the node object in the second node object mapping table is different from the attribute value of the corresponding attribute of the node object in the third node object mapping table, there may be other conflict situations, which will not be elaborated here.

[0109] Therefore, the first difference part and / or the first conflict part can be specifically determined based on the object information corresponding to the non-shared node object. The object information is the specific content information of the node object. By judging whether there is a contradiction in the specific content information, it is determined whether there is a conflict. If there is a contradiction, this part of the non-shared node object can be identified as the first conflict part. If there is no contradiction, this part of the non-shared node object can be identified as the first difference part.

[0110] In an optional embodiment of the present application, object difference rules and object conflict rules are pre-configured. The object difference rules define under what circumstances multiple non-public node objects are considered different, and the object conflict rules define under what circumstances multiple non-public node objects are considered in conflict. For example, a preset object difference rule may be: a node object exists in the first node object mapping table and the third node object mapping table, and the node object is deleted from the second node object mapping table. A preset object conflict rule may be: a node object exists in the first node object mapping table, the node object is deleted from the second node object mapping table, and any attribute of the node object is modified in the third node object mapping table.

[0111] Therefore, the object information corresponding to the non-shared node object can be matched with the preset object difference rules and / or with the preset object conflict rules to determine whether the object information corresponding to the non-shared node object satisfies the above-mentioned preset object difference rules or preset object conflict rules, and the first difference part and / or the first conflict part are determined based on the matching result. The matching result can be a match on any object difference rule or any object conflict rule. Generally, for the non-shared node object, it is either the first difference part or the first conflict part.

[0112] Step S206 : parsing the attribute values ​​of the shared node objects to determine the second difference portion and / or the second conflict portion corresponding to the non-shared attributes.

[0113] Since all node objects have corresponding attributes, for shared node objects (here, the same node object exists in multiple node object mapping tables, and the number of shared node objects is multiple, which refers to 3 in this embodiment), you can first determine whether the attribute is a shared attribute or a non-shared attribute by comparing the attribute name. For the case where the attribute name is the same, you can determine whether it is a shared attribute or a non-shared attribute by the attribute value. Among them, a shared attribute means that the attribute value of the same attribute of the shared node object is the same. For example, if the shared node objects all have attribute A, and the attribute value corresponding to attribute A is 1, it means that it is a shared attribute.

[0114] When non-shared attributes exist, it means that only some shared node objects have the corresponding attributes, or the attribute values ​​are different. Non-shared attributes can be further divided into two types: differences and conflicts. The following briefly lists the differences and conflicts of non-shared attributes. For ease of understanding, the multiple shared node objects are referred to as the first shared node object, the second shared node object, and the third shared node object:

[0115] The differences are as follows: an attribute exists in the first common node object and the third common node object and the attribute value is the same, but the attribute is deleted in the second common node object; or, an attribute exists in the first common node object and the second common node object and the attribute value is the same, but the attribute is deleted in the third common node object; or, an attribute does not exist in the first common node object, but exists in the second common node object and the third common node object and the attribute value is the same, etc. There may also be other differences, which will not be detailed here.

[0116] The conflict situations are as follows: if an attribute exists in the first common node object and is deleted in the second common node object, and exists in the third common node object but has a different attribute value from the attribute in the first common node object, then this part is considered to be the conflicting part; or, if an attribute exists in the first common node object and exists in the second common node object but has a different attribute value from the attribute in the first common node object, and the attribute is deleted in the third common node object, then this part is considered to be the conflicting part; or, if an attribute does not exist in the first common node object and is added to the second and third common node objects, then the attribute value of the attribute in the second common node object is different from the attribute value in the third common node object. There may also be other conflict situations, which will not be elaborated here.

[0117] Therefore, it is possible to further determine whether the non-common attribute belongs to the difference part or the conflict part by parsing the attribute value, and then determine the second difference part and / or second conflict part corresponding to the non-common attribute.

[0118] For ease of understanding, Table 1 briefly lists the second difference part and the second conflict part of the non-common attributes:

[0119] Table 1:

[0120]

[0121]

[0122] In an optional embodiment of the present application, the attribute value of the node object can be of multiple types, for example, array type, dictionary type, basic data type, so the attribute value type of the shared node object can be used to perform corresponding parsing processing on the attribute value of the shared node object, determine the non-shared attributes corresponding to the shared node object, and thus determine the second difference part and / or the second conflict part based on the attribute value of the non-shared attribute. The attribute value is the specific content of the attribute, and whether there is a conflict is determined by judging whether there is a contradiction in the attribute value. If there is a contradiction, this part of the non-shared attribute can be identified as the second conflict part. If there is no contradiction, this part of the non-shared attribute can be identified as the second difference part.

[0123] In an optional implementation of the present application, attribute difference rules and attribute conflict rules are pre-configured. The attribute difference rules define under what circumstances multiple non-public attributes are considered differences, and the attribute conflict rules define under what circumstances multiple non-public attributes are considered conflicts. For example, a preset attribute difference rule may be: the attribute exists in the first common node object and the third common node object and the attribute value is the same, and the attribute is deleted from the second node object mapping table. A preset attribute conflict rule may be: the attribute exists in the first node object, the attribute is deleted from the second node object, and the attribute exists in the third node object mapping table, but the attribute value is different from the attribute value of the attribute in the first node object.

[0124] Therefore, the attribute value corresponding to the non-shared attribute can be matched with the preset attribute difference rule and / or the preset attribute conflict rule to determine whether the attribute value corresponding to the non-shared attribute satisfies the preset attribute difference rule or the preset attribute conflict rule, and the second difference portion and / or the second conflict portion are determined based on the matching result. The matching result can be a match with any attribute difference rule or any attribute conflict rule. Generally, for the non-shared attribute, it is either the second difference portion or the second conflict portion.

[0125] Different attribute value types use different parsing and processing methods. For example, if the attribute value of the shared node object is of dictionary type, the following method is recursively executed: determine the shared attributes and non-shared attributes of the child node objects at each level until the child node objects have non-shared attributes or the attribute value of the child node object is of the basic data type; if the attribute value of the child node object is of the basic data type, compare whether the attribute values ​​of the child node objects are the same; if the comparison result is not exactly the same, determine it as a non-shared attribute corresponding to the shared node object.

[0126] Specifically, when the attribute value of a shared node object is of dictionary type, a recursive comparison process is initiated. Starting from the root level of the object, the attributes of all child node objects under this level are scanned. Each child node object is determined to exist in all comparison samples and whether its attribute value is consistent. This is used to identify shared and non-shared attributes at this level. If the attribute value of a child node object is still of dictionary type, the process continues down to the next level, repeating the above scanning and judgment steps to continuously explore the attribute differences of the child node objects.

[0127] During the recursive process, once it is discovered that the attribute values ​​of the child node objects at a certain level are inconsistent, or the attribute values ​​of the child node objects are basic data types (such as strings, numbers, Boolean values), the termination condition is triggered and the recursion will not continue downward. For child node objects whose attribute values ​​are basic data types, their attribute values ​​will be directly compared to see if they are exactly the same. If they are the same, it means that they are shared attributes and are skipped without processing. If they are inconsistent, they are judged as non-shared attributes. Among them, if they are different, they are marked as the second conflict part and recorded in the log file. If two sides are the same and one side is different, it means that one side is adjusted separately, and this different value is used to modify the corresponding data in the first node object mapping table.

[0128] Through this recursive comparison method from the outside to the inside and step by step, the common attributes and non-common attributes of all levels in the dictionary type attributes can be completely and accurately identified, providing an accurate information basis for subsequent data merging and conflict resolution.

[0129] If the attribute value of the shared node object is of the basic data type, the attribute values ​​of the shared node objects are compared to see if they are the same; if the comparison result is not exactly the same, it is determined to be a non-shared attribute corresponding to the shared node object. Specifically, for the case where the attribute value is of the basic data type, the attribute values ​​of the three parties can be compared to see if they are the same. If they are the same, it means that they are shared attributes and they are skipped without any processing. If they are different, they are marked as the second conflicting part and recorded in the log file. If two of them are the same and one is different, it means that one party has made a separate adjustment, and this different value is used to modify the corresponding data in the first node object mapping table.

[0130] If the attribute value of the shared node object is of array type, determine whether the array element is structured data and has a unique identifier;

[0131] If the array element is structured data and has a unique element identifier, then an element mapping table is constructed based on the unique element identifier, and the following method is recursively executed: determining the common attributes and non-common attributes of each level of the array element until the array element has a non-common attribute or the attribute value of the array element is the basic data type;

[0132] If the attribute value of the array element is a basic data type, the attribute values ​​of the array elements are compared to see if they are the same; if the comparison result is not completely the same, it is determined to be a non-shared attribute corresponding to the shared node object.

[0133] If the array element is structured data or basic data type without a unique identifier, the array element is converted into a string value, the maximum common subsequence corresponding to the string value is determined, and the non-common attributes corresponding to the common node object are determined based on the maximum common subsequence.

[0134] When the attribute value of a shared node object is an array type, different comparison strategies are employed based on the characteristics of the array elements (structured data, basic data, and whether they contain a unique identifier). This process aims to decompose the array structure layer by layer to accurately identify shared and non-shared attributes. Specifically, it first determines whether the array element is structured data with a unique identifier. If the array element is structured data with a unique identifier, an element mapping table is constructed using the element identifier as the key. Elements with the same identifier in each array are aligned and stored, forming a dictionary structure indexed by the identifier. The elements in the dictionary structure are then recursively traversed, comparing their attribute values ​​layer by layer. If the attribute is still structured data, the decomposition and comparison continues until a non-shared attribute is found or a basic data type is encountered. If the attribute is a basic data type, the attribute values ​​are directly compared. If they are identical, they are considered shared attributes and are skipped without further processing. If they are inconsistent, they are considered non-shared attributes. If they are different, they are marked as the second conflicting part and recorded in the log file. If two of the two are identical and one is different, it indicates that the one has been adjusted independently. The corresponding data in the first node object mapping table is modified using this different value.

[0135] Because arrays are a data structure that relies on order, changes to the data order, or the addition or deletion of elements, can significantly affect their meaning. This conversion eliminates the order dependency issue in array structures where the actual elements are uniquely identified objects or dictionaries. The reference element during comparison can accurately locate the original element being moved, added, or deleted.

[0136] If the array elements are structured data or basic data types without unique identifiers, they are converted to standardized string values ​​(such as JSON serialization) according to predefined rules. The largest common subset is calculated for the converted string values ​​(this can be done using the classic algorithm for finding the largest common subset, including but not limited to other improved algorithms for finding common subsets). Dynamic programming is then used to identify the sequence of elements common to all arrays. Elements or substrings not included in the largest common subset are considered non-shared attributes. Using plain text is more efficient and intuitive.

[0137] Step S207: automatically modify the first node object mapping table according to the first difference part and the second difference part, and record a log file according to the first conflict part and the second conflict part so that the merging end can modify the first node object mapping table according to the log file.

[0138] Specifically, after determining the first difference part and the second difference part, the first node object mapping table can be automatically modified according to the first difference part and the second difference part. Here, the modification basis for modifying the first node object mapping table will be automatically determined in combination with the first difference part and the second difference part, thereby realizing an automated modification strategy and reducing the amount of content modified on the merging end; after determining the first conflict part and the second conflict part, it can be determined that this part of the content cannot be modified automatically and the merging end needs to intervene. Therefore, a log file can be recorded according to the first conflict part and the second conflict part, and the log file can be returned to the merging end for the merging end log file to modify the first node object mapping table, thereby completing all modifications to the first node object mapping table.

[0139] Step S208: generating a merged prefab according to the modified first node object mapping table.

[0140] A node topology structure is constructed based on the modified first node object mapping table, and node objects are instantiated layer by layer according to the mapping relationship; for each node object, its attribute data is dynamically configured according to the attribute merging result recorded in the first node object mapping table; when a node object has nested child objects, child node objects are recursively generated through depth-first traversal and mounted to the parent node object level; after completing the instantiation of all node objects, the root node and its complete subtree structure are serialized into a recognizable prefab, thereby obtaining a merged prefab.

[0141] Figure 2B Flowchart for object / attribute processing, in Figure 2B In the traversal of node objects and the traversal of node object attributes, the same process is reused.

[0142] Specifically, the first prefab, the second prefab, and the third prefab are loaded, and then the three prefabs are deserialized to generate three node object mapping tables (the first node object mapping table, the second node object mapping table, and the third node object mapping table). The common node objects and non-common node objects / the common attributes and non-common attributes of the three common node objects in the three node object mapping tables are traversed and processed. Then, it is determined whether all node objects have been traversed / whether all attributes of the common node objects have been traversed. If all node objects have not been traversed / all attributes of the common node objects have not been traversed, it is determined whether there are common node objects in the three node object mapping tables / whether there are common attributes of the three common node objects. If there are no common node objects / no common attributes, the difference part (the first difference part and the second difference part) and the conflict part (the first conflict part and the second conflict part) are determined. Object addition and deletion / object attribute addition and deletion operations are performed on the first node object mapping table according to the difference part. A log file is recorded according to the conflict part, thereby completing the single node object processing / completing the single attribute processing.

[0143] If the traversal of all node objects is completed / the traversal of all attributes of the common node objects is completed, it is further determined whether the attribute traversal is completed. If so, it means that the traversal of all attributes of a node object is completed, and then the traversal is jumped to process the common node objects and non-common node objects / common attributes and non-common attributes of the three common node objects in the mapping table of the three node objects to continue the execution; if not, it means that the processing of all node objects is completed, and the first node object mapping table after serialization modification generates a merged prefab.

[0144] For the case where there are common node objects in the three node object mapping tables / three common node objects have common attributes, determine whether the three common node objects have common attributes. If not, it means that the processing of the common objects has been completed, and the processing of the single node object is completed. If so, it is processed according to the common object attribute processing flow. For the specific processing flow, please refer to Figure 2C .

[0145] Figure 2C This is a sub-flowchart for the attribute processing of the common node object. Figure 2C In the process, the attributes of the common node objects are traversed and processed in a loop. The set of all attributes of the common node objects can be considered as the attribute set. The attribute set is processed in a loop. First, it is determined whether the last attribute has been processed. If the last attribute has been processed, it can be determined whether the attribute traversal of all node objects has been completed. If not, other node objects are processed. If the last attribute has not been processed, the current attribute is processed to determine whether the attribute value is a basic data type. If it is a basic data type, multiple attribute values ​​are compared to see if they are exactly the same to determine whether a second conflict occurs. If a second conflict exists, a log file is recorded. If there is no second conflict, but they are not exactly the same, the corresponding attribute value is selected to modify the first node object mapping table, and then the loop is jumped to process the attribute set.

[0146] If the attribute value is not a basic data type, it is further determined whether the attribute value is a dictionary type. If it is a dictionary type, it is processed recursively. For the specific processing process, please refer to Figure 2A The corresponding contents in the embodiment shown are not repeated here, and then the loop is jumped to process the attribute set;

[0147] If the attribute value is not a dictionary type, it is necessary to further determine whether the attribute value is an array type. If it is not an array type, it is considered to be an ignorable processing type, and then jump to the loop to process the attribute set;

[0148] If it is an array type, it is further determined whether the array element is a structured data and has a unique element identifier. If so, the array is converted into a dictionary structure with the unique element identifier as the index, and then the attributes of the attribute value dictionary are recursively processed. The specific processing process can be seen in Figure 2A The corresponding contents in the embodiment shown are not repeated here, and then the loop is jumped to process the attribute set;

[0149] If the array element is structured data or basic data type without a unique identifier, the array element is converted into a string value, the maximum common subset algorithm is used to find the second difference part and the second conflict part, modifications are made based on the second difference part, the log file is recorded based on the second conflict part, and then the attribute set is processed in a jump loop.

[0150] According to the file merging method provided by the embodiment of the present application, by processing the multiple prefabricated parts to be merged into corresponding node object mapping tables, it is convenient to subsequently determine the comparison objects, achieve accurate analysis, improve the merging accuracy, avoid the problem of confusion of the alignment reference objects when comparing differences caused by the order adjustment in plain text mode such as Git, and restore the true game object organization structure, overcoming the effect of being completely unusable in the project; by determining the difference part and the conflict part, it is convenient to perform automatic modification according to the difference part, and to perform targeted intervention according to the conflict part, reducing the amount of content modified at the merging end, thereby effectively improving the merging efficiency. For the case where the attribute value is an array type, a. The elements in the array are other objects or dictionary type data, and the data has a unique identifier, then this unique identifier is used as the index to construct the corresponding ordered dictionary structure. Then, using the same logic as above, the ordered dictionary structure index is used as the benchmark to align the data content for recursive comparison and merging, because the array is a data organization structure based on order, and changes in its data order, or the addition or deletion of elements, will truly affect its meaning. This conversion eliminates the order dependency issue for array structures whose actual elements are uniquely identified objects or dictionary types. The baseline element during comparison can actually locate the original element that was moved, added, or deleted. b. Array elements that are basic data types or structured data without unique identifiers need to be converted into string values. The classic maximum common subset algorithm is then used to find the common and modified parts, followed by a three-way merge. This retains the efficiency and intuitiveness of the plain text method. It implements automated merge operations while avoiding manual merging of third-party modifications. This also avoids the change comparison errors and garbled merge results of existing Git-like tools. Only a small number of conflicts resulting from simultaneous modifications by multiple parties are recorded in the log system for subsequent resolution. All other normal modifications by any party are correctly identified and automatically merged.

[0151] Figure 3A structural block diagram of a file merging device according to an embodiment of the present application is shown. Figure 3 As shown, the device includes:

[0152] An acquisition module 301 is adapted to acquire a plurality of prefabricated parts to be combined, the plurality of prefabricated parts including: a first prefabricated part, a second prefabricated part, and a third prefabricated part;

[0153] A first processing module 302 is adapted to perform file processing on the plurality of prefabricated parts respectively, and generate a plurality of corresponding node object mapping tables, the plurality of node object mapping tables including: a first node object mapping table, a second node object mapping table, and a third node object mapping table;

[0154] A determination module 303 is adapted to analyze and process the plurality of node object mapping tables to determine a first difference portion and / or a first conflict portion corresponding to the non-shared node objects, and to determine a second difference portion and / or a second conflict portion corresponding to the non-shared attributes of the shared node objects;

[0155] A second processing module 304 is configured to automatically modify the first node object mapping table according to the first difference part and the second difference part, and record a log file according to the first conflict part and the second conflict part so that the merge end can modify the first node object mapping table according to the log file;

[0156] The generating module 305 is adapted to generate a merged prefab according to the modified first node object mapping table.

[0157] Optionally, the determination module is further adapted to: perform comparative analysis on a plurality of node object mapping tables to determine non-common node objects and common node objects;

[0158] For the non-common node object, determining a first difference part and / or a first conflict part according to object information corresponding to the non-common node object;

[0159] For the shared node objects, the attribute values ​​of the shared node objects are parsed to determine the second difference portion and / or the second conflict portion corresponding to the non-shared attributes.

[0160] Optionally, the determination module is further adapted to: match the object information corresponding to the non-common node object with a preset object difference rule and / or with a preset object conflict rule, and determine the first difference part and / or the first conflict part according to the matching result.

[0161] Optionally, the determination module is further adapted to: perform corresponding parsing processing on the attribute value of the shared node object based on the attribute value type of the shared node object, and determine the non-shared attribute corresponding to the shared node object;

[0162] A second difference portion and / or a second conflict portion is determined according to the attribute values ​​of the non-common attributes.

[0163] Optionally, the determination module is further adapted to: match the attribute value of the non-common attribute with a preset attribute difference rule and / or with a preset attribute conflict rule, and determine the second difference part and / or the second conflict part according to the matching result.

[0164] Optionally, the determination module is further adapted to: if the attribute value of the common node object is of a dictionary type, recursively perform the following method: determine the common attributes and non-common attributes of the child node objects at each level until a non-common attribute exists in the child node object or the attribute value of the child node object is of a basic data type;

[0165] If the attribute value of the child node object is the basic data type, the attribute values ​​of the child node objects are compared to see if they are the same; if the comparison result is not completely the same, it is determined to be a non-shared attribute corresponding to the shared node object.

[0166] Optionally, the determination module is further adapted to: if the attribute value of the common node object is of a basic data type, compare whether the attribute values ​​of the common node objects are the same;

[0167] If the comparison result is not completely the same, it is determined to be a non-shared attribute corresponding to the shared node object.

[0168] Optionally, the determination module is further adapted to: if the attribute value of the common node object is of array type, determine whether the array element is structured data and has a unique identifier;

[0169] If the array element is structured data and has a unique element identifier, then an element mapping table is constructed based on the unique element identifier, and the following method is recursively executed: determining the common attributes and non-common attributes of each level of the array element until the array element has a non-common attribute or the attribute value of the array element is the basic data type;

[0170] If the attribute value of the array element is a basic data type, the attribute values ​​of the array elements are compared to see if they are the same; if the comparison result is not completely the same, it is determined to be a non-shared attribute corresponding to the shared node object.

[0171] Optionally, the determination module is further adapted to: if the array element is structured data or basic data type without a unique identifier, convert the array element into a string value, determine the maximum common subsequence corresponding to the string value, and determine the non-common attributes corresponding to the common node object based on the maximum common subsequence.

[0172] Optionally, the first processing module is further adapted to: perform structural processing on the plurality of prefabricated parts to generate a corresponding plurality of file structure objects;

[0173] Node data serialization is performed on multiple file structure objects to generate corresponding multiple node object mapping tables.

[0174] The description of each module above refers to the corresponding description in the method embodiment and will not be repeated here.

[0175] According to the file merging device provided in the embodiment of the present application, by processing the multiple prefabricated parts to be merged into corresponding node object mapping tables, it is convenient to subsequently determine the comparison objects, realize accurate analysis, improve the merging accuracy, avoid the problem of confusion in alignment of reference objects when comparing differences caused by order adjustment in plain text mode such as Git, realize the restoration of the true organizational structure of game objects, and overcome the effect of being completely unusable in the project; by determining the difference part and the conflicting part, it is convenient to perform automatic modification according to the difference part, and perform targeted intervention according to the conflicting part, thereby reducing the amount of content modified at the merging end, thereby effectively improving the merging efficiency.

[0176] An embodiment of the present application provides a non-volatile computer storage medium, which stores at least one executable instruction or computer program. The executable instruction or computer program can enable a processor to perform operations corresponding to the file merging method in any of the above method embodiments.

[0177] An embodiment of the present application provides a computer program product, which includes at least one executable instruction or computer program, and the executable instruction or computer program can enable a processor to perform operations corresponding to the file merging method in any of the above method embodiments.

[0178] Figure 4 A schematic diagram of the structure of an embodiment of a computing device of the present application is shown. The specific embodiment of the present application does not limit the specific implementation of the computing device.

[0179] like Figure 4 As shown, the computing device may include: a processor 402 , a communications interface 404 , a memory 406 , and a communication bus 408 .

[0180] Processor 402, communication interface 404, and memory 406 communicate with each other via communication bus 408. Communication interface 404 is used to communicate with other devices, such as clients or other server network elements. Processor 402 is used to execute program 410, which may specifically perform the steps described in the above-mentioned embodiment of the file merging method for a computing device.

[0181] Specifically, the program 410 may include program codes, which include computer operation instructions.

[0182] Processor 402 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application. The one or more processors included in the computing device may be processors of the same type, such as one or more CPUs, or may be processors of different types, such as one or more CPUs and one or more ASICs.

[0183] The memory 406 is used to store the program 410. The memory 406 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

[0184] Program 410 can be specifically configured to cause processor 402 to execute the file merging method of any of the above-described method embodiments. The specific implementation of each step in program 410 can be found in the corresponding descriptions of the corresponding steps and units in the above-described file merging embodiments, and will not be repeated here. Those skilled in the art will clearly understand that, for ease and brevity of description, the specific working processes of the devices and modules described above can refer to the corresponding process descriptions in the above-described method embodiments, and will not be repeated here.

[0185] The algorithm and display provided herein are not inherently relevant to any particular computer, virtual system or other device. Various general-purpose systems can also be used together with the teachings based on this. According to the above description, it is obvious that the structure required for constructing this type of system. In addition, the embodiments of the present application are not directed to any specific programming language yet. It should be understood that various programming languages ​​can be utilized to realize the content of the embodiments of the present application described herein, and the description of the specific languages ​​above is for the purpose of disclosing the best mode of implementation of the embodiments of the present application.

[0186] In the description provided herein, a large number of specific details are described. However, it is understood that the embodiments of the present application can be practiced without these specific details. In some instances, well-known methods, structures, and techniques are not shown in detail so as not to obscure the understanding of this description.

[0187] Similarly, it should be understood that in order to streamline the present disclosure and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the present application, the various features of the embodiments of the present application are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting the following intention: that the claimed embodiments of the present application require more features than the features explicitly recited in each claim. More precisely, as reflected in the claims below, inventive aspects lie in less than all the features of the individual embodiments disclosed above. Therefore, the claims following the detailed description are hereby expressly incorporated into the detailed description, with each claim itself serving as a separate embodiment of the embodiments of the present application.

[0188] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition may be divided into multiple submodules or subunits or subcomponents. All features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed herein may be combined in any combination, except that at least some of such features and / or processes or units are mutually exclusive. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.

[0189] Furthermore, those skilled in the art will appreciate that although some embodiments described herein include certain features that are included in other embodiments but not other features, combinations of features from different embodiments are intended to be within the scope of the present invention and to form different embodiments. For example, in the claims below, any of the claimed embodiments may be used in any combination.

[0190] The various component embodiments of the embodiments of the present application can be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or digital signal processor (DSP) can be used in practice to implement some or all of the functions of some or all of the components in the embodiments of the present application. The embodiments of the present application can also be implemented as a device or apparatus program (e.g., computer program and computer program product) for performing a part or all of the methods described herein. Such a program implementing the embodiments of the present application can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.

[0191] It should be noted that the above embodiments illustrate rather than limit the embodiments of the present application, and that a person skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbols placed between brackets should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The embodiments of the present application may be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third, etc. does not indicate any order. These words may be interpreted as names.

Claims

1. A file merging method, comprising: Acquire a plurality of prefabricated parts to be combined, wherein the plurality of prefabricated parts include: a first prefabricated part, a second prefabricated part, and a third prefabricated part; Performing file processing on the plurality of prefabricated parts respectively to generate a plurality of corresponding node object mapping tables, the plurality of node object mapping tables including: a first node object mapping table, a second node object mapping table, and a third node object mapping table; Analyzing and processing the plurality of node object mapping tables to determine first difference parts and / or first conflict parts corresponding to the non-common node objects, and determining second difference parts and / or second conflict parts corresponding to the non-common attributes of the common node objects; Automatically modifying the first node object mapping table according to the first difference part and the second difference part, and recording a log file according to the first conflict part and the second conflict part so that the merging end can modify the first node object mapping table according to the log file; Generate a merged prefab according to the modified first node object mapping table.

2. The method according to claim 1, wherein The analyzing and processing the plurality of node object mapping tables to determine the first difference portion and / or the first conflict portion corresponding to the non-common node objects, and determining the second difference portion and / or the second conflict portion corresponding to the non-common attributes of the common node objects further includes: Comparing and analyzing the plurality of node object mapping tables to determine non-shared node objects and shared node objects; For the non-common node object, determining a first difference part and / or a first conflict part according to object information corresponding to the non-common node object; For the shared node objects, the attribute values ​​of the shared node objects are parsed to determine the second difference part and / or the second conflict part corresponding to the non-shared attributes.

3. The method according to claim 2, wherein: The determining of the first difference part and / or the first conflict part according to the object information corresponding to the non-common node object further includes: The object information corresponding to the non-common node object is matched with a preset object difference rule and / or a preset object conflict rule, and a first difference part and / or a first conflict part is determined according to the matching result.

4. The method according to claim 2 or 3, wherein: The parsing of the attribute values ​​of the shared node objects to determine the second difference portion and / or the second conflict portion corresponding to the non-shared attributes further includes: Based on the attribute value type of the shared node object, performing corresponding parsing processing on the attribute value of the shared node object to determine the non-shared attribute corresponding to the shared node object; A second difference portion and / or a second conflict portion is determined according to the attribute values ​​of the non-common attributes.

5. The method according to claim 4, wherein The determining of the second difference portion and / or the second conflict portion according to the attribute values ​​of the non-common attributes further comprises: The attribute value of the non-common attribute is matched with a preset attribute difference rule and / or a preset attribute conflict rule, and a second difference part and / or a second conflict part is determined according to the matching result.

6. The method according to claim 4 or 5, wherein: The performing corresponding parsing processing on the attribute value of the shared node object based on the attribute value type of the shared node object to determine the non-shared attribute corresponding to the shared node object further includes: If the attribute value of the common node object is of dictionary type, recursively execute the following method: determine the common attributes and non-common attributes of the child node objects at each level until the child node object has non-common attributes or the attribute value of the child node object is of the basic data type; If the attribute value of the child node object is of the basic data type, the attribute values ​​of the child node objects are compared to see if they are the same; if the comparison result is not completely the same, it is determined to be a non-shared attribute corresponding to the shared node object.

7. The method according to any one of claims 4 to 6, wherein The performing corresponding parsing processing on the attribute value of the shared node object based on the attribute value type of the shared node object to determine the non-shared attribute corresponding to the shared node object further includes: If the attribute value of the shared node object is a basic data type, comparing whether the attribute values ​​of the shared node objects are the same; If the comparison result is not completely the same, it is determined to be a non-common attribute corresponding to the common node object.

8. The method according to any one of claims 4 to 7, wherein The performing corresponding parsing processing on the attribute value of the shared node object based on the attribute value type of the shared node object to determine the non-shared attribute corresponding to the shared node object further includes: If the attribute value of the shared node object is an array type, determining whether the array element is structured data and has a unique identifier; If the array element is structured data and has a unique element identifier, an element mapping table is constructed based on the unique element identifier, and the following method is recursively performed: determining the common attributes and non-common attributes of each level in the array element until the array element has a non-common attribute or the attribute value of the array element is a basic data type; If the attribute value of the array element is a basic data type, the attribute values ​​of the array elements are compared to see whether they are the same; if the comparison result is not completely the same, it is determined to be a non-shared attribute corresponding to the shared node object.

9. The method according to claim 8, wherein The method also includes: if the array element is structured data or basic data type without a unique identifier, converting the array element into a string value, determining the maximum common subsequence corresponding to the string value, and determining the non-common attributes corresponding to the common node object based on the maximum common subsequence.

10. The method according to any one of claims 1 to 9, wherein The performing file processing on the plurality of prefabricated parts respectively to generate a plurality of corresponding node object mapping tables further comprises: Performing structural processing on the plurality of prefabricated parts to generate a corresponding plurality of file structure objects; Node data serialization processing is performed on the multiple file structure objects to generate corresponding multiple node object mapping tables.

11. A file merging device, comprising: an acquisition module, adapted to acquire a plurality of prefabricated parts to be combined, the plurality of prefabricated parts comprising: a first prefabricated part, a second prefabricated part, and a third prefabricated part; A first processing module is adapted to perform file processing on the plurality of prefabricated parts respectively to generate a plurality of corresponding node object mapping tables, wherein the plurality of node object mapping tables include: a first node object mapping table, a second node object mapping table, and a third node object mapping table; a determination module adapted to analyze and process the plurality of node object mapping tables, determine a first difference portion and / or a first conflict portion corresponding to the non-common node objects, and determine a second difference portion and / or a second conflict portion corresponding to the non-common attributes of the common node objects; a second processing module, adapted to automatically modify the first node object mapping table according to the first difference part and the second difference part, and record a log file according to the first conflict part and the second conflict part so that a merging end can modify the first node object mapping table according to the log file; The generating module is adapted to generate a merged prefab according to the modified first node object mapping table.

12. A computing device comprising: A processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform an operation corresponding to the file merging method according to any one of claims 1 to 10.

13. A computer storage medium, wherein at least one executable instruction is stored in the storage medium, and wherein the executable instruction enables a processor to execute an operation corresponding to the file merging method according to any one of claims 1 to 10.

14. A computer program product, comprising at least one executable instruction, wherein the executable instruction enables a processor to execute operations corresponding to the file merging method according to any one of claims 1 to 10.