Software integration method, device and equipment, storage medium and vehicle
By comparing the software component information and configuration environment, only the differential modules are recompiled and the unchanged modules are reused, which solves the redundancy problem in software integration and improves iteration efficiency and resource utilization.
Patent Information
- Application Number
- CN202411058219.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-02
- Publication Date
- 2024-11-15
AI Technical Summary
The existing software integration methods have redundancy in the iteration process, taking into account both links and content, resulting in waste of resources and inefficiency.
By obtaining component information of the current version and previous version of the target software, comparing the configuration information, determining the target configuration environment, and recompiling the different development modules, reusing the unchanged module compilation products to achieve software integration.
It reduces the redundant work of software integration, improves the efficiency of the iteration process, saves time and costs, and reduces the resource usage of the integrated environment, making it easier to software version management and problem traceability.
Smart Images

Figure CN118963818A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of software management, and in particular to a software integration method, device, equipment, storage medium and vehicle. Background Art
[0002] Due to the expansion of business, the increase in vehicle models and the increasing demand for vehicle software functions, the version of vehicle software will continue to be iterated and updated. In the iterative process, software integration work will be redundant and will also take up a lot of human resources.
[0003] In order to solve the above problems, the existing technology starts with source code submission, downloads code from the source code configuration tool for automated construction, and after the construction is completed, uses Docker containers to create a deployment environment or integrates with the existing environment to achieve functional test script management, performance test script management, compatibility test script management and code vulnerability scanning configuration management, providing an integrated environment for functional testing, performance testing, compatibility testing, and source code auditing, executing various tests, and managing the results in a unified manner. It can be seen that the above method uses an automated way to build a complex continuous integration and testing environment, which not only reduces the investment in labor costs, but also improves software integration and R&D efficiency, ensuring that the project is accelerated to quickly iterate the software version in the market.
[0004] However, the above solution needs to take into account many links and contents, and there will still be redundancy in the software integration work during the iteration process, so there is still room for improvement. Summary of the invention
[0005] One of the objects of the present invention is to provide a software integration method to solve the problem that the existing software integration method has too many links and contents to consider, and there is still redundancy in the software integration work during the iteration process, so there is still room for improvement. The second object is to provide a software integration device, the third object is to provide an electronic device, the fourth object is to provide a computer-readable storage medium, and the fifth object is to provide a vehicle.
[0006] In order to achieve the above object, the technical solution adopted by the present invention is as follows:
[0007] A first aspect of an embodiment of the present invention provides a software integration method, the method comprising:
[0008] Obtaining first component information of a current version of target software and second component information of a previous version, wherein the target software includes a plurality of development modules, the first component information includes a first development module label and first configuration information of the target software, and the second component information includes a second development module label and second configuration information of the target software;
[0009] Comparing the first configuration information with the second configuration information;
[0010] Determine the target configuration environment according to the comparison result, and compare the first development module label with the second development module label, wherein multiple development module labels belonging to the same development module are compared one by one;
[0011] Determine, from the first development module labels, a third development module label with a difference and a fourth development module label with no difference according to the comparison result;
[0012] The first development module corresponding to the third development module tag is recompiled, and the second development module corresponding to the fourth development module tag is controlled to reuse the compilation product of the previous version of the target software, so as to realize software integration.
[0013] Optionally, before obtaining the first component information of the current version and the second component information of the previous version of the target software, the method further includes:
[0014] Pre-setting a first naming format for the software code integration branch in the integration warehouse, wherein the first naming format includes a vehicle type identifier, a branch version, and a target stage to which the software code integration branch belongs, the target stage includes a development stage and a release stage, the vehicle type identifier is used to distinguish different vehicle types, and the branch version is used to distinguish different interface versions used;
[0015] Establishing first software code integration branches of different vehicle types and different interface versions in the integration warehouse;
[0016] The first software code integration branches at different stages are named using the first naming format to generate different target integration branch names.
[0017] Optionally, after naming the first software code integration branches at different stages by using the first naming format to generate target software integration branch names, the method further includes:
[0018] When a version update of the target software is detected, obtaining a first branch name of each development branch in a development module in the current version of the target software, wherein the first branch name is also generated according to the first naming format, and each development branch includes a corresponding first label, and first labels belonging to the same development module are collectively referred to as development module labels of the same development module;
[0019] Searching the target integration branch name by using the first branch name;
[0020] If a first integration branch name consistent with the first branch name is retrieved from the target integration branch name, a second label corresponding to the first branch name is determined from the first label, and a second software code integration branch corresponding to the first integration branch name is determined from the first software code integration branch;
[0021] The second tag is submitted to the second software code integration branch, and the first development module tag is determined by the second tag.
[0022] Optionally, the first configuration information includes an interface version, a framework version, a compilation environment version and a software version;
[0023] Before comparing the first configuration information with the second configuration information, the method further includes:
[0024] Searching in the interface warehouse through the interface version, searching in the framework warehouse through the framework version, and searching in the environment warehouse through the compilation environment version;
[0025] If the interface version exists in the interface warehouse, the framework version exists in the framework warehouse, and the compilation environment version exists in the environment warehouse, searching in the second software code integration branch through the first development module tag;
[0026] If the first development module tag exists in the second software code integration branch, it is determined that the first component information in the target software is correct.
[0027] Optionally, determining the target configuration environment according to the comparison result further includes:
[0028] If the first configuration information is completely consistent with the second configuration information, obtaining the first configuration environment of the previous version of the target software from the product warehouse;
[0029] Using the first configuration environment as the target configuration environment of the current version of the target software;
[0030] If there is a difference between the first configuration information and the second configuration information, a target configuration environment of the current version of the target software is created according to the first configuration information.
[0031] Optionally, after recompiling the first development module corresponding to the third development module tag, the method further includes:
[0032] If an exception occurs during recompilation, an error report will be generated and an error prompt will be given;
[0033] If the recompilation is successful, the target compilation product is obtained and stored in the product warehouse, the first component information is stored in the cache of the target server, and a second naming format is set in the product warehouse, which includes a vehicle type identifier, a software version number and a timestamp.
[0034] A second aspect of an embodiment of the present invention provides a software integration device, the device comprising:
[0035] A first acquisition module is used to acquire first component information of a current version of target software and second component information of a previous version, wherein the target software includes a plurality of development modules, the first component information includes a first development module label and first configuration information of the target software, and the second component information includes a second development module label and second configuration information of the target software;
[0036] A first comparison module, used to compare the first configuration information with the second configuration information;
[0037] A second comparison module is used to determine a target configuration environment according to the comparison result, and compare the first development module tag with a second development module tag of a previous version of the target software, wherein multiple development module tags belonging to the same development module are compared one by one;
[0038] A first determining module, configured to determine, from the first development module labels, a third development module label with a difference and a fourth development module label with no difference according to the comparison result;
[0039] The first compiling module is used to recompile the first development module corresponding to the third development module tag, and control the second development module corresponding to the fourth development module tag to reuse the compilation product of the previous version of the target software, so as to achieve software integration.
[0040] A third aspect of an embodiment of the present invention provides an electronic device, including:
[0041] processor;
[0042] a memory for storing instructions executable by the processor;
[0043] The processor is configured to execute the instructions to implement the software integration method as described in the first aspect.
[0044] A fourth aspect of an embodiment of the present invention provides a computer-readable storage medium, which, when instructions in the storage medium are executed by a processor of a mobile terminal, enables the mobile terminal to execute a software integration method.
[0045] According to a fifth aspect of an embodiment of the present application, a vehicle is provided, comprising the software integration device described in the second aspect of the present application.
[0046] The technical solution provided by the embodiments of the present application may have the following beneficial effects:
[0047] The method of the present invention comprises: obtaining first component information of the current version of target software and second component information of the previous version, wherein the target software comprises a plurality of development modules, the first component information comprises a first development module label and first configuration information of the target software, the second component information comprises a second development module label and second configuration information of the target software, the first configuration information is compared with the second configuration information, a target configuration environment is determined according to the comparison result, different environment configuration methods can be adopted in a targeted manner, and the configuration time is reduced to a certain extent, the first development module label is compared with the second development module label, wherein a plurality of development module labels belonging to the same development module are compared one by one, a third development module label with a difference and a fourth development module label without a difference are determined from the first development module label according to the comparison result, and the The first development module corresponding to the third development module label is recompiled, and the second development module corresponding to the fourth development module label is controlled to reuse the compilation product of the previous version of the target software, so as to realize software integration. By recompiling only the development modules that have been modified, it is avoided that the development modules that have not been changed are repeatedly compiled during software integration, which causes redundancy in integration work, improves the efficiency of the iteration process and saves time cost. In summary, the embodiment of the present invention only recompiles the changed content in the current version of the target software, and reuses the results of the previous version for the repeated content, improves the efficiency of the iteration process and saves time cost. In addition, the present invention also sets a product warehouse to store the compilation products, which is beneficial to reducing the resource occupation of the integration environment on the one hand, and facilitates software version management on the other hand, which is conducive to problem tracing.
[0048] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0050] Figure 1 is a flowchart of a software integration method according to an exemplary embodiment;
[0051] Figure 2 yes Figure 1 The flowchart of step 103 in a software integration method according to an exemplary embodiment is shown;
[0052] Figure 3 is a flowchart of another software integration method according to an exemplary embodiment;
[0053] Figure 4 is a flowchart of another software integration method according to an exemplary embodiment;
[0054] Figure 5 is a block diagram of a software integration device according to an exemplary embodiment;
[0055] Figure 6 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0056] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.
[0057] The first embodiment of the present application relates to a software integration method. Figure 1 is a flowchart of a software integration method according to an exemplary embodiment. Figure 1 As shown, the following steps are included:
[0058] Step 101, obtain the first component information of the current version of the target software and the second component information of the previous version, the target software includes several development modules, the first component information includes the first development module label and first configuration information of the target software, and the second component information includes the second development module label and second configuration information of the target software.
[0059] In the embodiment of the present invention, the target software includes multiple development modules, and each development module can set a different code branch. The setting of code branches can allow the development team to develop multiple functions or fix multiple problems in parallel in the same code base without interfering with each other, and can also make the software development process more flexible, while also maintaining the traceability of code changes. Developers can clearly see the change history on each branch, which is convenient for backtracking and understanding, and branches support the practice of continuous integration (CI) and continuous deployment (CD). Developers can frequently merge the code on the branch into the main branch for automated testing and deployment, thereby speeding up software delivery.
[0060] It should be noted that in order to facilitate the management of the integrated warehouse set up in the embodiment of the present invention, the integration personnel need to complete the establishment of the integrated branch according to different vehicle models and different interface versions, so that subsequent development engineers can pull the required development branch from the integrated branch. In addition, in order to facilitate management, a standardized naming rule is also formulated. The specific steps include:
[0061] Pre-setting a first naming format for the software code integration branch in the integration warehouse, wherein the first naming format includes a vehicle type identifier to which the software code integration branch belongs, a branch version, and a target stage, the target stage includes a development stage and a release stage, the vehicle type identifier is used to distinguish different vehicle types, and the branch version is used to distinguish different interface versions used;
[0062] Establishing first software code integration branches for different vehicle types and different interface versions in the integration warehouse;
[0063] The first software code integration branches at different stages are named using the first naming format to generate different target integration branch names.
[0064] Each of the above-mentioned first software code integration branches corresponds to a unique target integration branch name. The target stages include the development stage and the release stage. The development stage is used for developers to self-test software modifications; the release stage is used for software iteration and large-scale testing, which requires management and control by integrators. In the integration warehouse, integrators need to complete branch establishment according to different vehicle models and different interface versions, and then name the established branches according to the first naming format. Because the first naming format includes the vehicle type identifier, branch version and target stage to which the software code integration branch belongs, the first naming format can be set to "vehicle model number-branch version-stage". Then, the naming of the branch based on vehicle model A, interface version B and in the development stage is "vehicle model A-interface version B-development stage".
[0065] In addition, after establishing a branch, some basic general configuration of the software needs to be completed to ensure the smooth operation of the branch code. At the same time, this operation can reduce subsequent changes and thus reduce the risk of software integration.
[0066] Furthermore, in the current version of the target software of the embodiment of the present invention, there are multiple development modules, and there can be multiple development branches in one development module. After the developer completes the code update on the development branch, he submits the changes and creates a label, where one branch corresponds to one label, and the label is used to uniquely identify the branch. The development branch is then matched with the integration branch in the integration warehouse. At this time, the naming format of the development branch needs to be set to be consistent with the first naming format, and is also set by vehicle type and interface version. After the match is successful, the developer submits the label of the development branch to the integration branch. In order to facilitate the subsequent comparison of labels to determine whether there is a difference, the specific steps include:
[0067] When a version update of the target software is detected, obtaining a first branch name of each development branch in a development module in the current version of the target software, wherein the first branch name is also generated according to the first naming format, and each development branch includes a corresponding first label, and first labels belonging to the same development module are collectively referred to as development module labels of the same development module;
[0068] Searching the target integration branch name by using the first branch name;
[0069] If a first integration branch name consistent with the first branch name is retrieved from the target integration branch name, a second label corresponding to the first branch name is determined from the first label, and a second software code integration branch corresponding to the first integration branch name is determined from the first software code integration branch;
[0070] The second tag is submitted to the second software code integration branch, and the first development module tag is determined by the second tag.
[0071] It should be noted that each development branch corresponds to a unique first branch name. For software submissions in the release phase, developers are required to fully self-test in the development phase to ensure that the software submitted to the release phase is available, reduce the integration and testing costs of subsequent software, and use Git to establish and manage the software code of the above branches. At the same time, set corresponding permissions for each warehouse to ensure the traceability and security of the warehouse code.
[0072] In the embodiment of the present invention, after determining that the development branch sends the tag to the integration branch, the integration engineer will trigger the software integration. During the software integration process, the first component information of the current version of the target software and the second component information of the previous version will be obtained first. The first component information includes the first development module tag and the first configuration information of the target software, and the second component information includes the second development module tag and the second configuration information of the target software. Among them, the development module tag is used to confirm what branches are included therein, and the configuration information includes the interface version, framework version, compilation environment version and software version. The corresponding software branch can be pulled through the software version information for software integration.
[0073] Step 102: compare the first configuration information with the second configuration information.
[0074] After determining the first component information in the embodiment of the present invention, the software integration pipeline can be triggered by resubmitting README.md. The pipeline first verifies the configuration content, where the first configuration information includes the interface version, framework version, compilation environment version and software version. The verification content is to confirm whether the configured interface version, framework version and compilation environment exist in the current interface warehouse, framework warehouse and environment warehouse, and determine whether the labels of each development module exist in the development branch corresponding to each module. If they all exist, it is considered that the verified integration content is correct. The specific steps include:
[0075] Search in the interface repository by interface version, search in the framework repository by framework version, and search in the environment repository by compilation environment version;
[0076] If the interface version exists in the interface repository, the framework version exists in the framework repository, and the compilation environment version exists in the environment repository, searching in the first integration branch through the first development module tag;
[0077] If the first development module tag exists in the first integration branch, it is determined that the first component information in the target software is correct.
[0078] The correctness of the first configuration information is determined through the above verification, but if it is detected that the interface version does not exist in the interface warehouse or the framework version does not exist in the framework warehouse or the compilation environment version does not exist in the environment warehouse, and the first development module label does not exist in the first integration branch, then it is considered that the first configuration information obtained at this time is wrong, and it is necessary to report the error prompt information so that the staff can recheck and confirm the correct information of the version and label, and then perform the correctness check again until the verification passes. At this time, the version control system (Git) is used to compare the current version of the first configuration information with the previous second configuration information cached in the server product warehouse.
[0079] Step 103 , determining the target configuration environment according to the comparison result, and comparing the first development module tag with the second development module tag, wherein multiple development module tags belonging to the same development module are compared one by one.
[0080] During the software iteration process, there are some core elements that are usually unchanged, including: Project goals and requirements: The overall goals and core requirements of the software usually remain unchanged during the iteration process, although the specific implementation details and functions may change with iterations; Code base structure: The basic structure of the code base, such as directory structure, naming conventions, and coding standards, is usually kept consistent during the iteration process to ensure the maintainability and consistency of the code; Core algorithms and data structures: The core algorithms and data structures in the software usually remain unchanged during the iteration process unless there are major performance improvements or functional expansion requirements; Interfaces and protocols: The interfaces and protocols for the software to interact with other systems or components usually remain unchanged during the iteration process to ensure compatibility and stability; Version control strategies: The basic strategies of the version control system, such as branch management, tag management, and submission specifications, are usually kept consistent during the iteration process.
[0081] Therefore, in the embodiment of the present invention, when the configuration information of the current version of the target software is compared with the configuration information of the previous version, there may be two results. If the comparison is consistent, the configuration environment of the second configuration information is reused, which can reduce the compilation time and improve the integration efficiency. If the comparison is inconsistent, it indicates that the environment needs to be reconfigured.
[0082] It should be noted that the software needs to be configured according to the configuration information before integration, which can ensure the consistency of the development, testing and production environments. This helps to avoid compilation errors or runtime problems caused by environmental differences. The framework configuration ensures that the necessary frameworks are available during the compilation process, and the version configuration can avoid compilation problems caused by version incompatibility. In addition to the interface version, framework version, compilation environment version and software version mentioned above, the configuration content can also include dependent libraries, compilation tools, and programming language runtimes (referring to the environment for executing programs written in a specific programming language in a computer system, such as Java, Python, Node.js, etc.), which are not specifically limited in the present invention.
[0083] Step 104 : determining a third development module tag with a difference and a fourth development module tag with no difference from the first development module tag according to the comparison result.
[0084] In the embodiment of the present invention, there are multiple development modules, and each development module may have multiple branches. Each branch will have a label tag. During the iteration process of the software, the branches in some development modules may change, and the corresponding development module labels will change. However, there will be some branches in some development modules that may not change, and the corresponding development module labels will not change. Therefore, there are two situations for the comparison results, one is that there are differences and the other is that there are no differences. During the comparison, the labels in the same development module are compared.
[0085] The first development module labels that are determined to have differences are collectively referred to as the third development module labels, and the first development module labels that are determined to have no differences are collectively referred to as the fourth development module labels. For example, there is a development module named UserModule. In the first iteration (previous version), the label of this module is v1.0.0. In the second iteration (current version), due to the functional enhancement and bug fixes of the module, the label is updated to v1.1.0. In this case, v1.1.0 is the third development module label, because it is different from the previous version. There is a development module named PaymentModule. In the first iteration, the label of this module is v2.0.0. In the second iteration, since no changes are made to the module, the label remains v2.0.0. In this case, v2.0.0 is the fourth development module label, because it has not changed in two iterations. The above content is only to more clearly illustrate the classification of development module labels. The actual labels and development modules can be changed according to actual conditions, and the present invention is not specifically limited here.
[0086] Step 105 , recompile the first development module corresponding to the third development module tag, and control the second development module corresponding to the fourth development module tag to reuse the compilation product of the previous version of the target software, so as to achieve software integration.
[0087] In the embodiment of the present invention, if there is no difference in the development module tag, the second development module corresponding to the development module tag reuses the last compiled product. If there is a difference, only the development module with the difference is recompiled.
[0088] The method of the present invention comprises: obtaining first component information of the current version of target software and second component information of the previous version, wherein the target software comprises a plurality of development modules, the first component information comprises a first development module label and first configuration information of the target software, the second component information comprises a second development module label and second configuration information of the target software, the first configuration information is compared with the second configuration information, a target configuration environment is determined according to the comparison result, different environment configuration methods can be adopted in a targeted manner, and the configuration time is reduced to a certain extent, the first development module label is compared with the second development module label, wherein a plurality of development module labels belonging to the same development module are compared one by one, a third development module label with a difference and a fourth development module label without a difference are determined from the first development module label according to the comparison result, and the The first development module corresponding to the third development module label is recompiled, and the second development module corresponding to the fourth development module label is controlled to reuse the compilation product of the previous version of the target software, so as to realize software integration. By recompiling only the development modules that have been modified, it is avoided that the development modules that have not been changed are repeatedly compiled during software integration, which causes redundancy in integration work, improves the efficiency of the iteration process and saves time cost. In summary, the embodiment of the present invention only recompiles the changed content in the current version of the target software, and reuses the results of the previous version for the repeated content, improves the efficiency of the iteration process and saves time cost. In addition, the present invention also sets a product warehouse to store the compilation products, which is beneficial to reducing the resource occupation of the integration environment on the one hand, and facilitates software version management on the other hand, which is conducive to problem tracing.
[0089] The second embodiment of the present application relates to another software integration method. Figure 2 is based on Figure 1 An exemplary embodiment shown in FIG. 1 shows a flowchart of step 103 in a software integration method, such as Figure 2 As shown, the following steps are included:
[0090] Step 1031: If the first configuration information is completely consistent with the second configuration information, the first configuration environment of the previous version of the target software is obtained from the product warehouse.
[0091] In the embodiment of the present invention, there are two types of comparison results between the first configuration information and the second configuration information of the previous version of the target software. One is that the first configuration information is completely consistent with the second configuration information. At this time, it is determined that the interface version, framework version and compilation environment have not been updated, so the previous environment is reused, that is, the first configuration environment of the previous version of the target software is obtained from the product warehouse.
[0092] Step 1032: Use the first configuration environment as the target configuration environment of the current version of the target software.
[0093] In the embodiment of the present invention, after the first configuration environment is obtained, it can be reused directly without the need to build it again, thus saving time.
[0094] Step 1033: If there is a difference between the first configuration information and the second configuration information, create a target configuration environment of the current version of the target software according to the first configuration information.
[0095] In the embodiment of the present invention, if there is a difference between the first configuration information and the second configuration information, it is determined that there are updates in the interface version, framework version and compilation environment, and the previous environment cannot be directly reused, so it is necessary to reconfigure according to the first configuration information to create the target configuration environment of the current version of the target software.
[0096] A third embodiment of the present application relates to another software integration method. Figure 3 is a flowchart of another software integration method according to an exemplary embodiment. Figure 3 As shown, the following steps are included:
[0097] Step 201, obtain the first component information of the current version of the target software and the second component information of the previous version, the target software includes several development modules, the first component information includes the first development module label and first configuration information of the target software, and the second component information includes the second development module label and second configuration information of the target software.
[0098] Step 202: compare the first configuration information with the second configuration information.
[0099] Step 203 , determining the target configuration environment according to the comparison result, and comparing the first development module tag with the second development module tag, wherein multiple development module tags belonging to the same development module are compared one by one.
[0100] Step 204 : determining a third development module tag with a difference and a fourth development module tag with no difference from the first development module tag according to the comparison result.
[0101] Step 205 , recompile the first development module corresponding to the third development module tag, and control the second development module corresponding to the fourth development module tag to reuse the compilation product of the previous version of the target software, so as to achieve software integration.
[0102] The above steps 201-205 refer to the discussion of the aforementioned steps 101-105, and the present invention will not be repeated here.
[0103] Step 206: If an exception occurs during recompilation, an error report is generated and an error prompt is given.
[0104] After the compilation starts in the embodiment of the present invention, the compilation process will be monitored. If an exception occurs during the compilation process, an error report will be generated, and an error prompt will be given to notify relevant personnel. The error prompt method can be email notification, SMS notification, etc., which is not specifically limited in the present invention.
[0105] Step 207: If the recompilation is successful, the target compilation product is obtained, and the target compilation product is stored in the product warehouse, and the first component information is stored in the cache of the target server.
[0106] In the embodiment of the present invention, when the target compilation product is stored in the product warehouse, the target compilation product is first packaged and then named. Because the second naming format is set in the product warehouse, and the second naming format includes the vehicle type identification, software version number and timestamp, the second naming format is used here to name the product, and the naming format is "vehicle type_software version number_timestamp". The above settings are conducive to reducing the resource occupation of the integrated environment on the one hand, and on the other hand, it is convenient for software version management and problem tracing.
[0107] It should be noted that in order to facilitate developers and testers to flash the vehicle software to the vehicle computer by themselves, the integrated software package has adapted corresponding software flashing scripts for different vehicle models and operating systems. For example, a shell script is provided for software flashing for the Linux operating system; a bat script is provided for software flashing for the Windows operating system.
[0108] A fourth embodiment of the present application relates to another software integration method. Figure 4 is a flowchart of another software integration method according to an exemplary embodiment. Figure 4 As shown, the following steps are included:
[0109] Create an integrated warehouse to determine the software code branch, and then pull the corresponding development branch according to the integrated branch. After the software code is updated, tag the development branch and submit the tag to the corresponding integration branch. The integrator triggers the automatic integration pipeline compilation. First, configure the compilation environment and tools. At this time, compare whether the configuration environment has changed. If it has changed, reconfigure the environment. If it has not changed, pull the last compilation environment for reuse, and then verify and compare the development module tags. If the verification fails, an error report is generated and notified. The integrator analyzes the problem according to the error report. If the verification passes and there is no difference in the comparison, reuse the last compilation product. If the verification passes and there is a difference in the comparison, recompile the development module with the difference. If the compilation fails, an error report will still be generated and notified. If the compilation fails, the compilation result will be cached and packaged to generate an integrated software package. In order to facilitate developers and testers to flash the vehicle software to the vehicle computer by themselves, the corresponding software flashing scripts are adapted for different models and operating systems in the integrated software package. The software is flashed and updated on the vehicle computer according to the flashing script. Finally, the flashing result is tested and verified to determine whether the flashing is successful.
[0110] A fifth embodiment of the present application relates to a software integration device. Figure 5 is a flowchart of a software integration device according to an exemplary embodiment. Figure 5 As shown, the following steps are included:
[0111] The first acquisition module 301 is used to obtain the first component information of the current version of the target software and the second component information of the previous version. The target software includes several development modules. The first component information includes the first development module label and first configuration information of the target software, and the second component information includes the second development module label and second configuration information of the target software.
[0112] The first comparison module 302 is used to compare the first configuration information with the second configuration information.
[0113] The second comparison module 303 is used to determine the target configuration environment according to the comparison result, and compare the first development module tag with the second development module tag of the previous version of the target software, wherein multiple development module tags belonging to the same development module are compared one by one.
[0114] The first determining module 304 is used to determine a third development module tag with a difference and a fourth development module tag with no difference from the first development module tag according to the comparison result.
[0115] The first compiling module 305 is used to recompile the first development module corresponding to the third development module tag, and control the second development module corresponding to the fourth development module tag to reuse the compilation product of the previous version of the target software, so as to achieve software integration.
[0116] Optionally, the software integration device further includes:
[0117] The first setting module is used to pre-set a first naming format for the software code integration branch in the integration warehouse, wherein the first naming format includes the vehicle type identifier, branch version and target stage to which the software code integration branch belongs, the target stage includes the development stage and the release stage, the vehicle type identifier is used to distinguish different vehicle types, and the branch version is used to distinguish different interface versions used.
[0118] The first establishing module is used to establish first software code integration branches of different vehicle types and different interface versions in the integration warehouse.
[0119] The first generating module is used to name the first software code integration branches at different stages by using a first naming format to generate different target integration branch names.
[0120] The second acquisition module is used to obtain the first branch name of each development branch in the development module in the current version of the target software when a version update of the target software is detected, wherein the first branch name is also generated according to the first naming format, and each development branch includes a corresponding first label. The first labels belonging to the same development module are collectively referred to as development module labels of the same development module.
[0121] The first search module is used to search the target integration branch names through the first branch name.
[0122] The third acquisition module is used to determine the second label corresponding to the first branch name from the first label and the second software code integration branch corresponding to the first integration branch name from the first software code integration branch if a first integration branch name consistent with the first branch name is retrieved from the target integration branch name.
[0123] The first submission module is used to submit the second tag to the second software code integration branch and determine the first development module tag through the second tag.
[0124] Optionally, the first configuration information includes an interface version, a framework version, a compilation environment version and a software version.
[0125] The software integration device also includes:
[0126] The second search module is used to search in the interface warehouse by interface version, to search in the framework warehouse by framework version, and to search in the environment warehouse by compilation environment version.
[0127] The third retrieval module is used to search in the second software code integration branch through the first development module tag if the interface version exists in the interface warehouse, the framework version exists in the framework warehouse, and the compilation environment version exists in the environment warehouse.
[0128] The second determination module is used to determine that the first component information in the target software is correct if the first development module tag exists in the second software code integration branch.
[0129] Optionally, the second comparison module 303 specifically includes:
[0130] The acquisition submodule is used to acquire the first configuration environment of the previous version of the target software from the product warehouse if the first configuration information is completely consistent with the second configuration information.
[0131] The first environment configuration submodule is used to use the first configuration environment as the target configuration environment of the current version of the target software.
[0132] The second environment configuration submodule is used to create a target configuration environment of the current version of the target software according to the first configuration information if there is a difference between the first configuration information and the second configuration information.
[0133] Optionally, the software integration device further includes:
[0134] The second generation module is used to generate an error report and provide an error prompt if an exception occurs during recompilation.
[0135] The fourth acquisition module is used to obtain the target compilation product if the recompilation is successful, and store the target compilation product in the product warehouse, store the first component information in the cache of the target server, and set the second naming format in the product warehouse, the second naming format includes the vehicle type identification, software version number and timestamp.
[0136] The method of the present invention comprises: obtaining first component information of the current version of target software and second component information of the previous version, wherein the target software comprises a plurality of development modules, the first component information comprises a first development module label and first configuration information of the target software, the second component information comprises a second development module label and second configuration information of the target software, the first configuration information is compared with the second configuration information, a target configuration environment is determined according to the comparison result, different environment configuration methods can be adopted in a targeted manner, and the configuration time is reduced to a certain extent, the first development module label is compared with the second development module label, wherein the development module labels of the same development module are compared one by one, a third development module label with a difference and a fourth development module label without a difference are determined from the first development module label according to the comparison result, and the third development module label is compared with the second development module label. The first development module corresponding to the development module label is recompiled, and the second development module corresponding to the fourth development module label is controlled to reuse the compilation product of the previous version of the target software, so as to realize software integration. By recompiling only the development modules that have been modified, it is avoided that the development modules that have not been changed are repeatedly compiled during software integration, which causes redundancy in integration work, improves the efficiency of the iteration process and saves time cost. In summary, the embodiment of the present invention only recompiles the changed content in the current version of the target software, and reuses the results of the previous version for the repeated content, improves the efficiency of the iteration process and saves time cost. In addition, the present invention also sets a product warehouse to store the compilation products, which is beneficial to reducing the resource occupation of the integration environment on the one hand, and facilitates software version management on the other hand, which is conducive to problem tracing.
[0137] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0138] The sixth embodiment of the present application relates to an electronic device, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement any software integration method.
[0139] Figure 6 4 is a block diagram of an electronic device 400 according to an exemplary embodiment. For example, the electronic device 400 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0140] Reference Figure 6 , the electronic device 400 may include one or more of the following components: a processing component 402 , a memory 404 , a power component 406 , a multimedia component 408 , an audio component 410 , an input / output interface 412 , a sensor component 414 , and a communication component 416 .
[0141] The processing component 402 generally controls the overall operation of the device 400, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 402 may include one or more processors 420 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 402 may include one or more modules to facilitate the interaction between the processing component 402 and other components. For example, the processing component 402 may include a multimedia module to facilitate the interaction between the multimedia component 408 and the processing component 402.
[0142] The memory 404 is configured to store various types of data to support operations on the device 400. Examples of such data include instructions for any application or method operating on the device 400, contact data, phone book data, messages, pictures, videos, etc. The memory 404 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0143] The power supply component 406 provides power to the various components of the electronic device 400. The power supply component 406 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 400.
[0144] The multimedia component 408 includes a screen that provides an output interface between the electronic device 400 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 408 includes a front camera and / or a rear camera. When the electronic device 400 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and the rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0145] The audio component 410 is configured to output and / or input audio signals. For example, the audio component 410 includes a microphone (MIC), and when the electronic device 400 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 404 or sent via the communication component 416. In some embodiments, the audio component 410 also includes a speaker for outputting audio signals.
[0146] The input / output interface 412 provides an interface between the processing component 402 and the peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0147] The sensor assembly 414 includes one or more sensors for providing various aspects of status assessment for the electronic device 400. For example, the sensor assembly 414 can detect the open / closed state of the electronic device 400, the relative positioning of the components, such as the display and keypad of the electronic device 400, and the sensor assembly 414 can also detect the position change of the electronic device 400 or a component of the electronic device 400, the presence or absence of contact between the user and the electronic device 400, the orientation or acceleration / deceleration of the electronic device 400, and the temperature change of the electronic device 400. The sensor assembly 414 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 414 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 414 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0148] The communication component 416 is configured to facilitate wired or wireless communication between the electronic device 400 and other devices. The electronic device 400 can access a wireless network based on a communication standard, such as WiFi, a carrier network (such as 2G, 3G, 4G or 5G), or a combination thereof. In an exemplary embodiment, the communication component 416 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 416 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0149] In an exemplary embodiment, the electronic device 400 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0150] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 404 including instructions, and the instructions can be executed by a processor 420 of an electronic device 400 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0151] Based on the same inventive concept, in an exemplary embodiment, a vehicle is also provided, which may specifically include: the above-mentioned software integration device.
[0152] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed in this application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present invention are indicated by the following claims.
[0153] It should be noted that the above embodiments illustrate the present invention rather than limit it, and that those skilled in the art may design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be construed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In a unit claim that lists several devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc. does not indicate any order. These words may be interpreted as names. The present invention is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes may be made without departing from its scope. The scope of the present invention is limited only by the appended claims.
Claims
1. A software integration method, characterized in that: The method comprises: Obtaining first component information of a current version of target software and second component information of a previous version, wherein the target software includes a plurality of development modules, the first component information includes a first development module label and first configuration information of the target software, and the second component information includes a second development module label and second configuration information of the target software; Comparing the first configuration information with the second configuration information; Determine the target configuration environment according to the comparison result, and compare the first development module label with the second development module label, wherein multiple development module labels belonging to the same development module are compared one by one; Determine, from the first development module labels, a third development module label with a difference and a fourth development module label with no difference according to the comparison result; The first development module corresponding to the third development module tag is recompiled, and the second development module corresponding to the fourth development module tag is controlled to reuse the compilation product of the previous version of the target software, so as to realize software integration.
2. The software integration method according to claim 1, characterized in that: Before obtaining the first component information of the current version and the second component information of the previous version of the target software, the method further includes: Pre-setting a first naming format for the software code integration branch in the integration warehouse, wherein the first naming format includes a vehicle type identifier, a branch version, and a target stage to which the software code integration branch belongs, the target stage includes a development stage and a release stage, the vehicle type identifier is used to distinguish different vehicle types, and the branch version is used to distinguish different interface versions used; Establishing first software code integration branches of different vehicle types and different interface versions in the integration warehouse; The first software code integration branches at different stages are named using the first naming format to generate different target integration branch names.
3. The software integration method according to claim 2, characterized in that: After naming the first software code integration branches at different stages by using the first naming format to generate target software integration branch names, the method further includes: When a version update of the target software is detected, obtaining a first branch name of each development branch in a development module in the current version of the target software, wherein the first branch name is also generated according to the first naming format, and each development branch includes a corresponding first label, and first labels belonging to the same development module are collectively referred to as development module labels of the same development module; Searching the target integration branch name by using the first branch name; If a first integration branch name consistent with the first branch name is retrieved from the target integration branch name, a second label corresponding to the first branch name is determined from the first label, and a second software code integration branch corresponding to the first integration branch name is determined from the first software code integration branch; The second tag is submitted to the second software code integration branch, and the first development module tag is determined by the second tag.
4. The software integration method according to claim 3, characterized in that: The first configuration information includes an interface version, a framework version, a compilation environment version and a software version; Before comparing the first configuration information with the second configuration information, the method further includes: Searching in the interface warehouse through the interface version, searching in the framework warehouse through the framework version, and searching in the environment warehouse through the compilation environment version; If the interface version exists in the interface warehouse, the framework version exists in the framework warehouse, and the compilation environment version exists in the environment warehouse, searching in the second software code integration branch through the first development module tag; If the first development module tag exists in the second software code integration branch, it is determined that the first component information in the target software is correct.
5. The software integration method according to claim 1, characterized in that: Determining the target configuration environment according to the comparison result also includes: If the first configuration information is completely consistent with the second configuration information, obtaining the first configuration environment of the previous version of the target software from the product warehouse; Using the first configuration environment as the target configuration environment of the current version of the target software; If there is a difference between the first configuration information and the second configuration information, a target configuration environment of the current version of the target software is created according to the first configuration information.
6. The software integration method according to claim 1, characterized in that: After recompiling the first development module corresponding to the third development module tag, the method further includes: If an exception occurs during recompilation, an error report will be generated and an error prompt will be given; If the recompilation is successful, the target compilation product is obtained and stored in the product warehouse, the first component information is stored in the cache of the target server, and a second naming format is set in the product warehouse, which includes a vehicle type identifier, a software version number and a timestamp.
7. A software integration device, characterized in that: include: A first acquisition module is used to acquire first component information of a current version of target software and second component information of a previous version, wherein the target software includes a plurality of development modules, the first component information includes a first development module label and first configuration information of the target software, and the second component information includes a second development module label and second configuration information of the target software; A first comparison module, used to compare the first configuration information with the second configuration information; A second comparison module is used to determine a target configuration environment according to the comparison result, and compare the first development module tag with a second development module tag of a previous version of the target software, wherein multiple development module tags belonging to the same development module are compared one by one; A first determining module, configured to determine, from the first development module labels, a third development module label with a difference and a fourth development module label with no difference according to the comparison result; The first compiling module is used to recompile the first development module corresponding to the third development module tag, and control the second development module corresponding to the fourth development module tag to reuse the compilation product of the previous version of the target software, so as to achieve software integration.
8. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to execute the instructions to implement the software integration method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of the mobile terminal, the mobile terminal is enabled to execute the software integration method according to any one of claims 1 to 6.
10. A vehicle, characterized in that: Including the software integration device as described in claim 7.
Citation Information
Cited By
Project deployment method and device, electronic equipment and storage medium
CN119781814A
