Code product management method and device, computer equipment and storage medium

By receiving the initial code file, the task process is established and tested to generate target code files, solve the problem of poor management effects of traditional operation and maintenance management platforms, and improve the management effect and quality of code products.

CN119377115APending Publication Date: 2025-01-28SHENZHEN COMTOP INFORMATION TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411506974.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-28
Publication Date
2025-01-28

AI Technical Summary

Technical Problem

Traditional operation and maintenance management platforms have shortcomings in the effectiveness of automation management, and it is difficult to effectively manage and improve the quality of code products.

Method used

By receiving the initial code file, the task process is established, and the environmental construction component and service configuration components are called to test, and the target code file is generated according to the test results.

Benefits of technology

The management effect of code products is improved, and the availability and quality of the target code file are improved through multi -dimensional test recognition and modified defects and vulnerabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119377115A_ABST
    Figure CN119377115A_ABST
Patent Text Reader

Abstract

The invention relates to a code product management method and device, computer equipment and a storage medium. The method comprises the steps that under the condition that an initial code file is received, a task process corresponding to the initial code file is established; in a first process in the task processes, according to description information of the initial code file, calling an environment construction component and a service configuration component to test the initial code file to obtain a test result; and in a second process in the task processes, obtaining a target code file according to the test result and the initial code file. According to the method, code security check standards are integrated into assembly lines, code automatic security check in the research and development process, defects and vulnerabilities are recognized in advance, the security capability of digital application is improved, multi-dimensional testing is carried out on initial code files, the comprehensiveness and reliability of testing are improved, and therefore the availability of target code files is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of software development technology, and in particular to a method, apparatus, computer equipment and storage medium for managing code products. Background Art

[0002] With the development of computer technology, the application and demand of software research and development are increasing. In order to improve the efficiency of software development and testing, various industries have gradually introduced integrated operation and maintenance management platforms to manage the entire process of software development, so as to meet the requirements for high-quality development of the R&D process, improve the software R&D efficiency and delivery quality, and at the same time improve the collaborative relationship between teams, fill the information gap between the development and operation and maintenance ends, break down communication barriers, and improve the R&D efficiency of enterprises.

[0003] In traditional technology, a uniformly developed operation and maintenance management platform is usually used to manage the entire software development process. However, the traditional operation and maintenance management platform has the problem of poor automated management effect. Summary of the invention

[0004] Based on this, it is necessary to provide a code product management method, device, computer equipment and storage medium that can improve the management effect of code products in response to the above technical problems.

[0005] In a first aspect, the present application provides a method for managing a code product, comprising:

[0006] When the initial code file is received, a task process corresponding to the initial code file is established;

[0007] In the first process of the task process, according to the description information of the initial code file, calling the environment construction component and the service configuration component to test the initial code file to obtain a test result;

[0008] In a second process in the task process, a target code file is obtained according to the test result and the initial code file.

[0009] In one of the embodiments, the calling of the environment construction component and the service configuration component to test the initial code file according to the description information of the initial code file to obtain the test result includes:

[0010] According to the description information of the initial code file, the environment construction component is called to determine the test environment; the test environment includes a unit test environment, an acceptance test environment and a production test environment;

[0011] According to the description information of the initial code file, calling the service configuration component to determine the test configuration; the test configuration includes unit test configuration, acceptance test configuration and production test configuration;

[0012] The initial code file is tested according to the test environment and the test configuration to obtain a test result.

[0013] In one embodiment, the testing the initial code file according to the test environment and the test configuration to obtain a test result includes:

[0014] Performing unit testing on the initial code file according to the unit testing environment and the unit testing configuration to obtain a unit testing result;

[0015] According to the acceptance test environment and the acceptance test configuration, the initial code file is tested to obtain an acceptance test result;

[0016] According to the production test environment and the production test configuration, a production test is performed on the initial code file to obtain a production test result.

[0017] In one embodiment, the test results include unit test results, acceptance test results, and production test results, and obtaining the target code file based on the test results and the initial code file includes:

[0018] When the unit test result, the acceptance test result and the production test result are all tested passed, determining the initial code file as the target code file;

[0019] When at least one of the unit test results, the acceptance test results and the production test results fails the test, the initial code file is corrected, and the process returns to the step of executing the calling environment building component and the service configuration component to test the initial code file and obtain the test result.

[0020] In one embodiment, upon receiving the initial code file, establishing the task process corresponding to the initial code file includes:

[0021] When the initial code file is received, calling the task management component to establish an initial task for the initial code file;

[0022] The task management component is called to allocate the initial task to the target executor.

[0023] In one embodiment, the method further comprises:

[0024] Performing an initial test on the initial code file to obtain an initial test result;

[0025] In the case where the initial test result is a test failure, calling a correction component to correct the initial code file to obtain a corrected initial code file, and returning to the step of executing the task process corresponding to the initial code file;

[0026] When the initial test result is that the test passes, the initial code file is deployed to a preset database, and the step of establishing the task process corresponding to the initial code file is returned to be executed.

[0027] In one embodiment, the method further comprises:

[0028] In response to a query request triggered by a user, a task process interface is displayed to the user; the task process interface includes at least one of the running status of the task process, the running log of the task process, and the basic information of the initial code file.

[0029] In a second aspect, the present application also provides a code product management device, including:

[0030] An establishing module, used for establishing a task process corresponding to the initial code file when the initial code file is received;

[0031] A calling module is used to call an environment building component and a service configuration component in a first process in the task process to test the initial code file according to the description information of the initial code file to obtain a test result;

[0032] The determination module is used to obtain a target code file according to the test result and the initial code file in a second process in the task process.

[0033] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0034] When the initial code file is received, a task process corresponding to the initial code file is established;

[0035] In the first process of the task process, according to the description information of the initial code file, calling the environment construction component and the service configuration component to test the initial code file to obtain a test result;

[0036] In a second process in the task process, a target code file is obtained according to the test result and the initial code file.

[0037] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0038] When the initial code file is received, a task process corresponding to the initial code file is established;

[0039] In the first process of the task process, according to the description information of the initial code file, calling the environment construction component and the service configuration component to test the initial code file to obtain a test result;

[0040] In a second process in the task process, a target code file is obtained according to the test result and the initial code file.

[0041] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0042] When the initial code file is received, a task process corresponding to the initial code file is established;

[0043] In the first process of the task process, according to the description information of the initial code file, calling the environment construction component and the service configuration component to test the initial code file to obtain a test result;

[0044] In a second process in the task process, a target code file is obtained according to the test result and the initial code file.

[0045] The management method, device, computer equipment and storage medium of the above-mentioned code product, upon receiving the initial code file, establish a task process corresponding to the initial code file; in the first process of the task process, according to the description information of the initial code file, call the environment construction component and the service configuration component to test the initial code file and obtain the test result; in the second process of the task process, according to the test result and the initial code file, obtain the target code file. Integrate the code security inspection standard into the pipeline, automatically perform security inspection on the code during the research and development process, identify security issues such as defects and vulnerabilities in advance, improve the security capabilities of digital applications, test the initial code file in multiple dimensions, improve the comprehensiveness and reliability of the test, and thus improve the availability of the target code file. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0047] FIG1 is an application environment diagram of a code product management method in one embodiment;

[0048] FIG2 is a schematic diagram of a flow chart of a method for managing code products in one embodiment;

[0049] FIG3 is a schematic diagram of a task process of an initial code file in one embodiment;

[0050] Figure 4 A schematic diagram of a flow chart of a method for managing code products in another embodiment;

[0051] Figure 5 A schematic diagram of a flow chart of a method for managing code products in another embodiment;

[0052] Figure 6 A schematic diagram of setting up a test environment in one embodiment;

[0053] Figure 7 A schematic diagram of a flow chart of a method for managing code products in another embodiment;

[0054] Figure 8 A schematic diagram of a flow chart of a method for managing code products in another embodiment;

[0055] Fig. 9 is a schematic diagram of a task management component in one embodiment;

[0056] Fig.10 A schematic diagram of a flow chart of a method for managing code products in another embodiment;

[0057] Fig.11 A schematic diagram of an initial test in one embodiment;

[0058] Fig.12 A schematic diagram of a flow chart of a method for managing code products in another embodiment;

[0059] Fig.13 A schematic diagram of the running status of a task process in a task process interface in one embodiment;

[0060] Fig.14 A schematic diagram of a running log of a task process in a task process interface in one embodiment;

[0061] Fig.15 A schematic diagram of basic information of an initial code file in a task process interface in one embodiment;

[0062] Fig.16 A schematic diagram of basic information of an initial code file in another task process interface in one embodiment;

[0063] Fig.17 A schematic diagram of an initial test situation of an initial code file in a task process interface in one embodiment;

[0064] Fig.18 is a structural block diagram of a code product management device in an embodiment;

[0065] FIG. 19 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0066] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0067] The management method of the code product provided in the embodiment of the present application can be applied to the application environment shown in Figure 1. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The terminal 102 sends the initial code file to the server 104, and the server 104 establishes the task process corresponding to the initial file code file and tests the initial code file. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The head-mounted device can be a virtual reality (VR) device, an augmented reality (AR) device, smart glasses, etc. The server 104 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services.

[0068] In one embodiment, as shown in FIG. 2 , a method for managing code products is provided, which is described by taking the method applied to the server in FIG. 1 as an example, including:

[0069] S201, when an initial code file is received, establishing a task process corresponding to the initial code file.

[0070] Among them, the task process corresponding to the initial code file may include code preprocessing, test environment construction, test process, etc.

[0071] In an embodiment of the present application, as shown in Figure 3, the developer sends the initial code file to the server through the terminal, and the server temporarily stores the initial code file in the initial database. Further, the task processes corresponding to the initial code files in the initial database are established in sequence, and the initial file code is compiled, the compiled initial code file is packaged, and the packaged initial code file is stored in the product library, so that the server can read the packaged initial code file from the product library and execute the task process corresponding to the initial code file.

[0072] S202, in the first process of the task process, according to the description information of the initial code file, calling the environment construction component and the service configuration component to test the initial code file to obtain the test result.

[0073] The first process includes a process for determining a test script, a process for configuring a test environment, a process for testing an initial code file, etc. The description information of the initial code file may be at least one of the function, code type, and usage scenario of the initial code file. The test result includes a test pass and a test fail.

[0074] In the embodiment of the present application, the description information of the initial code file can be carried in the initial code file, and the server parses the initial code file to obtain the description information of the initial code file; or, the server can extract keywords in the initial code file, and thereby determine the description information of the initial code file from a preset information base according to the correspondence between the keywords and the description information. Further, as shown in FIG3 , the server calls the environment construction component, determines the target test environment of the initial code file from the environment information base according to the description information, and calls the service configuration component, determines the target configuration information of the initial code file from the configuration information base according to the description information, thereby configuring the target test environment according to the configuration information of the initial code file, and testing the initial code file through the configured target test environment to obtain the test result.

[0075] S203, in the second process of the task process, obtaining a target code file according to the test result and the initial code file.

[0076] In an embodiment of the present application, if the test result is that the test passes, the initial code file is determined as the target code file. Optionally, the target code file can be packaged, compressed, and other operations can be performed to form a code product. When a code product acquisition request is received from other electronic devices, the code product is sent to other electronic devices.

[0077] Optionally, if the test result is that the test fails, the server can display the information that the code test fails to the user through the interactive interface, so that the user can re-enter the initial code file and return to the step of establishing the task process corresponding to the initial code file; or, the server can correct the initial code file according to a preset correction logic, and return to the step of establishing the task process corresponding to the initial code file.

[0078] In the management method of the above code product, when the initial code file is received, a task process corresponding to the initial code file is established; in the first process of the task process, according to the description information of the initial code file, the environment construction component and the service configuration component are called to test the initial code file to obtain the test result; in the second process of the task process, according to the test result and the initial code file, the target code file is obtained. Integrate the code security inspection standard into the pipeline, automatically check the code security during the research and development process, identify security issues such as defects and vulnerabilities in advance, improve the security capabilities of digital applications, test the initial code file in multiple dimensions, improve the comprehensiveness and reliability of the test, and thus improve the availability of the target code file.

[0079] In one embodiment, an implementation of the above S202 is provided, such as Figure 4 As shown, the above “according to the description information of the initial code file, calling the environment construction component and the service configuration component to test the initial code file and obtain the test result” includes:

[0080] S301, calling the environment building component according to the description information of the initial code file to determine the test environment; the test environment includes a unit test environment, an acceptance test environment and a production test environment.

[0081] Among them, unit testing is a testing method that checks and verifies the smallest testable unit in the software. For example, in a process-oriented programming language, such as C, a unit usually refers to a single function; in an object-oriented programming language, such as Java or Python, a unit can refer to a method of a class. Acceptance testing is a user acceptance test (User Acceptance Test, UAT), which is used to verify whether the code meets the needs and expectations of the user. Generate tests are used to verify the stability and reliability of the code in the actual operating environment.

[0082] In an embodiment of the present application, a test environment database may be pre-stored in the server, and the test environment database includes a unit test environment database, an acceptance test environment database, and a production test environment database, and the server may pre-store a first correspondence between the description information and the unit test environment, a second correspondence between the description information and the acceptance test environment, and a third correspondence between the description information and the production test environment. Further, the server calls the environment construction component, and determines the unit test environment corresponding to the initial code file from the unit test environment database according to the description information of the initial code file and the first correspondence; determines the acceptance test environment corresponding to the initial code file from the acceptance test environment database according to the description information of the initial code file and the second correspondence; and determines the production test environment corresponding to the initial code file from the production test environment database according to the description information of the initial code file and the third correspondence.

[0083] Optionally, the test environment can be a test case corresponding to the initial code file, such as a test script or test code. The environment construction component can manage the status of each test case. For example, when the test case runs normally during the test process, the status of the test case is determined to be stable, and the test case continues to be stored in the stable test case pool; when the test case runs abnormally during the test process, the status of the test case is determined to be unstable, and the test case is stored in the unstable test case pool, and a message to repair the test case is sent to the terminal of the maintenance personnel. After the unstable test case is repaired, the test case is transferred to the stable test case pool.

[0084] S302, calling the service configuration component according to the description information of the initial code file to determine the test configuration; the test configuration includes unit test configuration, acceptance test configuration and production test configuration.

[0085] In an embodiment of the present application, a test configuration database may be pre-stored in the server, and the test configuration database includes a unit test configuration database, an acceptance test configuration database, and a production test configuration database, and the server may pre-store a fourth correspondence between the description information and the unit test configuration, a fifth correspondence between the description information and the acceptance test configuration, and a sixth correspondence between the description information and the production test configuration. Further, the server calls the service configuration component, and determines the unit test configuration corresponding to the initial code file from the unit test configuration database according to the description information of the initial code file and the fourth correspondence; determines the acceptance test configuration corresponding to the initial code file from the acceptance test configuration database according to the description information of the initial code file and the fifth correspondence; and determines the production test configuration corresponding to the initial code file from the production test configuration database according to the description information of the initial code file and the sixth correspondence.

[0086] S303, testing the initial code file according to the test environment and test configuration to obtain a test result.

[0087] In the embodiment of the present application, the initial code file is tested according to the unit test environment, the acceptance test environment, the production test environment, the unit test configuration, the acceptance test configuration and the production test configuration to obtain the unit test result. Optionally, the test script suitable for multiple tests can be determined according to the unit test environment, the acceptance test environment and the production test environment, and the test environment can be configured according to the unit test configuration, the acceptance test configuration and the production test configuration to obtain the final test environment, and the initial code file is tested in the final test environment to obtain the test result.

[0088] In the above application embodiment, the environment construction component and the service configuration component are called respectively to determine the test environment and the test configuration, so as to build a test environment matching the initial code file according to the test environment and the test configuration, thereby improving the matching degree between the test environment and the initial code file and thus improving the accuracy of the test.

[0089] In one embodiment, an implementation of the above S303 is provided, such as Figure 5 As shown, the above “testing the initial code file according to the test environment and test configuration to obtain the test result” includes:

[0090] S401, performing unit testing on the initial code file according to the unit testing environment and unit testing configuration to obtain unit testing results.

[0091] In the embodiments of the present application, Figure 6 As shown, the unit test environment is configured according to the unit test configuration to obtain the unit test environment of the initial code file, and the unit test script is run to obtain the unit test result.

[0092] S402, performing acceptance testing on the initial code file according to the acceptance test environment and acceptance test configuration to obtain an acceptance test result.

[0093] In the embodiments of the present application, Figure 6 As shown, the acceptance test environment is configured according to the acceptance test configuration to obtain the acceptance test environment of the initial code file, and the acceptance test script is run to obtain the acceptance test result.

[0094] S403, performing a production test on the initial code file according to the production test environment and the production test configuration, and obtaining a production test result.

[0095] In the embodiments of the present application, Figure 6As shown, the production test environment is configured according to the production test configuration to obtain the production test environment of the initial code file, and the production test script is run to obtain the production test result.

[0096] In the above-mentioned application embodiments, the unit test environment corresponds to the unit test configuration, and the unit test environment is built according to the unit test environment and the unit test configuration; the acceptance test environment corresponds to the acceptance test configuration, and the acceptance test environment is built according to the acceptance test environment and the acceptance test configuration; the production test environment corresponds to the production test configuration, and the production test environment is built according to the production test environment and the production test configuration, thereby building respective test environments for various types of tests, improving the matching degree between the test environment and the initial code file, and thus improving the accuracy of the test.

[0097] In one embodiment, an implementation of the above S203 is provided, such as Figure 7 As shown, the test results include unit test results, acceptance test results and production test results. The above “obtaining the target code file based on the test results and the initial code file” includes:

[0098] S501, when the unit test results, the acceptance test results and the production test results are all tested passed, the initial code file is determined as the target code file.

[0099] In an embodiment of the present application, when the unit test results, acceptance test results and production test results are all tested and passed, indicating that the functions and usage scenarios of the initial code file are all verified, the initial code file is determined as the target code file.

[0100] S502, when at least one of the unit test results, acceptance test results and production test results fails the test, the initial code file is corrected, and the execution returns to the step of calling the environment construction component and the service configuration component to test the initial code file and obtain the test result.

[0101] In the embodiment of the present application, when at least one of the unit test results, the acceptance test results, and the production test results is a test failure, it indicates that the test of the initial code file has not completely passed.

[0102] As an optional implementation, the server can call a preset first repair script to repair the initial code file that fails the test. Exemplarily, the first repair script can first determine the abnormal field in the initial code file, and then modify the abnormal field through a preset repair logic to obtain a repaired initial code file, and then return to the step of executing the call environment construction component and the service configuration component to test the initial code file to obtain the test results.

[0103] As an optional implementation, the server may send a test failure message to the terminal corresponding to the initial code file, so that the user resends the initial code file to the server through the terminal and returns to the step of establishing the task process corresponding to the initial code file.

[0104] In the above application embodiment, when all test results are test passed, the initial code file is determined as the target code file, thereby improving the accuracy and availability of the target code file.

[0105] In one embodiment, an implementation of the above S201 is provided, such as Figure 8 As shown, the above “upon receiving the initial code file, establishing a task process corresponding to the initial code file” includes:

[0106] S601, when an initial code file is received, calling a task management component to create an initial task for the initial code file.

[0107] Among them, the task management component is used to establish the task process and monitor and record the execution of the task process.

[0108] In the embodiments of this application, Fig. 9 As shown, the task management component may include a task establishment subcomponent, a cluster management subcomponent, and a scheduling management subcomponent. The server may call the cluster management subcomponent to establish multiple executors. For example, the executor may be a task execution queue. Further, when the server receives the initial code file, the server calls the task establishment subcomponent to establish the initial task of the initial code file.

[0109] S602, calling the task management component to assign the initial task to the target executor.

[0110] In the embodiments of the present application, Fig. 9 As shown, after the server creates the initial task of the initial code file, the scheduling management subcomponent in the task management component is called to assign the initial task to the target executor. Optionally, the initial task can be assigned according to the number of initial tasks to be tested in each executor, and the initial task is assigned to the executor with the least number of initial tasks to be tested.

[0111] In the above application embodiment, an initial task of the initial code file is established to facilitate monitoring of the test progress of the initial code file, thereby improving the management efficiency and management effect of the code file, and timely discovering abnormal conditions when there are abnormalities in the initial code file.

[0112] In one embodiment, Fig.10 As shown, the management method of the above code product also includes:

[0113] S204, performing an initial test on the initial code file to obtain an initial test result.

[0114] Among them, the initial test may include code scanning and code compilation. For example, code scanning may include NODEJS code scanning, PYTHON code scanning, GO code scanning, JAVA code scanning, etc., and the corresponding code scanning method is determined according to the programming language of the initial code file to perform code scanning; code compilation includes NODEJS code, JAVA code compilation, etc.

[0115] In the embodiments of the present application, Fig.11 As shown, according to the programming language of the initial code file, the code scanning script and code compilation script corresponding to the initial code file are determined, and the code scanning script and the code compilation script are run to perform an initial test on the initial code file. When the running results of the scripts are normal, the initial test result is determined to be a passed test; when the running result of the code scanning script or the code compilation script is an abnormal operation, the initial test result is determined to be a failed test.

[0116] S205, when the initial test result is that the test fails, calling the correction component to correct the initial code file to obtain a corrected initial code file, and returning to the step of executing the task process corresponding to the initial code file.

[0117] In an embodiment of the present application, when the initial test result is that the test fails, the correction component is called to correct the initial code file to obtain a corrected initial code file, and the corrected initial code file is subjected to operations such as image building and deployment. Among them, image building can include NODEJS image building, PYTHON image building, GO image building, JAVA image building and custom image building; deployment includes normal deployment, grayscale release and rolling release. Further, according to the corrected initial code file, the step of establishing the task process corresponding to the initial code file is returned.

[0118] Optionally, based on the programming language of the initial code file, an image building script corresponding to the initial code file is determined, and the image building script is run to perform the image building operation. Further, based on preset setting information, a deployment script corresponding to the initial code file is determined, and the deployment script is run to perform the image building operation.

[0119] S206, when the initial test result is that the test passes, the initial code file is deployed to a preset database, and the process returns to the step of executing the task process corresponding to the initial code file.

[0120] In the embodiment of the present application, when the initial test result is that the test passes, operations such as image building and deployment are performed on the initial code file. Among them, image building can include NODEJS image building, PYTHON image building, GO image building, JAVA image building and custom image building; deployment includes normal deployment, grayscale release and rolling release. Further, the initial code file is deployed to a preset database, and the step of executing the task process corresponding to the initial code file is returned.

[0121] Optionally, based on the programming language of the initial code file, an image building script corresponding to the initial code file is determined, and the image building script is run to perform the image building operation. Further, based on preset setting information, a deployment script corresponding to the initial code file is determined, and the deployment script is run to perform the image building operation.

[0122] In the above application embodiment, the initial code file is initially tested, and the initial code file that fails the initial test is corrected, and the problems determined to be abnormal due to format and other reasons through simple tests are identified, thereby avoiding test failures due to simple problems in subsequent testing processes and improving test efficiency.

[0123] In one embodiment, Fig.12 As shown, the management method of the above code product also includes:

[0124] S207, in response to the query request triggered by the user, displaying the task process interface to the user; the task process interface includes at least one of the running status of the task process, the running log of the task process, and the basic information of the initial code file.

[0125] In the embodiment of the present application, when the user triggers a query request for the running status of the task process, the server displays the running status of the task process in the task process interface as follows: Fig.13 When a user triggers a query request for the running log of a task process, the running log of the task process in the task process interface can be as follows: Fig.14 When the user triggers a query request for the basic information of the initial code file, the basic information of the initial code file in the task process interface can be as follows: Fig.15 and Fig.16 shown.

[0126] Optionally, the server can also display the initial test status of the initial code file to the user in the display interface. Fig.17 shown.

[0127] In the above application embodiment, complex processes are visualized through orchestration and result presentation to ensure that delivery is visible, controllable and measurable; the pipeline provides graphical configuration to lower the user threshold, has built-in best practices and standard processes, reduces errors, supports the control of the R&D process through automation capabilities, and improves delivery quality and efficiency.

[0128] In one embodiment, a complete code product management method is provided, including:

[0129] S1, perform initial testing on the initial code file to obtain initial test results.

[0130] S2, when the initial test result is that the test fails, calling the correction component to correct the initial code file to obtain the corrected initial code file, and returning to the step of executing the task process corresponding to the initial code file.

[0131] S3, when the initial test result is that the test passes, the initial code file is deployed to a preset database, and the process returns to the step of executing the task process corresponding to the initial code file.

[0132] S4, when the initial code file is received, calling the task management component to establish an initial task for the initial code file.

[0133] S5, calls the task management component to assign the initial task to the target executor.

[0134] S6, according to the description information of the initial code file, call the environment construction component to determine the test environment; the test environment includes the unit test environment, the acceptance test environment and the production test environment; according to the description information of the initial code file, call the service configuration component to determine the test configuration; the test configuration includes the unit test configuration, the acceptance test configuration and the production test configuration.

[0135] S7, performing unit testing on the initial code file according to the unit testing environment and the unit testing configuration, and obtaining a unit testing result.

[0136] S8, according to the acceptance test environment and acceptance test configuration, the initial code file is tested to obtain the acceptance test result.

[0137] S9, performing production testing on the initial code file according to the production test environment and production test configuration, and obtaining a production test result.

[0138] S10, when the unit test results, acceptance test results and production test results are all passed, the initial code file is determined as the target code file; when at least one of the unit test results, acceptance test results and production test results is failed, the initial code file is corrected, and the execution returns to the step of calling the environment construction component and the service configuration component to test the initial code file and obtain the test results.

[0139] S11, in response to a query request triggered by a user, displaying a task process interface to the user; the task process interface includes at least one of the running status of the task process, the running log of the task process, and basic information of the initial code file.

[0140] In the management method of the above code product, when the initial code file is received, a task process corresponding to the initial code file is established; in the first process of the task process, according to the description information of the initial code file, the environment construction component and the service configuration component are called to test the initial code file to obtain the test result; in the second process of the task process, according to the test result and the initial code file, the target code file is obtained. Integrate the code security inspection standard into the pipeline, automatically check the code security during the research and development process, identify security issues such as defects and vulnerabilities in advance, improve the security capabilities of digital applications, test the initial code file in multiple dimensions, improve the comprehensiveness and reliability of the test, and thus improve the availability of the target code file.

[0141] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0142] Based on the same inventive concept, the embodiment of the present application also provides a code product management device for implementing the code product management method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in the one or more code product management device embodiments provided below can refer to the limitations of the code product management method above, and will not be repeated here.

[0143] In one embodiment, Fig.18 As shown, a code product management device is provided, comprising: an establishment module 10, a calling module 11 and a determination module 12, wherein:

[0144] The establishing module 10 is used to establish a task process corresponding to the initial code file when the initial code file is received.

[0145] The calling module 11 is used to call the environment construction component and the service configuration component to test the initial code file in the first process of the task process according to the description information of the initial code file to obtain the test result.

[0146] The determination module 12 is used to obtain the target code file according to the test result and the initial code file in the second process of the task process.

[0147] In one embodiment, the calling module 11 includes: a first determining unit, a second determining unit and a testing unit, wherein:

[0148] The first determination module is used to call the environment construction component and determine the test environment according to the description information of the initial code file; the test environment includes a unit test environment, an acceptance test environment and a production test environment.

[0149] The second determination unit is used to call the service configuration component according to the description information of the initial code file to determine the test configuration; the test configuration includes unit test configuration, acceptance test configuration and production test configuration.

[0150] The test unit is used to test the initial code file according to the test environment and test configuration to obtain the test results.

[0151] In one embodiment, the above test results are specifically used to perform unit testing on the initial code files according to the unit testing environment and unit testing configuration to obtain unit testing results; perform acceptance testing on the initial code files according to the acceptance testing environment and acceptance testing configuration to obtain acceptance testing results; perform production testing on the initial code files according to the production testing environment and production testing configuration to obtain production testing results.

[0152] In one embodiment, the determination module 12 includes: a third determination unit and a correction unit, wherein:

[0153] A third determining unit is used to determine the initial code file as the target code file when the unit test results, the acceptance test results and the production test results are all passed;

[0154] The correction unit is used to correct the initial code file when at least one of the unit test results, acceptance test results and production test results fails the test, and returns to the step of executing the call environment construction component and the service configuration component to test the initial code file and obtain the test result.

[0155] In one embodiment, the establishment module 10 includes: an establishment unit and a calling unit, wherein:

[0156] The establishing unit is used to call the task management component to establish the initial task of the initial code file when the initial code file is received.

[0157] The calling unit is used to call the task management component to allocate the initial task to the target executor.

[0158] In one embodiment, the management device of the code product further includes: a testing module, a correction module and a deployment module, wherein:

[0159] The test module is used to perform initial tests on the initial code files and obtain initial test results.

[0160] The correction module is used to call the correction component to correct the initial code file when the initial test result is that the test fails, obtain the corrected initial code file, and return to the step of executing the task process corresponding to the initial code file.

[0161] The deployment module is used to deploy the initial code file to a preset database when the initial test result is that the test passes, and return to the step of executing the task process corresponding to the initial code file.

[0162] In one embodiment, the management device of the above-mentioned code product also includes: a display module, which is used to display the task process interface to the user in response to a query request triggered by the user; the task process interface includes at least one of the running status of the task process, the running log of the task process, and the basic information of the initial code file.

[0163] Each module in the management device of the above code product can be implemented in whole or in part by software, hardware and a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module above.

[0164] In an exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG19. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store management data of the code product. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for managing a code product is implemented.

[0165] Those skilled in the art will understand that the structure shown in FIG. 19 is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0166] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0167] When the initial code file is received, a task process corresponding to the initial code file is established;

[0168] In the first process of the task process, according to the description information of the initial code file, the environment construction component and the service configuration component are called to test the initial code file to obtain the test result;

[0169] In the second process of the task process, a target code file is obtained according to the test result and the initial code file.

[0170] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0171] According to the description information of the initial code file, call the environment construction component and determine the test environment; the test environment includes the unit test environment, acceptance test environment and production test environment;

[0172] According to the description information of the initial code file, call the service configuration component to determine the test configuration; the test configuration includes unit test configuration, acceptance test configuration and production test configuration;

[0173] The initial code file is tested according to the test environment and test configuration to obtain the test results.

[0174] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0175] According to the unit test environment and unit test configuration, the initial code file is unit tested to obtain the unit test results;

[0176] According to the acceptance test environment and acceptance test configuration, the initial code file is tested to obtain the acceptance test results;

[0177] According to the production test environment and production test configuration, the initial code file is subjected to production test to obtain the production test result.

[0178] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0179] When the unit test results, the acceptance test results, and the production test results are all passed, the initial code file is determined as the target code file;

[0180] When at least one of the unit test results, acceptance test results, and production test results fails the test, the initial code file is corrected, and the execution returns to the step of calling the environment construction component and the service configuration component to test the initial code file to obtain the test result.

[0181] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0182] When the initial code file is received, the task management component is called to establish an initial task for the initial code file;

[0183] Call the task management component to assign the initial task to the target executor.

[0184] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0185] Perform initial testing on the initial code file to obtain initial test results;

[0186] When the initial test result is that the test fails, the correction component is called to correct the initial code file to obtain the corrected initial code file, and the step of executing the task process corresponding to the initial code file is returned;

[0187] When the initial test result is that the test passes, the initial code file is deployed to a preset database, and the step of executing the task process corresponding to the initial code file is returned to be executed.

[0188] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0189] In response to a query request triggered by a user, a task process interface is displayed to the user; the task process interface includes at least one of the running status of the task process, the running log of the task process, and basic information of the initial code file.

[0190] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0191] When the initial code file is received, a task process corresponding to the initial code file is established;

[0192] In the first process of the task process, according to the description information of the initial code file, the environment construction component and the service configuration component are called to test the initial code file to obtain the test result;

[0193] In the second process of the task process, a target code file is obtained according to the test result and the initial code file.

[0194] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0195] According to the description information of the initial code file, call the environment construction component and determine the test environment; the test environment includes the unit test environment, acceptance test environment and production test environment;

[0196] According to the description information of the initial code file, call the service configuration component to determine the test configuration; the test configuration includes unit test configuration, acceptance test configuration and production test configuration;

[0197] The initial code file is tested according to the test environment and test configuration to obtain the test results.

[0198] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0199] According to the unit test environment and unit test configuration, the initial code file is unit tested to obtain the unit test results;

[0200] According to the acceptance test environment and acceptance test configuration, the initial code file is tested to obtain the acceptance test results;

[0201] According to the production test environment and production test configuration, the initial code file is subjected to production test to obtain the production test result.

[0202] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0203] When the unit test results, the acceptance test results, and the production test results are all passed, the initial code file is determined as the target code file;

[0204] When at least one of the unit test results, acceptance test results, and production test results fails the test, the initial code file is corrected, and the execution returns to the step of calling the environment construction component and the service configuration component to test the initial code file to obtain the test result.

[0205] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0206] When the initial code file is received, the task management component is called to establish an initial task for the initial code file;

[0207] Call the task management component to assign the initial task to the target executor.

[0208] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0209] Perform initial testing on the initial code file to obtain initial test results;

[0210] When the initial test result is that the test fails, the correction component is called to correct the initial code file to obtain the corrected initial code file, and the step of executing the task process corresponding to the initial code file is returned;

[0211] When the initial test result is that the test passes, the initial code file is deployed to a preset database, and the step of executing the task process corresponding to the initial code file is returned to be executed.

[0212] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0213] In response to a query request triggered by a user, a task process interface is displayed to the user; the task process interface includes at least one of the running status of the task process, the running log of the task process, and basic information of the initial code file.

[0214] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

[0215] When the initial code file is received, a task process corresponding to the initial code file is established;

[0216] In the first process of the task process, according to the description information of the initial code file, the environment construction component and the service configuration component are called to test the initial code file to obtain the test result;

[0217] In the second process of the task process, a target code file is obtained according to the test result and the initial code file.

[0218] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0219] According to the description information of the initial code file, call the environment construction component and determine the test environment; the test environment includes the unit test environment, acceptance test environment and production test environment;

[0220] According to the description information of the initial code file, call the service configuration component to determine the test configuration; the test configuration includes unit test configuration, acceptance test configuration and production test configuration;

[0221] The initial code file is tested according to the test environment and test configuration to obtain the test results.

[0222] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0223] According to the unit test environment and unit test configuration, the initial code file is unit tested to obtain the unit test results;

[0224] According to the acceptance test environment and acceptance test configuration, the initial code file is tested to obtain the acceptance test results;

[0225] According to the production test environment and production test configuration, the initial code file is subjected to production test to obtain the production test result.

[0226] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0227] When the unit test results, the acceptance test results, and the production test results are all passed, the initial code file is determined as the target code file;

[0228] When at least one of the unit test results, acceptance test results, and production test results fails the test, the initial code file is corrected, and the execution returns to the step of calling the environment construction component and the service configuration component to test the initial code file to obtain the test result.

[0229] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0230] When the initial code file is received, the task management component is called to establish an initial task for the initial code file;

[0231] Call the task management component to assign the initial task to the target executor.

[0232] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0233] Perform initial testing on the initial code file to obtain initial test results;

[0234] When the initial test result is that the test fails, the correction component is called to correct the initial code file to obtain the corrected initial code file, and the step of executing the task process corresponding to the initial code file is returned;

[0235] When the initial test result is that the test passes, the initial code file is deployed to a preset database, and the step of executing the task process corresponding to the initial code file is returned to be executed.

[0236] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0237] In response to a query request triggered by a user, a task process interface is displayed to the user; the task process interface includes at least one of the running status of the task process, the running log of the task process, and basic information of the initial code file.

[0238] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0239] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0240] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0241] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for managing code products, characterized in that: The method comprises: When the initial code file is received, a task process corresponding to the initial code file is established; In the first process of the task process, according to the description information of the initial code file, calling the environment construction component and the service configuration component to test the initial code file to obtain a test result; In a second process in the task process, a target code file is obtained according to the test result and the initial code file.

2. The method according to claim 1, characterized in that The calling of the environment construction component and the service configuration component to test the initial code file according to the description information of the initial code file to obtain the test result includes: According to the description information of the initial code file, the environment construction component is called to determine the test environment; the test environment includes a unit test environment, an acceptance test environment and a production test environment; According to the description information of the initial code file, calling the service configuration component to determine the test configuration; the test configuration includes unit test configuration, acceptance test configuration and production test configuration; The initial code file is tested according to the test environment and the test configuration to obtain a test result.

3. The method according to claim 2, characterized in that The testing of the initial code file according to the test environment and the test configuration to obtain a test result includes: Performing unit testing on the initial code file according to the unit testing environment and the unit testing configuration to obtain a unit testing result; According to the acceptance test environment and the acceptance test configuration, the initial code file is tested to obtain an acceptance test result; According to the production test environment and the production test configuration, a production test is performed on the initial code file to obtain a production test result.

4. The method according to claim 1, characterized in that: The test results include unit test results, acceptance test results and production test results. The target code file is obtained according to the test results and the initial code file, including: When the unit test result, the acceptance test result and the production test result are all tested passed, determining the initial code file as the target code file; When at least one of the unit test results, the acceptance test results and the production test results fails the test, the initial code file is corrected, and the process returns to the step of executing the calling environment building component and the service configuration component to test the initial code file and obtain the test result.

5. The method according to claim 1, characterized in that When the initial code file is received, establishing a task process corresponding to the initial code file includes: When the initial code file is received, calling the task management component to establish an initial task for the initial code file; The task management component is called to allocate the initial task to the target executor.

6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: Performing an initial test on the initial code file to obtain an initial test result; In the case where the initial test result is a test failure, calling a correction component to correct the initial code file to obtain a corrected initial code file, and returning to the step of executing the task process corresponding to the initial code file; When the initial test result is that the test passes, the initial code file is deployed to a preset database, and the step of establishing the task process corresponding to the initial code file is returned to be executed.

7. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: In response to a query request triggered by a user, a task process interface is displayed to the user; the task process interface includes at least one of the running status of the task process, the running log of the task process, and the basic information of the initial code file.

8. A code product management device, characterized in that: The device comprises: An establishing module, used for establishing a task process corresponding to the initial code file when the initial code file is received; A calling module is used to call an environment building component and a service configuration component in a first process in the task process to test the initial code file according to the description information of the initial code file to obtain a test result; The determination module is used to obtain a target code file according to the test result and the initial code file in a second process in the task process.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.