Software management method, device and equipment based on three-library linkage and medium

By implementing multi-level quality verification across development libraries, controlled libraries, and product libraries, the problem of low-quality code entering the controlled stage and inconsistent version identification in existing technologies has been solved. This has resulted in improved code quality and version consistency, and reduced the failure rate in the production environment.

CN120909635APending Publication Date: 2025-11-07AVIC (CHENGDU) UAS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511027521.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-24
Publication Date
2025-11-07

AI Technical Summary

Technical Problem

Existing software management methods rely on external tools for surface checks and lack in-depth analysis, resulting in low-quality code entering the controlled phase. Furthermore, manual operations lead to inconsistencies between version identifiers and actual deployed content, making it impossible to guarantee the consistency of the version baseline.

Method used

Through the collaborative operation of development libraries, controlled libraries, and product libraries, and multi-level quality verification, including static analysis, functional testing, integration testing, and hash value comparison, code quality and version consistency are ensured.

Benefits of technology

It improved code quality, reduced the failure rate in the production environment, reduced manual intervention, and ensured the accuracy of version identification and the integrity of the code.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120909635A_ABST
    Figure CN120909635A_ABST
Patent Text Reader

Abstract

The invention discloses a software management method and device based on three-library linkage, equipment and a medium, and relates to the field of software engineering.The method comprises the steps that a first target code passing first quality verification is obtained based on a development library, and the first target code is sent to a controlled library; in the process of transmitting the first target code from the development library to the controlled library, performing second quality verification on the first target code, so that the controlled library performs an integration test on the second target code passing the second quality verification in the simulated target environment, and sends a third target code which is successfully tested to the product library; and in the process of transmitting the third target code from the controlled library to the product library, performing third quality verification on the third target code, so that the product library obtains a fourth target code passing the third quality verification, and generates a product baseline corresponding to the fourth target code. Through collaborative operation of the development library, the controlled library and the product library and multi-level quality verification, the fault occurrence rate of the production environment is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of software engineering, and in particular to a software management method and device based on three-library linkage, equipment and medium. BACKGROUND

[0002] With the improvement of software engineering complexity and the popularity of agile development mode, software full life cycle management faces multi-dimensional challenges. In the current development library, controlled library and product library management, for example, the hierarchical management mode based on multiple repositories of Gitee (a code hosting platform), the core idea is to separate the code repositories of development, testing and production environments, and realize phased management and control by combining automatic tool chains. For example, the code library is divided into development branches, test branches and master branches. Developers submit code in the local development branch, trigger a merge request manually to enter the controlled environment, and then manually release it to the production environment by the administrator, so as to realize the linkage among the development library, the controlled library and the product library.

[0003] However, the following problems exist: only relying on external tools for surface inspection, lacking deep analysis of code defects, which may lead to low-quality code entering the controlled stage; triggering a merge request manually, manually releasing to the production environment, and manually marking the version baseline, due to subjective errors in manual operation, which cannot guarantee the consistency of version identification and actual deployment content. SUMMARY

[0004] Therefore, the purpose of the present application is to provide a software management method and device based on three-library linkage, equipment and medium, which reduces the failure rate of the production environment through the cooperative operation of the development library, the controlled library and the product library and multi-level quality verification. The specific scheme is as follows:

[0005] In a first aspect, the present application provides a software management method based on three-library linkage, applied to a software management platform based on three libraries, including a development library, a controlled library and a product library; wherein the method comprises:

[0006] acquiring first target code passing a first quality verification based on the development library, and sending the first target code to the controlled library; the content of the first quality verification includes static checking of the code;

[0007] In the process of transmitting the first target code from the development library to the controlled library, the first target code is subjected to a second quality verification, so that the controlled library acquires second target code passing the second quality verification; the content of the second quality verification includes functional testing of the code;

[0008] The second target code is integrated and tested in a simulated target environment by the controlled library, and third target code that passes the test is sent to a product library; the simulated target environment is consistent with an actual production environment in which the software provides services to users;

[0009] During the process of transmitting the third target code from the controlled library to the product library, the third target code is subjected to third quality verification, so that the product library obtains fourth target code that passes the third quality verification; the third quality verification includes comparing a hash value of a baseline version corresponding to the code;

[0010] The product library is used to generate a product baseline corresponding to the fourth target code.

[0011] Optionally, before the first target code that passes the first quality verification is obtained based on the development library, the method further includes:

[0012] A preset incremental check is performed on the obtained code to be detected to determine a changed part in the code to be detected compared with a current known code;

[0013] A preset lightweight static check is performed on changed code corresponding to the changed part, and if the changed code passes the preset lightweight static check, the code to be detected is sent to the development library as the first target code; the preset lightweight static check includes syntax verification and basic rule scanning.

[0014] Optionally, the second quality verification on the first target code includes:

[0015] First target functions corresponding to the changed code and second target functions corresponding to code affected by the changed code are determined, a target test case set is constructed by selecting test cases corresponding to the first target functions and the second target functions, and the code corresponding to the first target functions and the second target functions is locally tested by using the target test case set;

[0016] It is verified whether a current environment corresponding to the first target code is compatible with a target environment simulated by the controlled library;

[0017] If the local test is successful and the current environment corresponding to the first target code is compatible with the target environment simulated by the controlled library, the first target code passes the verification.

[0018] Optionally, the third quality verification on the third target code includes:

[0019] Determine the first hash value of the baseline version corresponding to the third target code, compare the first hash value with the second hash value generated by the controlled library for the baseline version corresponding to the third target code, and determine whether the first hash value and the second hash value are consistent.

[0020] The target dependency library list corresponding to the third target code is compared with the expected standard dependency library list to determine whether the target dependency library list and the standard dependency library list are consistent.

[0021] A compliance check is performed on the baseline version corresponding to the third target code to determine whether the baseline version meets the preset compliance standards; the baseline version includes the target code, a list of dependent libraries, and configuration files;

[0022] If the first hash value and the second hash value are consistent, the target dependency library list and the standard dependency library list are consistent, and the baseline version corresponding to the third target code meets the preset compliance standard, then the third target code passes the verification.

[0023] Optionally, the process of generating the product baseline corresponding to the fourth target code using the product library further includes:

[0024] The product library is used to generate a unique version identifier for the fourth target code; the version identifier includes a code hash value and a list of dependent libraries.

[0025] The product database is directly connected to the actual production environment. When the actual production environment malfunctions, the software management method further includes:

[0026] Based on the current version identification information, the corresponding fault information is determined. According to the saved historical version identification information, a fault-free stable product baseline is selected, and the current product baseline corresponding to the actual production environment is rolled back to the stable product baseline.

[0027] Optionally, if any target code fails the corresponding quality verification, the software management method further includes:

[0028] Save the defect information corresponding to any of the target codes to the initial defect set;

[0029] The target defect set is obtained by preprocessing the defect information in the initial defect set; the preprocessing operations include deduplication, invalid data filtering, and defect type standardization conversion; the defect type standardization conversion is used to unify the tag content corresponding to defects of the same type.

[0030] determine defect relationship tables corresponding to target defect information in the target defect set respectively, determine defect feature information corresponding to the target defect information respectively according to the defect relationship tables, and determine target defect feature information corresponding to each of the target defect information based on the defect relationship tables, the defect feature information, and a preset data format; the defect relationship tables include defect content, defect code, and a developer; and the defect feature information includes defect type, defect severity level, defect code complexity, defect stage, and defect repair time;

[0031] construct a target knowledge graph based on the target defect feature information, and determine a target knowledge base according to the target knowledge graph.

[0032] Optionally, the software management method based on three-library linkage further includes:

[0033] extracting target feature information corresponding to new target code that fails quality verification;

[0034] comparing the target feature information with data in the target knowledge base to determine target defect data in the target knowledge base that has a similarity to the target feature information exceeding a preset similarity threshold;

[0035] repairing the new target code that fails quality verification based on historical repair information corresponding to the target defect data, and saving current repair information to the target knowledge base.

[0036] In a second aspect, the present application provides a software management device based on three-library linkage, applied to a software management platform based on three libraries, including a development library, a controlled library, and a product library; wherein the device includes:

[0037] a first code transmission module, configured to acquire first target code passing a first quality verification based on the development library, and transmit the first target code to the controlled library; the first quality verification includes static checking of the code;

[0038] a first quality verification module, configured to perform second quality verification on the first target code in a process of transmitting the first target code from the development library to the controlled library, so that the controlled library acquires second target code passing the second quality verification; the second quality verification includes functional testing of the code;

[0039] a second code transmission module, configured to perform integration testing on the second target code in a simulated target environment through the controlled library, and transmit third target code passing the integration testing to the product library; the simulated target environment is consistent with an actual production environment in which the software provides services to users;

[0040] a second quality verification module, configured to perform a third quality verification on the third target code in a process in which the third target code is transmitted from the controlled library to the product library, so that the product library acquires a fourth target code that passes the third quality verification; the third quality verification includes comparing a hash value of a baseline version corresponding to the code;

[0041] a product baseline determination module, configured to generate a product baseline corresponding to the fourth target code by using the product library.

[0042] In a third aspect, the present application provides an electronic device, comprising:

[0043] a memory, configured to save a computer program;

[0044] a processor, configured to execute the computer program to implement the software management method based on the three-library linkage as described above.

[0045] In a fourth aspect, the present application provides a computer readable storage medium, configured to save a computer program, wherein the computer program is executed by a processor to implement the software management method based on the three-library linkage as described above.

[0046] In the present application, the first target code passing the first quality verification is acquired based on the development library, and the first target code is sent to the controlled library; the content of the first quality verification includes static checking of the code; the second quality verification is performed on the first target code in the process of transferring the first target code from the development library to the controlled library, so that the second target code passing the second quality verification is acquired by the controlled library; the content of the second quality verification includes functional testing of the code; the second target code is integrated and tested in a simulated target environment by the controlled library, and the third target code passing the test is sent to the product library; the simulated target environment is consistent with the actual production environment in which the software provides services to users; the third quality verification is performed on the third target code in the process of transferring the third target code from the controlled library to the product library, so that the fourth target code passing the third quality verification is acquired by the product library; the content of the third quality verification includes comparison of the hash value of the corresponding baseline version of the code; and the product baseline corresponding to the fourth target code is generated by the product library. As can be seen from the above, the first quality verification is performed on the code before the code enters the development library, the low-level errors and potential risks are intercepted from the source, and the low-quality code is prevented from flowing into the subsequent stage. The second quality verification is performed on the code in the process of transferring the code from the development library to the controlled library, so as to verify the correctness of the code logic and ensure that the basic function meets the demand. The third quality verification is performed on the code in the process of transferring the code from the controlled library to the product library, so as to verify the consistency of the baseline version through the hash value comparison and ensure that the release content is completely matched with the code passing the test. In this way, the code quality is improved through the layer-by-layer verification. On the other hand, the process of the code from the development library to the product library through the controlled library is triggered by automatic verification, reducing the manual intervention points. At the same time, a unique hash value corresponding to the baseline version of the code is generated, and the final product baseline is automatically generated according to the hash value, avoiding subjective errors of manual marking. BRIEF DESCRIPTION OF DRAWINGS

[0047] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are only embodiments of the present application, and those skilled in the art can obtain other drawings according to the provided drawings without creative labor.

[0048] Figure 1 A software management method flow chart based on three-library linkage disclosed by the present application;

[0049] Figure 2 A three-library architecture and interaction flow diagram disclosed by the present application;

[0050] Figure 3 A defect set management process disclosed by the present application is shown in the figure;

[0051] Figure 4 A system architecture of a software management method based on three-library linkage disclosed by the present application is shown in the figure;

[0052] Figure 5 A structure of a software management device based on three-library linkage disclosed by the present application is shown in the figure;

[0053] Figure 6 A structure of an electronic device disclosed by the present application is shown in the figure. DETAILED DESCRIPTION

[0054] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.

[0055] The hierarchical management mode based on multiple warehouses in the prior art divides the code library into a development branch, a test branch and a master branch. The developer submits the code in the local development branch, triggers a merge request manually to enter a controlled environment, and manually releases it to the production environment by an administrator, so as to realize the linkage among the development library, the controlled library and the product library. However, only relying on external tools for surface inspection, the depth analysis of code defects is lacking, which may cause low-quality code to enter the controlled stage; on the other hand, by manually triggering a merge request and manually releasing it to the production environment, the version baseline is marked by a human, and due to the subjective error of manual operation, the consistency of the version identification and the actual deployment content cannot be guaranteed. Therefore, the present application provides a software management method based on three-library linkage, which reduces the failure rate of the production environment through the collaborative operation of the development library, the controlled library and the product library and multi-level quality verification.

[0056] Referring to Figure 1 The embodiments of the present application disclose a software management method based on three-library linkage, applied to a software management platform based on three libraries, wherein the software management platform based on three libraries includes a development library, a controlled library and a product library; and the method includes:

[0057] In step S11, the first target code passing the first quality verification is obtained based on the development library, and the first target code is sent to the controlled library; the content of the first quality verification includes static inspection of the code.

[0058] In the embodiment, before the first target code passing the first quality verification is acquired based on the development library, the method can further include: first performing a preset incremental check on the acquired code to be detected to determine a changed part in the code to be detected compared with the current known code; then performing a preset lightweight static check on the changed code corresponding to the changed part, and if the changed code passes the preset lightweight static check, sending the code to be detected as the first target code to the development library; wherein the preset lightweight static check includes but is not limited to syntax verification and basic rule scanning.

[0059] It can be understood that, referring to FIG. 1, Figure 2 As shown in FIG. 1, the development library is used as an initial entry to allow developers to freely submit codes, and in the process of the codes entering the development library, a quality verification engine, i.e., a preset lightweight static check, can be deployed to preliminarily filter the codes. Then the first target code passing the quality verification engine is acquired by the development library, and the first target code is sent to the controlled library.

[0060] In the process of the first target code being transmitted from the development library to the controlled library, the first target code is subjected to a second quality verification so that the second target code passing the second quality verification is acquired by the controlled library; the content of the second quality verification includes a function test on the code.

[0061] In the embodiment, in the process of the first target code being transmitted from the development library to the controlled library, the first target code can be subjected to the second quality verification by the quality verification engine, specifically including: first determining a first target function corresponding to the changed code and a second target function corresponding to the code affected by the changed code, selecting a test case corresponding to the first target function and the second target function to build a target test case set, and performing a local test on the code corresponding to the first target function and the second target function by using the target test case set. Then it is verified whether a current environment corresponding to the first target code and a target environment simulated by the controlled library are compatible. If the local test is successful and the current environment corresponding to the first target code and the target environment simulated by the controlled library are compatible, the first target code passes the verification.

[0062] It can be understood that, referring to FIG. 1, Figure 2As shown, the traditional full-quantity test is low in efficiency, so the code test range can be reduced by changing the impact analysis to achieve the first goal of differential checking of the baseline version corresponding to the target code and the current baseline version of the controlled library, so as to reduce the time and improve the efficiency. At the same time, the compatibility check of the development environment corresponding to the code and the target environment simulated by the controlled library can be carried out, including but not limited to verifying whether the dependent library version is consistent, whether the system parameters are matched, etc. For example, if the development environment corresponding to the code uses MySQL 8.0 (an open source relational database management system), and the production environment simulated by the controlled library is MariaDB 10.6 (a branch of MySQL), it may cause SQL syntax compatibility problems, which can be intercepted in advance through the quality verification engine.

[0063] In step S13, the second target code is integrated and tested in the simulated target environment by the controlled library, and the third target code that passes the test is sent to the product library; the simulated target environment is consistent with the actual production environment in which the software provides services to users.

[0064] In this embodiment, the controlled library obtains the second target code passed by the quality verification engine, and integrates and tests the second target code in the simulated target environment. Among them, the controlled library as a quality strong management layer only allows the code branch in the development library that passes the automatic quality verification to enter, when the version corresponding to the above code branch enters the controlled library, the system automatically creates an independent sandbox environment for integration testing, and if any modification is made to the version during the integration testing, the full-quantity verification process needs to be triggered again, that is, the modified version is submitted to the development library again, and the processes of steps S11, S12 and S13 are repeated.

[0065] It should be noted that after the code enters the controlled library, the system will automatically trigger the "permission shrinkage" mechanism, that is, in each stage such as development, testing and operation and maintenance, real-time dynamic permission control is implemented based on roles such as developers, testers and operators. For example, the developer can only use the "read-only mirror access" mechanism of the controlled library to locate the problem, direct modification of the controlled library content is prohibited, the release permission of the product library is limited to authorized accounts with digital certificates, etc.

[0066] In step S14, the third quality verification is performed on the third target code during the process of transmitting the third target code from the controlled library to the product library, so that the product library obtains the fourth target code that passes the third quality verification; the content of the third quality verification includes comparing the hash values of the baseline versions corresponding to the code.

[0067] In this embodiment, the third quality verification can be performed on the third target code by the quality verification engine during the process of transmitting the third target code from the controlled library to the product library, as shown in Figure 2As shown, specifically can include: first determine the first hash value of the baseline version corresponding to the third target code, compare the first hash value with the second hash value generated by the controlled library for the baseline version corresponding to the third target code, and judge whether the first hash value and the second hash value are consistent. Then compare the target dependent library list corresponding to the third target code with the expected standard dependent library list, and judge whether the target dependent library list and the standard dependent library list are consistent. Finally, the baseline version corresponding to the third target code is checked for compliance, and it is judged whether the baseline version meets the preset compliance standard; wherein the baseline version includes but is not limited to target code, dependent library list and configuration file; the compliance checking range can include whether the code is safe, whether the configuration is compliant, and whether the policy is adapted, etc. If the first hash value and the second hash value are consistent, the target dependent library list and the standard dependent library list are consistent, and the baseline version corresponding to the third target code meets the preset compliance standard, the third target code passes the verification.

[0068] In this way, through the triple verification mechanism, the integrity, consistency and compliance of the code from the controlled library to the product library can be ensured, and problems such as version tampering, dependency loss or security vulnerabilities in the production environment can be avoided.

[0069] Step S15, generating a product baseline corresponding to the fourth target code by using the product library.

[0070] In this embodiment, after the product library obtains the fourth target code, it can generate unique corresponding version identification information for the fourth target code and obtain the product baseline corresponding to the fourth target code; wherein the version identification information includes but is not limited to code hash value and dependent library list.

[0071] Among them, the product library is directly connected to the actual production environment, and only accepts the baseline version completed by the controlled library and approved by the configuration auditor, and generates tamper-proof version identification information. When the actual production environment fails, the corresponding fault information can be determined based on the current version identification information, the stable product baseline without fault is selected according to the saved historical version identification information, and the corresponding current product baseline in the actual production environment is rolled back to the stable product baseline. That is, through the version identification information chain, the full-link tracing capability is constructed, when the production environment fails, the system can automatically locate the problem source based on the version identification information, and quickly roll back to the historical stable version through the baseline synchronization engine, and supports accurate restoration according to time point or version number.

[0072] It should be noted that, referring to Figure 3As shown in the above steps S11 to S14, when any target code passes the corresponding quality verification, the target code enters the corresponding library, and when any target code fails the corresponding quality verification, the system will automatically freeze the branch and notify the responsible person, and at the same time, the defect type is associated with the submission history record of the corresponding library, so as to form a defect set for assisting subsequent improvement. For example, if the quality verification in the process of developing the library to the controlled library fails, the defect type is associated with the submission history record of the development library.

[0073] Specifically, it can include: saving the defect information corresponding to any target code to an initial defect set. Then pre-process the defect information in the initial defect set to obtain a target defect set; wherein the pre-processing operation includes but is not limited to deduplication operation, invalid data filtering and defect type standardization conversion; the defect type standardization conversion is used to unify the label content corresponding to the same type of defect. Further, determine the defect relationship table corresponding to the target defect information in the target defect set respectively, determine the defect feature information corresponding to the target defect information respectively according to the defect relationship table, and determine the target defect feature information corresponding to each target defect information based on the defect relationship table, defect feature information and pre-set data format; wherein the defect relationship table includes but is not limited to defect content, defect code and developer; the defect feature information includes but is not limited to defect type, defect severity level, defect code complexity, defect stage and defect repair time. Finally, construct a target knowledge graph based on the target defect feature information, and determine a target knowledge base according to the target knowledge graph.

[0074] Referring to Figure 3 As shown, the defect set is analyzed in depth based on the defect deep mining engine, and the specific process can include:

[0075] Defect data preprocessing: first, obtain the defect information in the initial defect set, such as code submission log, test report, error record, etc., and then use the automatic cleaning technology based on the rule engine to clean the defect data, remove duplicate and invalid defect data, to obtain the target defect set. For example, based on the similarity of the hash value corresponding to the code and the defect description, the duplicate defects are merged; the invalid defect data such as blank log and system error is removed; the free text defect description is mapped to a standardized type label. Finally, determine the defect relationship table corresponding to the target defect information in the target defect set respectively.

[0076] Defect information acquisition: statistics the historical defect rate, average repair time, code style deviation degree, etc. corresponding to the developer in the defect relationship table. Mark the stage and corresponding environment configuration of the defect, such as the operating system version. Based on the above information and the defect relationship table, determine the defect feature information corresponding to the target defect information respectively, and based on the defect relationship table, defect feature information and pre-set data format, determine the target defect feature information corresponding to each target defect information.

[0077] Risk prediction and causal inference: Based on the target defect feature information, a group of defects with high frequency and similar features is determined from the target defect set, and is defined as a "high-frequency defect pattern", which provides a basis for subsequent risk prediction. A random forest model can also be trained using the target defect set, so that the model outputs a defect risk probability when a new code is submitted, enabling proactive early warning. Using a causal inference model, through quantitative analysis, confounding variables such as developer experience and environmental configuration are excluded, and it is verified whether the code change is the direct cause of the defect.

[0078] Knowledge graph construction: The defect pattern is taken as the core entity, and nodes such as defect type, defect severity level, defect code, test case, and project phase are associated. When a new defect is generated or the code is changed, a new defect node is added, and the corresponding code module and developer are associated. If the defect is repaired, the "code-defect" edge weight is reduced. Using the dynamic reasoning of graph neural network, defect traceability and impact analysis are realized, and a queryable defect knowledge graph is formed, and then a target knowledge base is constructed according to the defect knowledge graph.

[0079] Intelligent repair recommendation: According to the obtained defect risk rate, the threshold rules of the quality verification engine are dynamically adjusted, the interception rate of the code of the corresponding type with high defect risk rate in the development stage is improved, and the production environment failure is reduced. For the defect pattern that frequently occurs in history, set a "block point" in the CI / CD (CI, Continuous Integration, continuous integration; CD, Continuous Delivery / Continuous Deployment, continuous delivery / continuous deployment) process to prevent the same type of defect from occurring repeatedly. Use historical defect repair information to provide "experience reuse" repair solutions for new defects to shorten the solution cycle. Specifically, it can include: extracting target feature information corresponding to the target code that fails the quality verification. Compare the target feature information with the data in the target knowledge base to determine target defect data with a similarity to the target feature information exceeding a preset similarity threshold from the target knowledge base. Repair the new target code that fails the quality verification based on the historical repair information corresponding to the target defect data, and then save the current repair information to the target knowledge base.

[0080] Knowledge base update: The target knowledge base is version controlled to record defect patterns and repair experience at different times, and supports on-demand rollback of the target knowledge base to a historical state, avoiding the loss of knowledge assets due to code base iteration or architecture upgrade, and ensuring that defect management capabilities continue to be available as the version evolves.

[0081] It should be noted that, see Figure 4As shown in the system architecture diagram, in the embodiment, the development library supports connection with mainstream code hosting platforms such as GitLab and GitHub; the automatic test framework of the controlled library can inherit test management tools such as Jira; the product library release module supports deployment environments such as Docker; the CI / CD pipeline triggers the automatic transfer of the development library to the controlled library to the product library, and embeds a quality verification engine. The version warehouse in the data storage layer is used to store data such as resource consumption of code transfer; test results are used to save the results of quality verification at each stage, such as static checking reports, function test coverage, security vulnerability lists, and the like; configuration strategies are used to set threshold configurations of quality access, such as test coverage greater than or equal to 80%, response time less than or equal to 200 ms, compliance rules, and the like. At the same time, the threshold configuration is opened through the strategy engine, allowing manual customization of quality access standards according to actual business scenarios.

[0082] As can be seen from the above, the embodiment builds a quality defense line from code submission to development release based on the three-library physical isolation and the automatic quality verification engine, realizes absolute one-way flow of data between environments, and eliminates the risk of reverse pollution of code. Through the progressive quality filtering network formed based on the development library, the controlled library, and the product library, it is ensured that low-quality code cannot be spread across levels and environments, compared with traditional manual review or a single test link, the defect interception rate is significantly improved, and the software failure rate is reduced; at the same time, the three libraries work together to make data flow. Based on the "read-only mirror access" mechanism and the "permission shrinkage" mechanism of the controlled library, the permission control of the code is realized, the possibility of unauthorized tampering is eliminated from the root, and the code management level is improved. Through the in-depth analysis of automatic defects, a reusable target knowledge base is formed, potential risks are predicted before code submission, and the optimization of software configuration management processes is driven. When the production environment fails, the system can adjust the strategy in real time according to the actual state, quickly locate and recover to the stable version, the operation and maintenance efficiency is greatly improved, and the reliability and security of the software product are also significantly improved. At the same time, developers can adjust the strategy according to the actual state of the project in real time, and the quality threshold setting is also formed to form a self-adaptive closed loop.

[0083] Referring to Figure 5 As shown, the embodiment of the application also discloses a software management device based on three-library linkage, applied to a software management platform composed of three libraries, the software management platform composed of three libraries includes a development library, a controlled library and a product library; wherein the device comprises:

[0084] A first code transmission module 11 is configured to obtain a first target code passing a first quality verification based on the development library, and send the first target code to the controlled library; the content of the first quality verification includes static checking of the code;

[0085] The first quality verification module 12 is configured to perform a second quality verification on the first target code during the process of transferring the first target code from the development library to the controlled library, so that the controlled library obtains second target code passing the second quality verification; the second quality verification includes a function test on the code;

[0086] The second code transfer module 13 is configured to perform an integration test on the second target code in a simulated target environment through the controlled library, and send third target code passing the test to a product library; the simulated target environment is consistent with an actual production environment in which the software provides services to users;

[0087] The second quality verification module 14 is configured to perform a third quality verification on the third target code during the process of transferring the third target code from the controlled library to the product library, so that the product library obtains fourth target code passing the third quality verification; the third quality verification includes a comparison of a hash value of a baseline version corresponding to the code;

[0088] The product baseline determination module 15 is configured to generate a product baseline corresponding to the fourth target code by using the product library.

[0089] As can be seen from the above, the first quality verification is performed on the code before the code enters the development library, the low-level errors and potential risks are intercepted from the source, and the low-quality code is prevented from flowing into the subsequent stage. The second quality verification is performed on the code during the process of transferring the code from the development library to the controlled library, so as to verify the correctness of the code logic and ensure that the basic function meets the demand. The third quality verification is performed on the code during the process of transferring the code from the controlled library to the product library, so as to verify the consistency of the baseline version corresponding to the code through the comparison of the hash value, and ensure that the release content is completely matched with the code passing the test. In this way, the code quality is improved through the layer-by-layer verification. On the other hand, the process of transferring the code from the development library to the product library through the controlled library is triggered by the automatic verification, so as to reduce the manual intervention points. Meanwhile, the unique hash value corresponding to the baseline version of the code is generated, and the final product baseline is automatically generated according to the hash value, so as to avoid the subjective error of manual marking.

[0090] In some embodiments, the first code transfer module 11 further includes:

[0091] The checking unit is configured to perform a preset incremental check on the obtained to-be-detected code, so as to determine a changed part in the to-be-detected code compared with the current known code;

[0092] The code sending unit is configured to perform a preset lightweight static check on a change code corresponding to the change part, and if the change code passes the preset lightweight static check, send the to-be-detected code as first target code to a development library; the preset lightweight static check includes syntax verification and basic rule scanning.

[0093] In some embodiments, the first quality verification module 12 includes:

[0094] The first verification unit is configured to determine a first target function corresponding to the change code and a second target function corresponding to code affected by the change code, select a test case set corresponding to the first target function and the second target function by using test cases, and perform local testing on code corresponding to the first target function and the second target function by using the test case set.

[0095] The second verification unit is configured to verify whether a current environment corresponding to the first target code is compatible with a target environment simulated by a controlled library.

[0096] The first judgment unit is configured to determine that the first target code passes the verification if the local testing is successful and the current environment corresponding to the first target code is compatible with the target environment simulated by the controlled library.

[0097] In some embodiments, the second quality verification module 14 includes:

[0098] The third verification unit is configured to determine a first hash value of a baseline version corresponding to the third target code, compare the first hash value with a second hash value generated by the controlled library for the baseline version corresponding to the third target code, and determine whether the first hash value and the second hash value are consistent.

[0099] The fourth verification unit is configured to compare a target dependent library list corresponding to the third target code with an expected standard dependent library list, and determine whether the target dependent library list and the standard dependent library list are consistent.

[0100] The fifth verification unit is configured to perform compliance checking on a baseline version corresponding to the third target code, and determine whether the baseline version meets a preset compliance standard; the baseline version includes target code, a dependent library list, and a configuration file.

[0101] The second judgment unit is configured to determine that the third target code passes the verification if the first hash value and the second hash value are consistent, the target dependent library list and the standard dependent library list are consistent, and the baseline version corresponding to the third target code meets the preset compliance standard.

[0102] In some embodiments, the product baseline determination module 15 further comprises:

[0103] an information generation unit configured to generate unique corresponding version identification information for the fourth target code through the product library; the version identification information comprises a code hash value and a dependent library list;

[0104] In some embodiments, the product library is directly connected to the actual production environment, and when the actual production environment fails, the software management device further comprises:

[0105] a baseline rollback unit configured to determine corresponding failure information based on the current version identification information, select a stable product baseline without failure according to the saved historical version identification information, and roll back the corresponding current product baseline in the actual production environment to the stable product baseline.

[0106] In some embodiments, when any target code fails to pass the corresponding quality verification, the software management device further comprises:

[0107] an information saving unit configured to save the defect information corresponding to the any target code to an initial defect set;

[0108] an information processing unit configured to perform a preprocessing operation on the defect information in the initial defect set to obtain a target defect set; the preprocessing operation comprises a deduplication operation, invalid data filtering, and defect type standardization conversion; the defect type standardization conversion is used to unify the label content corresponding to defects of the same type;

[0109] an information determination unit configured to determine a defect relationship table corresponding to the target defect information in the target defect set respectively, determine defect feature information corresponding to the target defect information respectively according to the defect relationship table, and determine target defect feature information corresponding to each of the target defect information based on the defect relationship table, the defect feature information, and a preset data format; the defect relationship table comprises defect content, defect code, and developer; the defect feature information comprises defect type, defect severity level, defect code complexity, defect stage, and defect repair time;

[0110] a knowledge base construction unit configured to construct a target knowledge graph based on the target defect feature information, and determine a target knowledge base according to the target knowledge graph.

[0111] In some embodiments, the software management device based on the three-library linkage further comprises:

[0112] an information extraction unit configured to extract target feature information corresponding to a new target code that fails to pass the quality verification;

[0113] a data comparison unit, configured to compare the target feature information with data in the target knowledge base to determine target defect data from the target knowledge base, which has a similarity to the target feature information exceeding a preset similarity threshold;

[0114] a code repair unit, configured to repair the new target code failing in quality verification based on historical repair information corresponding to the target defect data, and save current repair information into the target knowledge base.

[0115] Further, the embodiment of the present application further discloses an electronic device, Figure 6 is an electronic device 20 structure diagram shown according to an exemplary embodiment, the contents in the figure cannot be considered as any limitation on the use range of the present application.

[0116] Figure 6 An electronic device 20 structure diagram is provided for the embodiment of the present application. The electronic device 20 can specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25 and a communication bus 26. Wherein, the memory 22 is used to store computer programs, the computer programs are loaded and executed by the processor 21 to realize the related steps in the software management method based on three-knowledge base linkage disclosed in any of the preceding embodiments. In addition, the electronic device 20 in the embodiment can be an electronic computer.

[0117] In the embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol followed by the communication interface 24 can be any communication protocol applicable to the technical solution of the present application, which is not limited here; the input / output interface 25 is used to obtain external input data or output data to the outside world, and the specific interface type can be selected according to the specific application needs, which is not limited here.

[0118] In addition, the memory 22 as the carrier of resource storage can be a read-only memory, a random access memory, a magnetic disk or an optical disk, etc., and the resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage mode can be temporary storage or permanent storage.

[0119] The operating system 221 is used to manage and control each hardware device on the electronic device 20 and the computer program 222, which can be Windows Server, Netware, Unix, Linux, etc. The computer program 222 can further include computer programs capable of completing other specific work in addition to the computer programs capable of completing the software management method based on the three-library linkage executed by the electronic device 20 disclosed in any one of the foregoing embodiments.

[0120] Further, the application also discloses a computer readable storage medium for storing a computer program; wherein the computer program is executed by a processor to implement the software management method based on the three-library linkage disclosed above. The specific steps of the method can refer to the corresponding content disclosed in the foregoing embodiments, which will not be repeated here.

[0121] The embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts of each embodiment can be referred to each other. For the device disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple, and the relevant parts can refer to the method part.

[0122] The skilled person can further realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be realized by electronic hardware, computer software or a combination of the two. In order to clearly show the interchangeability of hardware and software, the composition and steps of each example have been described in the above description. Whether the functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. The skilled person can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the application.

[0123] The steps of the method or algorithm described in combination with the embodiments disclosed herein can be directly implemented by hardware, a software module executed by a processor, or a combination of the two. The software module can be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0124] Finally, it needs to be pointed out that in this document, relational terms such as first and second and the like can only be intended to distinguish one entity or operation from another entity or operation without necessarily requiring or implying any actual such relationship or order between such entities or operations. Moreover, the terms "comprising", "including", or any other variant thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without more limitations, an element defined by the statement "comprising a" does not exclude the existence of additional identical elements in the process, method, article, or apparatus including the stated element.

[0125] The above detailed description of the technical solutions provided by the present application has been provided, and the principles and implementation manners of the present application have been described by applying specific examples. The above description of the examples is only for the purpose of helping to understand the method of the present application and its core idea; at the same time, for those skilled in the art, according to the idea of the present application, the specific implementation manner and application range will be changed, and the above description of the content of the specification should not be understood as a limitation of the present application.

Claims

1. A software management method based on three-library linkage, characterized in that, The method is applied to a software management platform based on three libraries, including a development library, a controlled library and a product library. A first target code passing a first quality verification is obtained from the development library, and the first target code is sent to the controlled library; the first quality verification includes static checking of the code; During the process of transferring the first target code from the development library to the controlled library, a second quality verification is performed on the first target code, so that the controlled library obtains a second target code passing the second quality verification; the second quality verification includes functional testing of the code; The second target code is integrated and tested in a simulated target environment by the controlled library, and a third target code passing the test is sent to the product library; the simulated target environment is consistent with an actual production environment in which the software provides services to users; During the process of transferring the third target code from the controlled library to the product library, a third quality verification is performed on the third target code, so that the product library obtains a fourth target code passing the third quality verification; the third quality verification includes comparison of a hash value of a baseline version corresponding to the code; The product library is used to generate a product baseline corresponding to the fourth target code.

2. The software management method based on three-library linkage according to claim 1, characterized in that, Before the development library obtains the first target code passing the first quality verification, the method further includes: A preset incremental check is performed on the obtained to-be-detected code to determine a changed part in the to-be-detected code compared with a current known code; A preset lightweight static check is performed on changed code corresponding to the changed part, and if the changed code passes the preset lightweight static check, the to-be-detected code is sent to the development library as the first target code; the preset lightweight static check includes syntax verification and basic rule scanning.

3. The software management method based on three-library linkage according to claim 2, characterized in that, The second quality verification on the first target code includes: First target functions corresponding to the changed code and second target functions corresponding to code affected by the changed code are determined, a target test case set is constructed by selecting test cases corresponding to the first target functions and the second target functions, and the target test case set is used to perform local testing on code corresponding to the first target functions and the second target functions; It is verified whether a current environment corresponding to the first target code is compatible with a target environment simulated by the controlled library; If the local testing is successful and the current environment corresponding to the first target code is compatible with the target environment simulated by the controlled library, the first target code passes the verification.

4. The software management method based on three-library linkage according to claim 1, wherein, The third quality verification on the third target code includes: A first hash value of a baseline version corresponding to the third target code is determined, the first hash value is compared with a second hash value of the baseline version generated by the controlled library for the third target code, and it is judged whether the first hash value and the second hash value are consistent; The third target code corresponding to the target dependent library list is compared with the expected standard dependent library list to determine whether the target dependent library list and the standard dependent library list are consistent; The baseline version corresponding to the third target code is subjected to compliance checking to determine whether the baseline version meets the preset compliance standard; the baseline version includes target code, dependent library list, and configuration file; If the first hash value and the second hash value are consistent, the target dependent library list and the standard dependent library list are consistent, and the baseline version corresponding to the third target code meets the preset compliance standard, the third target code passes the verification.

5. The software management method based on three-library linkage according to claim 1, wherein, In the process of generating the product baseline corresponding to the fourth target code by using the product library, the process further includes: The product library generates unique corresponding version identification information for the fourth target code; the version identification information includes code hash value and dependent library list; The product library is directly connected to the actual production environment, and when the actual production environment fails, the software management method further includes: Based on the current version identification information, determine the corresponding fault information, select the stable product baseline without fault according to the saved historical version identification information, and roll back the corresponding current product baseline in the actual production environment to the stable product baseline.

6. The software management method based on three-library linkage according to any one of claims 1 to 5, characterized in that, When any target code does not pass the corresponding quality verification, the software management method further includes: Save the defect information corresponding to the any target code to an initial defect set; The defect information in the initial defect set is preprocessed to obtain a target defect set; the preprocessing operation includes a deduplication operation, invalid data filtering, and defect type standardization conversion; the defect type standardization conversion is used to unify the label content corresponding to defects of the same type; Determine the defect relationship table corresponding to the target defect information in the target defect set, determine the defect feature information corresponding to the target defect information according to the defect relationship table, and determine the target defect feature information corresponding to each target defect information based on the defect relationship table, the defect feature information, and a preset data format; the defect relationship table includes defect content, defect code, and developer; the defect feature information includes defect type, defect severity level, defect code complexity, defect stage, and defect repair time; Based on the target defect feature information, a target knowledge graph is constructed, and a target knowledge base is determined according to the target knowledge graph.

7. The software management method based on three-library linkage according to claim 6, wherein, Further including: Extracting target feature information corresponding to a new target code that does not pass the quality verification; Comparing the target feature information with the data in the target knowledge base to determine target defect data with a similarity to the target feature information exceeding a preset similarity threshold from the target knowledge base; Based on the historical repair information corresponding to the target defect data, the new target code that does not pass the quality verification is repaired, and then the current repair information is saved to the target knowledge base.

8. A software management device based on three-library linkage, characterized by, The device is applied to a software management platform based on three libraries, including a development library, a controlled library and a product library. The first code transmission module is configured to acquire first target code that passes a first quality verification based on the development library and send the first target code to the controlled library; the first quality verification includes static checking of the code; The first quality verification module is configured to perform second quality verification on the first target code in the process of transmitting the first target code from the development library to the controlled library, so that the controlled library acquires second target code that passes the second quality verification; the second quality verification includes functional testing of the code; The second code transmission module is configured to perform integration testing on the second target code in a simulated target environment through the controlled library, and send third target code that passes the testing to the product library; the simulated target environment is consistent with an actual production environment in which the software provides services for users; The second quality verification module is configured to perform third quality verification on the third target code in the process of transmitting the third target code from the controlled library to the product library, so that the product library acquires fourth target code that passes the third quality verification; the third quality verification includes comparison of a hash value of a baseline version corresponding to the code; The product baseline determination module is configured to generate a product baseline corresponding to the fourth target code by using the product library.

9. An electronic device, comprising: The device comprises: a memory configured to save a computer program; a processor configured to execute the computer program to implement the software management method based on three-library linkage according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The device is configured to save a computer program, which is executed by a processor to implement the software management method based on three-library linkage according to any one of claims 1 to 7.