Code branch management system for comparing main code branch with new code branch and / or updating main code branch using new code branch

Through the user interface, code base and test server of the code branch management system, the new code branch is automatically tested, solving the problem of code merge defects in multi-person collaborative development, and achieving efficient and reliable code merge and performance management.

CN120266101APending Publication Date: 2025-07-04HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202280102062.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2022-11-29
Publication Date
2025-07-04

AI Technical Summary

Technical Problem

The existing technology cannot effectively manage code branches developed by multiple people, resulting in the introduction of code defects when new code branches are merged into the main code branch, reducing system performance, and difficult to locate and solve.

Method used

Provides a code branch management system, including a user interface, code base and test server, by obtaining configuration information, automates testing new code branches and determines performance changes, generates result files, and supports efficient comparison and merging of main code branches and new code branches.

Benefits of technology

It improves the efficiency of team code development, reduces defects during code merging, ensures software quality, and improves the performance of the code system and the reliability of merging.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120266101A_ABST
    Figure CN120266101A_ABST
Patent Text Reader

Abstract

The invention relates to managing code branches. A code branch management system and a corresponding method for operating the code branch management system are presented. The code branch management system includes a user interface, a code library, and a test server for comparing a main code branch to a new code branch and / or updating the main code branch with the new code branch. The method comprises the following steps: acquiring configuration information by using the user interface; using the user interface to provide the configuration information to the test server; using the test server to obtain the new code branch from the code library based on the configuration information; determining, using the test server, a configured test based on the new code branch and the configuration information; and determining a result file through the configured test by using the test server.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to managing code branches. The present invention proposes a code branch management system and a corresponding method for operating the code branch management system. The code branch management system includes a user interface, a code library, and a test server for comparing a main code branch with a new code branch and / or updating the main code branch with the new code branch. Background Art

[0002] During the process of simultaneously developing the same set of software code, it may be necessary to generate multiple code branches based on a main code branch. After developing and testing the code branches, developers need to integrate the code branches into the main code branch. Without careful inspection, the integration of the new code branch may introduce code defects and reduce the performance of the entire code system.

[0003] Traditional code update support systems include basic test criteria that are defined for simple development tasks such as web development. Generally, the test criteria interface and check the business logic. However, these traditional types of test systems cannot be customized for in-depth algorithm development and cannot meet the test requirements for multiple team members to jointly develop the same algorithm code. Summary of the Invention

[0004] In the case of multiple people simultaneously developing the same set of code, the code quality of the software should be ensured. However, without a complete test system design, the efficiency of collaborative code development may be very low. When a new code branch is merged into the main code branch, code defects may be merged into the main code branch and may accumulate. These code errors may cause various operation errors in the future and may be difficult to locate.

[0005] In view of the above, an object of the present invention is to provide a code test system for efficiently comparing a main code branch with one or more new code branches and / or updating the main code branch with one or more new code branches. Another objective is to provide an automated code test system to effectively improve the team code development efficiency and / or support the synchronous automated performance comparison of multiple code branches.

[0006] These and other objectives are achieved by the present invention as described in the appended independent claims. Advantageous implementations are further defined in the dependent claims.

[0007] A first aspect of the present invention provides a method for operating a code branch management system, the management system being used to compare a main code branch with a new code branch and / or update the main code branch using the new code branch. The management system includes a user interface, a code library, and a test server. The method includes: obtaining configuration information using the user interface, providing the configuration information to the test server using the user interface, obtaining the new code branch from the code library by the test server based on the configuration information, determining a configured test by the test server based on the new code branch and the configuration information, and determining a result file by the test server through the configured test.

[0008] Therefore, new software and / or new code branches can be tested efficiently.

[0009] The code management system may include a mobile device, wherein the mobile device may include at least one of the user interface, the code library, and the test server.

[0010] For example, the mobile device may include a user interface, and the code library and the test server may be included in one or more external devices. Therefore, the processing requirements for the mobile device can be efficiently reduced.

[0011] In an implementation manner of the first aspect, the configuration information includes at least one of code branch information, data selection information, and operation mode information.

[0012] The test server may obtain the new code branch from the code library based on the code branch information.

[0013] The test server may determine the configured test based on the new code branch and the operation mode information and / or based on the data selection information.

[0014] In another implementation manner of the first aspect, the determining of the configured test includes: generating an executable file through code compilation using the new code branch and the configuration information (such as the operation mode information), and / or generating a running script for the configured test based on the configuration information (such as based on the operation mode information).

[0015] In another implementation manner of the first aspect, wherein the determining of the result file includes: obtaining a test data set from a pre-determined test database based on the configuration information (such as based on the data selection information), and executing the executable file based on the running script and the test data set to generate a log or the result file.

[0016] The data selection information may include indication information for a test data set of the test database. The test database may include one or more test data sets, which may be pre-determined.

[0017] In another implementation of the first aspect, the determined result file further includes: extracting information from the log and / or analyzing the information in the log to generate the result file.

[0018] In another implementation of the first aspect, the method further includes: using the test server to determine a performance change between the main code branch and the new code branch by comparing the result file with baseline data.

[0019] The method may further include summarizing the performance change to generate one or more test results.

[0020] The test server may automatically determine whether the new code branch is superior to the main code branch.

[0021] In another implementation of the first aspect, the method further includes: selecting the baseline data from a pre-determined baseline data set based on the configuration information (e.g., based on the data selection information).

[0022] The baseline data set may be based on the main code branch and / or the configuration information, such as data selection information and / or code branch information.

[0023] In another implementation of the first aspect, the result file is a first result file associated with the new code branch, wherein the baseline data is included in a second result file associated with the main code branch.

[0024] In another implementation of the first aspect, the method further includes: determining the performance change based on one or more performance metrics.

[0025] In another implementation of the first aspect, the method further includes: summarizing (e.g., visualizing) the performance change based on the one or more performance metrics to generate one or more test results.

[0026] The performance change may be summarized using at least one of the following: one or more scores, one or more charts, one or more bar graphs, and one or more box plots.

[0027] Thus, for example, by determining whether one score is greater than another score and / or higher than a threshold, or whether a characteristic value of a chart is higher than another characteristic value of another chart and / or higher than a threshold, it can be efficient to determine whether to merge the new code branch and the main code branch.

[0028] In another implementation of the first aspect, the one or more performance metrics are determined based on the configuration information (e.g., based on the operating mode information).

[0029] In another implementation of the first aspect, the result file includes one or more test results indicating the performance change between the main code branch and the new code branch.

[0030] The performance change can be indicated by one or more scores. Thus, for example, by determining whether one score is greater than another score and / or higher than a threshold, it can be efficient to determine whether to merge the new code branch and the main code branch.

[0031] In another implementation of the first aspect, the method further includes: using the test server to provide the one or more test results to the user interface and / or the code repository.

[0032] In another implementation of the first aspect, the user interface includes a display, and the method further includes: using the user interface to display the one or more test results on the display.

[0033] The one or more test results can be displayed and / or visualized for the user.

[0034] In another implementation of the first aspect, the method further includes: using the test server to determine whether the new code branch should be merged with the main code branch based on the one or more test results; if the new code branch should be merged with the main code branch, using the code repository to merge the new code branch with the main code branch.

[0035] Thus, the code branches can be updated automatically and efficiently.

[0036] In another implementation of the first aspect, the one or more test results include one or more scores, and determining whether the new code branch should be merged with the main code branch includes: comparing the one or more scores with one or more thresholds.

[0037] The one or more thresholds can be predetermined based on the configuration information and / or based on the baseline data.

[0038] The one or more thresholds can be based on at least one of the operating mode information, the code branch information, and the data selection information.

[0039] In another implementation of the first aspect, the method further includes: using the test server to provide notification information to the user interface to indicate whether the new code branch is merged with the main code branch.

[0040] Therefore, the user can be notified. Thus, the user can accept the merge or cancel the merge.

[0041] In another implementation of the first aspect, the method further includes: if the new code branch is merged with the main code branch, using the test server to modify the baseline data based on the result file.

[0042] Therefore, the baseline data can be automatically updated. Thus, it can be automatically determined whether another code branch can be merged with the current main code branch based on the modified baseline data.

[0043] The second aspect of the present invention provides a code branch management system for comparing a main code branch with a new code branch and / or updating the main code branch with the new code branch. The management system includes a user interface, a code repository, and a test server. Among them, the user interface is used to obtain configuration information and provide the configuration information to the test server. The test server is used to obtain the new code branch from the code repository based on the configuration information, determine configured tests based on the new code branch and the configuration information, and determine a result file based on the configured tests.

[0044] In an implementation of the second aspect, the code management system includes a mobile device, where the mobile device includes at least one of the user interface, the code repository, and the test server.

[0045] The third aspect of the present invention provides a computer program product including program code that, when executed on a computer, is used to execute the method according to any implementation of the first aspect.

[0046] The system of the second aspect may have an implementation corresponding to the implementation of the method of the first aspect. The system of the second aspect and its implementation realizes the advantages and effects of the method of the first aspect and its corresponding implementation.

[0047] In addition, in the present invention, the phrases "code repository" and "code library" can be used interchangeably.

[0048] It should be noted that all the devices, elements, units and apparatuses described in the present invention can be implemented in software or hardware elements or any combination thereof. All the steps performed by the various entities described in the present invention and the functions to be performed by the various entities described are intended to mean that the corresponding entities are used to perform the corresponding steps and functions. Although in the description of the following specific embodiments, the specific functions or steps performed by external entities are not reflected in the description of the specific detailed elements of the entities performing the specific steps or functions, those skilled in the art should be clear that these methods and functions can be implemented by the corresponding software or hardware elements or any combination thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In conjunction with the accompanying drawings, the following description of specific embodiments will elaborate on the above aspects and their implementation manners. In the drawings:

[0050] Figure 1 Shows the management system provided by an embodiment of the present invention.

[0051] Figure 2 Shows an exemplary code branch management system architecture provided by an embodiment of the present invention.

[0052] Figure 3 Shows an exemplary test result including the visualization of the mapping result provided by an embodiment of the present invention.

[0053] Figure 4 Shows the visualization of an exemplary test result provided by an embodiment of the present invention.

[0054] Figure 5 Shows the method provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0055] Figure 1 Shows the code branch management system 100 provided by an embodiment of the present invention. The management system 100 is used to compare the main code branch 100a with the new code branch 100b and / or update the main code branch 100a using the new code branch 100b. The management system 100 includes a user interface 101, a code library 102, and a test server 103. The user interface 101 is used to obtain configuration information 104 based on input information from a user, for example, and provide the configuration information 104 to the test server 103. The test server 103 is used to obtain the new code branch 100b from the code library 102 based on the configuration information 104. The test server 103 is also used to determine a configured test 105 based on the new code branch 100b and the configuration information 104, and determine a result file 106 through the configured test 105.

[0056] Figure 2 Shows an exemplary code branch management system architecture provided by an embodiment of the present invention.

[0057] The management system 100 includes three modules: a user interface 101, a code library 102 (which can also be referred to as a code repository), and a test server 103. These three modules can be deployed on the same computer or device, or can be distributed across different computers or devices. For example, the one or more devices can be a mobile phone. In another example, the test server can be included in dedicated processing hardware. A user can initiate a test configuration by entering configuration information 104 in the user interface 101. The configuration information 104 can include, but is not limited to, code branch information, data selection information, and run mode information. The configuration information 104 can be sent to the test server 103 to run the corresponding configured test 105. After receiving a command, for example, based on the configuration information and / or run mode information, the test server 103 can be used to obtain the corresponding code branch, such as a new code branch 100b, from the code library 102 to run the configured test 105 to generate a result file 106. The result file 106 can include one or more test results 107 indicating a performance change between the main code branch 100a and the new code branch 100b. For example, the performance change can be indicated by a summary and / or visualization of the performance change. Alternatively, the test server 103 can be used to determine the performance change between the main code branch 100a and the new code branch 100b by comparing the result file 105 with baseline data. In addition, the performance change can be summarized (e.g., visualized) based on one or more performance metrics to generate one or more test results 107.

[0058] In addition, the test server 103 can be used to send one or more test results 107 of the configured test 105 to the user interface 101 and the code repository 102. After receiving the one or more test results 107, the user can determine whether to merge the tested code branch code 100b into the main code branch 100a. Alternatively or additionally, the test server can automatically determine whether to merge the tested code branch code 100b into the main code branch 100a.

[0059] The user interface 101 can be implemented in various forms, such as a command line and Jenkins. In the user interface 101, test parameters can be entered, such as run mode, test data, and / or code branch information. The test parameters can describe the most important characteristics of the test 105 to be executed, such as which code branch to test, which result files 106 to compare, or which metrics (e.g., performance metrics) to use to evaluate the result file 106 and generate one or more test results 107. These test characteristics can be user-defined and can be extended based on test characteristic requirements. When these test characteristics are assigned their corresponding values, the configured test 105 can start running.

[0060] After receiving a test instruction, the test server 103 can be used to obtain the code branch 100b to be tested from the code repository 102. The code branch can be used to generate an executable file through code compilation. Based on the configuration information 104, a corresponding running script can be generated. The code running module can extract the corresponding test data, execute the executable file, and generate a log. Then, the log analysis module can extract and analyze the important information of the operation and generate a corresponding result file 106 for subsequent performance evaluation. For example, in the result visualization module, the performance evaluation module can compare the result file 106 with the latest baseline data, find performance changes, and summarize (e.g., display or visualize) the performance changes based on one or more performance metrics. The result visualization module can generate scores, charts, bar graphs, and / or box plots. One or more test results 107 of the performance evaluation can be sent back to the test user interface 101 and the code repository 102 and / or can be used to automatically merge the new code branch 100b and the main code branch 100a. Developers or users can observe one or more test results 107 and determine whether to merge the code branch 100b to be tested into the main code branch 100a.

[0061] The user inputs important test parameters such as the running mode, test data, etc. Here, two different code branches are compared.

[0062] Figure 3 An exemplary test result including the trajectory visualization of the mapping result provided by an embodiment of the present invention is shown.

[0063] After running the log analysis module, the management system can extract the trajectory information of the current run. The performance evaluation module can calculate the error between the trajectory information and the recorded ground truth. The error metrics can be, for example, relative position error (RPE) and absolute translation error (ATE), where RPE is the error of the inter-frame change between the actual trajectory and the estimated trajectory, and ATE is the absolute trajectory error that directly measures the difference between the ground truth and the estimated trajectory points. The estimated pose sequence can be P_1, P_2, ……, P_n, the ground truth pose sequence can be Q_1, Q2, ……, Q_n, and the time interval can be Δ. The RPE of the i-th frame can be defined as follows:

[0064]

[0065] The ATE of the i-th frame can be defined as follows:

[0066]

[0067] After the calculation is completed, the result 106 of the calculation can be compared with the latest baseline data to detect performance changes, and the changes can be displayed in the result visualization module, as Figure 4 shown.

[0068] Figure 4 shows the visualization of the exemplary test results provided by the embodiments of the present invention.

[0069] One or more test results 107 can be sent back to the user interface 101 and the code repository 102. The user can view one or more test results 107 and determine whether to merge the new code branch 100b into the main code branch 100a. Alternatively or additionally, a management system can be used to automatically determine whether to merge the code branch 100b into the main code branch 100a based on one or more test results 107.

[0070] Figure 5 shows the method 200 provided by the embodiments of the present invention. The method 200 can be executed by the management system 100. Generally, the management system 100 includes a user interface 101, a code repository 102, and a test server 103. The method 200 includes step 201: obtaining configuration information 104 using the user interface 101. In addition, the method 200 includes step 202: providing the configuration information 104 to the test server 103 using the user interface 101. In addition, the method 200 includes step 203: using the test server 103 to obtain a new code branch 100b from the code repository 102 based on the configuration information 104. In addition, the method 200 includes step 204: using the test server 103 to determine a configured test 105 based on the new code branch 100b and the configuration information 104. In addition, the method 200 includes step 205: using the test server 103 to determine a result file 106 through the configured test 105.

[0071] The present invention provides a design solution for efficient software testing. This solution can be applied to the testing of any software and algorithm system. Different from general Web interface testing, this testing solution allows developers or users to customize the system performance they want to test. For example, developers or users can define baseline data and test characteristics. This test system can be used to automatically test software performance, which improves development efficiency and reduces the software performance degradation caused by new code merging in the case where multiple developers or users work on the same code set.

[0072] The management system 100 can include a processor. For example, the user interface 101 and / or the test server 102 can include a processor.

[0073] Generally, a processor can be used to perform, conduct, or initiate the various operations of the management system 100 described herein. The processor can include hardware and / or can be controlled by software. The hardware can include analog circuits or digital circuits, or both analog and digital circuits. The digital circuits can include components such as application-specific integrated circuits (ASICs), field-programmable arrays (FPAs), digital signal processors (DSPs), or general-purpose processors. The management system 100 can also include a memory circuit that stores one or more instructions that can be executed by the processor (specifically, executed under the control of software). For example, the memory circuit can include a non-transitory storage medium that stores executable software code that, when executed by the processor, causes the management system 100 to perform various operations. In one embodiment, the management system 100 can include one or more processors and a non-transitory memory connected to the one or more processors. The non-transitory memory can carry executable program code that, when executed by the one or more processors, causes the management system 100 to perform, conduct, or initiate the operations or methods described herein.

[0074] The present invention has been described in connection with various embodiments as examples and implementations. However, upon study of the drawings, the present disclosure, and the independent claims, other variations can be understood and effected by those skilled in the art in practicing the claimed subject matter. In the claims as well as in the specification, the word "comprising" does not exclude other elements or steps, and the word "a" does not exclude a plurality. A single element or other unit can fulfill the functions of several entities or items recited in the claims. The fact that certain measures are recited in mutually different dependent claims does not indicate that a combination of these measures cannot be used to advantage.

Claims

1. A method (200) for operating a code branch management system (100), characterized in that, The management system (100) is used to compare the main code branch (100a) with the new code branch (100b) and / or update the main code branch (100a) using the new code branch (100b). The management system (100) includes a user interface (101), a code library (102), and a test server (103). The method includes: Obtaining (201) configuration information (104) using the user interface (101). Providing (202) the configuration information (104) to the test server (103) using the user interface (101). Obtaining (203) the new code branch (100b) from the code library (102) by the test server (103) based on the configuration information (104). Determining (204) a configured test (105) by the test server (103) based on the new code branch (100b) and the configuration information (104). Determining (205) a result file (106) by the test server (103) through the configured test (105).

2. The method (200) according to claim 1, wherein: The configuration information (104) includes at least one of code branch information, data selection information, and operating mode information.

3. The method (200) according to any one of the above claims, wherein: The determining (204) of the configured test (105) includes: Generating an executable file by code compilation using the new code branch (100b) and the configuration information (104), and / or Generating a running script for the configured test (105) based on the configuration information (104).

4. The method (200) according to claim 3, wherein: The determining (205) of the result file (106) includes: Obtaining a test data set from a pre-determined test database based on the configuration information (104). Executing the executable file based on the running script and the test data set to generate a log or the result file (106).

5. The method (200) according to claim 4, wherein: The determining (205) of the result file (106) further includes: Extracting information from the log and / or analyzing the information in the log to generate the result file (106).

6. The method (200) according to any one of the above claims, wherein: The method (200) further includes: Determining the performance change between the main code branch (100a) and the new code branch (100b) by the test server (103) by comparing the result file (106) with baseline data.

7. The method (200) according to claim 6, wherein: The method (200) further includes: Selecting the baseline data from a pre-determined baseline data set based on the configuration information (104).

8. The method (200) according to claim 6 or 7, wherein: The result file (106) is a first result file associated with the new code branch (100b), and the baseline data is included in a second result file associated with the main code branch (100a).

9. The method according to any one of claims 6 to 8, characterized in that, the method further comprises: determining the performance change based on one or more performance metrics.

10. The method (200) according to claim 9, characterized in that, the method (200) further comprises: summarizing the performance change based on the one or more performance metrics to generate one or more test results.

11. The method (200) according to claim 9 or 10, characterized in that, the one or more performance metrics are determined based on the configuration information (104).

12. The method (200) according to any one of claims 1 to 5, characterized in that, the result file (106) includes one or more test results indicating a performance change between the main code branch (100a) and the new code branch (100b).

13. The method (200) according to any one of claims 10 to 12, characterized in that, the method (200) further comprises: using the test server (103) to provide the one or more test results to the user interface (101) and / or the code library (102).

14. The method (200) according to claim 13, characterized in that, the user interface (101) includes a display, and the method (200) further comprises: using the user interface (101) to display the one or more test results on the display.

15. The method (200) according to any one of claims 10 to 14, characterized in that, the method (200) further comprises: using the test server (103) to determine whether the new code branch (100b) should be merged with the main code branch (100a) based on the one or more test results, and if the new code branch (100b) should be merged with the main code branch (100a), using the code library (102) to merge the new code branch (100b) with the main code branch (100a).

16. The method (200) according to claim 15, characterized in that, the one or more test results include one or more scores, and the determining whether the new code branch (100b) should be merged with the main code branch (100a) comprises: comparing the one or more scores with one or more thresholds.

17. The method (200) according to claim 15 or 16, characterized in that, the method (200) further comprises: using the test server (103) to provide notification information to the user interface (101) to indicate whether the new code branch (100b) is merged with the main code branch (100a).

18. The method (200) according to any one of claims 15 to 17, characterized in that, The method (200) further includes: If the new code branch (100b) is merged with the main code branch (100a), the test server (103) is used to modify the baseline data based on the result file (106).

19. A code branch management system (100), characterized in that, The management system (100) is used to compare the main code branch (100a) with the new code branch (100b) and / or update the main code branch (100a) using the new code branch (100b). The management system (100) includes a user interface (101), a code library (102), and a test server. The user interface (101) is used to obtain configuration information (104), and provide the configuration information (104) to the test server (103). The test server (103) is used to obtain the new code branch (100b) from the code library (102) based on the configuration information (104), determine a configured test (105) based on the new code branch (100b) and the configuration information (104), and determine a result file (106) through the configured test (105).

20. The code branch management system (100) according to claim 19, wherein the code management system (100) includes a mobile device, the mobile device includes at least one of the user interface (101), the code library (102), and the test server (103).

21. A computer program product, characterized in that, including program code that, when executed on a computer, is used to execute the method (200) according to any one of claims 1 to 18.