A method for synchronizing software code into a hardware environment and automatically integrating it

By automatically translating and synchronizing software code version information, the complexity of software code version management in different tool environments is solved, verification efficiency is improved, and the correct integration of software code and hardware environment is ensured.

CN118916075BActive Publication Date: 2024-12-27沐曦科技(成都)有限公司
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411414613.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-11
Publication Date
2024-12-27
Estimated Expiration
2044-10-11

AI Technical Summary

Technical Problem

When different software code version management tools are used on the software side and the hardware side, the version information of the software code version is different, resulting in high complexity and low efficiency when verifying that the software code is integrated with the hardware environment.

Method used

Through user input instructions, the version information of the software code version management tool is automatically extracted, translated and synchronized, updated the configuration files of the hardware verification environment, and tested and integrated to avoid duplicate verification.

Benefits of technology

It reduces the complexity of users' verification of software code versions, saves verification time, improves efficiency, and ensures the correct integration of software code with the hardware environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118916075B_ABST
    Figure CN118916075B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of electronic digital data processing, and in particular to a method for synchronizing software code into a hardware environment and automatically integrating it. It includes: in response to a first instruction input by a user, determining an information text of a specified software code version according to preset type information of the specified software code version; extracting version information of each code branch of the specified software code version corresponding to a first tool from the information text; translating the version information to obtain version information of each code branch corresponding to a second tool; updating a configuration file of version management in a hardware verification environment according to the version information of the second tool, and downloading the corresponding software code version from the second tool to a local according to the updated configuration file; testing the updated hardware verification environment locally using preset test cases; and submitting the updated configuration file to the second tool if the test passes. The present invention reduces the complexity of user verification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electronic digital data processing, and in particular to a method for synchronizing and automatically integrating software codes into a hardware environment. Background Art

[0002] The prior art discloses a variety of tools for managing software code versions, which can be used to help users track the history of software code changes, collaborate and maintain multiple versions of software code libraries. Tools for managing software code versions include Git and Perforce. When a new software code passes the software delivery standard, the new software code will be stored in the software code repository on the software side; for scenarios where the software code needs to be integrated into the hardware verification environment during the hardware verification process, the software code repository on the hardware side will also synchronize the new software code stored in the software code repository on the software side. However, for scenarios where different software code version management tools are used on the software side and the hardware side, the version information corresponding to the same software code in the two tools is different; when the user knows the version information of the software code version corresponding to the software code version management tool on the software side, the process of the user verifying whether the specified software code version is available after integration with the hardware environment is relatively complicated. How to reduce the complexity of the user's verification of the specified software code version is an urgent problem to be solved. Summary of the invention

[0003] The object of the present invention is to provide a method for synchronizing software code into a hardware environment and automatically integrating the software code into the hardware environment, so as to reduce the complexity of the user's verification of the specified software code version and improve the verification efficiency.

[0004] According to the present invention, a method for synchronizing software code into a hardware environment and automatically integrating the software code into the hardware environment is provided, the method comprising the following steps:

[0005] S100, in response to a first instruction input by a user, entering S200; the first instruction includes preset type information of a specified software code version.

[0006] S200, determining the information text of the specified software code version according to the preset type information of the specified software code version; the information text of the specified software code version has a mapping relationship with the preset type information of the specified software code version.

[0007] S300, extracting version information of a first software code version management tool corresponding to all code branches of the specified software code version from the information text of the specified software code version; the first software code version management tool is used to implement management of software code versions on the software side.

[0008] S400, translating the version information of the first software code version management tool corresponding to all code branches of the specified software code version to obtain the version information of the second software code version management tool corresponding to each code branch of the specified software code version; the second software code version management tool is used to implement the management of the software code version on the hardware side.

[0009] S500, updating the configuration file of version management in the hardware verification environment according to the version information of the second software code version management tool corresponding to each code branch of the specified software code version, so that the updated configuration file of version management in the hardware verification environment includes the version information of the second software code version management tool corresponding to each code branch of the specified software code version.

[0010] S600, downloading corresponding software code from a second software code version management tool to a local device according to a configuration file of version management in an updated hardware verification environment, so as to integrate the downloaded software code with the hardware verification environment to obtain an updated hardware verification environment.

[0011] S700, locally tests the updated hardware verification environment using preset test cases.

[0012] S800: If the test passes, submit the updated version management configuration file in the hardware verification environment to a second software code version management tool.

[0013] Compared with the prior art, the present invention has at least the following beneficial effects:

[0014] In the present invention, the first software code version management tool and the second software code version management tool are tools for implementing software code version management on the software side and the hardware side respectively. When the software code in the first software code version management tool is updated, the software code in the second software code version management tool will also be updated synchronously; in response to a first instruction input by a user, the present invention can automatically translate the version information of all code branches of the specified software code version corresponding to the first software code version management tool to obtain the version information of all code branches of the specified software code version corresponding to the second software code version management tool, and download from the second software code version management tool based on the version information of all code branches of the specified software code version corresponding to the second software code version management tool. The corresponding software code is integrated with the hardware verification environment, and it is verified whether all code branches of the specified software code version can run normally after being integrated with the hardware verification environment. If the verification passes, the version management configuration file in the updated hardware verification environment is uploaded to the second software code version management tool. The configuration file includes the version information of the second software code version management tool corresponding to all code branches of the specified software code version, which can avoid subsequent users' re-verification of the same software code version and save users' re-verification time. Moreover, the present invention only needs the user to input the first instruction to automatically execute the above multiple steps, which reduces the complexity of users' verification of the specified software code version, saves users' verification time, and improves verification efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0016] Figure 1 A flowchart of a method for synchronizing software code into a hardware environment and automatically integrating the software code into the hardware environment provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0017] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0018] In the description of this application specification and the appended claims, the terms "first", "second", "third", etc., if used, are only used to distinguish the description and are not to be understood as indicating or implying relative importance, nor are they used to describe a specific order or sequence.

[0019] According to this embodiment, a method for synchronizing software code into a hardware environment and automatically integrating the software code into the hardware environment is provided. The method comprises the following steps: Figure 1 As shown:

[0020] S100, in response to a first instruction input by a user, entering S200; the first instruction includes preset type information of a specified software code version.

[0021] In this embodiment, the designated software code version is a software code version that has passed the delivery standard preset by the software side and is also the software code version that the user wants to verify.

[0022] In this embodiment, the preset type information is pre-set. As an optional specific implementation method, the preset type information is a standardized path with an update time and date corresponding to the software code version.

[0023] S200, determining the information text of the specified software code version according to the preset type information of the specified software code version; the information text of the specified software code version has a mapping relationship with the preset type information of the specified software code version.

[0024] In this embodiment, different software code versions correspond to different preset type information. The corresponding software code version, that is, the specified software code version, can be determined based on the preset type information of the specified software code version input by the user; each software code version corresponds to an information text in the first software code version management tool, and the information text corresponding to the specified software code version can be determined based on the preset type information of the specified software code version input by the user, and the information text of the specified software code version has a mapping relationship with the preset type information of the specified software code version.

[0025] Those skilled in the art are aware that any software code version management tool in the prior art falls within the protection scope of the present invention; optionally, the first software code version management tool is Git, and the second software code version management tool is Perforce.

[0026] In this embodiment, the first software code version management tool and the second software code version management tool are different software code version management tools. Although the second software code version management tool will synchronously store the software code version stored in the first software code version management tool, the version information corresponding to the same software code version in the two tools is different.

[0027] As a specific implementation, before S100, the method further includes:

[0028] S010: Establish a mapping relationship between the path of the code repository of the first software code version management tool and the code repository of the second software code version management tool.

[0029] In this embodiment, the names of different code warehouses in the first software code version management tool are different, and the names of different code warehouses in the second software code version management tool are different. A code warehouse in the first software code version management tool may have a mapping relationship with a code warehouse in the second software code version management tool, or a code warehouse in the first software code version management tool includes multiple paths, each path has a mapping relationship with a code warehouse in the second software code version management tool; based on the above mapping relationship, it can be determined which code warehouse in the second software code version management tool corresponds to a certain path of a certain code warehouse in the first software code version management tool, and the code warehouse with a mapping relationship and the software code version stored in the path are the same.

[0030] S020, if a new software code version is uploaded to a certain path of a certain code repository in the first software code version management tool, the new software code version is synchronized in the target code repository in the second software code version management tool; the target code repository is a code repository that has a mapping relationship with the path of the code repository where the new software code version is uploaded.

[0031] Based on S010 - S020 , synchronization of the second software code version management tool with the first software code version management tool can be achieved.

[0032] As a preferred specific implementation, S020 includes:

[0033] S021, obtaining version information of a first software code version management tool corresponding to the new software code version.

[0034] In this embodiment, the version information is used to uniquely identify the corresponding software code. The version information of the first software code version management tool is used to uniquely identify the software code version in the first software code version management tool, and the version information of the second software code version management tool is used to uniquely identify the software code version in the second software code version management tool.

[0035] S022: Obtain the name of the target code repository in the second software code version management tool according to the path of the code repository in the first software code version management tool where the new software code version is uploaded and the mapping relationship.

[0036] S023: Synchronize the new software code version to a code repository in a second software code version management tool whose name is the target code repository, and assign version information corresponding to the second software code version management tool to the new software code version.

[0037] S024, write the version information of the new software code version corresponding to the first software code version management tool into the description information of the second software code version management tool, so that the corresponding software code version can be obtained from the second software code version management tool according to the version information of the software code version corresponding to the first software code version management tool.

[0038] In this embodiment, the version information of the first software code version management tool is used to uniquely identify the software code version in the first software code version management tool. Therefore, the version information of the new software code version corresponding to the first software code version management tool is unique. Therefore, in the second software code version management tool, only the description information of the new software code version is written with the version information of the new software code version corresponding to the first software code version management tool. It is also possible to uniquely determine the software code version in the second software code version management tool based on the version information of the first software code version management tool, and the determined software code version and the new software code version are the same software code version.

[0039] S300, extracting version information of a first software code version management tool corresponding to all code branches of the specified software code version from the information text of the specified software code version; the first software code version management tool is used to implement management of software code versions on the software side.

[0040] S400, translating the version information of the first software code version management tool corresponding to all code branches of the specified software code version to obtain the version information of the second software code version management tool corresponding to each code branch of the specified software code version; the second software code version management tool is used to implement the management of the software code version on the hardware side.

[0041] As a preferred specific implementation, the information text of the specified software code version includes the name of the software warehouse stored in the first software code version management tool for each code branch of the specified software code version, the path of the corresponding code branch, and the version information of the corresponding code branch corresponding to the first software code version management tool, wherein the path is used to locate the location where the corresponding code branch is stored in the software warehouse; S400 includes:

[0042] S410, obtaining a software warehouse name sequence A corresponding to the specified software code version, A=(a1, a2, ..., ai ,…,a n ), a i The name of the software warehouse stored in the first software code version management tool for the i-th code branch of the specified software code version, where i ranges from 1 to n, and n is the number of code branches of the specified software code version.

[0043] S420, obtaining a code branch path sequence B corresponding to the specified software code version, B=(b1, b2, ..., b i ,…,b n ), b i The path of the i-th code branch of the specified software code version.

[0044] S430, obtaining a version information sequence C of the first software code version management tool corresponding to the specified software code version, where C=(c1, c2, ..., c i ,…,c n ), c i The i-th code branch of the specified software code version corresponds to the version information of the first software code version management tool.

[0045] S440, traverse A, B and C, according to a i 、b i and c i Determine that the i-th code branch of the specified software code version corresponds to version information of a second software code version management tool.

[0046] As a preferred specific implementation, S440 includes:

[0047] S441, according to a i and b i Determine the code repository r of the i-th code branch storing the specified software code version in the second software code version management tool i .

[0048] In this embodiment, a code warehouse in the first software code version management tool may have a mapping relationship with a code warehouse in the second software code version management tool, or a code warehouse in the first software code version management tool includes multiple paths, each path has a mapping relationship with a code warehouse in the second software code version management tool; a code warehouse in the first software code version management tool can be uniquely determined based on the name of the code warehouse in the first software code version management tool and the path of the code branch.

[0049] S442, will be stored in r i and the description information includes c iThe version information of the code branch in the second software code version management tool is determined as the version information of the second software code version management tool corresponding to the i-th code branch of the specified software code version.

[0050] In this embodiment, r i There may be stored in the ith code branch of the specified software code version multiple versions, different versions corresponding to different description information, only the description information includes c i The version information of the code branch in the second software code version management tool is the version information of the second software code version management tool corresponding to the i-th code branch of the specified software code version.

[0051] S500, updating the configuration file of version management in the hardware verification environment according to the version information of the second software code version management tool corresponding to each code branch of the specified software code version, so that the updated configuration file of version management in the hardware verification environment includes the version information of the second software code version management tool corresponding to each code branch of the specified software code version.

[0052] In this embodiment, the version information of each code branch of the software code version is set in the configuration file of the version management in the hardware verification environment, and the version information of each code branch of the software code version in the configuration file of the version management in the hardware verification environment is updated to the version information of each code branch of the specified software code version corresponding to the second software code version management tool.

[0053] S600, downloading the corresponding software code version from the second software code version management tool to the local according to the configuration file of the version management in the updated hardware verification environment, so as to integrate the downloaded software code version with the hardware verification environment to obtain the updated hardware verification environment.

[0054] In this embodiment, the configuration file of the version management in the updated hardware verification environment includes the version information of the second software code version management tool corresponding to each code branch of the specified software code version, and the second software code version management tool is synchronized with the software code version in the first software code version management tool. Therefore, the software code version identical to the specified software code version can be directly downloaded from the second software code version management tool to the local computer according to the version information of the second software code version management tool corresponding to each code branch of the specified software code version, and the software code version can be integrated with the hardware verification environment to obtain the updated hardware verification environment.

[0055] S700, locally tests the updated hardware verification environment using preset test cases.

[0056] In this embodiment, the preset test cases are test cases for quickly checking the correctness of all codes, with the purpose of ensuring that the coding and basic functions are correct.

[0057] S800: If the test passes, submit the updated version management configuration file in the hardware verification environment to a second software code version management tool.

[0058] In this embodiment, if the test fails, a preset verification error message is issued.

[0059] In this embodiment, the first software code version management tool and the second software code version management tool are tools for implementing software code version management on the software side and the hardware side respectively. When the software code in the first software code version management tool is updated, the software code in the second software code version management tool will also be updated synchronously; in response to the first instruction input by the user, this embodiment can automatically translate the version information of all code branches of the specified software code version corresponding to the first software code version management tool to obtain the version information of all code branches of the specified software code version corresponding to the second software code version management tool, and download from the second software code version management tool based on the version information of all code branches of the specified software code version corresponding to the second software code version management tool The corresponding software code is integrated with the hardware verification environment, and it is verified whether all code branches of the specified software code version can run normally after being integrated with the hardware verification environment. If the verification passes, the version management configuration file in the updated hardware verification environment is uploaded to the second software code version management tool. The configuration file includes the version information of the second software code version management tool corresponding to all code branches of the specified software code version, which can avoid subsequent users' re-verification of the same software code version and save users' re-verification time. Moreover, this embodiment only needs the user to input the first instruction to automatically execute the above multiple steps, which reduces the complexity of users' verification of the specified software code version, saves users' verification time, and improves verification efficiency.

[0060] In addition to verifying the software code, this embodiment can also verify a code branch of the software code version, which is more suitable for the scenario where a code branch of the software code version is updated separately; as a preferred specific implementation, after S800, the method further includes:

[0061] S900, in response to a second instruction input by a user, proceed to S910; the second instruction includes version information of a first software code version management tool corresponding to a specified code branch of a specified software code version.

[0062] S910: Translate version information of a first software code version management tool corresponding to a specified code branch of the specified software code version to obtain version information of a second software code version management tool corresponding to a specified code branch of the specified software code version.

[0063] In this embodiment, the corresponding description information in the second software code version management tool includes the code branch of the specified software code version corresponding to the version information of the first software code version management tool as the specified code branch of the specified software code version, and the code branch corresponding to the version information of the second software code version management tool is the specified code branch of the specified software code version corresponding to the version information of the second software code version management tool.

[0064] S920, update the version management configuration file in the hardware verification environment according to the version information of the second software code version management tool corresponding to the specified code branch of the specified software code version, so that the updated version management configuration file in the hardware verification environment includes the version information of the second software code version management tool corresponding to the specified code branch of the specified software code version.

[0065] In this embodiment, only the version information corresponding to the specified code branch of the specified software code version in the version management configuration file in the hardware verification environment is updated, and the version information corresponding to other code branches of the specified software code version does not need to be modified.

[0066] S930, downloading the corresponding software code version from the second software code version management tool to the local according to the configuration file of the version management in the updated hardware verification environment, so as to integrate the downloaded software code version with the hardware verification environment to obtain the updated hardware verification environment.

[0067] S940, locally tests the updated hardware verification environment using preset test cases.

[0068] S950: If the test passes, submit the updated version management configuration file in the hardware verification environment to the second software code version management tool.

[0069] Based on S910 - S950 , this embodiment implements verification of the specified code branch of the specified software code version.

[0070] Although some specific embodiments of the present invention have been described in detail by way of example, it will be appreciated by those skilled in the art that the above examples are for illustration only and are not intended to limit the scope of the present invention. It will also be appreciated by those skilled in the art that various modifications may be made to the embodiments without departing from the scope and spirit of the present invention. The scope of the present invention is defined by the appended claims.

Claims

1. A method for synchronizing software code into a hardware environment and automatically integrating it, characterized in that: The method comprises the following steps: S100, in response to a first instruction input by a user, entering S200; the first instruction includes preset type information of a specified software code version; S200, determining the information text of the specified software code version according to the preset type information of the specified software code version; the information text of the specified software code version has a mapping relationship with the preset type information of the specified software code version; S300, extracting version information of a first software code version management tool corresponding to all code branches of the specified software code version from the information text of the specified software code version; the first software code version management tool is used to implement management of software code versions on the software side; S400, translating the version information of all code branches of the specified software code version corresponding to the first software code version management tool to obtain the version information of each code branch of the specified software code version corresponding to the second software code version management tool; the second software code version management tool is used to implement the management of the software code version on the hardware side; S500, updating a configuration file of version management in a hardware verification environment according to the version information of a second software code version management tool corresponding to each code branch of the specified software code version, so that the updated configuration file of version management in the hardware verification environment includes the version information of the second software code version management tool corresponding to each code branch of the specified software code version; S600, downloading the corresponding software code version from the second software code version management tool to the local according to the configuration file of the version management in the updated hardware verification environment, so as to integrate the downloaded software code version with the hardware verification environment to obtain the updated hardware verification environment; S700, locally tests the updated hardware verification environment using preset test cases; S800, if the test passes, submitting the updated version management configuration file in the hardware verification environment to the second software code version management tool; The information text of the specified software code version includes the name of the software warehouse stored in the first software code version management tool for each code branch of the specified software code version, the path of the corresponding code branch, and the version information of the corresponding code branch corresponding to the first software code version management tool, wherein the path is used to locate the location where the corresponding code branch is stored in the software warehouse; S400 includes: S410, obtaining a software warehouse name sequence A corresponding to the specified software code version, A=(a1, a2, ..., a i ,…,a n ), a i is the name of the software warehouse stored in the first software code version management tool for the i-th code branch of the specified software code version, where i ranges from 1 to n, and n is the number of code branches of the specified software code version; S420, obtaining a code branch path sequence B corresponding to the specified software code version, B=(b1, b2, ..., b i ,…,b n ), b i The path of the i-th code branch of the specified software code version; S430, obtaining a version information sequence C of the first software code version management tool corresponding to the specified software code version, where C=(c1, c2, ..., c i ,…,c n ), c i The version information of the first software code version management tool corresponding to the i-th code branch of the specified software code version; S440, traverse A, B and C, according to a i 、b i and c i Determine that the i-th code branch of the specified software code version corresponds to version information of a second software code version management tool.

2. The method for synchronizing software code into a hardware environment and automatically integrating the software code according to claim 1, characterized in that: S440 includes: S441, according to a i and b i Determine the code repository r of the i-th code branch storing the specified software code version in the second software code version management tool i ; S442, will be stored in r i and the description information includes c i The version information of the code branch in the second software code version management tool is determined as the version information of the second software code version management tool corresponding to the i-th code branch of the specified software code version.

3. The method for synchronizing software code into a hardware environment and automatically integrating the software code according to claim 1, characterized in that: After S800, the method further includes: S900, in response to a second instruction input by a user, proceed to S910; the second instruction includes version information of a first software code version management tool corresponding to a specified code branch of a specified software code version; S910, translating version information of a first software code version management tool corresponding to a specified code branch of the specified software code version to obtain version information of a second software code version management tool corresponding to a specified code branch of the specified software code version; S920, updating a configuration file of version management in a hardware verification environment according to the version information of the second software code version management tool corresponding to the specified code branch of the specified software code version, so that the updated configuration file of version management in the hardware verification environment includes the version information of the second software code version management tool corresponding to the specified code branch of the specified software code version; S930, downloading the corresponding software code version from the second software code version management tool to the local according to the configuration file of the version management in the updated hardware verification environment, so as to integrate the downloaded software code version with the hardware verification environment to obtain the updated hardware verification environment; S940, locally tests the updated hardware verification environment using preset test cases; S950: If the test passes, submit the updated configuration file of the version management in the hardware verification environment to the second software code version management tool.

4. The method for synchronizing software code into a hardware environment and automatically integrating the software code according to claim 1, characterized in that: Before S100, the method further includes: S010, establishing a mapping relationship between the path of the code repository of the first software code version management tool and the code repository of the second software code version management tool; S020, if a new software code version is uploaded to a certain path of a certain code repository in the first software code version management tool, the new software code version is synchronized in the target code repository in the second software code version management tool; the target code repository is a code repository that has a mapping relationship with the path of the code repository where the new software code version is uploaded.

5. The method for synchronizing software code into a hardware environment and automatically integrating the software code according to claim 4, characterized in that: S020 includes: S021, obtaining version information of the new software code version corresponding to a first software code version management tool; S022, obtaining the name of the target code repository in the second software code version management tool according to the path of the code repository in which the new software code version is uploaded in the first software code version management tool and the mapping relationship; S023, synchronizing the new software code version to a code repository in a second software code version management tool whose name is the name of the target code repository, and assigning version information corresponding to the second software code version management tool to the new software code version; S024, write the version information of the new software code version corresponding to the first software code version management tool into the description information of the second software code version management tool, so that the corresponding software code version can be obtained from the second software code version management tool according to the version information of the software code version corresponding to the first software code version management tool.

6. The method for synchronizing software code into a hardware environment and automatically integrating the software code according to claim 1, characterized in that: The first software code version management tool is Git, and the second software code version management tool is Perforce.

Citation Information

Patent Citations

  • Code warehouse management method and device, computer equipment and storage medium

    CN114253595A

  • Software continuous integration method and device and storage medium

    CN114860296A

  • Method and device for constructing multi-terminal applet

    CN115934151A

  • Version management system of application distribution platform

    CN118444970A

  • Continuous development and delivery system

    US20200371898A1