Virtual engine resource processing method and apparatus, program product, and electronic device

By selecting a merge mode to obtain the difference data of Unreal Engine resources, the conflict problem during Unreal Engine resource merging is resolved, and the effective updating and merging of resources is achieved, which is applicable to a variety of resource types.

WO2025241720A1PCT designated stage Publication Date: 2025-11-27NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/086724
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-05-22
Filing Date
2025-04-01
Publication Date
2025-11-27

AI Technical Summary

Technical Problem

In Unreal Engine, resource merging is prone to conflicts, leading to data errors or omissions, and existing technologies lack effective solutions.

Method used

A method for processing virtual engine resources is provided, which obtains the difference data between the source branch and the target branch by selecting a merge mode (conflict resolution mode or numerical merge mode), outputs the difference comparison results, and updates the resources based on the comparison results.

Benefits of technology

It enables the effective merging of virtual engine resources, avoids data errors and omissions, expands the applicable scenarios for difference comparison, and is suitable for resource types other than blueprints and pure data resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025086724_27112025_PF_FP_ABST
    Figure CN2025086724_27112025_PF_FP_ABST
Patent Text Reader

Abstract

A virtual engine resource processing method and apparatus, a program product, and an electronic device. The method comprises: receiving a selection operation for a virtual engine resource merging mode, and determining a target merging mode corresponding to the merging mode selection operation; in response to the target merging mode being determined as a conflict resolution mode, acquiring a source branch and a target branch of the virtual engine resource to be processed, and generating first difference data based on the source branch and the target branch; in response to the target merging mode being determined as a numerical merging mode, acquiring a source branch and a target branch of the virtual engine resource to be processed, and generating second difference data based on the source branch and the target branch; outputting a difference comparison result based on the first difference data and / or the second difference data; in response to a selection of the difference comparison result, determining a branch to be merged from the differing source branch or the differing target branch; and updating the virtual engine resource based on the determined branch to be merged.
Need to check novelty before this filing date? Find Prior Art

Description

Method and device for processing virtual engine resources, program product, and electronic device

[0001] Cross Reference to Related Applications

[0002] This application claims priority to Chinese Patent Application No. 202410650253.7, filed May 22, 2024, entitled “Method and Device for Processing Virtual Engine Resources, Program Product, and Electronic Device,” the entire contents of which are incorporated herein by reference in its entirety. TECHNICAL FIELD

[0003] The present disclosure relates to the technical field of data processing, and particularly relates to a method for processing virtual engine resources and a device for processing virtual engine resources, a computer readable storage medium and an electronic device. BACKGROUND

[0004] Unreal Engine (UE) is a comprehensive game engine used for developing electronic games, virtual reality and augmented reality applications.

[0005] However, the UE resources, which are binary files, may encounter conflicts when merging. When encountering these conflicts, generally, a two-choice operation is performed on the resources, either believing the resources of the source branch or believing the locally saved resources, which causes the loss of modified data of either end, resulting in errors or omissions of data.

[0006] In view of this, there is an urgent need in the art to develop a new method and device for processing virtual engine resources.

[0007] It should be noted that the information disclosed in the above background section is only used to strengthen the understanding of the background of the present disclosure, and therefore can include information that does not constitute prior art known to those of ordinary skill in the art. SUMMARY

[0008] The purpose of the present disclosure is to provide a method for processing virtual engine resources, a device for processing virtual engine resources, a computer readable storage medium and an electronic device, thereby at least partially overcoming the problem of errors or omissions of data caused in the process of merging UE resources due to related technologies.

[0009] Other characteristics and advantages of the present disclosure will become apparent from the following detailed description, or will be learned by practice of the present disclosure.

[0010] According to a first aspect of the embodiments of the present application, a processing method of virtual engine resources is provided. The method comprises: receiving a selection operation of a virtual engine resource merging mode, and determining a target merging mode corresponding to the merging mode selection operation; wherein the target merging mode comprises a conflict resolution mode and a numerical merging mode; in response to the target merging mode being determined as the conflict resolution mode, obtaining a source branch and a target branch of a virtual engine resource to be processed, and generating first difference data based on the source branch and the target branch; wherein the target branch is a local branch corresponding to the virtual engine resource to be processed; in response to the target merging mode being determined as the numerical merging mode, obtaining a source branch and a target branch of a virtual engine resource to be processed, and generating second difference data based on the source branch and the target branch; wherein the target branch is a historical branch corresponding to the source branch; outputting a difference comparison result based on the first difference data and / or the second difference data; wherein the difference comparison result comprises a source branch and a target branch with differences; in response to a selection of the difference comparison result, determining a branch to be merged from the source branch or the target branch with differences; and updating the virtual engine resource based on the determined branch to be merged.

[0011] According to a second aspect of the embodiments of the present application, a processing device of virtual engine resources is provided. The device comprises: a merging mode determination module configured to receive a selection operation of a virtual engine resource merging mode, and determine a target merging mode corresponding to the merging mode selection operation; wherein the target merging mode comprises a conflict resolution mode and a numerical merging mode; a conflict resolution mode module configured to, in response to the target merging mode being determined as the conflict resolution mode, obtain a source branch and a target branch of a virtual engine resource to be processed, and generate first difference data based on the source branch and the target branch; wherein the target branch is a local branch corresponding to the virtual engine resource to be processed; a numerical merging mode module configured to, in response to the target merging mode being determined as the numerical merging mode, obtain a source branch and a target branch of a virtual engine resource to be processed, and generate second difference data based on the source branch and the target branch; wherein the target branch is a historical branch corresponding to the source branch; an output difference result module configured to output a difference comparison result based on the first difference data and / or the second difference data; wherein the difference comparison result comprises a source branch and a target branch with differences; a branch to be merged determination module configured to, in response to a selection of the difference comparison result, determine a branch to be merged from the source branch or the target branch with differences; and an updated virtual engine resource module configured to update the virtual engine resource based on the determined branch to be merged.

[0012] According to a third aspect of the embodiments of the present application, an electronic device is provided, comprising a processor and a memory; wherein the memory has computer readable instructions stored thereon, and the computer readable instructions, when executed by the processor, implement the processing method of the virtual engine resource of any of the example embodiments described above.

[0013] According to a fourth aspect of the embodiments of the present application, a computer program product is provided, and the computer program product has a computer program stored thereon, and the computer program, when executed by a processor, implements the processing method of the virtual engine resource of any of the example embodiments described above.

[0014] From the technical solutions described above, the processing method of the virtual engine resource, the processing device of the virtual engine resource, the computer storage medium and the electronic device in the example embodiments of the present application at least have the following advantages and positive effects:

[0015] In the method and device provided in the example embodiments of the present application, the selected target merging mode is determined. According to different target merging modes, the source branch and the target branch of the virtual engine resource to be processed are determined. The source branch and the target branch are compared to obtain first difference data and second difference data, so as to output a difference comparison result according to the first difference data and / or the second difference data, and then update the virtual engine resource according to the difference comparison result. On the one hand, it is helpful to realize the merging between the virtual engine resource under the source branch and the virtual engine resource under the target branch according to the difference comparison result; on the other hand, the scenarios in which the difference comparison result is determined are expanded, and the situation that the difference comparison can only be performed on the virtual engine resource of the blueprint or the pure data class is avoided.

[0016] It should be understood that the foregoing general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF DRAWINGS

[0017] The drawings incorporated into the specification and constituting a part of the specification show embodiments consistent with the present disclosure, and together with the specification serve to explain the principles of the present disclosure. Obviously, the drawings in the following description are only some embodiments of the present disclosure, and other drawings can be obtained by those skilled in the art without creative labor.

[0018] Fig. 1 schematically shows a flowchart of a processing method of a virtual engine resource in one of the embodiments of the present disclosure;

[0019] Fig. 2 schematically shows a flowchart of pulling source branch virtual engine resources under a source branch and target branch virtual engine resources under a target branch in a numerical merging mode in the processing method of the virtual engine resource in one of the embodiments of the present disclosure;

[0020] FIG. 3 schematically shows a flow diagram of obtaining difference data of a source branch table and a difference comparison table in a processing method of virtual engine resources according to an embodiment of the present disclosure;

[0021] FIG. 4 schematically shows a schematic diagram of an overall framework of constructing a tool for solving conflicts in a processing method of virtual engine resources according to an embodiment of the present disclosure;

[0022] FIG. 5 schematically shows a schematic diagram of a resource management module in a processing method of virtual engine resources according to an embodiment of the present disclosure;

[0023] FIG. 6 schematically shows a schematic diagram of a resource merging module and a visualization module in a processing method of virtual engine resources according to an embodiment of the present disclosure;

[0024] FIG. 7 schematically shows a flow diagram of a processing method of virtual engine resources according to an embodiment of the present disclosure;

[0025] FIG. 8 schematically shows a schematic diagram of an entry interface of a virtual editor in a processing method of virtual engine resources according to an embodiment of the present disclosure;

[0026] FIG. 9 schematically shows a device for a processing method of virtual engine resources according to an embodiment of the present disclosure;

[0027] FIG. 10 schematically shows an electronic device for a processing method of virtual engine resources according to an embodiment of the present disclosure;

[0028] FIG. 11 schematically shows a computer-readable storage medium for a processing method of virtual engine resources according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0029] Example implementations will now be described more fully with reference to the accompanying drawings. Example implementations may, however, be implemented in many different forms and should not be construed as limited to the implementations set forth herein; rather, these implementations are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the example implementations to those skilled in the art. The described features, structures, or characteristics can be combined in one or more implementations. In the following description, numerous specific details are provided to give a thorough understanding of implementations of the disclosure. One skilled in the relevant art will recognize, however, that the implementations of the disclosure can be practiced without one or more of the specific details, or with other methods, components, materials, and so forth. In other instances, well-known structures have not been described in detail to avoid obscuring aspects of the disclosure.

[0030] The terms "one", "an", "the", and "said" are used in this specification to convey "at least one" or "one or more" unless otherwise indicated; the terms "including" and "having" are used in this specification to mean "including, without limitation" and "having, without limitation" to enable this disclosure to specify that additional, unspecified elements can be present; the terms "first" and "second" are used in this specification to distinguish between similar elements, and are not meant to indicate a quantity limitation.

[0031] In addition, the accompanying drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. Like reference numerals in the drawings denote like or similar parts, and thus repeated descriptions thereof will be omitted. Some of the block diagrams shown in the drawings are functional entities, which do not necessarily have to correspond to physically or logically independent entities.

[0032] Generally speaking, for the development management of a software project, a version control tool is used to build a multi-branch development environment. There are usually main branches, release branches, development branches, and the like in the multi-branch development environment. Code files can be freely merged between branches.

[0033] If the code files in the branches are merged again in the case that both branches have edits, a merge conflict will occur. For code files, a text conflict resolution tool provided by the version control tool can be used to select code snippets from different branches to resolve the conflict.

[0034] However, UE resources are binary files, and conflicts can also occur when merging UE resources. When these conflicts occur, these UE resources cannot be finely resolved in the merging process according to actual data differences, as code files can be, and thus conflicts in them are generally resolved by adopting a branch selection strategy. At the same time, there are almost no good solutions for UE resource merging on the market.

[0035] To address the problems in the related art, the present disclosure proposes a virtual engine resource processing method. FIG. 1 schematically shows a flowchart of a virtual engine resource processing method in an embodiment of the present disclosure. As shown in FIG. 1, the virtual engine resource processing method at least includes the following steps:

[0036] Step S110. Receiving a selection operation of a virtual engine resource merging mode, determining a target merging mode corresponding to the merging mode selection operation; wherein the target merging mode includes a conflict resolution mode and a numerical merging mode.

[0037] Step S120. In response to the target merging mode being determined as the conflict resolution mode, obtaining a source branch and a target branch of a virtual engine resource to be processed, and generating first difference data based on the source branch and the target branch; wherein the target branch is a local branch corresponding to the virtual engine resource to be processed.

[0038] Step S130. In response to the target merge mode being determined as the numerical merge mode, obtaining a source branch and a target branch of the virtual engine resource to be processed, and generating second difference data based on the source branch and the target branch; wherein the target branch is a historical branch corresponding to the source branch.

[0039] Step S140. Outputting a difference comparison result based on the first difference data and / or the second difference data; wherein the difference comparison result includes the source branch and the target branch with differences.

[0040] Step S150. In response to selection of the difference comparison result, determining a branch to be merged from the source branch or the target branch with differences.

[0041] Step S160. Updating the virtual engine resource based on the determined branch to be merged.

[0042] In the method and device provided in the example embodiments of the present disclosure, the selected target merge mode is determined. According to different target merge modes, the source branch and the target branch of the virtual engine resource to be processed are determined. The source branch and the target branch are compared to obtain first difference data and second difference data, and the difference comparison result is output according to the first difference data and the second difference data, and then the virtual engine resource is updated according to the difference comparison result. On the one hand, it helps to realize the merging between the source branch virtual engine resource under the source branch and the target branch virtual engine resource under the target branch according to the difference comparison result; on the other hand, it expands the scenarios in which the difference comparison result is determined, avoiding the situation that only the virtual engine resources of blueprints or pure data classes can be compared for differences.

[0043] The steps of the processing method of the virtual engine resource are described in detail below.

[0044] In step S110, a selection operation of a virtual engine resource merge mode is received, and a target merge mode corresponding to the merge mode selection operation is determined; wherein the target merge mode includes a conflict resolution mode and a numerical merge mode.

[0045] In the example embodiments of the present disclosure, the virtual engine resource refers to a UE resource, generally refers to a file with uasset as a suffix, used to edit and save data resources generated during UE development.

[0046] The virtual resource editor is the UE editor. The selection operation refers to an operation in the UE editor for determining the mode for determining the difference comparison result. The target merge mode refers to the mode determined according to the selection operation for determining the difference comparison result. It is worth noting that the target merge mode includes two types, namely the conflict resolution mode and the numerical merge mode.

[0047] In step S120, in response to the target merge mode being determined as the conflict resolution mode, a source branch and a target branch of the virtual engine resource to be processed are acquired, and first difference data is generated based on the source branch and the target branch; the target branch is a local branch corresponding to the virtual engine resource to be processed.

[0048] In the example embodiments of the present disclosure, generally speaking, the development management of a software project usually uses a version control tool, such as SVN, Perforce, Git, etc., to build a multi-branch development environment. For example, the multi-branch development environment includes a master branch, a release branch, a development branch, etc. The code files can be freely merged between branches.

[0049] If there are resource edits in the two branches, the conflict between the two branches needs to be handled before resource merging. When the resource contents of the same object stored in different branches are different, it is considered that there is a conflict between the virtual engine resources of the two branches.

[0050] In order to solve the conflict problem between the multi-branches, the target merge mode needs to be determined first, and then the source branch virtual engine resource corresponding to the source branch needs to be determined. Specifically, the source branch virtual engine resource under the source branch can be determined in the virtual resource editor through resource pulling operation.

[0051] Since the target merge mode can be a conflict resolution mode or a numerical value merge mode, according to the different target merge modes determined, the target branch virtual engine resource under the target branch different from the source branch virtual engine resource under the source branch can be determined, and at this time, the objects that need to be resolved are the source branch virtual engine resource under the source branch and the target branch virtual engine resource under the target branch.

[0052] Specifically, when the target merge mode is the conflict resolution mode, after the source branch of the virtual engine resource to be processed is determined, the determined target branch is the local branch of the virtual engine resource to be processed in the local. Based on this, the difference data (i.e., the first difference data) between the local branch of the virtual engine resource to be processed in the local and the source branch of the virtual engine resource to be processed can be generated.

[0053] In an optional embodiment, in response to the target merging mode being determined as the conflict resolution mode, the source branch and the target branch of the to-be-processed virtual engine resource are acquired, including: acquiring a resource information list; wherein the resource information list records a plurality of to-be-processed virtual engine resources in a conflict state; pulling the source branch corresponding to the to-be-processed virtual engine resource; wherein the version of the source branch virtual engine resource corresponding to the source branch is the target virtual engine resource version; and determining the local virtual engine resource corresponding to the to-be-processed virtual engine resource as the target branch corresponding to the source branch.

[0054] The target merging mode can be the conflict resolution mode or the numerical merging mode. The conflict resolution mode and the numerical merging mode differ in the generation process of the difference data. In the conflict resolution mode, the source branch and the target branch corresponding to the to-be-processed virtual resource need to be determined through the resource information list. In the numerical merging mode, the source branch and the target branch corresponding to the to-be-processed virtual engine resource need to be determined through the change resource list. Based on this, by designing different target merging modes, the generation of difference data and the update of virtual engine resources in different scenarios can be met.

[0055] In the conflict resolution mode, the resource information list stores the to-be-processed virtual engine resources marked as the conflict state, that is, when the resource contents of the plurality of branches for the same object are different, different resource contents are recorded in the resource information list. For example, if the version control tool used for the multi-branch project is Perforce, the above-mentioned resource information list can be the pedding list in Perforce.

[0056] After the resource information list is acquired, the source branch corresponding to each to-be-processed virtual engine resource recorded in the resource information list needs to be pulled. It is worth noting that the source branch virtual engine resource corresponding to the source branch has the latest resource version (that is, the resource version is the target virtual engine resource version). Since the target merging mode is the conflict resolution mode, the local virtual engine resource corresponding to the to-be-processed virtual engine resource recorded locally in the virtual resource editor is determined as the target branch corresponding to the source branch in the conflict resolution mode.

[0057] In the present exemplary embodiment, a manner of determining the source branch virtual engine resource under the source branch and the target branch virtual engine resource under the target branch in the conflict resolution mode is provided, which provides a basis for subsequent difference comparison of the source branch virtual engine resource under the source branch and the target branch virtual engine resource under the target branch.

[0058] In step S130, in response to the target merge mode being determined as the numerical merge mode, a source branch and a target branch of the virtual engine resource to be processed are obtained, and second difference data is generated based on the source branch and the target branch; the target branch is a historical branch corresponding to the source branch.

[0059] In the present exemplary embodiment, the target merge mode can also be the numerical merge mode. It is worth noting that in the numerical merge mode, the target branch is a historical branch corresponding to the source branch, which is completely different from the conflict resolution mode.

[0060] After the source branch and the target branch are determined, difference data (i.e., second difference data) between the source branch virtual engine resource under the source branch and the virtual engine resource under the historical branch is obtained.

[0061] In an optional embodiment, in response to the target merge mode being determined as the numerical merge mode, the source branch and the target branch of the virtual engine resource to be processed are obtained, including: determining a change list number, and obtaining a change resource list according to the change list number; the change resource list records a plurality of resource change records corresponding to the virtual engine resource to be processed; based on the change resource list, a resource version and a repository address corresponding to each resource change record are determined; according to the resource version and the repository address, a plurality of virtual engine resource versions corresponding to the plurality of resource change records are pulled, wherein one virtual engine resource version corresponds to one historical branch of the virtual engine resource to be processed; one historical branch of the virtual engine resource to be processed is determined as the source branch; according to the virtual engine resource version corresponding to the source branch, a target branch of the virtual engine resource to be processed is determined in the historical branch of the virtual engine resource to be processed; the virtual engine resource version corresponding to the target branch is the previous version of the virtual engine resource version corresponding to the source branch.

[0062] In the version control tool, there is a change resource list (for example, Changelist in Perforce). In the change resource list, a plurality of modification records (i.e., a plurality of resource change records) for the virtual engine resource to be processed are recorded. Each change resource list has a change list number corresponding thereto. The user can input the change list number in the virtual resource editor through the resource pulling operation, and then obtain the corresponding change resource list according to the change list number.

[0063] After obtaining the change resource list, since the change resource list records a plurality of resource change records, the change resource list needs to be traversed, and for each resource change record, its corresponding resource version and repository address are obtained.

[0064] The resource version corresponds to the resource change record, and is used to indicate that the modification is in which version of the to-be-processed virtual engine resource. The warehouse address refers to an address of the to-be-processed virtual engine resource corresponding to the resource version corresponding to the resource change record. When the iteration of the change resource list ends, the warehouse address and the resource version corresponding to each resource change record are obtained.

[0065] On this basis, the obtained plurality of warehouse addresses and resource versions are iterated, and the virtual engine resource versions corresponding to the plurality of resource change records are pulled in turn. It is worth noting that each virtual engine resource version has a corresponding relationship with a historical branch of the to-be-processed virtual engine resource.

[0066] After obtaining the virtual engine resource version corresponding to each resource change record, a historical branch of the to-be-processed virtual engine resource can be taken as a source branch, for example, a historical branch corresponding to a virtual resource version of 2.0 is taken as a source branch of the to-be-processed virtual engine resource, and then a historical branch of the virtual engine resource version of 1.0 can be determined in the virtual engine resource, and the historical branch is determined as a target branch of the to-be-processed virtual engine resource in the numerical merging mode (the virtual engine resource version 1.0 is the previous version of the virtual engine resource version 2.0).

[0067] In the present exemplary embodiment, a historical branch corresponding to the virtual engine resource version pulled according to the plurality of resource change records is taken as a source branch, and a branch corresponding to the previous version of the virtual engine resource version corresponding to the source branch is determined as a target branch of the to-be-processed virtual engine resource, which is helpful for subsequent difference comparison of the plurality of resource change records in the same branch to obtain a difference comparison result between the plurality of resource change records in the same branch.

[0068] In an optional embodiment, the resource version and the warehouse address corresponding to each resource change record are determined based on the change resource list, comprising: determining a version pulling mapping relationship corresponding to the change resource list; wherein the version pulling mapping relationship is a mapping relationship between the warehouse address and the resource version corresponding to the plurality of resource change records; and determining the resource version and the warehouse address corresponding to each resource change record according to the version pulling mapping relationship.

[0069] The version pulling mapping table relationship refers to a table of a record mapping relationship, and the mapping relationship refers to a mapping relationship between the plurality of resource change records and the corresponding warehouse address and resource version.

[0070] Figure 2 schematically shows a flowchart of a method for processing virtual engine resources according to an embodiment of the present disclosure, in which the source branch virtual engine resources under a source branch and the target branch virtual engine resources under a target branch are pulled in the numerical merging mode. As shown in Figure 2, after obtaining the changed resource list, since the changed resource list records multiple resource change records, the changed resource list needs to be traversed. For each resource change record, a version pulling mapping relationship is obtained.

[0071] Since the changed resource list can be multiple, after obtaining multiple version pulling mapping relationships, the multiple version pulling mapping relationships can be traversed, and the contents in a certain pulling mapping relationship table are further traversed to obtain the repository addresses and resource versions corresponding to the multiple resource change records respectively.

[0072] On this basis, according to the obtained multiple repository addresses and resource versions, multiple virtual engine resource versions corresponding to the multiple resource change records respectively are pulled in sequence. After obtaining the multiple virtual engine resource versions corresponding to each resource change record respectively, one of the historical branches corresponding to the virtual engine resource versions of the virtual engine resource to be processed can be determined as the source branch, for example, the historical branch with a resource version of 2.0 is determined as the source branch, and then the historical branch with a resource version of 1.0 can be determined as the target branch.

[0073] In an optional embodiment, the version pulling mapping relationship is determined, and a way of obtaining the repository addresses and resource versions corresponding to the multiple resource change records respectively based on the version pulling mapping relationship is provided.

[0074] In an optional embodiment, the source branch virtual engine resources under the source branch include a source branch table, and the target branch virtual engine resources under the target branch include a difference comparison table. The method includes determining a first row name corresponding to the source branch table and determining a second row name corresponding to the difference comparison table. By comparing the first row name and the second row name, the added rows, the deleted rows, and the common rows with the same first row name and second row name of the source branch table relative to the difference comparison table are determined. Based on the added rows, the deleted rows, and the common rows, the difference data between the source branch table and the difference comparison table is obtained.

[0075] The resource types of the source branch virtual resources under the source branch and the target branch virtual resources under the target branch can be table types, for example, DataTable in UE resources, which is used to configure tables and can export and import Excel tables.

[0076] In this embodiment, the source branch virtual engine resources are source branch tables, and the target branch virtual engine resources are difference comparison tables.

[0077] In the process of difference comparison on the source branch table and the difference comparison table of the table type, the row name of each row of the source branch table (i.e. the first row name) is determined first, and then the row name of each row of the difference comparison table (i.e. the second row name) is determined.

[0078] By comparing the first row name and the second row name, the newly added row existing in the source branch table but not existing in the difference comparison table can be determined, the deleted row not existing in the source branch table but existing in the difference comparison table can be determined, and the common row existing in both the source branch table and the difference comparison table can be determined.

[0079] After the newly added row, the deleted row and the common row are determined, the different attribute objects in the newly added row, the deleted row and the common row can be determined as the difference data between the source branch table and the difference comparison table. For example, there are 5 rows in the source branch table, and the row names (i.e. the first row name) of the 5 rows are A, B, C, D and E respectively. There are 6 rows in the difference comparison table, and the row names (i.e. the second row name) of the 6 rows are A, F, G, H, E and I respectively. By comparing the first row name and the second row name, it can be determined that the common row in the source branch table and the difference comparison table is the row corresponding to A and E, the deleted row is the row corresponding to F, G, H and I, and the newly added row is the row corresponding to B, C and D.

[0080] In the optional embodiment, the source branch virtual engine resource includes the source branch table, and the target branch virtual engine resource under the target branch includes the difference comparison table, which avoids the situation that only the blueprint virtual engine resource and the data type virtual engine resource can be compared, and expands the scene for difference comparison.

[0081] In the optional embodiment, the difference data between the source branch table and the difference comparison table is obtained based on the newly added row, the deleted row and the common row, and includes: the third difference data between the source branch table and the difference comparison table is obtained based on the newly added row and the deleted row; the source branch table row data corresponding to the common row in the source branch table is determined, and the difference comparison table row data corresponding to the common row in the difference comparison table is determined based on the common row; the source branch attribute value in the source branch table row resource is determined, and the difference comparison attribute value in the difference comparison table row resource is determined; the source branch attribute value and the difference comparison attribute value corresponding to the same attribute are compared to determine the difference attribute in the source branch table row resource and the difference comparison table row resource; the fourth difference data between the source branch table and the difference comparison table is obtained based on the difference attribute value; and the difference data between the source branch table and the difference comparison table is obtained based on the third difference data and the fourth difference data.

[0082] Wherein, although the common row in the source branch table and the difference comparison table is consistent in the row name, it does not mean that the corresponding storage content in the common row is consistent.

[0083] Based on this, the source branch table row resource, that is, the virtual engine resource stored in the common row of the source branch table, is determined, and the difference comparison table row resource, that is, the virtual engine resource stored in the common row of the difference comparison table, also needs to be determined.

[0084] The source branch attribute value refers to the attribute value recorded in the source branch table row resource, and the difference comparison attribute value refers to the attribute value recorded in the difference comparison table row resource. For the same attribute, if the source branch attribute value and the difference comparison attribute value are different, it is considered that the source branch attribute value and the difference comparison attribute value belong to the difference attribute value (all difference attribute values constitute the fourth difference data); if the source branch attribute value and the difference comparison attribute value are the same for the same attribute, it is not considered that the source branch attribute value and the difference comparison attribute value belong to the difference attribute value.

[0085] Based on this, after the difference attribute value is determined, the third difference data and the fourth difference data constitute the difference data between the source branch table and the difference comparison table.

[0086] Wherein, it is worth noting that, whether in the conflict resolution mode or in the numerical value merging mode, the resource type of the source branch virtual resource under the source branch can be a table type, and in the embodiment, the first difference data and the second difference data can include the third difference data and / or the fourth difference data.

[0087] FIG. 3 schematically shows a flow diagram of the difference data obtained from the source branch table and the difference comparison table in the processing method of the virtual engine resource of the embodiment of the present disclosure, as shown in FIG. 3, wherein table A is the source branch table, table B is the difference comparison table, A-B represents an added row, B-A represents a deleted row, and A&B represents a common row.

[0088] The GetRowMap interface of the UE engine is used to obtain the row data of the source branch table A and the difference comparison table B, and the common row A&B is traversed to determine the row data of each row in the common row. The reflection mechanism in the UE engine is used to traverse each attribute name in the row data, and the FPropertySoftPath:Resolve interface is used to obtain the attribute value of the row data of each row in the common row to obtain the source branch attribute value and the difference comparison attribute value. For the same attribute, the source branch attribute value and the difference comparison attribute value are traversed to determine whether the source branch attribute value and the difference comparison attribute value are the same, if not, the source branch attribute value and the difference comparison attribute value are determined as the difference attribute value, and finally the difference data is obtained according to the difference attribute value, the added row resource corresponding to the added row, and the deleted row resource corresponding to the deleted row.

[0089] In an optional embodiment, the source-branch virtual engine resource under the source branch includes a source-branch data resource, and the target-branch virtual engine resource under the target branch includes a difference comparison data resource; the method comprises: obtaining a source-branch attribute list corresponding to the source-branch data resource, and obtaining a difference comparison attribute list corresponding to the difference comparison data resource; determining a first attribute object from the source-branch attribute list, and determining a second attribute object from the difference comparison attribute list; comparing the first attribute object and the second attribute object to obtain a difference attribute object, and taking the difference attribute object as difference data between the source-branch data resource and the difference comparison data resource.

[0090] It is worth noting that, regardless of the conflict resolution mode or the numerical combination mode, the source-branch virtual engine resource can also be a pure data type resource, i.e., a source-branch data resource. The target-branch virtual engine resource under the target branch can also be a pure data type resource, i.e., a difference comparison data resource. For example, it can be a DataAsset in the UE resource, used to configure a pure data object.

[0091] For the virtual engine resource of the above resource type, it is necessary to obtain a source-branch attribute list storing attribute objects in the source-branch data resource, and it is also necessary to obtain a difference comparison attribute list storing attribute objects in the difference comparison data resource. Furthermore, all attribute objects recorded in the source-branch data resource (i.e., the first attribute object) are determined from the source-branch attribute list, and all attribute objects recorded in the difference comparison data resource (i.e., the second attribute object) are determined from the difference comparison attribute list. For example, the source-branch attribute list of the DataAsset and the difference comparison attribute list of the DataAsset are obtained. The attribute objects of the source-branch attribute list and the difference comparison attribute list are determined by traversing the source-branch attribute list and the difference comparison attribute list, i.e., the first attribute object and the second attribute object are determined.

[0092] For the same attribute, the first attribute object and the second attribute object are compared. If the first attribute object and the second attribute object are different for the same attribute, it is considered that the first attribute object and the second attribute object belong to the difference attribute object; if the first attribute object and the second attribute object are the same for the same attribute, it is considered that the first attribute object and the second attribute object do not belong to the difference attribute object. Furthermore, the difference attribute object is taken as difference data between the source-branch data resource and the difference comparison data resource.

[0093] Similarly, in this embodiment, the first difference data and the second difference data can each include difference data between the source-branch data resource and the difference comparison data resource.

[0094] In an optional embodiment, the source branch virtual engine resource comprises a source branch data resource, and the target branch virtual engine resource comprises a difference comparison data resource, so that the difference comparison can be performed on the blueprint virtual engine resource and the data type virtual engine resource, and the application scenarios of the difference comparison are expanded.

[0095] In step S140, a difference comparison result is output based on the first difference data and the second difference data; the difference comparison result comprises the source branch and the target branch having the difference.

[0096] In the example embodiment of the present disclosure, after the source branch virtual engine resource and the target branch virtual engine resource are obtained, the source branch virtual engine resource and the target branch virtual engine resource need to be compared, so as to determine the difference between the source branch virtual engine resource and the target branch virtual engine resource, i.e., to obtain the first difference data and the second difference data, and then output the first difference data and the second difference data for subsequent selection.

[0097] In step S150, in response to the selection of the difference comparison result, a branch to be merged is determined from the source branch or the target branch having the difference.

[0098] In an optional embodiment, whether in the conflict resolution mode or in the numerical merging mode, after the difference data (i.e., the first difference data or the second difference data) is obtained, the difference data can be displayed in the virtual resource editor for the user to select. The selected source branch or target branch is the branch to be merged.

[0099] In an optional embodiment, the method further comprises initializing a difference comparison tree of the tree structure, and displaying the difference data in the source branch virtual resource and the difference data in the target branch virtual engine resource corresponding to the target branch as different branches of the difference comparison tree; the difference data comprises the first difference data or the second difference data.

[0100] The difference comparison tree refers to a tree structure for displaying the difference data. After the difference comparison tree is initialized, the difference data belonging to the source branch virtual resource can be displayed in one branch of the difference comparison tree, and the difference data belonging to the target branch virtual engine resource can be displayed in another branch of the difference comparison tree. Finally, the difference data is displayed in the virtual resource editor through the tree structure of the difference comparison tree for the user to select, and the selected branch is the branch to be merged.

[0101] In an optional embodiment, the difference data in the source branch virtual resource and the difference data in the target branch virtual engine resource are displayed as different branches of the difference comparison tree in the virtual resource editor, which helps the user to select the difference data later to solve the conflict between the source branch virtual engine resource and the target branch virtual engine resource.

[0102] In an optional embodiment, in response to the selection of the difference comparison result, the source branch or the target branch with the difference is determined as the to-be-merged branch, including: in response to a selection operation acting on the difference comparison tree, determining the to-be-merged branch corresponding to the selection operation.

[0103] Wherein, the selection operation can be an operation acting on the difference comparison tree, if the user's selection operation acts on the source branch in the difference comparison tree, the source branch is the to-be-merged branch; correspondingly, if the user's selection operation acts on the target branch in the difference comparison tree, the target branch is the to-be-merged branch.

[0104] In an optional embodiment, the selection operation is performed in the difference comparison tree, which helps the user to intuitively, clearly and traversely select the to-be-merged branch.

[0105] In an optional embodiment, updating the virtual engine resource based on the determined to-be-merged branch, including: in response to the virtual resource object corresponding to the to-be-merged branch and the target resource content corresponding to the virtual resource object; replacing the resource content corresponding to the virtual resource object in the local resource with the target resource content.

[0106] Wherein, the difference comparison tree can have multiple branches. The selection operation is an operation acted by the user on the difference comparison tree for selecting the to-be-merged branch from the multiple branches.

[0107] For example, there are 10 pieces of difference data, including difference data for virtual resource object O1, virtual resource object O2, virtual resource object O3, virtual resource object O4 and virtual resource object O5, and for the same virtual resource object, there is one piece of difference data belonging to the source branch virtual engine resource and one piece of difference data belonging to the target branch.

[0108] The user selection for the virtual resource object O1 is the target resource content 01 recorded in the source branch virtual engine resource, the user selection for the virtual resource object O2 is the target resource content 01-2 recorded in the source branch virtual engine resource, the user selection for the virtual resource object O3 is the target resource content 01-21 recorded in the target branch virtual engine resource, the user selection for the virtual resource object O4 is the target resource content 01-33 recorded in the target branch virtual engine resource, and the user selection for the virtual resource object O5 is the target resource content 01-36 recorded in the target branch virtual engine resource.

[0109] Based on this, the resource content corresponding to the virtual resource object O1 in the local resource stored by the resource editor is modified to 01, the resource content corresponding to the virtual resource object O2 is modified to 01-2, the resource content corresponding to the virtual resource object O3 is modified to 01-21, the resource content corresponding to the virtual resource object O4 is modified to 01-33, and the resource content corresponding to the virtual resource object O5 is modified to 01-36.

[0110] In an optional embodiment, according to the selected target resource content, the data of the batch virtual engine resource can be restored (that is, the resource content corresponding to the virtual resource object in the local resource is replaced with the target resource content).

[0111] In the method and device provided in the example embodiments of the present disclosure, the selected target merging mode is determined. According to different target merging modes, the source branch and the target branch of the virtual engine resource to be processed are determined. The source branch and the target branch are compared to obtain first difference data and second difference data, and a difference comparison result is output according to the first difference data and the second difference data, and the virtual engine resource is updated according to the difference comparison result. On the one hand, it is helpful to realize the merging between the virtual engine resource under the source branch and the virtual engine resource under the target branch according to the difference comparison result; on the other hand, it expands the scenarios suitable for determining the difference comparison result, avoiding the situation that the difference comparison can only be performed on the virtual engine resource of the blueprint or pure data type.

[0112] In addition, the code for resolving conflicts between the source branch virtual engine resources and the target branch virtual engine resources can be integrated into a plug-in. First, a blank plug-in is generated in the official manner of UE, and the overall framework code of the tool for resolving conflicts is constructed on the basis of the plug-in. FIG. 4 schematically shows an overall framework diagram of the tool for resolving conflicts in the processing method of the virtual engine resources according to the embodiments of the present disclosure, as shown in FIG. 4, the module definition class FMergeAssistModule of the plug-in is at the top, the SMergeMainPanel class, the IMergeTreeEntry class, the GraphTreeEntry class, the FDataAssetTreeEntry class, the FDataTableTreeEntry class, the FMergeViewManger class, and the FMergeViewSummonerFactory class are responsible for implementing the visual module (for example, performing merge mode selection operations, displaying difference data, and the like in the virtual engine editor); the FMergeAssetManager is responsible for implementing the resource management module; and the FMergeHelpler and the FMergeAssistModel are the resource difference calculation module and the resource merging module that are cooperatively implemented.

[0113] Specifically, the main functions of the resource management module include pulling and loading of the virtual engine resources and the like, and the implementation principle thereof is divided into three layers. FIG. 5 schematically shows a diagram of the resource management module in the processing method of the virtual engine resources according to the embodiments of the present disclosure, as shown in FIG. 5, the API layer is at the bottom, and the API interface of the version control tool is encapsulated here. For example, for the Perforce (P4 for short) version control tool, a class object of the P4 end can be generated by calling the third-party library of P4 to perform coded P4 operations, and thus the API interface of P4 is encapsulated. For example, for the SVN, the API interface can be encapsulated by executing the windows command and sequentially implementing the official document.

[0114] The second layer encapsulates common version control operations, such as conflict virtual engine resource pulling, virtual engine resource pulling of different resource versions, and the like, on the basis of the API. The third layer is closest to the UE and can use the UE interface to read virtual engine resources, manage virtual engine resources, and change the state of virtual engine resources. For example, after a series of version control operations are performed on the source branch virtual engine resource under the source branch and the target branch virtual engine resource under the target branch, a temporary file that we need is generated in the temporary directory of the engine, for example, to compare versions 2 and 3 of a source branch virtual engine resource, the two versions of the source branch virtual engine resource are pulled to the temporary directory, at which time the interface of the UE can be called to load these resources, and the content after loading is managed persistently in the file management module, facilitating the timely acquisition of other modules.

[0115] The resource difference calculation module is configured to calculate differences between the source branch virtual engine resource under the source branch and the target branch virtual engine resource under the target branch to obtain a difference calculation result.

[0116] The resource merging module provides an operation function interface for the visualization module. FIG. 6 schematically shows a schematic diagram of the resource merging module and the visualization module in the virtual engine resource processing method according to an embodiment of the present disclosure. As shown in FIG. 6, the resource merging module includes a UE attribute operation layer configured to write attributes (specifically including blueprint, pure data, and table resource types) of various virtual engine resources, and an interface implementation layer configured to provide the visualization module with an interface (i.e., a write-in interface) for writing attributes of various virtual engine resources and an interface (i.e., a rollback write-in interface) for rolling back writing attributes of various virtual engine resources.

[0117] Specifically, the write-in interface implements the following principle: for attributes included in the UE reflection system, the engine interface FProperty::CopyCompleteValue(void*Dest, void const*Src) is relied on to conveniently copy values of any attribute in the virtual engine resource, and then write attributes of various virtual engine resources. For table type virtual engine resources, additional processing is required, such as using the UDataTable::AddRow interface to add a table row and using the UDataTable::RemoveRow interface to delete a table row.

[0118] The rollback write-in interface implements the following principle: the default write-in value of each piece of difference data (the difference data includes first difference data and / or second difference data) is tracked, such as defaulting to the target branch in the conflict resolution mode and defaulting to the source branch in the value merging mode, and then when the rollback operation is performed, the attribute corresponding to the branch that is defaulted to is written into the local resource.

[0119] The visualization module comprises a tool interface layer for receiving attributes of various virtual engine resources of interface transmission for writing attributes of various virtual engine resources to write the attributes of various virtual engine resources to source branch virtual engine resources, target branch virtual engine resources under target branch or fallback to write local resources.

[0120] FIG. 7 schematically shows a flowchart of a processing method of a virtual engine resource according to an embodiment of the present disclosure. As shown in FIG. 7, first open the virtual editor, and the entry interface of the virtual editor as shown in FIG. 8 will be displayed (in FIG. 8, the touch control 810 can select the virtual engine resource merging mode to determine the target merging mode), and then determine whether the selected target merging mode is the conflict resolution mode.

[0121] If the target merging mode is the conflict resolution mode, input the corresponding address in the input box 820 shown in FIG. 8 to pull the source branch corresponding to the virtual engine resource to be processed, and take the local resource corresponding to the virtual engine resource to be processed as the target branch, and then compare the source branch virtual engine resources under the source branch and the target branch virtual engine resources under the target branch to obtain the first difference data.

[0122] If the target merging mode is not the conflict resolution mode (i.e. the numerical merging mode), input the change list number in the input box 820 shown in FIG. 8, pull the source branch virtual engine resources under the source branch corresponding to the resource version, and take the virtual engine resources corresponding to the target resource version as the target branch virtual engine resources under the target branch to perform difference comparison between the two to obtain the second difference data.

[0123] The first difference data or the second difference data is displayed in the difference comparison tree. According to the selection operation in the difference comparison tree, the branch to be merged is determined, and the target resource content corresponding to the branch to be merged is written to a temporary file. When the save button is clicked, the resource content corresponding to the virtual engine object in the local resource is replaced by the target resource content.

[0124] In addition, in the exemplary embodiment of the present disclosure, a virtual engine resource processing apparatus is also provided. FIG. 9 shows a structural schematic diagram of the virtual engine resource processing apparatus. As shown in FIG. 9, the virtual engine resource processing apparatus 900 can comprise a merging mode determination module 910, a conflict resolution mode module 920, a numerical merging mode module 930, an output difference result module 940, a determination of the branch to be merged module 950, and an update virtual engine resource module 960. Wherein:

[0125] The merge mode determination module 910 is configured to receive a selection operation of a virtual engine resource merge mode, determine a target merge mode corresponding to the merge mode selection operation; wherein the target merge mode includes a conflict resolution mode and a numerical value merge mode; the conflict resolution mode module 920 is configured to, in response to the target merge mode being determined as the conflict resolution mode, acquire a source branch and a target branch of a to-be-processed virtual engine resource, and generate first difference data based on the source branch and the target branch; wherein the target branch is a local branch corresponding to the to-be-processed virtual engine resource; the numerical value merge mode module 930 is configured to, in response to the target merge mode being determined as the numerical value merge mode, acquire a source branch and a target branch of a to-be-processed virtual engine resource, and generate second difference data based on the source branch and the target branch; wherein the target branch is a historical branch corresponding to the source branch; the output difference result module 940 is configured to output a difference comparison result based on the first difference data and / or the second difference data; wherein the difference comparison result includes a source branch and a target branch with differences; the to-be-merged branch determination module 950 is configured to, in response to a selection of the difference comparison result, determine a to-be-merged branch from the source branch or the target branch with differences; and the virtual engine resource update module 960 is configured to update the virtual engine resource based on the determined to-be-merged branch.

[0126] In an exemplary embodiment of the present disclosure, based on the foregoing scheme, in response to the target merge mode being determined as the conflict resolution mode, the conflict resolution mode module 920 includes: a list acquisition module configured to acquire a resource information list; wherein the resource information list records a plurality of to-be-processed virtual engine resources in a conflict state; a first resource pulling module configured to pull a source branch corresponding to the to-be-processed virtual engine resource; wherein a version of a source branch virtual engine resource corresponding to the source branch is a target virtual engine resource version; and a second resource pulling module configured to determine a local virtual engine resource corresponding to the to-be-processed virtual engine resource as a target branch corresponding to the source branch.

[0127] In an example embodiment of the present disclosure, based on the foregoing scheme, in response to the target merge mode being determined as the numerical merge mode, the source branch and the target branch of the virtual engine resource to be processed are obtained, the numerical merge mode module 930 includes: a list number determination module configured to determine a change list number, and obtain a change resource list according to the change list number; wherein the change resource list records a plurality of resource change records corresponding to the virtual engine resource to be processed; a warehouse address determination module configured to determine a resource version and a warehouse address corresponding to each resource change record based on the change resource list; a third resource pulling module configured to pull a plurality of virtual engine resource versions corresponding to the plurality of resource change records respectively according to the resource version and the warehouse address, wherein one virtual engine resource version corresponds to a historical branch of the virtual engine resource to be processed; a source branch determination module configured to determine a historical branch of the virtual engine resource to be processed as the source branch; and a fourth resource pulling module configured to determine the target branch of the virtual engine resource to be processed in the historical branch of the virtual engine resource to be processed according to the virtual engine resource version corresponding to the source branch; wherein the virtual engine resource version corresponding to the target branch is the previous version of the virtual engine resource version corresponding to the source branch.

[0128] In an example embodiment of the present disclosure, based on the foregoing scheme, the warehouse address determination module includes: a mapping relationship determination module configured to determine a version pulling mapping relationship corresponding to the change resource list; wherein the version pulling mapping relationship is a mapping relationship between the warehouse address and the resource version corresponding to the plurality of resource change records respectively; and a resource version warehouse address determination module configured to determine the resource version and the warehouse address corresponding to each resource change record according to the version pulling mapping relationship.

[0129] In an example embodiment of the present disclosure, based on the foregoing scheme, the source branch virtual engine resource under the source branch includes a source branch table, and the target branch virtual engine resource under the target branch includes a difference comparison table, and the apparatus further includes: a first row name determination module configured to determine a first row name corresponding to the source branch table, and determine a second row name corresponding to the difference comparison table; a common row determination module configured to determine, by comparing the first row name and the second row name, an added row of the source branch table relative to the difference comparison table, a deleted row, and a common row with the same first row name and second row name; and a difference comparison result determination module configured to obtain difference data between the source branch table and the difference comparison table based on the added row, the deleted row, and the common row.

[0130] In an example embodiment of the present disclosure, based on the foregoing scheme, the difference comparison result determination module comprises: a first table difference data determination module configured to determine third difference data between the source branch table and the difference comparison table based on the added rows and the deleted rows; a row resource determination module configured to determine source branch table row resources corresponding to the common rows in the source branch table and determine difference comparison table row resources corresponding to the common rows in the difference comparison table based on the common rows; an attribute value determination module configured to determine source branch attribute values in the source branch table row resources and determine difference comparison attribute values in the difference comparison table row resources; an attribute value comparison module configured to compare the source branch attribute values and the difference comparison attribute values corresponding to the same attribute to determine difference attribute values in the source branch table row resources and the difference comparison table row resources; a second table difference data determination module configured to determine fourth difference data between the source branch table and the difference comparison table based on the difference attribute values; and a third table difference data determination module configured to determine difference data between the source branch table and the difference comparison table based on the third difference data and the fourth difference data.

[0131] In an example embodiment of the present disclosure, based on the foregoing scheme, the source branch virtual engine resource under the source branch and the target branch virtual engine resource under the target branch comprise difference comparison data resources, and the method comprises: a list acquisition module configured to acquire a source branch attribute list corresponding to the source branch data resource and acquire a difference comparison attribute list corresponding to the difference comparison data resource; an attribute object acquisition module configured to determine a first attribute object from the source branch attribute list and determine a second attribute object from the difference comparison attribute list; and a comparison attribute object module configured to compare the first attribute object and the second attribute object to obtain a difference attribute object, so as to use the difference attribute object as difference data between the source branch data resource and the difference comparison data resource.

[0132] In an example embodiment of the present disclosure, based on the foregoing scheme, the device further comprises an initialization module configured to initialize a difference comparison tree of the tree structure and display the difference data in the source branch virtual resource corresponding to the source branch and the difference data in the target branch virtual engine resource corresponding to the target branch as different branches of the difference comparison tree; wherein the difference data comprises first difference data or second difference data.

[0133] In an example embodiment of the present disclosure, based on the foregoing scheme, the to-be-merged branch determination module 950 comprises: a response selection operation configured to determine a to-be-merged branch corresponding to a selection operation acting on the difference comparison tree in response to the selection operation.

[0134] In an example embodiment of the present disclosure, based on the foregoing scheme, the virtual engine resource module 960 is updated, including: a target branch selection module configured to respond to the virtual resource object corresponding to the branch to be merged and the target resource content corresponding to the virtual resource object; and a replacement module configured to replace the resource content corresponding to the virtual resource object in the local resource with the target resource content.

[0135] The specific details of the virtual engine resource processing apparatus 900 have been described in detail in the corresponding virtual engine resource processing method, and thus will not be described here again.

[0136] It should be noted that although several modules or units of the virtual engine resource processing apparatus 900 are mentioned in the foregoing detailed description, such division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units.

[0137] In addition, in an example embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.

[0138] The electronic device 1000 according to such an embodiment of the present disclosure will be described below with reference to FIG. 10. FIG. 10 shows the electronic device 1000 as only one example, and should not bring any limitation to the functions and usage range of the embodiments of the present disclosure.

[0139] As shown in FIG. 10, the electronic device 1000 is in the form of a general computing device. The components of the electronic device 1000 can include, but are not limited to, the at least one processing unit 1010 described above, the at least one storage unit 1020 described above, a bus 1030 connecting different system components including the storage unit 1020 and the processing unit 1010, and a display unit 1040.

[0140] The storage unit stores program codes which can be executed by the processing unit 1010, so that the processing unit 1010 performs the steps according to various example embodiments of the present disclosure described in the “example method” part of the present specification.

[0141] The storage unit 1020 can include a readable medium in the form of a volatile storage unit, such as a random access memory (RAM) 1021 and / or a cache memory 1022, and can further include a read-only memory (ROM) 1023.

[0142] The storage unit 1020 can also include a program / utility 1024 having a set (at least one) of program modules 1025, including but not limited to an operating system, one or more application programs, other program modules, and program data, each of which or a combination thereof, can include an implementation of a networking environment.

[0143] The bus 1030 can represent one or more of several types of bus structures, including a storage bus or bus controller, a peripheral bus, a graphics acceleration port, a processor or local bus using any of a variety of bus structures.

[0144] The electronic device 1000 can also communicate with one or more external devices 1070, such as a keyboard or pointing device, using one or more communication interfaces 1050. Communication interfaces 1050 can include, without limitation, a modem, a network interface card (e.g. an Ethernet card), a wireless network interface card, etc. One or more communication interfaces 1050 can enable the electronic device 1000 to communicate with other devices and / or systems. The communication can be via I / O interface 1050. Furthermore, the electronic device 1000 can communicate with one or more networks, such as a local area network (LAN), a general wide area network (WAN), and / or a public network, such as the Internet, via network adapter 1060. As depicted, network adapter 1060 is communicatively coupled to the other components of electronic device 1000 via bus 1030. It should be appreciated that the network adapter 1060 can be implemented as part of the bus 1030, as a separate component, or as an on-board component of the processor(s) 1010. It should be appreciated that other hardware and / or software modules can be used in conjunction with the electronic device 1000. Such modules include, but are not limited to, microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data archival storage systems, etc.

[0145] The processor in the above electronic device, by executing machine executable instructions, can implement the following operations in the above virtual background generation method:

[0146] Receiving a selection operation of a virtual engine resource merge mode, determining a target merge mode corresponding to the merge mode selection operation; wherein the target merge mode includes a conflict resolution mode and a numerical merge mode; in response to the target merge mode being determined as the conflict resolution mode, obtaining a source branch and a target branch of a to-be-processed virtual engine resource, and generating first difference data based on the source branch and the target branch; wherein the target branch is a local branch corresponding to the to-be-processed virtual engine resource; in response to the target merge mode being determined as the numerical merge mode, obtaining a source branch and a target branch of a to-be-processed virtual engine resource, and generating second difference data based on the source branch and the target branch; wherein the target branch is a historical branch corresponding to the source branch; outputting a difference comparison result based on the first difference data and / or the second difference data; wherein the difference comparison result includes the source branch and the target branch with differences; in response to the selection of the difference comparison result, determining a to-be-merged branch from the source branch or the target branch with differences; updating the virtual engine resource based on the determined to-be-merged branch.

[0147] Obtaining a resource information list; wherein the resource information list records a plurality of to-be-processed virtual engine resources in a conflict state; pulling a source branch corresponding to the to-be-processed virtual engine resource; wherein the version of the source branch virtual engine resource corresponding to the source branch is the version of the target virtual engine resource; determining a local virtual engine resource corresponding to the to-be-processed virtual engine resource as a target branch corresponding to the source branch.

[0148] Determining a change list number, and obtaining a change resource list according to the change list number; wherein the change resource list records a plurality of resource change records corresponding to the to-be-processed virtual engine resource; determining a resource version and a repository address corresponding to each resource change record based on the change resource list; pulling a plurality of virtual engine resource versions corresponding to the plurality of resource change records respectively according to the resource version and the repository address, wherein one virtual engine resource version corresponds to one historical branch of the to-be-processed virtual engine resource; determining one historical branch of the to-be-processed virtual engine resource as a source branch; determining a target branch of the to-be-processed virtual engine resource in the historical branch of the to-be-processed virtual engine resource according to the virtual engine resource version corresponding to the source branch; wherein the virtual engine resource version corresponding to the target branch is the previous version of the virtual engine resource version corresponding to the source branch.

[0149] Determining a version pull mapping relationship corresponding to the change resource list; wherein the version pull mapping relationship is a mapping relationship between the repository address and the resource version corresponding to the plurality of resource change records respectively; determining the resource version and the repository address corresponding to each resource change record according to the version pull mapping relationship.

[0150] determine a first row name corresponding to the source branch table and a second row name corresponding to the difference comparison table; determine, by comparing the first row name and the second row name, an added row, a deleted row and a common row with the same first row name and second row name of the source branch table relative to the difference comparison table; and obtain difference data between the source branch table and the difference comparison table based on the added row, the deleted row and the common row.

[0151] obtain third difference data between the source branch table and the difference comparison table based on the added row and the deleted row; determine source branch table row resources corresponding to the common row in the source branch table and difference comparison table row resources corresponding to the common row in the difference comparison table based on the common row; determine source branch attribute values in the source branch table row resources and difference comparison attribute values in the difference comparison table row resources; compare the source branch attribute values and the difference comparison attribute values corresponding to the same attribute to determine difference attribute values in the source branch table row resources and the difference comparison table row resources; obtain fourth difference data between the source branch table and the difference comparison table based on the difference attribute values; and obtain difference data between the source branch table and the difference comparison table based on added row resources corresponding to the added row, deleted row resources corresponding to the deleted row and the difference attribute.

[0152] obtain a source branch attribute list corresponding to the source branch data resource and a difference comparison attribute list corresponding to the difference comparison data resource; determine a first attribute object from the source branch attribute list and a second attribute object from the difference comparison attribute list; compare the first attribute object and the second attribute object to obtain a difference attribute object, and use the difference attribute object as difference data between the source branch data resource and the difference comparison data resource.

[0153] initialize a difference comparison tree of a tree structure, and display difference data in a source branch virtual resource corresponding to a source branch and difference data in a target branch virtual engine resource corresponding to a target branch as different branches of the difference comparison tree; wherein the difference data includes first difference data or second difference data.

[0154] determine a to-be-merged branch corresponding to a selection operation acting on the difference comparison tree in response to the selection operation.

[0155] replace resource content corresponding to a virtual resource object of the to-be-merged branch with target resource content corresponding to the virtual resource object.

[0156] Those skilled in the art can easily understand from the above description of the embodiments that the example embodiments described herein can be implemented by software or by software in combination with necessary hardware. Therefore, the technical solutions according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a U disk, a mobile hard disk, etc.) or a network, and includes a plurality of instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to perform the method according to the embodiments of the present disclosure.

[0157] The example embodiments of the present disclosure also provide a computer program product. The computer program product includes a computer program which, when executed by a processor, implements the processing method of the virtual engine resource.

[0158] In an embodiment, the computer program product can be a tangible product containing the computer program, such as a computer-readable storage medium storing the computer program. The readable storage medium can be a storage medium based on electrical, magnetic, optical, electromagnetic, infrared, etc. signals, including but not limited to: random access memory (RAM), read-only memory (ROM), magnetic tape, floppy disk, flash memory (Flash), mechanical hard disk (HDD), solid state disk (SSD), etc. For example, the computer program product can be implemented as a non-volatile storage medium storing the computer program, such as a read-only memory, a NAND flash memory, etc.

[0159] In an embodiment, the computer program product can be an intangible product containing the computer program. For example, the computer program product can be implemented as a virtual digital product, such as an executable file, an installation package, etc. digital file storing the computer program.

[0160] The code of the computer program can be written in one or more programming languages. Programming languages such as C, Java, C++, etc. The program code can be executed entirely on the user computing device, or partially on the user computing device, or as a separate software package, or partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case involving a remote computing device, the remote computing device can be connected to the user computing device through any kind of network, such as a local area network (LAN), a wide area network (WAN), etc., or can be connected to an external computing device (for example, through an Internet connection provided by an operator).

[0161] The computer program can be carried or transmitted by electrical, magnetic, optical, electromagnetic, infrared, or the like signals. The electronic device can convert the signal carrying the computer program into a digital signal, and then run the computer program. When the computer program runs on the electronic device, its code is used to make the electronic device execute (more specifically, can make the processor of the electronic device execute) the method steps of various exemplary embodiments of the present disclosure, such as the processing method of the virtual engine resource described above, which includes the following steps: receiving a selection operation of a virtual engine resource merging mode, determining a target merging mode corresponding to the merging mode selection operation; wherein the target merging mode includes a conflict resolution mode and a numerical merging mode; in response to the target merging mode being determined as the conflict resolution mode, obtaining a source branch and a target branch of a virtual engine resource to be processed, and generating first difference data based on the source branch and the target branch; wherein the target branch is a local branch corresponding to the virtual engine resource to be processed; in response to the target merging mode being determined as the numerical merging mode, obtaining a source branch and a target branch of a virtual engine resource to be processed, and generating second difference data based on the source branch and the target branch; wherein the target branch is a historical branch corresponding to the source branch; outputting a difference comparison result based on the first difference data and / or the second difference data; wherein the difference comparison result includes the source branch and the target branch with differences; in response to the selection of the difference comparison result, determining a merging branch to be merged from the source branch or the target branch with differences; updating the virtual engine resource based on the determined merging branch to be merged.

[0162] The above method steps are executed by the computer program to determine the selected target merging mode. According to different target merging modes, the source branch and the target branch of the virtual engine resource to be processed are determined. The source branch and the target branch are compared to obtain first difference data and second difference data, and the difference comparison result is output according to the first difference data and the second difference data, and then the virtual engine resource is updated according to the difference comparison result. On the one hand, it helps to realize the merging between the source branch virtual engine resource under the source branch and the target branch virtual engine resource under the target branch according to the difference comparison result; on the other hand, it expands the scenarios suitable for determining the difference comparison result, avoiding the situation that only the virtual engine resource of the blueprint or the pure data class can be compared.

[0163] In addition, its code can also make the electronic device execute the following steps:

[0164] Obtain a resource information list; wherein the resource information list records a plurality of virtual engine resources to be processed in a conflict state; pull a source branch corresponding to the virtual engine resource to be processed; wherein the version of the source branch virtual engine resource corresponding to the source branch is the version of the target virtual engine resource; determine a local virtual engine resource corresponding to the virtual engine resource to be processed as a target branch corresponding to the source branch.

[0165] determine a change list number, and obtain a change resource list according to the change list number; the change resource list records a plurality of resource change records corresponding to the to-be-processed virtual engine resource; determine a resource version and a repository address corresponding to each resource change record based on the change resource list; pull a plurality of virtual engine resource versions corresponding to the plurality of resource change records respectively according to the resource version and the repository address, wherein one virtual engine resource version corresponds to one historical branch of the to-be-processed virtual engine resource; determine one historical branch of the to-be-processed virtual engine resource as a source branch; determine a target branch of the to-be-processed virtual engine resource in the historical branch of the to-be-processed virtual engine resource according to the virtual engine resource version corresponding to the source branch; wherein the virtual engine resource version corresponding to the target branch is the previous version of the virtual engine resource version corresponding to the source branch.

[0166] determine a version-pull mapping relationship corresponding to the change resource list; the version-pull mapping relationship is a mapping relationship between the repository address and the resource version corresponding to the plurality of resource change records respectively; determine the resource version and the repository address corresponding to each resource change record according to the version-pull mapping relationship.

[0167] determine a first row name corresponding to the source branch table and a second row name corresponding to the difference comparison table; determine an added row, a deleted row, and a common row with the same first row name and second row name of the source branch table relative to the difference comparison table by comparing the first row name and the second row name; obtain difference data between the source branch table and the difference comparison table based on the added row, the deleted row, and the common row.

[0168] obtain third difference data between the source branch table and the difference comparison table based on the added row and the deleted row; determine a source branch table row resource corresponding to the common row in the source branch table and a difference comparison table row resource corresponding to the common row in the difference comparison table based on the common row; determine a source branch attribute value in the source branch table row resource and a difference comparison attribute value in the difference comparison table row resource; compare the source branch attribute value and the difference comparison attribute value corresponding to the same attribute to determine a difference attribute value in the source branch table row resource and the difference comparison table row resource; obtain fourth difference data between the source branch table and the difference comparison table based on the difference attribute value; and obtain difference data between the source branch table and the difference comparison table based on the added row resource corresponding to the added row, the deleted row resource corresponding to the deleted row, and the difference attribute.

[0169] The source branch attribute list corresponding to the source branch data resource is acquired, and a difference comparison attribute list corresponding to the difference comparison data resource is acquired; a first attribute object is determined from the source branch attribute list, and a second attribute object is determined from the difference comparison attribute list; a difference attribute object is obtained by comparing the first attribute object and the second attribute object, and the difference attribute object is taken as difference data between the source branch data resource and the difference comparison data resource.

[0170] The difference comparison tree of the tree structure is initialized, and the difference data in the source branch virtual resource corresponding to the source branch and the difference data in the target branch virtual engine resource corresponding to the target branch are displayed as different branches of the difference comparison tree; wherein the difference data includes first difference data or second difference data.

[0171] The difference comparison tree of the tree structure is initialized, and the difference data in the source branch virtual resource corresponding to the source branch and the difference data in the target branch virtual engine resource corresponding to the target branch are displayed as different branches of the difference comparison tree.

[0172] In response to a selection operation acting on the difference comparison tree, a to-be-merged branch corresponding to the selection operation is determined.

[0173] In response to a virtual resource object corresponding to the to-be-merged branch and target resource content corresponding to the virtual resource object, resource content corresponding to the virtual resource object in the local resource is replaced by the target resource content.

[0174] Referring to FIG. 11, a program product 1100 for implementing the above method according to an embodiment of the present application is described, which can adopt a portable compact disc read-only memory (CD-ROM) and include program code, and can run on a terminal device such as a personal computer. However, the program product of the present application is not limited to this, and in this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, device or apparatus.

[0175] The program product can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can be, for example but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or apparatus, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include an electrical connection having one or more wires, a portable disc, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0176] A computer readable signal medium can include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated signal can take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium can be any computer readable medium that can be

[0177] A computer readable medium storing the program code can be transmitted or received over any suitable medium, including but not limited to wireless, wired, optical fiber cable, RF, or any suitable combination thereof.

[0178] The program code for carrying out operations of the present application can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++, or the like, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computing device, partly on the user's computing device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device or entirely on the remote computing device or server. In the latter scenario, the remote computing device can be connected to the user's computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computing device, such as through the Internet using an Internet Service Provider. The application can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device.

[0179] Other embodiments of the present disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. This application is intended to cover any variations, uses, or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice in the art to which the application pertains. It is intended that the specification and examples be considered exemplary only, with the true scope and spirit of the application being indicated by the following claims.

Claims

1. A method for processing virtual engine resources, the method comprising: receiving a selection operation of a virtual engine resource merge mode, and determining a target merge mode corresponding to the merge mode selection operation; wherein the target merge mode comprises a conflict resolution mode and a numerical merge mode; in response to the target merge mode being determined as the conflict resolution mode, obtaining a source branch and a target branch of a virtual engine resource to be processed, and generating first difference data based on the source branch and the target branch; wherein the target branch is a local branch corresponding to the virtual engine resource to be processed; in response to the target merge mode being determined as the numerical merge mode, obtaining a source branch and a target branch of a virtual engine resource to be processed, and generating second difference data based on the source branch and the target branch; wherein the target branch is a historical branch corresponding to the source branch; outputting a difference comparison result based on the first difference data and / or the second difference data; wherein the difference comparison result comprises a source branch and a target branch with differences; in response to a selection of the difference comparison result, determining a branch to be merged from the source branch or the target branch with differences; updating the virtual engine resource based on the determined branch to be merged.

2. The method of claim 1, wherein, The response to the target merge mode being determined as the conflict resolution mode, obtaining a source branch and a target branch of a virtual engine resource to be processed, comprises: obtaining a resource information list; wherein the resource information list records a plurality of virtual engine resources to be processed in a conflict state; pulling a source branch corresponding to the virtual engine resource to be processed; wherein the version of the source branch virtual engine resource corresponding to the source branch is a target virtual engine resource version; determining a local virtual engine resource corresponding to the virtual engine resource to be processed as a target branch corresponding to the source branch.

3. The method of claim 1, wherein, The response to the target merge mode being determined as the numerical merge mode, obtaining a source branch and a target branch of a virtual engine resource to be processed, comprises: determining a change list number, and obtaining a change resource list according to the change list number; wherein the change resource list records a plurality of resource change records corresponding to the virtual engine resource to be processed; determining a resource version and a repository address corresponding to each resource change record based on the change resource list; pulling a plurality of virtual engine resource versions corresponding to the plurality of resource change records respectively according to the resource version and the repository address; wherein one virtual engine resource version corresponds to a historical branch of the virtual engine resource to be processed; determining a historical branch of the virtual engine resource to be processed as a source branch; determining a target branch of the virtual engine resource to be processed in the historical branch of the virtual engine resource to be processed according to a virtual engine resource version corresponding to the source branch; wherein the virtual engine resource version corresponding to the target branch is a previous version of the virtual engine resource version corresponding to the source branch.

4. The method of claim 3, wherein, The determination of a resource version and a repository address corresponding to each resource change record based on the change resource list comprises: determine a version-pull mapping relationship corresponding to the change resource list, wherein the version-pull mapping relationship is a mapping relationship between repository addresses and resource versions corresponding to the plurality of resource change records respectively; determine, according to the version-pull mapping relationship, a resource version and a repository address corresponding to each of the resource change records.

5. The method of claim 1, wherein, The source branch virtual engine resource under the source branch includes a source branch table, and the target branch virtual engine resource under the target branch includes a difference comparison table. The method comprises: determining a first row name corresponding to the source branch table and a second row name corresponding to the difference comparison table; determining, by comparing the first row name and the second row name, an added row, a deleted row of the source branch table relative to the difference comparison table, and a common row with the same first row name and second row name; obtaining difference data between the source branch table and the difference comparison table based on the added row, the deleted row, and the common row.

6. The method of claim 5, wherein, The method comprises: obtaining third difference data between the source branch table and the difference comparison table based on the added row and the deleted row; determining source branch table row resources corresponding to the common row in the source branch table and determining difference comparison table row resources corresponding to the common row in the difference comparison table based on the common row; determining source branch attribute values in the source branch table row resources and difference comparison attribute values in the difference comparison table row resources; comparing the source branch attribute values and the difference comparison attribute values corresponding to the same attribute to determine difference attribute values in the source branch table row resources and the difference comparison table row resources; obtaining fourth difference data between the source branch table and the difference comparison table based on the difference attribute values; obtaining difference data between the source branch table and the difference comparison table based on the third difference data and the fourth difference data.

7. The method of claim 1, wherein, The source branch virtual engine resource under the source branch includes source branch data resources, and the target branch virtual engine resource under the target branch includes difference comparison data resources. The method further comprises: obtaining a source branch attribute list corresponding to the source branch data resources and a difference comparison attribute list corresponding to the difference comparison data resources; determining a first attribute object from the source branch attribute list and a second attribute object from the difference comparison attribute list; obtaining a difference attribute object by comparing the first attribute object and the second attribute object, so as to take the difference attribute object as difference data between the source branch data resources and the difference comparison data resources.

8. The method of claim 1, wherein, The method further comprises: The difference comparison tree of the initialized tree structure is displayed, and difference data in the source branch virtual resource corresponding to the source branch and difference data in the target branch virtual engine resource corresponding to the target branch are displayed as different branches of the difference comparison tree; wherein the difference data includes the first difference data or the second difference data.

9. The method of claim 8, wherein, The response to the selection of the difference comparison result includes: In response to the selection of the difference comparison result, a to-be-merged branch is determined from the source branch or the target branch with differences.

10. The method of claim 9, wherein, In response to the selection operation on the difference comparison tree, a to-be-merged branch corresponding to the selection operation is determined. The virtual engine resource is updated based on the determined to-be-merged branch, including: The virtual resource object corresponding to the to-be-merged branch and the target resource content corresponding to the virtual resource object are determined. The resource content in the local resource corresponding to the virtual resource object is replaced with the target resource content.

11. A virtual engine resource processing apparatus, the apparatus comprising: A merge mode determination module configured to receive a selection operation of a virtual engine resource merge mode and determine a target merge mode corresponding to the merge mode selection operation; wherein the target merge mode includes a conflict resolution mode and a numerical merge mode; A conflict resolution mode module configured to, in response to the target merge mode being determined as the conflict resolution mode, acquire a source branch and a target branch of a to-be-processed virtual engine resource and generate first difference data based on the source branch and the target branch; wherein the target branch is a local branch corresponding to the to-be-processed virtual engine resource; A numerical merge mode module configured to, in response to the target merge mode being determined as the numerical merge mode, acquire a source branch and a target branch of a to-be-processed virtual engine resource and generate second difference data based on the source branch and the target branch; wherein the target branch is a historical branch corresponding to the source branch; An output difference result module configured to output a difference comparison result based on the first difference data and / or the second difference data; wherein the difference comparison result includes a source branch and a target branch with differences; A to-be-merged branch determination module configured to, in response to the selection of the difference comparison result, determine a to-be-merged branch from the source branch or the target branch with differences; An updated virtual engine resource module configured to update the virtual engine resource based on the determined to-be-merged branch.

12. An electronic device comprising: A processor; A memory for storing executable instructions of the processor; 13. A computer program product comprising a computer program, characterized in that, Wherein the processor is configured to execute the virtual engine resource processing method of any one of claims 1-10 via execution of the executable instructions. The computer program is executed by the processor to implement the virtual engine resource processing method of any one of claims 1-10. The computer program is executed by the processor to implement the virtual engine resource processing method of any one of claims 1-10.

Citation Information

Patent Citations

  • Method and device for generating update package and data updating method and device

    CN115934119A

  • Resource bundle processing method and device, electronic equipment, storage medium and product

    CN116069381A

  • Resource updating method, related device, equipment and storage medium

    CN116943225A

  • Virtual engine resource processing method and device, program product and electronic equipment

    CN118505942A

  • Machine learning driven resource allocation

    US20200171382A1