A resource merging method, apparatus, device, and storage medium

CN117282108BActive Publication Date: 2026-09-15NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311302231.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-09
Publication Date
2026-09-15
Estimated Expiration
2043-10-09

AI Technical Summary

Technical Problem

[0005]本发明的目的在于,针对上述现有技术中的不足,本申请提供了一种资源合并方法、装置、设备及存储介质,以解决现有技术中合并效率低等问题

Benefits of technology

[0078]This application provides a resource merging method, apparatus, device, and storage medium. The method obtains a resource merging request for a preset application, the request including: development branch information and the identifier of the target requirement; based on the development branch information, obtains the identifier of the source branch and the identifier of the target branch; based on the identifier of the source branch and the identifier of the target requirement, generates a first list of resource modification files for the target requirement under the source branch; based on the first list of resource modification files, searches for associated files of each first resource file in the resource file directories of the source and target branches, generating a target associated file list; based on the first list of resource modification files and the target associated file list, generates a second list of resource modification files; based on the second list of resource modification files, merges the source and target branches to obtain the target resource file directory of the preset application on the target branch. Thus, through a pre-set merging process, the merging is completed automatically, reducing manual intervention; through association analysis, the files to be merged are accurately obtained, ensuring the integrity and correctness of the merged resources; it does not depend on a single merging command, supports long-term development branches, and improves merging efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117282108B_ABST
    Figure CN117282108B_ABST
Patent Text Reader

Abstract

The application provides a resource merging method and device, equipment and storage medium, and relates to the technical field of data management. A resource merging request for a preset application program is acquired; according to development branch information, the identification of a source branch and the identification of a target branch are acquired; according to the identification of the source branch and the identification of the target demand, a first resource change file list for the target demand under the source branch is generated; according to the first resource change file list, the associated files of each first resource file in the first resource change file list are found from the resource file directories of the source branch and the target branch, and a target associated file list is generated; according to the first resource change file list and the target associated file list, a second resource change file list is generated; and according to the second resource change file list, the source branch and the target branch are merged to obtain a target resource file directory of the preset application program in the target branch. Thus, the merging efficiency and accuracy are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data management technology, and more specifically, to a resource merging method, apparatus, device, and storage medium. Background Technology

[0002] SVN (Subversion) is a version control system. When using SVN to assist in game development, branching strategies are employed to manage and organize code and resources. Branching plays a crucial role in SVN, allowing development teams to work in parallel on different tasks or features. A typical branching strategy consists of three main directories: Trunk: The main development line, usually containing the latest development code and art assets. Branches: When new features need to be developed or bugs fixed, a new branch is usually created from the trunk. After development is complete, this branch is merged back into the trunk. Tags: Markups for specific versions of the code, typically used for publishing or saving specific versions.

[0003] In actual game development, especially in version control of art assets, SVN's branching strategy is not ideal. Due to the special nature of art assets—numerous binary files, huge size, and complex relationships—conflicts and errors are prone to occur during the process of merging branches back into the trunk. This requires high operational skills from developers, and error handling is very complex, reducing overall work efficiency.

[0004] Existing branch merging solutions are primarily based on the svn merge command. For smaller projects with fewer changes, or when communication and collaboration among team members are smooth, this merging solution can generally meet the needs. However, as project size increases, or the number of parallel development tasks grows, problems such as merge conflicts, operational complexity, difficulty in determining an accurate merge list, and lack of support for long-term development can easily arise. Summary of the Invention

[0005] The purpose of this invention is to address the shortcomings of the prior art by providing a resource merging method, apparatus, device, and storage medium to solve problems such as low merging efficiency in the prior art.

[0006] To achieve the above objectives, the technical solutions adopted in the embodiments of this application are as follows:

[0007] In a first aspect, embodiments of this application provide a resource merging method, the method comprising:

[0008] Obtain a resource merge request for a preset application, the resource merge request including: development branch information and the identifier of the target requirement;

[0009] Based on the development branch information, obtain the identifier of the source branch and the identifier of the target branch;

[0010] Based on the identifier of the source branch and the identifier of the target requirement, generate a first list of resource modification files for the target requirement under the source branch;

[0011] Based on the first resource modification file list, search for the associated files of each first resource file in the first resource modification file list from the resource file directories of the source branch and the target branch, and generate a target associated file list;

[0012] A second list of resource modification files is generated based on the first list of resource modification files and the target associated file list;

[0013] Based on the second list of modified resource files, the source branch and the target branch are merged to obtain the target resource file directory of the preset application on the target branch.

[0014] Optionally, generating a first list of resource modification files for the target requirement under the source branch, based on the identifier of the source branch and the identifier of the target requirement, includes:

[0015] Based on the identifier of the source branch, retrieve the commit records of multiple versions under the source branch;

[0016] Based on the identifier of the target requirement, determine multiple target submission records with the identifier of the target requirement from the multiple versions of submission records;

[0017] Based on the version numbers of the multiple target commit records, obtain the resource file paths corresponding to the multiple target commit records;

[0018] Based on the resource file paths corresponding to the multiple target submission records, a first list of resource modification files for the target requirements is generated.

[0019] Optionally, after determining, based on the identifier of the target requirement, a plurality of target commit records having the identifier of the target requirement from the plurality of commit records, the method further includes:

[0020] The largest version number of the multiple target commit records is determined as the current version number of the resource file directory of the source branch.

[0021] Optionally, the step of searching for associated files of each first resource file in the first resource modification file list from the resource file directories of the source branch and the target branch, based on the first resource modification file list, and generating a target associated file list, includes:

[0022] Based on the resource files in the resource file directories of the source branch and the target branch, construct a reference mapping table for all resource files;

[0023] Based on the first list of modified resource files, the reference mapping table of all resource files is used to search for the associated files of the first resource files in the resource file directories of the source branch and the target branch, and generate the target associated file list.

[0024] Optionally, constructing a reference mapping table for all resource files based on the resource files in the resource file directories of the source branch and the target branch includes:

[0025] Perform dependency analysis on the resource files in the resource file directories of the source branch and the target branch to generate a dependency mapping table for all resource files;

[0026] The dependency mapping table of all resource files is reverse-engineered to obtain the reference mapping table of all resource files.

[0027] Optionally, the reference mapping relationship of each resource file includes: multiple mapping tables for each resource file, each mapping table having corresponding reference attribute information;

[0028] The step of generating the target associated file list by searching for the associated files of the first resource file in the resource file directories of the source branch and the target branch, based on the first resource modification file list and using the reference mapping table of all resource files, includes:

[0029] Based on the first list of modified resource files, generate attribute information for each of the first resource files;

[0030] Based on the attribute information of each first resource file and the reference attribute information corresponding to the reference mapping table of all resource files, the resource file with the attribute information of the first resource file is searched from all resource files as the associated file of the first resource file;

[0031] The target associated file list is generated based on the identifier of the associated file of the first resource file.

[0032] Optionally, the reference mapping table for each resource file includes: multiple mapping tables for each resource file, each mapping table having a corresponding preset operation type and preset resource type;

[0033] The attribute information of each of the first resource files includes: the attribute information of the target resource type and the attribute information of the target operation type of each of the first resource files;

[0034] The step of searching among all resource files for a resource file that has the attribute information of the first resource file as an associated file of the first resource file, based on the attribute information of each first resource file and the reference attribute information corresponding to the reference mapping table of all resource files, includes:

[0035] Based on the attribute information of the target resource type and the attribute information of the target operation type of each first resource file, and the reference mapping table of each resource file, the resource file with the attribute information of the first resource file is searched from all resource files as the associated file of the first resource file.

[0036] Optionally, generating a second resource modification file list based on the first resource modification file list and the target associated file list includes:

[0037] The resource files in the first list of modified resource files and the target associated file list are merged to generate an initial list of modified resource files;

[0038] Obtain the summary information and current version number of each candidate resource file in the initial resource modification file list;

[0039] Based on the summary information and current version number of each candidate resource file, determine the resource file to be merged from each candidate resource file;

[0040] Based on the resource files to be merged, generate the second list of resource modification files.

[0041] Optionally, obtaining the summary information and current version number of each candidate resource file in the initial resource modification file list includes:

[0042] Based on the identifiers of each candidate resource file, the summary information and current version number of each candidate resource file are obtained from the corresponding file paths in the resource file directories of the source branch and the target branch.

[0043] Optionally, determining the resource file to be merged from the candidate resource files based on the summary information and current version number of each candidate resource file includes:

[0044] Based on the summary information of each candidate resource file, determine whether each candidate resource file has been modified;

[0045] If the target candidate resource file has been modified, the historical version number of the target candidate resource file is obtained from the version database of the preset application.

[0046] Compare the historical version number and the current version number of the target candidate resource file;

[0047] If the current version number of the target candidate resource file is greater than the historical version number, then the target candidate resource file is determined to be the resource file to be merged.

[0048] Optionally, merging the source branch and the target branch according to the second list of modified resource files to obtain the target resource file directory of the preset application on the target branch includes:

[0049] Determine the operation type for each second resource file in the second resource modification file list;

[0050] Based on the operation type of the second resource file, the source branch and the target branch are merged using the merging method corresponding to the operation type to obtain the target resource file directory of the preset application in the target branch.

[0051] Optionally, determining the operation type of each of the second resource files in the second resource modification file list includes:

[0052] Determine the file paths of each of the second resource files in the second resource modification file list in the resource file directories of the source branch and the target branch, respectively;

[0053] If the second resource file has a file path in the resource file directory of the source branch but not in the resource file directory of the target branch, then the operation type of the second resource file is determined to be an add type.

[0054] If the second resource file has a file path in the resource file directory of the source branch and also has a file path in the resource file directory of the target branch, then the operation type of the second resource file is determined to be modification type.

[0055] If the second resource file does not exist in the resource file directory of the source branch, then the operation type of the second resource file is determined to be deletion.

[0056] Optionally, the step of merging the source branch and the target branch according to the operation type of the second resource file, using the merging method corresponding to the operation type, to obtain the target resource file directory of the preset application on the target branch, includes:

[0057] If the operation type of the second resource file is add type, then copy the second resource file to the resource file directory of the target branch; or.

[0058] If the operation type of the second resource file is modification, then update the second resource file to the resource file directory of the target branch; or.

[0059] If the operation type for the second resource file is deletion, then the second resource file is deleted from the resource file directory of the target branch.

[0060] Optionally, the method further includes:

[0061] The target resource file directory is synchronized to the first database of the preset application.

[0062] Optionally, the method further includes:

[0063] Based on the second resource modification file list, store the file identifier, branch information, and version number of each second resource file in the second database.

[0064] Optionally, the method further includes:

[0065] Based on the second list of modified resource files, retrieve the historical merge version number from the second database;

[0066] Based on the historical merge version number and the current version number of the resource file directory of the source branch, determine the modification requirement identifier of each second resource file;

[0067] A list of affected files is generated based on the modification requirement identifiers of each of the second resource files and the identifiers of each of the second resource files.

[0068] Secondly, embodiments of this application provide a resource merging apparatus, the apparatus comprising:

[0069] The first acquisition module is used to acquire a resource merging request for a preset application. The resource merging request includes: development branch information and the identifier of the target requirement.

[0070] The second acquisition module is used to acquire the identifier of the source branch and the identifier of the target branch based on the development branch information.

[0071] The first generation module is used to generate a first resource modification file list for the target requirement under the source branch based on the identifier of the source branch and the identifier of the target requirement;

[0072] The search module is used to search for the associated files of each first resource file in the first resource modification file list from the resource file directories of the source branch and the target branch, based on the first resource modification file list, and generate a target associated file list;

[0073] The second generation module is used to generate a second resource modification file list based on the first resource modification file list and the target associated file list;

[0074] The merging module is used to merge the source branch and the target branch according to the second list of modified resource files, so as to obtain the target resource file directory of the preset application in the target branch.

[0075] Thirdly, embodiments of this application provide an electronic device, including: a processor, a storage medium, and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of a resource merging method as described in any one of the first aspects.

[0076] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of a resource merging method as described in any one of the first aspects.

[0077] Compared with the prior art, this application has the following beneficial effects:

[0078] This application provides a resource merging method, apparatus, device, and storage medium. The method obtains a resource merging request for a preset application, the request including: development branch information and the identifier of the target requirement; based on the development branch information, obtains the identifier of the source branch and the identifier of the target branch; based on the identifier of the source branch and the identifier of the target requirement, generates a first list of resource modification files for the target requirement under the source branch; based on the first list of resource modification files, searches for associated files of each first resource file in the resource file directories of the source and target branches, generating a target associated file list; based on the first list of resource modification files and the target associated file list, generates a second list of resource modification files; based on the second list of resource modification files, merges the source and target branches to obtain the target resource file directory of the preset application on the target branch. Thus, through a pre-set merging process, the merging is completed automatically, reducing manual intervention; through association analysis, the files to be merged are accurately obtained, ensuring the integrity and correctness of the merged resources; it does not depend on a single merging command, supports long-term development branches, and improves merging efficiency and accuracy. Attached Figure Description

[0079] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0080] Figure 1 A flowchart illustrating a resource merging method provided in this application;

[0081] Figure 2 This application also provides a flowchart illustrating a method for generating a first resource modification file list;

[0082] Figure 3 This application also provides a flowchart illustrating a method for generating a list of target associated files;

[0083] Figure 4 A flowchart illustrating a method for constructing a reference mapping table provided in this application;

[0084] Figure 5 A flowchart illustrating a method for generating a target associated file list using a mapping table, as provided in this application;

[0085] Figure 6 This application also provides a flowchart illustrating a method for generating a second list of resource modification files;

[0086] Figure 7 This application also provides a flowchart illustrating a method for determining resource files to be merged;

[0087] Figure 8 This application also provides a flowchart illustrating a method for merging a list of modified files based on a second resource;

[0088] Figure 9 A flowchart illustrating a method for determining the operation type provided in this application;

[0089] Figure 10 A flowchart illustrating a method for generating a list of impact files provided in this application;

[0090] Figure 11 A schematic diagram of a resource merging device provided in an embodiment of this application;

[0091] Figure 12 This is a schematic diagram of an electronic device provided in an embodiment of this application.

[0092] Icons: 1101-First Acquisition Module, 1102-Second Acquisition Module, 1103-First Generation Module, 1104-Search Module, 1105-Second Generation Module, 1106-Merge Module, 1201-Processor, 1202-Storage Medium. Detailed Implementation

[0093] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. The components of the embodiments of the present application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0094] Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0095] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0096] Furthermore, the terms "first" and "second" are used only to distinguish descriptions and should not be interpreted as indicating or implying relative importance.

[0097] It should be noted that, where there is no conflict, the features in the embodiments of the present invention can be combined with each other.

[0098] To accurately achieve resource merging, this application provides a resource merging method, apparatus, device, and storage medium.

[0099] It should be noted that the special effects generation method provided in this application is based on the SVN control system.

[0100] The following specific examples illustrate a resource merging method provided in this application. Figure 1 This is a flowchart illustrating a resource merging method provided in this application. The executing entity of this method can be an electronic device (or a server). This electronic device can be a device with computing processing capabilities, such as a desktop computer or laptop computer, and it has an SVN system installed on it. Figure 1 As shown, the method includes:

[0101] S101. Obtain resource merging requests for the preset application.

[0102] The resource merge request includes: development branch information and the identifier of the target requirement.

[0103] For example, the default application is an application currently under development. When a user needs to merge resources, they can enter a resource merge request in the default visual dialogue interface to trigger the merge. A chatbot is pre-configured in the default visual dialogue interface. After successfully receiving a resource merge request for the default application, the chatbot replies with a success message in the default visual dialogue interface.

[0104] For example, the task initiator sends a resource merge request through a pre-defined visual dialogue interface. This request clearly indicates the development branch information and the identifier of the target requirement. For instance, the resource merge request might be "merge trunk3#103258", the development branch information is "trunk3", and the target requirement identifier is "103258". After receiving the resource merge request, the chatbot's backend interface forwards it to the continuous integration platform of the electronic device for resource merging. The development branch information includes both "trunk" and "branch" information.

[0105] For example, instead of using a preset visual dialog interface, you can directly trigger a resource merging request for a preset application by inputting commands. Examples include text commands and voice commands.

[0106] Thus, by simplifying triggering instructions and automating processes, task initiators can more easily initiate resource merging requests using chatbots, thereby improving work efficiency.

[0107] S102. Based on the development branch information, obtain the identifier of the source branch and the identifier of the target branch.

[0108] The development branch information indicates the source branch and target branch for this merge request.

[0109] For example, the development branch information is "trunk3". By identifying the two ends of the "trunk3" path and the direction of data transfer, the source branch and the target branch can be determined. Obtaining the identifiers of the source branch and the target branch makes it easier to call the source branch and the target branch in subsequent steps.

[0110] S103. Based on the identifier of the source branch and the identifier of the target requirement, generate a list of the first resource modification files for the target requirement under the source branch.

[0111] The source branch represents the branch to be merged, and the target requirement identifier represents the requirement to be merged. Based on the source branch identifier and the target requirement identifier, multiple resource files to be merged can be identified. That is, a list of the first resource modification files under the source branch for the target requirement is generated.

[0112] S104. Based on the list of modified first resource files, search for the associated files of each first resource file in the list of modified first resource files in the resource file directories of the source branch and the target branch, and generate a target associated file list.

[0113] The resource merging operation is initiated with the identifier of the target requirement as input. In practice, the art team cannot guarantee that all resources under a certain requirement identifier are comprehensive and completely independent of other resources. By performing correlation analysis on the list of modified files for the first resource, all resources associated with the first resource file can be automatically included in the merging operation. This effectively ensures the integrity and correctness of the target branch resources, avoids duplicate merging and manual operations, and greatly improves work efficiency.

[0114] S105. Generate a second resource modification file list based on the first resource modification file list and the target associated file list.

[0115] Multiple resource files in both the first list of modified resource files and the target associated file list need to be merged into the target branch. Therefore, the first list of modified resource files and the target associated file list should be merged into the second list of modified resource files first.

[0116] S106. Based on the second list of modified resource files, merge the source branch and the target branch to obtain the target resource file directory of the preset application on the target branch.

[0117] Multiple resource files from the second list of modified resource files are merged into the resource file directory of the target branch, resulting in the target resource file directory for the default application on the target branch. By merging the resource files from the source branch and their associated resource files into the target branch, modifications to the source branch always take precedence over modifications to the target branch.

[0118] For example, after the merge is completed, a chatbot interface is used to send relevant information about the merge task to a pre-defined visual dialogue interface. This allows the task executor to be informed of the completion status of the merge task in a timely manner.

[0119] In summary, this embodiment obtains a resource merge request for a preset application. The resource merge request includes: development branch information and the identifier of the target requirement; based on the development branch information, it obtains the identifier of the source branch and the identifier of the target branch; based on the identifier of the source branch and the identifier of the target requirement, it generates a first resource modification file list for the target requirement under the source branch; based on the first resource modification file list, it searches for the associated files of each first resource file in the resource file directory of the source branch and the target branch, generating a target associated file list; based on the first resource modification file list and the target associated file list, it generates a second resource modification file list; based on the second resource modification file list, it merges the source branch and the target branch to obtain the target resource file directory of the preset application on the target branch. Thus, through a pre-set merge process, the merge is completed automatically, reducing manual intervention; through association analysis, the files to be merged are accurately obtained, ensuring the integrity and correctness of the merged resources; it does not depend on a single merge command, supports long-term development branches, and improves merge efficiency and accuracy.

[0120] In the above Figure 1 Based on the corresponding embodiments, this application also provides a method for generating a first list of resource modification files. Figure 2 This application also provides a flowchart illustrating a method for generating a first list of resource modification files. For example... Figure 2 As shown, in S103, based on the identifier of the source branch and the identifier of the target requirement, a list of first resource modification files for the target requirement under the source branch is generated, including:

[0121] S201. Based on the identifier of the source branch, retrieve the commit records of multiple versions under the source branch.

[0122] Based on the source branch identifier, the complete SVN path of the source branch can be obtained, and then an SVN log query command can be constructed to obtain the commit records of multiple versions under the source branch.

[0123] In practice, only the commit records of multiple versions under the source branch within a preset historical time period need to be retrieved. The preset historical time period is set by the user; for example, the preset historical time period is 30 days prior to the current time.

[0124] S202. Based on the identifier of the target requirement, identify multiple target commit records with the identifier of the target requirement from multiple versions of the commit records.

[0125] Iterate through all the commit records obtained in S201 and filter out the commit records that contain the identifier of the target requirement.

[0126] Using the identifier of the target requirement as the granularity for merging makes it easy to immediately obtain a list of relevant files for that requirement as the merging object after completing it. This approach aligns with the development habits of art assets and can also improve the accuracy of merging operations, helping the art team to more accurately track and manage the progress of requirements.

[0127] S203. Based on the version numbers of multiple target commit records, obtain the resource file paths corresponding to the multiple target commit records.

[0128] For example, iterate through the version numbers of multiple target commit records, and for each version number, use the command "svnlog -r{svn version number} -vq{svn path}" to get the resource file path corresponding to that version number.

[0129] S204. Based on the resource file paths corresponding to multiple target submission records, generate a first resource modification file list for the target requirements.

[0130] Each resource file path corresponds to one resource file.

[0131] In summary, this embodiment retrieves commit records for multiple versions under the source branch based on the source branch's identifier; identifies multiple target commit records with the target requirement's identifier from the multiple versions' commit records based on the target requirement's identifier; retrieves the resource file paths corresponding to the multiple target commit records based on their version numbers; and generates a first list of resource modification files for the target requirement based on the resource file paths corresponding to the multiple target commit records. This accurately generates the first list of resource modification files, conforming to resource development practices and improving the accuracy of the merge operation.

[0132] In the above Figure 2Based on the corresponding embodiments, in another embodiment of this application, after determining multiple target submission records with the target requirement identifier from multiple versions of submission records in S202 according to the target requirement identifier, the method further includes:

[0133] Determine the highest version number of multiple target commit records as the current version number of the resource file directory of the source branch.

[0134] Among the version numbers corresponding to multiple commit records, determine the largest version number. The largest version number is the latest version number of the commit record that meets the target requirement, and this latest version number is used as the current version number of the resource file directory of the source branch.

[0135] For example, executing the "svn update -r max_revision" operation on the source branch will set the maximum version number as the current version number of the resource file directory of the source branch.

[0136] It should be noted that the version number of the source branch was updated in this step. The "current version number" mentioned in the following embodiments refers to the updated version number in this embodiment, or a version number update method similar to that in this embodiment. By determining the current version number of the resource file directory of the source branch, it is ensured that any operation uses the latest file version, avoiding file error rollback.

[0137] In summary, in this embodiment, the largest version number of multiple target commit records is determined as the current version number of the resource file directory of the source branch. Thus, the current version number of the source branch is accurately determined.

[0138] In the above Figure 1 Based on the corresponding embodiments, this application also provides a method for generating a target associated file list. Figure 3 This application also provides a flowchart illustrating a method for generating a list of target associated files. For example... Figure 3 As shown, in S104, based on the first resource modification file list, the associated files of each first resource file in the first resource modification file list are searched in the resource file directories of the source branch and the target branch, and a target associated file list is generated, including:

[0139] S301. Based on the resource files in the resource file directories of the source branch and the target branch, construct a reference mapping table for all resource files.

[0140] Since the resource files in the resource directories of both the source and target branches may change after each resource merge, a reference mapping table for all resource files needs to be constructed based on the resource files in the resource directories of both the source and target branches during each resource merge.

[0141] S302. Based on the list of modified files for the first resource, using the reference mapping table of all resource files, search for the associated files of the first resource file in the resource file directories of the source branch and the target branch, and generate a list of target associated files.

[0142] The reference mapping table for all resource files represents the relationships between multiple resource files. Based on the identifier of each resource file, the identifier of the associated file corresponding to each resource file can be determined using the reference mapping table. Then, based on the identifier of the associated file, the associated file of the first resource file is searched in the resource file directories of the source and target branches.

[0143] The resource merging operation is initiated with the identifier of the target requirement as input. However, in reality, the art team cannot guarantee that all resources under a given requirement identifier are comprehensive and completely independent of other resources. If the merging is based solely on the list of modified files involved in a specific requirement, the integrity and correctness of the target branch's resources cannot be guaranteed, potentially leading to errors such as missing resources or dependencies. In such cases, the art team needs to manually locate the requirement identifier containing the missing resource and re-execute the merging operation until all related resources are completely merged. In this embodiment, however, by performing correlation analysis on the first resource modification file list, all resources associated with the first resource file can be automatically included in the merging operation. This effectively ensures the integrity and correctness of the target branch's resources, avoids redundant merging and manual operations, and greatly improves work efficiency.

[0144] In summary, in this embodiment, a reference mapping table for all resource files is constructed based on the resource files in the resource file directories of the source and target branches. Based on the first list of modified resource files, the reference mapping table is used to search for associated files of the first resource files in the resource file directories of the source and target branches, generating a target associated file list. This accurately generates the target associated file list, effectively ensuring the integrity and correctness of the target branch resources, avoiding redundant merging and manual operations, and greatly improving work efficiency.

[0145] In the above Figure 3 Based on the corresponding embodiments, this application also provides a method for constructing a reference mapping table. Figure 4 This is a flowchart illustrating a method for constructing a reference mapping table provided in this application.

[0146] Before constructing the reference mapping table, this application embodiment pre-classifies the resource files, as detailed below.

[0147] Due to the dependency nature of resource files (e.g., art resource files), merging only the content of a single commit into the target branch does not guarantee the integrity and correctness of the final resource files. In some optional embodiments, this application embodiment includes resource files of at least the following four types:

[0148] 1. Repository / GUID (Storage Unit Type): This type represents the smallest resource granularity within the repository, i.e., the resource file. Different types of resource files are stored in their respective subdirectories under the repository directory, specifically at xxx.local / {ResourceType} / {GUID[:2]} / {GUID}. Here, {GUID} is the unique identifier string for the resource, and Type: the type of resource. The resource files represented by Repository / GUID are the lowest-level nodes in the entire resource dependency chain; they are the basic elements constituting the various types of resources mentioned above.

[0149] 2. Repository / resource.repository (Repository Type): Repositories are located in the Repository directory. Each repository is an independent directory named xxx.local. Each repository directory contains a resource.repository file, which serves as the repository's description file, recording the index information of the resources within the repository in XML format. The Repository / resource.repository file records the index information of the resources within the repository, thus identifying the repository where the resource files are located.

[0150] Each resource is described as an Item, which includes, but is not limited to, the following typical information:

[0151] (1) GUID. A unique identifier string for a resource.

[0152] (2) Type. Type: The type of resource.

[0153] (3) Deps: A list of GUIDs that depend on the current file resources. Deps will include multiple dependent file resources that depend on the current file resources.

[0154] 3. Worlds / .iworld (Global Scene Type): Global art scene files, stored in XML format, defining global environment rendering parameters and referencing Worlds / *.ilevel files. Application scenes are represented by iworld files and their associated ilevel files under the Worlds directory. Essentially, they are the serialized storage form of static World objects, using GUID format to record information about entities and components within the scene. In other words, this category determines the global scene in which the resource files are applied.

[0155] 4. Worlds / .ilevel (Region Scene Type): Region art scene file, also stored in XML format. The application divides the scene into multiple ilevels, each ilevel representing a region of the scene or multiple levels of a region, and also uses GUID format to record the entities in the scene and their component information. That is, this classification determines the application region scene of the resource file.

[0156] The Worlds / .iworld and Worlds / .ilevel resource files explicitly record references to other resources, such as resources in the repository.

[0157] The categorization of art assets is based on their storage method and usage within the game application. This detailed classification provides clear objects and paths for dependency analysis, facilitating an accurate understanding and identification of the relationships between resources. Furthermore, by analyzing the organization and referencing relationships of these four resource types, a complete resource dependency chain can be constructed, enabling precise dependency analysis.

[0158] like Figure 4 As shown, in S301, a reference mapping table for all resource files is constructed based on the resource files in the resource file directories of the source and target branches, including:

[0159] S401. Perform dependency analysis on the resource files in the resource file directories of the source branch and the target branch, and generate a dependency mapping table for all resource files.

[0160] Determine the mapping relationship between resource files and file identifiers. For example, a dependency GUID-Deps mapping, where GUID represents the smallest unit of an art asset, and Deps represents other dependent art assets, represented in the format {GUID:Deps}. Deps is a list format that stores a list of other dependent GUIDs.

[0161] Determine the mapping relationship between the global scene and the regional scene. For example, the mapping from Worlds / .iworld to Worlds / .ilevel is saved in the format {iworld:ilevel}.

[0162] Determine the mapping relationship between the global scene and file identifiers, and the mapping relationship between the regional scene and file identifiers. For example, construct mappings from Worlds / .iworld and .ilevel to GUIDs, and save them in the format {iworld / ilevel:GUID}. Here, GUID refers to the file identifier of the art asset whose reference relationship is declared directly in the iworld and ilevel files.

[0163] Determine the mapping between storage repositories and file identifiers. For example, construct a mapping from Repository / resource.repository to GUIDs, identifying which art asset files are contained in each repository, and saving them in the format {repository:GUIDs}. GUIDs refers to a list of all GUIDs contained in that repository.

[0164] The aforementioned dependency mapping tables represent which file identifiers are included in each storage location, each storage repository, each global scenario, and each regional scenario.

[0165] S402. Reverse the dependency mapping table of all resource files to obtain the reference mapping table of all resource files.

[0166] For example, reverse engineering is performed based on the multiple dependency mapping tables constructed in S401. This allows us to determine the storage location, storage repository, global scenario, and regional scenario corresponding to each file identifier.

[0167] For example, taking the dependency mapping relationship GUID-Deps as an example, this dependency mapping relationship is traversed to determine which files (GUIDs) reference each art asset file (Dep), and these reference mapping relationships are recorded in the GUID-Refs dictionary, where Refs represents multiple referenced files. Finally, the reference mapping relationships are obtained as follows: {GUID:Refs}, {GUID:iworld / ilevel}, {ilevel:iworld}, {GUID:repository}.

[0168] In summary, this embodiment performs dependency analysis on the resource files in the resource file directories of the source and target branches to generate a dependency mapping table for all resource files; then, it reverse-engineers this dependency mapping table to obtain a reference mapping table for all resource files. Thus, through dependency analysis, the reference mapping table for each resource file is accurately determined.

[0169] In the above Figure 3 Based on the corresponding embodiments, this application also provides a method for generating a target associated file list using a mapping table. Figure 5 This application provides a flowchart illustrating a method for generating a target associated file list using a mapping table.

[0170] The reference mapping relationship for each resource file includes: multiple mapping tables for each resource file, and each mapping table has corresponding reference attribute information.

[0171] Based on the list of modified files for the first resource in S302, the reference mapping table of all resource files is used to search for the associated files of the first resource file in the resource file directories of the source and target branches, generating a target associated file list, including:

[0172] S501. Generate attribute information for each first resource file based on the list of modified first resource files.

[0173] The attribute information of the first resource file represents the characteristics of the first resource file in multiple dimensions.

[0174] S502. Based on the attribute information of each first resource file and the reference attribute information corresponding to the reference mapping table of all resource files, search among all resource files for the resource file that has the attribute information of the first resource file as the associated file of the first resource file.

[0175] Resource files with the same attribute information as the first resource file are designated as associated files of the first resource file. This establishes a relationship between the first resource file and its associated files at the attribute information level.

[0176] S503. Generate a list of target associated files based on the identifiers of the associated files of the first resource file.

[0177] In summary, in this embodiment, the reference mapping relationship for each resource file includes: multiple mapping tables for each resource file, each mapping table having corresponding reference attribute information; generating attribute information for each first resource file based on the first resource modification file list; searching for resource files with the attribute information of the first resource files as associated files of the first resource files from all resource files based on the attribute information of each first resource file and the reference attribute information corresponding to the reference mapping relationship tables of all resource files; and generating a target associated file list based on the identifiers of the associated files of the first resource files. Thus, the target associated file list is accurately generated through the mapping relationship.

[0178] In the above Figure 5Based on the corresponding embodiments, in another embodiment of this application, the reference mapping table for each resource file includes: multiple mapping tables for each resource file, and each mapping table has a corresponding preset operation type and preset resource type.

[0179] For example, multiple mapping tables for each resource file can be: {GUID:Refs}, {GUID:iworld / ilevel}, {ilevel:iworld}, {GUID:repository}.

[0180] Preset resource types include: Repository / GUID (storage unit type), Repository / resource.repository (storage repository type), Worlds / .iworld (global scene type), and Worlds / .ilevel (regional scene type).

[0181] The default operation types include: delete, modify, and add.

[0182] The attribute information of each first resource file includes: the attribute information of the target resource type and the attribute information of the target operation type;

[0183] For example, after generating the first resource modification file list in S103 above, attribute information for each first resource file is generated based on the first resource modification file list. For example, the attribute information also includes: the path of the first resource file and the name of the first resource file.

[0184] If the first resource file has a file path in the resource file directory of the source branch but not in the resource file directory of the target branch, then the operation type of the first resource file is determined to be an add type.

[0185] If the first resource file has a file path in both the resource file directory of the source branch and the resource file directory of the target branch, then the operation type of the first resource file is determined to be modification.

[0186] If the first resource file does not exist in the resource file directory of the source branch, then the operation type for the first resource file is determined to be deletion.

[0187] In S502, based on the attribute information of each first resource file and the reference attribute information corresponding to the reference mapping table of all resource files, the resource file with the attribute information of the first resource file is searched from all resource files as the associated file of the first resource file, including:

[0188] Based on the attribute information of the target resource type and the attribute information of the target operation type of each first resource file, as well as the reference mapping table of each resource file, the resource file with the attribute information of the first resource file is searched from all resource files to find the associated file of the first resource file.

[0189] For example, if the target resource type of the first resource file is Repository / GUID, then if the target operation type of the first resource file is deletion, the reference mapping table is determined as: {GUID:repository}, {GUID:Refs}, {GUID:iworlds}. When a GUID resource is deleted, the Repository / resource.repository file will change; the field describing the GUID in the file will be deleted. Therefore, it is necessary to read the <source branch>{GUID:repository} to add the corresponding repository to the association list; at the same time, iterate through the <source branch> reference mapping {GUID:Refs} and {GUID:iworlds} to obtain other resource files that depend on this GUID as association files.

[0190] For example, if the target resource type of the first resource file is Repository / GUID, then if the target operation type of the first resource file is modification, the reference mapping table is determined to be: {GUID:Deps}. The dependency list Deps is obtained by reading {GUID:Deps} from the <source branch>, and the files in the dependency list Deps are used as associated files.

[0191] For example, if the target resource type of the first resource file is Repository / GUID, then if the target operation type of the first resource file is "add", the reference mapping table is determined to be: {GUID:Deps}, {GUID:repository}. The dependency list Deps and associated repository are obtained by reading {GUID:Deps} and {GUID:repository} from the <source branch>. The files in the dependency list Deps and associated repository are then used as associated files.

[0192] For example, if the target resource type of the first resource file is Repository / resource.repository, then if the target operation type of the first resource file is deletion, the reference mapping table is determined as: {repository:GUIDs}, {GUID:iworld / ilevel}, {GUID:Refs}. Reading <target branch>{repository:GUIDs} yields the list of GUIDs within the repository. Traversing this list, the associated iworld / ilevel files and other GUIDs are extracted from the <target branch>{GUID:iworld / ilevel}, {GUID:Refs} relationship, and merged with the GUIDs in the repository to be deleted to obtain the list of associated files for the deletion operation.

[0193] For example, if the target resource type of the first resource file is Repository / resource.repository, then if the target operation type of the first resource file is "add", the reference mapping table is determined as: {repository:GUIDs}, {GUID:iworld / ilevel}, {GUID:Refs}. Reading <source branch>{repository:GUIDs} yields the list of GUIDs within the repository. Traversing this list, the associated iworld / ilevel files and other GUIDs are removed from the <source branch>{GUID:iworld / ilevel} and {GUID:Refs} relationships, and merged with the GUIDs in the add repository to obtain the list of associated files for the add operation.

[0194] For example, if the target resource type of the first resource file is Repository / resource.repository, then if the target operation type of the first resource file is modification, the reference mapping table is determined to be: {repository:GUIDs}. The {repository:GUIDs} of the <source branch> and <target branch> are read respectively to obtain the GUID list of the repository in the <source branch> and <target branch>, and the GUID lists for <add>, <delete>, and <modify> are calculated as the list of associated files.

[0195] For example, if the target resource type of the first resource file is Worlds / .iworld, then if the target operation type of the first resource file is deletion, an empty set will be returned, indicating no associated file.

[0196] For example, if the target resource type of the first resource file is Worlds / .iworld, then if the target operation type of the first resource file is "add", the reference mapping table is determined to be: {iworld:ilevel}, {iworld:GUIDs}. The <source branch> {iworld:ilevel} mapping and {iworld:GUIDs} mapping are read, the corresponding ilevel and GUID dependencies are returned, and added to the association list.

[0197] For example, if the target resource type of the first resource file is Worlds / .iworld, then if the target operation type of the first resource file is modification, the reference mapping table is determined to be {iworld:ilevel} and {iworld:GUIDs}. The {iworld:ilevel} and {iworld:GUIDs} mappings of the <source branch> and <target branch> are read respectively to obtain the ilevel and GUIDs dependencies, and then added to the association list.

[0198] For example, if the target resource type of the first resource file is Worlds / .ilevel, then if the target operation type of the first resource file is deletion, the reference mapping table is determined to be: {ilevel:iworld}. The <target branch>{ilevel:iworld} mapping is read, the iworld filename containing the ilevel file is returned, and added to the association list.

[0199] For example, if the target resource type of the first resource file is Worlds / .ilevel, then if the target operation type of the first resource file is "add", the reference mapping table is determined to be: {ilevel:iworld}. The <source branch>{ilevel:iworld} mapping is read, the iworld filename containing the ilevel file is returned, and added to the association list.

[0200] For example, if the target resource type of the first resource file is Worlds / .ilevel, then if the target operation type of the first resource file is "add", the reference mapping table is determined to be: {ilevel:GUIDs}. The {ilevel:GUIDs} relationship between the <source branch> and <target branch> is read respectively, obtaining the GUID list that the ilevel file depends on in the <source branch> and <target branch>, and the GUID lists for <add> and <delete> are calculated and returned as the associated file list, which is then added to the associated list.

[0201] In summary, in this embodiment, the reference mapping table for each resource file includes: multiple mapping tables for each resource file, each mapping table having a corresponding preset operation type and preset resource type; the attribute information of each first resource file includes: attribute information of the target resource type and attribute information of the target operation type for each first resource file; based on the attribute information of the target resource type and the target operation type of each first resource file, and the reference mapping table for each resource file, the resource file containing the attribute information of the first resource file is searched from all resource files as the associated file of the first resource file. Thus, based on the target resource type and target operation type of the first resource file, the associated file of the first resource file is accurately determined.

[0202] In the above Figure 1 Based on the corresponding embodiments, this application also provides a method for generating a second list of resource modification files. Figure 6 This application also provides a flowchart illustrating a method for generating a second list of resource modification files. For example... Figure 6 As shown, in S105, a second resource modification file list is generated based on the first resource modification file list and the target associated file list, including:

[0203] S601. Merge the resource files in the first resource modification file list and the target associated file list to generate an initial resource modification file list.

[0204] S602. Obtain the summary information and current version number of each candidate resource file in the initial resource modification file list.

[0205] The summary information represents the content of the candidate resource file, and the current version number represents the modification history of the candidate resource file.

[0206] S603. Based on the summary information and current version number of each candidate resource file, determine the resource files to be merged from each candidate resource file.

[0207] By comparing the summary information and current version number of each candidate resource file with the resource files under the target branch, it can be determined whether the candidate resource file has been modified / merged. Through summary information comparison and current version number comparison, it is possible to accurately determine whether a candidate resource file has been modified / merged.

[0208] Based on the summary information and current version number of each candidate resource file, the modified candidate resource files are identified from the candidate resource files, and the modified candidate resource files are determined as the resource files to be merged.

[0209] S604. Generate a second list of modified resource files based on the resource files to be merged.

[0210] In summary, in this embodiment, resource files in the first resource modification file list and the target associated file list are merged to generate an initial resource modification file list; summary information and current version number of each candidate resource file in the initial resource modification file list are obtained; based on the summary information and current version number of each candidate resource file, resource files to be merged are determined from each candidate resource file; and a second resource modification file list is generated based on the resource files to be merged. Thus, the second resource modification file list is accurately generated, the modified files are obtained, and the files that need to be merged are accurately identified.

[0211] In the above Figure 6 Based on the corresponding embodiment, in S602, the summary information and current version number of each candidate resource file in the initial resource modification file list are obtained, including:

[0212] Based on the identifier of each candidate resource file, obtain the summary information and current version number of each candidate resource file from the corresponding file path in the resource file directory of the source branch and the target branch.

[0213] The file path can be used to determine the full content of the file, and then obtain the file's summary information and current version number.

[0214] In summary, in this embodiment, based on the identifier of each candidate resource file, the summary information and current version number of each candidate resource file are obtained from the corresponding file path in the resource file directory of the source branch and the target branch. Thus, the summary information and current version number of the file are accurately determined through the file path.

[0215] In the above Figure 6 Based on the corresponding embodiments, this application also provides a method for determining resource files to be merged. Figure 7 This application also provides a flowchart illustrating a method for determining resource files to be merged. For example... Figure 7 As shown, in S603, based on the summary information and current version number of each candidate resource file, the resource files to be merged are determined from each candidate resource file, including:

[0216] S701. Based on the summary information of each candidate resource file, determine whether each candidate resource file has been modified.

[0217] Compare the summary information of each candidate resource file with that of the resource files in the target branch. If identical summary information exists, it is determined that none of the candidate resource files have been modified. If no identical summary information exists, it is determined that none of the candidate resource files have been modified.

[0218] File summary comparison is used to identify whether there are substantial differences between the files in the source branch and the target branch. By comparing the summary results, it can be determined whether a merge operation needs to be performed. Thus, before merging each candidate resource file into the target branch, the resource files with actual modifications are first screened using the summary information; then, based on these modified resource files, the merge operation can be further performed.

[0219] S702. If the target candidate resource file has been modified, the historical version number of the target candidate resource file is obtained from the version database of the preset application.

[0220] For example, the version database is an sqlite database.

[0221] S703. Compare the historical version number and the current version number of the target candidate resource file.

[0222] S704. If the current version number of the target candidate resource file is greater than the historical version number, then the target candidate resource file is determined to be the resource file to be merged.

[0223] If the current version number of the target candidate resource file is greater than the historical version number, then the target candidate resource file is determined to be the latest version resource file and is used as the resource file to be merged.

[0224] If the current version number of the target candidate resource file is less than or equal to the historical version number, it is considered a file rollback and will not be merged.

[0225] Based on the comparison of summary information, the historical version numbers of the target candidate resource files are obtained for version number comparison. Version number comparison can effectively prevent file sequence rollback that may occur due to misoperation of the requirement order number when the art team initiates the merge request, further ensuring the correctness of the merge operation sequence.

[0226] In summary, in this embodiment, based on the summary information of each candidate resource file, it is determined whether each candidate resource file has been modified. If the target candidate resource file has been modified, the historical version number of the target candidate resource file is obtained from the version database of the preset application. The historical version number of the target candidate resource file is compared with the current version number. If the current version number of the target candidate resource file is greater than the historical version number, the target candidate resource file is determined to be the resource file to be merged. Thus, by comparing the summary information and the version number, the timing correctness of the merging operation is ensured.

[0227] In the above Figure 1 Based on the corresponding embodiments, this application also provides a method for merging a list of modified files according to a second resource. Figure 8This application also provides a flowchart illustrating a method for merging a list of modified files based on a second resource. For example... Figure 8 As shown, in S106, based on the second resource modification file list, the source branch and the target branch are merged to obtain the target resource file directory of the preset application on the target branch, including:

[0228] S801. Determine the operation type of each second resource file in the second resource modification file list.

[0229] S802. Based on the operation type of the second resource file, the source branch and the target branch are merged using the merging method corresponding to the operation type to obtain the target resource file directory of the preset application on the target branch.

[0230] By employing the merge method corresponding to the operation type, multiple second resource files are precisely merged into the resource file directory of the target branch. This ensures that the target branch includes all changes made to the source branch under the specified requirement identifier (e.g., #103258).

[0231] In summary, in this embodiment, the operation type of each second resource file in the second resource modification file list is determined; based on the operation type of the second resource file, the source branch and the target branch are merged using the merging method corresponding to the operation type, resulting in the target resource file directory of the preset application on the target branch. Thus, the target branch contains all changes made to the source branch under the specified requirement identifier, accurately achieving resource merging.

[0232] In the above Figure 8 Based on the corresponding embodiments, this application also provides a method for determining the operation type. Figure 9 This is a flowchart illustrating a method for determining the operation type provided in this application. Figure 9 As shown, the operation type for determining each second resource file in the second resource modification file list in S801 includes:

[0233] S901. Determine the file paths of each second resource file in the resource file directories of the source branch and the target branch in the list of second resource modification files.

[0234] S902. If the second resource file has a file path in the resource file directory of the source branch but does not have a file path in the resource file directory of the target branch, then the operation type of the second resource file is determined to be the add type.

[0235] S903. If the second resource file has a file path in the resource file directory of the source branch and also has a file path in the resource file directory of the target branch, then the operation type of the second resource file is determined to be the modification type.

[0236] S904. If the second resource file does not exist in the resource file directory of the source branch, then the operation type of the second resource file is determined to be deletion.

[0237] In summary, this embodiment determines the file paths of each second resource file in the second resource modification file list in the resource file directories of the source branch and the target branch, respectively. If a second resource file exists in the resource file directory of the source branch but not in the resource file directory of the target branch, the operation type of the second resource file is determined to be an add type. If a second resource file exists in both the resource file directories of the source and target branches, the operation type is determined to be a modify type. If a second resource file does not exist in the resource file directory of the source branch, the operation type is determined to be a delete type. Thus, by comparing whether the resource file exists in the source and target branches, the operation type is accurately determined.

[0238] In the above Figure 8 Based on the corresponding embodiment, in S802, according to the operation type of the second resource file, the source branch and the target branch are merged using the merging method corresponding to the operation type to obtain the target resource file directory of the preset application on the target branch, including:

[0239] If the operation type of the second resource file is add, then copy the second resource file to the resource file directory of the target branch.

[0240] Alternatively, if the operation type of the second resource file is modification, then update the second resource file to the resource file directory of the target branch.

[0241] Alternatively, if the operation type for the second resource file is deletion, then delete the second resource file from the resource file directory of the target branch.

[0242] In summary, in this embodiment, if the operation type of the second resource file is add, the second resource file is copied to the resource file directory of the target branch; or, if the operation type of the second resource file is modify, the second resource file is updated to the resource file directory of the target branch; or, if the operation type of the second resource file is delete, the second resource file is deleted from the resource file directory of the target branch. Thus, the target branch contains all changes made to the source branch under the specified requirement identifier, accurately achieving resource merging.

[0243] In the above Figure 1 Based on the corresponding embodiments, in another embodiment of this application, the method further includes:

[0244] Synchronize the target resource file directory to the first database of the preset application.

[0245] For example, the first database could be an SVN repository database. The merged target resource file directory is synchronized to the first database to commit local changes to the target branch to the SVN repository database. This ensures that other users can access the latest state of the target branch.

[0246] In summary, in this embodiment, the target resource file directory is synchronized to the first database of the preset application. This ensures that the status of the target branch is updated in a timely manner.

[0247] In the above Figure 1 Based on the corresponding embodiments, in another embodiment of this application, the method further includes:

[0248] Based on the list of modified files for the second resource, store the file identifier, branch information, and version number of each second resource file in the second database.

[0249] For example, the second database is an sqlite database.

[0250] Each successfully merged resource file, along with its corresponding file identifier, branch information, and version number, is stored in a second database for use in the next resource merge.

[0251] In summary, in this embodiment, based on the list of modified second resource files, the file identifier, branch information, and version number of each second resource file are stored in the second database. This facilitates the next resource merging.

[0252] Based on the above embodiments, this application also provides a method for generating a list of affected files. Figure 10 This is a flowchart illustrating a method for generating a list of impact files provided in this application. Figure 10 As shown, the method also includes:

[0253] S1001. Based on the list of modified files in the second resource, obtain the historical merge version number from the second database.

[0254] For each second resource file in the list of second resource modification files, retrieve the historical merge version number (the version number after the last merge operation) of that second resource file from the second database.

[0255] S1002. Based on the historical merge version number and the current version number of the resource file directory of the source branch, determine the modification requirement identifier for each second resource file.

[0256] For example, the svn log command is used to calculate the requirement identifiers that have modified the second resource file between the historical merge version number and the current version number, and these are identified as the change requirement identifiers for the second resource file.

[0257] S1003. Generate a list of affected files based on the modification requirement identifiers of each second resource file and the identifiers of each second resource file.

[0258] Based on the modification requirement identifiers of each secondary resource file and the identifiers of each secondary resource file, a mapping table is created to generate a list of affected files. This allows for a more precise understanding of the status of each requirement identifier.

[0259] In summary, in this embodiment, based on the list of modified second resource files, the historical merge version number is obtained from the second database; based on the historical merge version number and the current version number of the resource file directory of the source branch, the modification requirement identifier of each second resource file is determined; based on the modification requirement identifier of each second resource file and the identifier of each second resource file, an affected file list is generated. Thus, the status of each requirement identifier can be understood more accurately.

[0260] Furthermore, the titles of merged requirement tags are marked as "[Merged]". This allows the art team to directly determine which requirement sheets have not yet been merged based on the requirement panel, making the project progress clearer and facilitating team collaboration.

[0261] The following describes a resource merging apparatus, device, and storage medium provided in this application for implementation. The specific implementation process and technical effects are described above and will not be repeated below.

[0262] Figure 11 This is a schematic diagram of a resource merging device provided in an embodiment of this application, as shown below. Figure 11 As shown, the device includes:

[0263] The first acquisition module 1101 is used to acquire resource merging requests for a preset application. The resource merging requests include: development branch information and the identifier of the target requirement.

[0264] The second acquisition module 1102 is used to acquire the identifier of the source branch and the identifier of the target branch based on the development branch information.

[0265] The first generation module 1103 is used to generate a list of first resource modification files for the target requirement under the source branch, based on the identifier of the source branch and the identifier of the target requirement.

[0266] The search module 1104 is used to search for the associated files of each first resource file in the first resource modification file list from the resource file directories of the source branch and the target branch, based on the first resource modification file list, and generate a target associated file list.

[0267] The second generation module 1105 is used to generate a second resource modification file list based on the first resource modification file list and the target associated file list.

[0268] The merging module 1106 is used to merge the source branch and the target branch according to the second resource modification file list to obtain the target resource file directory of the preset application on the target branch.

[0269] Thus, the merging process is automated through a pre-defined process, reducing manual intervention; the files to be merged are accurately obtained through correlation analysis, ensuring the integrity and correctness of the merged resources; and it does not depend on a single merge command, supporting long-term development branches and improving merging efficiency and accuracy.

[0270] Furthermore, the first generation module 1103 is specifically used to obtain the commit records of multiple versions under the source branch according to the identifier of the source branch; to determine multiple target commit records with the identifier of the target requirement from the commit records of multiple versions according to the identifier of the target requirement; to obtain the resource file paths corresponding to the multiple target commit records according to the version numbers of the multiple target commit records; and to generate a first resource modification file list for the target requirement according to the resource file paths corresponding to the multiple target commit records.

[0271] Furthermore, the first generation module 1103 is specifically used to determine the maximum version number of the commit record for the target requirement as the current version number of the resource file directory of the source branch.

[0272] Furthermore, the search module 1104 is specifically used to construct a reference mapping table for all resource files based on the resource files in the resource file directories of the source branch and the target branch; based on the first resource modification file list, using the reference mapping table for all resource files, it searches for the associated files of the first resource file in the resource file directories of the source branch and the target branch, and generates a target associated file list.

[0273] Furthermore, the lookup module 1104 is specifically used to perform dependency analysis on the resource files in the resource file directories of the source branch and the target branch, generate a dependency mapping table for all resource files, and reverse-engineer the dependency mapping table for all resource files to obtain a reference mapping table for all resource files.

[0274] Furthermore, the lookup module 1104 is specifically used for the reference mapping relationship of each resource file, including: multiple mapping tables for each resource file, each mapping table having corresponding reference attribute information; generating attribute information for each first resource file based on the first resource modification file list; searching for resource files with the attribute information of the first resource file as associated files of the first resource file from all resource files based on the attribute information of each first resource file and the reference attribute information corresponding to the reference mapping relationship table of all resource files; and generating a target associated file list based on the identifier of the associated file of the first resource file.

[0275] Furthermore, the lookup module 1104 is specifically used to include the following for each resource file's reference mapping relationship table: multiple mapping tables for each resource file, each mapping table having a corresponding preset operation type and preset resource type; the attribute information of each first resource file includes: attribute information of the target resource type and attribute information of the target operation type for each first resource file; based on the attribute information of the target resource type and the attribute information of the target operation type of each first resource file, and the reference mapping relationship table of each resource file, the resource file with the attribute information of the first resource file is searched from all resource files as the associated file of the first resource file.

[0276] Furthermore, the second generation module 1105 is specifically used to merge the resource files in the first resource modification file list and the target associated file list to generate an initial resource modification file list; obtain the summary information and current version number of each candidate resource file in the initial resource modification file list; determine the resource files to be merged from each candidate resource file based on the summary information and current version number of each candidate resource file; and generate a second resource modification file list based on the resource files to be merged.

[0277] Furthermore, the second generation module 1105 is specifically used to obtain the summary information and current version number of each candidate resource file from the corresponding file path of each candidate resource file in the resource file directory of the source branch and the target branch, based on the identifier of each candidate resource file.

[0278] Furthermore, the second generation module 1105 is specifically used to determine whether each candidate resource file has been modified based on the summary information of each candidate resource file; if the target candidate resource file has been modified, the historical version number of the target candidate resource file is obtained from the version database of the preset application; the historical version number of the target candidate resource file is compared with the current version number; if the current version number of the target candidate resource file is greater than the historical version number, the target candidate resource file is determined to be a resource file to be merged.

[0279] Furthermore, the merging module 1106 is specifically used to determine the operation type of each second resource file in the second resource modification file list; according to the operation type of the second resource file, the source branch and the target branch are merged using the merging method corresponding to the operation type to obtain the target resource file directory of the preset application on the target branch.

[0280] Furthermore, the merging module 1106 is specifically used to determine the file paths of each second resource file in the second resource modification file list in the resource file directories of the source branch and the target branch, respectively; if the second resource file has a file path in the resource file directory of the source branch but not in the resource file directory of the target branch, then the operation type of the second resource file is determined to be an add type; if the second resource file has a file path in both the resource file directory of the source branch and the resource file directory of the target branch, then the operation type of the second resource file is determined to be a modify type; if the second resource file does not have a file path in the resource file directory of the source branch, then the operation type of the second resource file is determined to be a delete type.

[0281] Furthermore, the merging module 1106 is specifically used to copy the second resource file to the resource file directory of the target branch if the operation type of the second resource file is an add type; or, if the operation type of the second resource file is a modify type, update the second resource file to the resource file directory of the target branch; or, if the operation type of the second resource file is a delete type, delete the second resource file from the resource file directory of the target branch.

[0282] Furthermore, the merging module 1106 is also used to synchronize the target resource file directory to the first database of the preset application.

[0283] Furthermore, the merging module 1106 is also used to store the file identifier, branch information and version number of each second resource file into the second database according to the second resource modification file list.

[0284] Furthermore, the merging module 1106 is also used to obtain the historical merge version number from the second database based on the second resource modification file list; determine the modification requirement identifier of each second resource file based on the historical merge version number and the current version number of the resource file directory of the source branch; and generate an affected file list based on the modification requirement identifier of each second resource file and the identifier of each second resource file.

[0285] Figure 12 This is a schematic diagram of an electronic device provided in an embodiment of this application. The electronic device may be a device with computing processing capabilities.

[0286] The electronic device includes a processor 1201 and a storage medium 1202. The processor 1201 and the storage medium 1202 are connected via a bus.

[0287] Storage medium 1202 is used to store programs, and processor 1201 calls the programs stored in storage medium 1202 to execute the above method embodiments. The specific implementation is similar to the above embodiments and will not be repeated here. Thus, through a pre-set merging process, the merging is completed automatically, reducing manual intervention; through correlation analysis, the files to be merged are accurately obtained, ensuring the integrity and correctness of the merged resources; it does not depend on a single merging command, supports long-term development branches, and improves merging efficiency and accuracy.

[0288] Optionally, the present invention also provides a computer-readable storage medium including a program, which, when executed by a processor, is used to perform the above-described method embodiments. In the embodiments of this application, the computer program, when run by a processor, can also execute other machine-readable instructions to perform other methods as described in the embodiments. For details on the specific execution steps and principles, please refer to the description of the embodiments, which will not be repeated here. Thus, the motion trajectory of the target moving object is accurately obtained, and special effects are generated in a streamlined manner, facilitating the adjustment and modification of the target trajectory and re-rendering, thereby improving the efficiency of special effects generation. Thus, through a pre-set merging process, merging is completed automatically, reducing manual intervention; through correlation analysis, the files to be merged are accurately obtained, ensuring the integrity and correctness of the merged resources; it does not depend on a single merging command, supports long-term development branches, and improves merging efficiency and accuracy.

[0289] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.

[0290] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0291] In addition, the functional units in the embodiments provided in this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0292] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0293] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "first", "second", "third", etc. are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0294] Finally, it should be noted that the above-described embodiments are merely specific implementations of this application, used to illustrate the technical solutions of this application, and not to limit them. The protection scope of this application is not limited thereto. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this application; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application. All should be covered within the protection scope of this application. Therefore, the protection scope of this application should be determined by the protection scope of the claims.

Claims

1. A resource consolidation method, characterized by, The method includes: Obtain a resource merge request for a preset application, the resource merge request including: development branch information and the identifier of the target requirement; Based on the development branch information, obtain the identifier of the source branch and the identifier of the target branch; Based on the identifier of the source branch and the identifier of the target requirement, generate a first list of resource modification files for the target requirement under the source branch; Based on the first resource modification file list, search for the associated files of each first resource file in the first resource modification file list from the resource file directories of the source branch and the target branch, and generate a target associated file list; A second list of resource modification files is generated based on the first list of resource modification files and the target associated file list; Based on the second list of modified resource files, the source branch and the target branch are merged to obtain the target resource file directory of the preset application in the target branch; The step of searching for associated files of each first resource file in the first resource modification file list from the resource file directories of the source branch and the target branch, and generating a target associated file list, includes: Perform dependency analysis on the resource files in the resource file directories of the source branch and the target branch to generate a dependency mapping table for all resource files; The dependency mapping table of all resource files is reverse-engineered to obtain the reference mapping table of all resource files; Based on the first list of modified resource files, the reference mapping table of all resource files is used to search for the associated files of the first resource files in the resource file directories of the source branch and the target branch, and generate the target associated file list.

2. The method according to claim 1, characterized in that, The step of generating a first list of resource modification files for the target requirement under the source branch, based on the identifier of the source branch and the identifier of the target requirement, includes: Based on the identifier of the source branch, retrieve the commit records of multiple versions under the source branch; Based on the identifier of the target requirement, determine multiple target submission records with the identifier of the target requirement from the multiple versions of submission records; Based on the version numbers of the multiple target commit records, obtain the resource file paths corresponding to the multiple target commit records; Based on the resource file paths corresponding to the multiple target submission records, a first list of resource modification files for the target requirements is generated.

3. The method according to claim 2, characterized in that, After determining, based on the identifier of the target requirement, a plurality of target commit records having the identifier of the target requirement from the plurality of commit records, the method further includes: The largest version number of the multiple target commit records is determined as the current version number of the resource file directory of the source branch.

4. The method according to claim 1, characterized in that, The reference mapping relationship of each resource file includes: multiple mapping tables for each resource file, and each mapping table has corresponding reference attribute information; The step of generating the target associated file list by searching for the associated files of the first resource file in the resource file directories of the source branch and the target branch, based on the first resource modification file list and using the reference mapping table of all resource files, includes: Based on the first list of modified resource files, generate attribute information for each of the first resource files; Based on the attribute information of each first resource file and the reference attribute information corresponding to the reference mapping table of all resource files, the resource file with the attribute information of the first resource file is searched from all resource files as the associated file of the first resource file; The target associated file list is generated based on the identifier of the associated file of the first resource file.

5. The method according to claim 4, characterized in that, The reference mapping table for each resource file includes: multiple mapping tables for each resource file, each mapping table having a corresponding preset operation type and preset resource type; The attribute information of each of the first resource files includes: the attribute information of the target resource type and the attribute information of the target operation type of each of the first resource files; The step of searching among all resource files for a resource file that has the attribute information of the first resource file as an associated file of the first resource file, based on the attribute information of each first resource file and the reference attribute information corresponding to the reference mapping table of all resource files, includes: Based on the attribute information of the target resource type and the attribute information of the target operation type of each first resource file, and the reference mapping table of each resource file, the resource file with the attribute information of the first resource file is searched from all resource files as the associated file of the first resource file.

6. The method according to claim 1, characterized in that, The step of generating a second resource modification file list based on the first resource modification file list and the target associated file list includes: The resource files in the first list of modified resource files and the target associated file list are merged to generate an initial list of modified resource files; Obtain the summary information and current version number of each candidate resource file in the initial resource modification file list; Based on the summary information and current version number of each candidate resource file, determine the resource file to be merged from each candidate resource file; Based on the resource files to be merged, generate the second list of resource modification files.

7. The method according to claim 6, characterized in that, The step of obtaining the summary information and current version number of each candidate resource file in the initial resource modification file list includes: Based on the identifiers of each candidate resource file, obtain the summary information of each candidate resource file from the corresponding file path in the resource file directory of the source branch and the target branch; and obtain the current version number.

8. The method according to claim 6, characterized in that, The step of determining the resource file to be merged from the candidate resource files based on the summary information and current version number of each candidate resource file includes: Based on the summary information of each candidate resource file, determine whether each candidate resource file has been modified; If the target candidate resource file has been modified, the historical version number of the target candidate resource file is obtained from the version database of the preset application. Compare the historical version number and the current version number of the target candidate resource file; If the current version number of the target candidate resource file is greater than the historical version number, then the target candidate resource file is determined to be the resource file to be merged.

9. The method according to claim 1, characterized in that, The step of merging the source branch and the target branch according to the second list of modified resource files to obtain the target resource file directory of the preset application on the target branch includes: Determine the operation type for each second resource file in the second resource modification file list; Based on the operation type of the second resource file, the source branch and the target branch are merged using the merging method corresponding to the operation type to obtain the target resource file directory of the preset application in the target branch.

10. The method according to claim 9, characterized in that, The step of determining the operation type for each of the second resource files in the second resource modification file list includes: Determine the file paths of each of the second resource files in the second resource modification file list in the resource file directories of the source branch and the target branch, respectively; If the second resource file has a file path in the resource file directory of the source branch but not in the resource file directory of the target branch, then the operation type of the second resource file is determined to be an add type. If the second resource file has a file path in the resource file directory of the source branch and also has a file path in the resource file directory of the target branch, then the operation type of the second resource file is determined to be modification type. If the second resource file does not exist in the resource file directory of the source branch, then the operation type of the second resource file is determined to be deletion.

11. The method according to claim 9, characterized in that, The step of merging the source branch and the target branch according to the operation type of the second resource file, using the merging method corresponding to the operation type, to obtain the target resource file directory of the preset application in the target branch, includes: If the operation type of the second resource file is add, then copy the second resource file to the resource file directory of the target branch; or, If the operation type of the second resource file is modification, then update the second resource file to the resource file directory of the target branch; or, If the operation type for the second resource file is deletion, then the second resource file is deleted from the resource file directory of the target branch.

12. The method according to claim 1, characterized in that, The method further includes: The target resource file directory is synchronized to the first database of the preset application.

13. The method according to claim 1, characterized in that, The method further includes: Based on the second resource modification file list, store the file identifier, branch information, and version number of each second resource file in the second database.

14. The method according to claim 13, characterized in that, The method further includes: Based on the second list of modified resource files, retrieve the historical merge version number from the second database; Based on the historical merge version number and the current version number of the resource file directory of the source branch, determine the modification requirement identifier of each second resource file; A list of affected files is generated based on the modification requirement identifiers of each of the second resource files and the identifiers of each of the second resource files.

15. A resource merging device, characterized in that, The device includes: The first acquisition module is used to acquire a resource merging request for a preset application. The resource merging request includes: development branch information and the identifier of the target requirement. The second acquisition module is used to acquire the identifier of the source branch and the identifier of the target branch based on the development branch information. The first generation module is used to generate a first resource modification file list for the target requirement under the source branch based on the identifier of the source branch and the identifier of the target requirement; The search module is used to search for the associated files of each first resource file in the first resource modification file list from the resource file directories of the source branch and the target branch according to the first resource modification file list, and generate a target associated file list; The second generation module is used to generate a second resource modification file list based on the first resource modification file list and the target associated file list; The merging module is used to merge the source branch and the target branch according to the second list of modified resource files to obtain the target resource file directory of the preset application in the target branch; Specifically, the search module is used to: perform dependency analysis on resource files in the resource file directories of the source branch and the target branch to generate a dependency mapping table for all resource files; reverse-engineer the dependency mapping table for all resource files to obtain a reference mapping table for all resource files; and, based on the first list of modified resource files and using the reference mapping table for all resource files, search for associated files of the first resource files in the resource file directories of the source branch and the target branch to generate the target associated file list.

16. An electronic device, characterized in that, include: The device includes a processor, a storage medium, and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of a resource merging method as claimed in any one of claims 1 to 14.

17. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of a resource merging method as described in any one of claims 1 to 14.

Citation Information

Patent Citations

  • Information processing method and apparatus, electronic device, and storage medium

    CN109358898A

  • Code compiling method, device and system, computer device and storage medium

    CN110531984A