A continuous integration method, system, storage medium and computer device

By using the object identifier of the integrated code library to pull code and perform local processing in the local terminal, the problems of server resource blocking and feedback delay in continuous integration of automotive electronic software are solved, and the efficiency of continuous integration is improved.

CN119781820APending Publication Date: 2025-04-08SHANGHAI XUANYI NEW ENERGY DEV CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411710484.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-27
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

In the existing continuous integration method of automotive electronic software, centralized integration of servers can easily lead to resource blockage, reduce integration efficiency, and there is a delay in the feedback process, affecting integration efficiency.

Method used

The object identifier of the integrated code base built on the server is used to pull the code in the integrated code base locally for processing, including data interface detection, compile file construction, compile file compilation, and generate executable files.

Benefits of technology

It solves the inefficiency problem caused by centralized integration resource blocking of servers, and uses local rapid feedback on the problems in the integration process to achieve local resolution and improve the efficiency of continuous integration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119781820A_ABST
    Figure CN119781820A_ABST
Patent Text Reader

Abstract

The present invention discloses a continuous integration method, system, storage medium and computer equipment. The present invention adopts the object identification of the integrated code library to pull the code in the integrated code library to the local for local processing, thereby solving the problem of low integration efficiency caused by the blockage of centralized integration resources on the server. Meanwhile, local processing can quickly feedback the problems in the integration process locally, realize local solutions and improve the efficiency of continuous integration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a continuous integration method, system, storage medium and computer equipment, belonging to the technical field of automated testing. Background Art

[0002] With the development of automotive electronic software, the software functions of automobiles are becoming more and more abundant, the software development is becoming more and more complex, and the software development cycle is becoming shorter and shorter. In order to adapt to the development iteration cycle of automotive electronic software and ensure the quality of the software development process, continuous integration (CI) is adopted in the development process of automotive electronic software. At present, continuous integration in the automotive electronics industry is based on the centralized integration of server versions. The CI integration pipeline is deployed on the server. The developers of the team submit various functional components to the server side, triggering the server-side integration pipeline to complete the continuous integration of the changes of various functional components. With the increase of team members and the increase of integration submission frequency, this method can easily cause the blockage of integration tasks and reduce integration efficiency. At the same time, most of the integration problems on the server side are sent to the corresponding developers by email. There is a delay in the feedback process, and the integration personnel cannot quickly get feedback on the integration problems, which reduces the integration efficiency. Summary of the invention

[0003] The present invention provides a continuous integration method, system, storage medium and computer equipment, which solve the problems disclosed in the background technology.

[0004] According to one aspect of the present disclosure, a continuous integration method is provided, the method being implemented on a local single terminal, comprising: Use the object identifier of the integrated code library built by the server to pull the code in the integrated code library to the local computer. Each time you submit code to the integrated code library, a unique object identifier is generated, which is used to indicate the version of the submitted code. The code pulled to the local computer is sequentially tested for data interfaces, compiled file construction, and compiled file compilation to generate an executable file.

[0005] The above method uses the object identifier of the integrated code library to pull the code in the integrated code library to the local for local processing, which solves the problem of centralized integration resource blocking on the server, resulting in low integration efficiency. At the same time, local processing can quickly feedback problems in the integration process locally, achieve local solutions, and improve the efficiency of continuous integration.

[0006] In some embodiments of the present disclosure, the integrated code library includes multiple sub-libraries, and different sub-libraries store codes of different layers of software. Storing codes of different layers of software in different sub-libraries facilitates code tracing and subsequent continuous integration.

[0007] In some embodiments of the present disclosure, the data interface detection process includes: using an automated script to extract all input interfaces of the code to be detected, and if all input interfaces can find associated output interfaces in the output interface library, the data interface detection of the code to be detected passes; wherein the output interface library is a library constructed of all code output interfaces. Using an automated script to perform data interface detection is fast, which further improves efficiency.

[0008] In some embodiments of the present disclosure, the compilation file construction process includes: using an automated script to construct the code into a compilable file. The compilation file is constructed by using an automated script, and the compilation file is constructed quickly, further improving efficiency.

[0009] In some embodiments of the present disclosure, the compilation process of the compiled file includes: using an automated script to call a compilation tool, compiling the compiled file, and obtaining an executable file. The automated script is used to compile the compiled file, and the compiled file is compiled quickly, further improving efficiency.

[0010] In some embodiments of the present disclosure, the integrated code base is a code base of the git platform, and the object identifier is a hash code value generated according to the submitted code. The git platform is combined for continuous integration. The git platform is an existing mature platform with easy access and stable performance, thereby further ensuring the efficiency of continuous integration.

[0011] According to another aspect of the present disclosure, a continuous integration system is provided, the system being loaded on a local single terminal, comprising: The pull module uses the object identifier of the integrated code library built by the server to pull the code in the integrated code library to the local computer. Each time a code is submitted to the integrated code library, a unique object identifier is generated, which is used to indicate the version of the submitted code. The local processing module performs data interface detection, compilation file construction and compilation file compilation on the code pulled to the local computer in turn to generate an executable file.

[0012] The above system uses the object identifier of the integrated code library to pull the code in the integrated code library to the local for local processing, which solves the problem of centralized integration resource blocking on the server, resulting in low integration efficiency. At the same time, local processing can quickly feedback problems in the integration process locally, achieve local solutions, and improve the efficiency of continuous integration.

[0013] In some embodiments of the present disclosure, in the pull module, the integrated code library includes multiple sub-libraries, and different sub-libraries store codes of different layers of software. Storing codes of different layers of software in different sub-libraries facilitates code tracing and subsequent continuous integration.

[0014] According to another aspect of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores one or more programs, wherein the one or more programs include instructions, and when the instructions are executed by a computing device, the computing device performs a continuous integration method.

[0015] Similar to the continuous integration method, this storage medium uses the object identifier of the integrated code library to pull the code in the integrated code library to the local for local processing, which solves the problem of centralized integration resources on the server being blocked, resulting in low integration efficiency. At the same time, local processing can quickly provide feedback on problems in the integration process locally, achieve local solutions, and improve the efficiency of continuous integration.

[0016] According to another aspect of the present disclosure, a computer device is provided, including one or more processors and one or more memories, one or more programs are stored in the one or more memories and are configured to be executed by the one or more processors, and the one or more programs include instructions for executing a continuous integration method.

[0017] Similar to the continuous integration method, this computer device uses the object identifier of the integrated code library to pull the code in the integrated code library to the local for local processing, which solves the problem of centralized integration resources on the server being blocked, resulting in low integration efficiency. At the same time, local processing can quickly provide feedback on problems in the integration process locally, achieve local solutions, and improve the efficiency of continuous integration.

[0018] The beneficial effects achieved by the present invention are as follows: the present invention uses the object identifier of the integrated code library to pull the code in the integrated code library to the local for local processing, thereby solving the problem of low integration efficiency caused by the blocking of centralized integration resources on the server. Meanwhile, local processing can quickly feedback problems in the integration process locally, thereby achieving local solutions and improving the efficiency of continuous integration. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 A flowchart of the continuous integration method; Figure 2 This is a schematic diagram of the continuous integration software pipeline; Figure 3 A block diagram of a continuous integration system. DETAILED DESCRIPTION

[0020] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. It is obvious that the described embodiments are only part of the embodiments of the present disclosure, rather than all the embodiments. The following description of at least one exemplary embodiment is actually only illustrative and is by no means intended to limit the present disclosure and its application or use. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present disclosure.

[0021] Unless otherwise specified, the relative arrangement of components and steps, the numerical expressions and numerical values ​​set forth in these embodiments do not limit the scope of the present disclosure.

[0022] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.

[0023] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered as part of the specification.

[0024] In all examples shown and discussed herein, any specific values ​​should be interpreted as merely exemplary and not as limiting. Therefore, other examples of the exemplary embodiments may have different values.

[0025] It should be noted that similar symbols and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it does not require further discussion in subsequent figures.

[0026] In order to solve the problems existing in the centralized integration of existing servers, the present disclosure proposes a continuous integration method, which is implemented in a local terminal, specifically, pulling the code in the integrated code library to the local terminal for local processing.

[0027] Figure 1 This is a schematic diagram of an embodiment of the continuous integration method disclosed in the present invention. Figure 1 The embodiment of can be executed by a local single terminal (such as a local stand-alone computer), and multiple terminals can realize distributed continuous integration, and each terminal adopts the same method (i.e. Figure 1 Continuous Integration approach).

[0028] like Figure 1 As shown, step 1 of the embodiment uses the object identifier of the integrated code library built by the server to pull the code in the integrated code library to the local; wherein, each time the code is submitted to the integrated code library, a unique object identifier is generated, and the object identifier is used to represent the version of the submitted code.

[0029] It should be noted that git is an open source distributed version control system that can effectively and quickly handle version management of projects from very small to very large. Therefore, the continuous integration here can be implemented based on git. The git platform is an existing mature platform. It is a git platform for code management, such as GitHub, GitLab, etc. It is easy to obtain and has stable performance, which further ensures the efficiency of continuous integration.

[0030] In the initial stage of implementation, you can first build a code base for the git platform (that is, the integrated code base mentioned above). Specifically, you can use the git tool to establish a code base to store the source code files, libraries, configuration files, scripts, etc. required for integrated compilation.

[0031] In some embodiments, in order to store different codes, multiple sub-libraries are established in the integrated code library, and different sub-libraries store codes of different layers of the software; storing codes of different layers of the software in different sub-libraries facilitates code tracing and subsequent continuous integration.

[0032] For example, two sub-libraries can be created in the code library of the git platform, one for storing the application layer code (ie, ASW code) and the other for storing the underlying code (ie, BSW code).

[0033] It should be noted that in the git platform, the hash code value is a hash string, which refers to the hash value of the commit object. In git, each commit will generate a unique hash string to represent the content and status of the commit. The hash string is a string composed of 40 hexadecimal characters, which can uniquely identify a commit object. The generation process of the hash string changes according to the changes in the content and status of the commit. As long as there is a change, a new hash string will be generated, which enables git to accurately track the changes of each commit and record the history of each commit. The hash string generation algorithm uses the SHA-1 (Secure Hash Algorithm 1) hash function, which is an irreversible algorithm, that is, the original data cannot be derived from the hash value. Therefore, even if the hash string is known, the original commit content and status cannot be restored. In git, the gitrev-parse HEAD command can be used to obtain the latest hash code value.

[0034] Therefore, in the git platform, hash code values ​​are used as object identifiers. The different hash code values ​​generated by each submission of the git library can be used to distinguish and track the differences between sub-library Stock1 and sub-library Stock2. Based on the hash code value, the integrated versions and code traceability can be distinguished.

[0035] It should be noted that code pulling is an existing operation method of the git platform. The current code pulling methods include using the Git command line to pull code, using the Git GUI tool to pull code, and using the Git tool integrated with the IDE to pull code. No matter which method is used, after pulling the code, a folder identical to the code repository will be generated locally, which contains all the code files and history records. You can manage and update the code through Git's related commands and tools.

[0036] return Figure 1 In step 2 of the embodiment, the code pulled to the local computer is sequentially subjected to data interface detection, compilation file construction and compilation file compilation to generate an executable file.

[0037] In some embodiments, an automated script may be used to perform data interface detection, compile file construction, and compile the compiled file on the locally pulled code in sequence to generate an executable file. The automated script is used for local processing, which is fast and further improves efficiency.

[0038] The data interface detection process can be: using an automated script to extract all input interfaces of the code to be detected. If all input interfaces can find associated output interfaces in the output interface library, the data interface detection of the code to be detected passes; wherein the output interface library is a library constructed by all code output interfaces. Here, the automated script is used to perform data interface detection, which is fast and further improves efficiency.

[0039] Taking the above two sub-libraries as an example, the data interface detection of all code components of sub-libraries Stock1 and Stock2 is pulled: the input and output interfaces of all codes are extracted, and the input interface library B1 and the output interface library B2 are established; when the code generation pipeline reaches this step (i.e., the interface detection step), all input interfaces of the code to be detected are extracted to check whether the input interface of the code to be detected is in the output interface library B2. If not (i.e., the input interface of the code to be detected cannot find other model output interfaces in the library, i.e., there is no associated other model output interface), the pipeline is terminated, and the input interfaces not included in the output interface library B2 are recorded in the pipeline report. All input interfaces of the code to be detected can find corresponding output interfaces in the output interface library B2, i.e., the detection is passed.

[0040] It should be noted that the data interface detection here can realize interface extraction, interface library establishment, etc. through Python scripts.

[0041] The compilation file construction process can be: using an automated script to build the code into a compilable file. The automated script is used to build the compilation file, and the compilation file is built quickly, further improving the efficiency.

[0042] For example, you can use the scons script to operate and build the code of the sub-library Stock1 and the sub-library Stock2, so that it outputs compiled files that can be recognized by the compiler.

[0043] The compilation process of the compiled file can be: using an automated script to call a compilation tool, compiling the compiled file, and obtaining an executable file. The compiled file is compiled quickly by using an automated script, which further improves efficiency.

[0044] For example, a compiler (such as a HighTec compiler) can be called through a python script to compile the target processor and output a file that can be executed by the processor.

[0045] It should be noted that since the method is implemented in the local terminal, a GUI graphical interface can be established in the local terminal, in which the hash code value input terminal corresponding to the font library is set, options such as whether to perform interface detection are set, an input interface box for the software integration version number, a button for starting integration, etc. By starting the integration button, code pulling, interface detection and other operations can be automatically executed to complete continuous integration and output execution files.

[0046] See also Figure 2 , taking the git platform as an example, the specific process of continuous integration can be as follows: 1) Build a code base on the git platform to store the source code files, libraries, configuration files, and scripts required for integrated compilation; 2) Create two sub-repositories in the constructed git platform repository, one for storing the ASW code sub-repository Stock1 and the other for storing the BSW code sub-repository Stock2; 3) The hash code value of each commit in the git repository is different, which can be used to distinguish and track the differences between sub-repositories Stock1 and Stock2; 4) Check the data interfaces of all components of the code of sub-libraries Stock1 and Stock2; 5) Use the scons script to operate and build the pulled sub-library Stock1 and sub-library Stock2 codes to output compiled files that can be recognized by the compiler; 6) Call the compiler (such as HighTec compiler) through the python script to compile the target processor and output the executable file of the processor.

[0047] The above method uses the object identifier of the integrated code library to pull the code in the integrated code library to the local for local processing, which solves the problem of centralized integration resource blocking on the server, resulting in low integration efficiency. At the same time, local processing can quickly feedback problems in the integration process locally, achieve local solutions, and improve the efficiency of continuous integration.

[0048] Figure 3 is a schematic diagram of an embodiment of the continuous integration system disclosed herein. Figure 3 The embodiment is a virtual system that can be loaded and executed by a local single terminal (such as a local stand-alone computer). Multiple terminals can realize distributed continuous integration, and each terminal loads and executes the same system (i.e. Figure 3 A continuous integration system), including a pull module and a local processing module.

[0049] The pulling module of the embodiment is configured to use the object identifier of the integrated code library built by the server to pull the code in the integrated code library to the local; wherein each time the code is submitted to the integrated code library, a unique object identifier is generated, and the object identifier is used to represent the version of the submitted code.

[0050] It should be noted that in the pull module, the integrated code library includes multiple sub-libraries, and different sub-libraries store the codes of different layers of the software. Storing the codes of different layers of the software in different sub-libraries facilitates code tracing and subsequent continuous integration.

[0051] The local processing module of the embodiment is configured to perform data interface detection, compilation file construction and compilation file compilation on the code pulled to the local in sequence to generate an executable file.

[0052] The above system uses the object identifier of the integrated code library to pull the code in the integrated code library to the local for local processing, which solves the problem of centralized integration resource blocking on the server, resulting in low integration efficiency. At the same time, local processing can quickly feedback problems in the integration process locally, achieve local solutions, and improve the efficiency of continuous integration.

[0053] Based on the same technical solution, the present disclosure also relates to a computer-readable storage medium, which stores one or more programs, and the one or more programs include instructions. When the instructions are executed by a computing device, the computing device executes a continuous integration method.

[0054] Similar to the continuous integration method, this storage medium uses the object identifier of the integrated code library to pull the code in the integrated code library to the local for local processing, which solves the problem of centralized integration resources on the server being blocked, resulting in low integration efficiency. At the same time, local processing can quickly provide feedback on problems in the integration process locally, achieve local solutions, and improve the efficiency of continuous integration.

[0055] Based on the same technical solution, the present disclosure also relates to a computer device, including one or more processors and one or more memories, one or more programs are stored in the one or more memories and are configured to be executed by the one or more processors, and the one or more programs include instructions for executing a continuous integration method.

[0056] Similar to the continuous integration method, this computer device uses the object identifier of the integrated code library to pull the code in the integrated code library to the local for local processing, which solves the problem of centralized integration resources on the server being blocked, resulting in low integration efficiency. At the same time, local processing can quickly provide feedback on problems in the integration process locally, achieve local solutions, and improve the efficiency of continuous integration.

[0057] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0058] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0059] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0060] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0061] The above are merely embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention are included in the scope of the claims of the present invention to be approved.

Claims

1. A continuous integration method, characterized in that: The method is implemented in a local single terminal, comprising: Use the object identifier of the integrated code library built by the server to pull the code in the integrated code library to the local computer. Each time you submit code to the integrated code library, a unique object identifier is generated, which is used to indicate the version of the submitted code. The code pulled to the local computer is sequentially tested for data interfaces, compiled file construction, and compiled file compilation to generate an executable file.

2. The method according to claim 1, characterized in that: The integrated code library includes multiple sub-libraries, and different sub-libraries store codes for different layers of the software.

3. The method according to claim 1, characterized in that The data interface detection process includes: An automated script is used to extract all input interfaces of the code to be detected. If all input interfaces can find associated output interfaces in the output interface library, the data interface detection of the code to be detected passes; among which, the output interface library is a library built for all code output interfaces.

4. The method according to claim 1, characterized in that The compilation file building process includes: using an automated script to build the code into a compilable file.

5. The method according to claim 1, characterized in that The compilation process of the compiled file includes: using an automated script to call a compilation tool, compiling the compiled file, and obtaining an executable file.

6. The method according to any one of claims 1 to 5, characterized in that The integrated code base is the code base of the git platform, and the object identifier is the hash code value generated based on the submitted code.

7. A continuous integration system, characterized in that: The system is loaded on a local single terminal and includes: The pull module uses the object identifier of the integrated code library built by the server to pull the code in the integrated code library to the local computer. Each time a code is submitted to the integrated code library, a unique object identifier is generated, which is used to indicate the version of the submitted code. The local processing module performs data interface detection, compilation file construction and compilation file compilation on the code pulled to the local computer in turn to generate an executable file.

8. The system according to claim 7, characterized in that In the pull module, the integrated code library includes multiple sub-libraries, and different sub-libraries store codes of different layers of the software.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores one or more programs, and the one or more programs include instructions. When the instructions are executed by a computing device, the computing device executes any one of the methods of claims 1 to 6.

10. A computer device, characterized in that: include: One or more processors and one or more memories, one or more programs are stored in the one or more memories and are configured to be executed by the one or more processors, and the one or more programs include instructions for executing any of the methods described in claims 1 to 6.