Code delivery processing method and device, computer equipment and storage medium
By conducting large-model exception analysis on the record information of the code delivery process, the problem of inaccurate positioning of abnormal causes in the code delivery process is solved, the positioning accuracy is improved and useful reference is provided for developers.
Patent Information
- Application Number
- CN202411723455.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-02-11
AI Technical Summary
In the prior art, there is a problem of inaccurate positioning of exception causes in code delivery processing, especially when developers are not experienced.
By obtaining the record information of multiple code delivery links, and inputting them into the big model for abnormal analysis, determining the risk level of the abnormality, and outputting prompt information that matches the risk level.
Improves the accuracy of abnormal cause positioning and provides a comprehensive reference to help inexperienced developers accurately locate abnormal cause.
Smart Images

Figure CN119415438A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of software engineering technology, and in particular to a code delivery processing method, apparatus, computer equipment, storage medium and computer program product. Background Art
[0002] In order to improve the availability and security of the code, the code needs to be delivered, for example, compiled, built, deployed, etc. However, the code may be abnormal in any link, resulting in abnormalities in the image of the final code deployment.
[0003] In the traditional way, the specific cause of the exception is located by relying on the experience of the developer, such as the code reason, the test case reason, or the delivery pipeline itself. When the developer lacks experience, the cause of the exception may be inaccurately located. Summary of the invention
[0004] Based on this, it is necessary to provide a code delivery processing method, device, computer equipment, computer-readable storage medium and computer program product that can improve the accuracy of determining the cause of the abnormality in response to the above-mentioned technical problems.
[0005] In a first aspect, the present application provides a code delivery processing method. The method comprises:
[0006] Acquire link record information of each of the multiple code delivery links; input the link record information of each of the links into a large model respectively; the large model is used to perform anomaly analysis on the link record information; based on the output of the large model, determine the link analysis results of each of the code delivery links; when the link analysis results indicate that an anomaly exists in the code delivery link, determine the risk level of the anomaly; for the anomaly, output prompt information matching the risk level.
[0007] In one of the embodiments, obtaining the link record information of each of the multiple code delivery links includes: obtaining the original record information of each of the code delivery links through a monitoring probe pre-embedded in each code delivery link; filtering the information of each of the original record information respectively to obtain the link record information of each of the code delivery links.
[0008] In one of the embodiments, the training method of the large model includes: obtaining an initial model and multiple training samples corresponding to the sample code delivery link; each of the training samples includes sample record information and sample analysis results of the sample code delivery link; the sample code delivery link is at least one of the multiple code delivery links; using each of the training samples to train the initial model, and when the loss function converges, obtaining a large model for performing anomaly analysis on the link record information.
[0009] In one of the embodiments, determining the risk level of the exception includes: obtaining multiple reference types configured for the exception in the delivery link, and a reference risk level of each of the reference types; and determining the reference risk level corresponding to the reference type to which the exception belongs as the risk level of the exception.
[0010] In one of the embodiments, the outputting of prompt information matching the risk level for the exception includes: when the risk level is greater than a preset level, outputting a first prompt information according to prompt parameters matching the risk level; when the risk level is less than or equal to the preset level, adjusting the link delivery parameters of the code delivery link where the exception exists to obtain new link delivery parameters; and outputting a second prompt information including the new link delivery parameters.
[0011] In one of the embodiments, the method also includes: when positive feedback is obtained for the second prompt information, determining the number of occurrences of the exception in the link analysis results; if the number of occurrences reaches a set threshold, the link record information and link delivery parameter adjustment method corresponding to the second prompt information are correspondingly incorporated into the knowledge base; when the acquired link record information and the target record information recorded in the knowledge base meet similar conditions, the code delivery link to which the acquired link record information belongs is adjusted according to the link delivery parameter adjustment method corresponding to the target record information in the knowledge base.
[0012] In a second aspect, the present application also provides a code delivery processing device. The device includes:
[0013] An acquisition module is used to obtain link record information of each of the multiple code delivery links; an analysis module is used to input the link record information of each of the links into a large model respectively; the large model is used to perform an abnormality analysis on the link record information; a result determination module is used to determine the link analysis results of each of the code delivery links based on the output of the large model; a level determination module is used to determine the risk level of the anomaly when the link analysis result indicates that the code delivery link has an abnormality; a prompt module is used to output prompt information matching the risk level for the anomaly.
[0014] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0015] Acquire link record information of each of the multiple code delivery links; input the link record information of each of the links into a large model respectively; the large model is used to perform anomaly analysis on the link record information; based on the output of the large model, determine the link analysis results of each of the code delivery links; when the link analysis results indicate that an anomaly exists in the code delivery link, determine the risk level of the anomaly; for the anomaly, output prompt information matching the risk level.
[0016] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0017] Acquire link record information of each of the multiple code delivery links; input the link record information of each of the links into a large model respectively; the large model is used to perform anomaly analysis on the link record information; based on the output of the large model, determine the link analysis results of each of the code delivery links; when the link analysis results indicate that an anomaly exists in the code delivery link, determine the risk level of the anomaly; for the anomaly, output prompt information matching the risk level.
[0018] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0019] Acquire link record information of each of the multiple code delivery links; input the link record information of each of the links into a large model respectively; the large model is used to perform anomaly analysis on the link record information; based on the output of the large model, determine the link analysis results of each of the code delivery links; when the link analysis results indicate that an anomaly exists in the code delivery link, determine the risk level of the anomaly; for the anomaly, output prompt information matching the risk level.
[0020] The above-mentioned code delivery processing method, device, computer equipment, storage medium and computer program product obtain the link record information of each of the multiple code delivery links, and input the link record information of each link into the big model respectively. The big model is used to perform abnormal analysis on the link record information. The accuracy of the link analysis results is improved by performing abnormal analysis on the link record information by the big model. Based on the output of the big model, the link analysis results of each code delivery link are determined. When the link analysis results indicate that there is an abnormality in the code delivery link, the risk level of the abnormality is determined. The above-mentioned method is used to output prompt information matching the risk level for the abnormality. The prompt information reflects the existence of abnormalities in the code delivery link and the risk level of the abnormality, providing a comprehensive reference for inexperienced developers, thereby accurately locating the cause of the abnormality. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] FIG1 is an application environment diagram of a code delivery processing method in one embodiment;
[0022] FIG2 is a schematic diagram of a flow chart of a code delivery processing method in one embodiment;
[0023] FIG3 is a flow chart of a method for tracing and resolving errors in a continuous delivery process based on a large model in one embodiment;
[0024] FIG4 is a structural block diagram of a code delivery processing device in one embodiment;
[0025] FIG. 5 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0026] 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.
[0027] The code delivery processing method provided in the embodiment of the present application can be applied in the application environment shown in FIG1 . In which, the terminal 102 communicates with the server 104 through a network. The data storage system can store 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.
[0028] The terminal 102 can obtain link record information of each of the multiple code delivery links. The terminal 102 can input the link record information of each link into the big model respectively, and the big model is used to perform abnormal analysis on the link record information. The terminal 102 can determine the link analysis results of each code delivery link based on the output of the big model. The terminal 102 can determine the risk level of the abnormality when the link analysis results indicate that there is an abnormality in the code delivery link. The terminal 102 can output prompt information matching the risk level for the abnormality. The terminal 102 can obtain the link record information of each of the multiple code delivery links from the server 104. The terminal 102 can also upload the prompt information to the server 104.
[0029] The terminal 102 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, IoT devices, and portable wearable devices. The IoT devices may be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. The portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. The server 104 may be implemented as an independent server or a server cluster consisting of multiple servers.
[0030] In one embodiment, as shown in FIG. 2 , a code delivery processing method is provided, which is described by taking the method applied to the terminal 102 in FIG. 1 as an example, including:
[0031] S202, obtaining the link record information of each of the multiple code delivery links.
[0032] The code delivery link can refer to the link of the code in the continuous delivery process. The code delivery link can include any link of code pulling link, code checking link, code compilation link, test case execution link, image building link, application deployment link, and automated testing link.
[0033] The link record information may indicate the input and output information of the code in the code delivery link. The link record information may include link input information and link output information.
[0034] The link input information may include the input result of the code in the code delivery link. For example, if the code delivery link is the image building link, the link input information may be the information to be processed before the image building of the code, such as a war package or a jar package. The information to be processed may be the entire war package or a part of the war package.
[0035] The link output information may include the output results of the code in the code delivery link. For example, the code delivery link is code compilation, and the link output information may be the war package or executable package obtained by compiling the code, the time consumed by the link, the number of errors reported in the link, the error type of the link, etc. Among them, the War package (Web Application Archive) is a standard format for packaging and publishing Java Web applications. It usually contains the code, configuration files, static resources, and Web resources of the Web application. The executable package can be a jar package, and the Jar package (Java Archive) is a packaging format for Java applications, which can contain Java class files, application resources, related metadata, and libraries.
[0036] For example, the link record information may include the record information of the problems that the code addresses in the code delivery link. For example, in the code scanning link, the link record information may be the problems that occurred in the code scanning. For another example, in the code compilation link, the link record information may be the warnings and errors that occurred in the code compilation.
[0037] Specifically, the terminal can obtain the link record information of each of the multiple code delivery links.
[0038] The link record information includes record problems. In one embodiment, the terminal can obtain the record problems of each code delivery link. For example, the record problems of the code scanning link can be the number of code scanning errors, the type of code scanning errors, etc.
[0039] There are many ways to obtain link record information. Specifically, the terminal can read the link record information in real time by monitoring the probe. The terminal can also extract the link record information from the information table of the code delivery link through a predefined template. The terminal can also directly extract the link record information of the code delivery link from an open source information extraction system.
[0040] In one embodiment, the terminal can obtain the original record information of each code delivery link through the monitoring probe pre-embedded in each code delivery link. The terminal can filter each original record information separately to obtain the link record information of each code delivery link.
[0041] S204, input the recorded information of each link into the large model respectively.
[0042] Among them, the large model can refer to a pre-trained machine learning model with ultra-large-scale parameters.
[0043] The big model can be used for automatic code generation and completion, intelligent debugging and error repair, continuous integration and deployment. Specifically, the big model can also be used to perform abnormal analysis on link record information.
[0044] Abnormal analysis can refer to the analysis of abnormal components in link record information.
[0045] Specifically, the terminal can input the recorded information of each link into the large model as the input information of the large model.
[0046] In one embodiment, the training process of the large model may include that the terminal may obtain the initial model and multiple training samples corresponding to the sample code delivery link. Each training sample includes sample record information and sample analysis results of the sample code delivery link, and the sample code delivery link is at least one of the multiple code delivery links. The terminal may use each training sample to train the initial model, and when the loss function converges, obtain a large model for abnormal analysis of the link record information.
[0047] In one embodiment, the terminal may also pre-process the recorded information of each link to obtain each pre-processed information. The terminal inputs each pre-processed information as input information into the large model. Among them, the pre-processing methods may include data cleaning, data integration, data conversion, data reduction, data discretization, etc. Among them, the purpose of data cleaning may be to remove invalid or missing data, and to deal with problems such as null values, abnormal values and duplicate values. The goal of data integration may be to integrate data from multiple databases or data stores, reduce and avoid redundancy and inconsistency in the data set, and improve the accuracy and speed of the mining process. The purpose of data conversion may be to convert or merge data to improve the efficiency of the analysis process and simplify the pattern for better understanding. Common conversion methods include data standardization (or normalization), feature construction, aggregation and smoothing, etc. The purpose of data reduction may be to reduce the amount of data while producing the same or similar analysis results. This can be achieved through methods such as data compression, feature selection and feature extraction. Data discretization may be to simplify data for numerical data by converting continuous values into discrete values.
[0048] S206: Based on the output of the big model, determine the analysis results of each code delivery link.
[0049] The output of the large model may include the output results of each code delivery link. For the output results of each code delivery link, the output results may include multiple candidate analysis results and the confidence level of each candidate analysis result.
[0050] The link analysis result may be the result obtained by analyzing the recorded information of the code delivery link. The link analysis result may at least include information indicating whether the code delivery link is abnormal. Similarly, the candidate analysis result may also at least include information indicating whether the code delivery link is abnormal.
[0051] Specifically, the terminal may filter the link analysis results that meet the result screening conditions from among the candidate analysis results.
[0052] In one embodiment, the output of the large model may include the output results of each code delivery link, and the output results of each code delivery link may include multiple candidate analysis results and the confidence of each candidate analysis result. For each code delivery link, the terminal may determine the candidate analysis result with the highest confidence as the link analysis result of the code delivery link.
[0053] In one embodiment, the terminal may also set a confidence threshold. For each code delivery link, the terminal may randomly determine any candidate analysis result from multiple candidate analysis results whose confidence is greater than the confidence threshold as the link analysis result of the code delivery link.
[0054] S208: When the link analysis result indicates that there is an abnormality in the code delivery link, determine the risk level of the abnormality.
[0055] The abnormality in the code delivery link may indicate that the link delivery parameters in the code delivery link are abnormal. The abnormality in the code delivery link may also indicate that the code in the code delivery link is abnormal.
[0056] The risk level may indicate the severity of the consequences that may be caused by the exception. Specifically, the risk level may indicate the time required to fix the exception, or the estimated number of developers involved in fixing the exception.
[0057] There are many ways to determine the risk level of the exception. Specifically, the terminal can obtain multiple reference types configured for the delivery link exception and the reference risk level of each reference type. The terminal can determine the reference risk level corresponding to the reference type to which the exception belongs as the risk level of the exception.
[0058] Specifically, the terminal may also determine abnormal description information. The terminal may filter target description information that matches the description information from multiple preset description information. The terminal may determine the risk level configured for the target description information as an abnormal risk level.
[0059] S210: For the abnormality, output prompt information matching the risk level.
[0060] The prompt information may be specific information used to prompt the developer. For example, the prompt information may be "XX line of code has an exception, the exception type is YY type, please eliminate the exception", or "XX line of code has been modified, the modified part has been highlighted, please confirm whether to modify it", etc.
[0061] The prompt information may include only the prompt information or the modified prompt information. Among them, only the prompt information means that only the abnormality in the code or the abnormality in the code delivery link is prompted. The prompt may highlight the abnormal part and not highlight the non-abnormal part. Modifying the prompt information may modify the abnormality in the code or the abnormality in the code delivery link, and prompt the modified content.
[0062] Specifically, the terminal may determine, for the exception, a plurality of candidate prompt information corresponding to the exception and a reference risk level of each candidate prompt information. The terminal may determine the candidate prompt information corresponding to the reference risk level matching the risk level as the prompt information matching the risk level.
[0063] Specifically, the terminal may also output a first prompt message according to a prompt parameter matching the risk level when the risk level is greater than a preset level. The terminal may adjust the link delivery parameters of the abnormal code delivery link to obtain new link delivery parameters when the risk level is less than or equal to the preset level. The terminal may output a second prompt message including the new link delivery parameters.
[0064] In the above code delivery processing method, the link record information of each of the multiple code delivery links is obtained, and the link record information of each link is input into the big model respectively. The big model is used to perform abnormal analysis on the link record information. The accuracy of the link analysis results is improved by performing abnormal analysis on the link record information by the big model. Based on the output of the big model, the link analysis results of each code delivery link are determined. When the link analysis results indicate that there is an abnormality in the code delivery link, the risk level of the abnormality is determined. Using the above method, prompt information matching the risk level is output for the abnormality. The prompt information reflects the existence of abnormalities in the code delivery link and the risk level of the abnormality, providing a comprehensive reference for inexperienced developers, thereby accurately locating the cause of the abnormality.
[0065] In one embodiment, link record information of each of the multiple code delivery links is obtained, including: obtaining the original record information of each of the code delivery links through monitoring probes pre-buried in each of the code delivery links, filtering each of the original record information respectively, and obtaining the link record information of each of the code delivery links.
[0066] Among them, the monitoring probe can be a Java Agent probe embedded in each code delivery link. Agent probe technology is widely used in the Java field, mainly used to dynamically modify Java bytecode, and is often used in scenarios such as program debugging, hot deployment, and performance diagnosis and analysis. This technology monitors and controls program behavior by dynamically loading an agent when the application is running.
[0067] The original record information may refer to the record information directly collected by the monitoring probe. The original record information may be the build log and exception information collected by the monitoring probe.
[0068] Information filtering can refer to a method of processing original record information to obtain link record information.
[0069] There are many ways to filter information. Specifically, the terminal can filter each original record information based on keyword filtering to obtain the link record information of each code delivery link. The keyword filtering method can be to filter information by identifying specific keywords or phrases in the text.
[0070] Specifically, the terminal can also filter each original record information based on content filtering to obtain the link record information of each code delivery link. The content filtering method can be to determine whether the information meets the user's interests or needs by analyzing the content of the information.
[0071] Exemplarily, the terminal may obtain a rule configuration table pre-configured by the user. The terminal may filter each original record information according to the rule configuration table to obtain the link record information of each code delivery link.
[0072] In this embodiment, by pre-embedded monitoring probes in each code delivery link, the original record information of each code delivery link is obtained, and the information of each original record information is filtered respectively to obtain the link record information of each code delivery link, thereby improving the accuracy of the link record information, and providing a basis for subsequent accurate positioning of the cause of the abnormality.
[0073] In one embodiment, the training method of the large model includes: obtaining an initial model and multiple training samples corresponding to the sample code delivery link, each training sample includes sample record information and sample analysis results of the sample code delivery link, using each training sample to train the initial model, and when the loss function converges, obtaining a large model for performing anomaly analysis on the link record information.
[0074] The initial model may be an open source large model that has not been trained.
[0075] The sample code delivery link may be a link in the continuous delivery process where the code is located. The sample code delivery link may be at least one of multiple code delivery links. For example, the sample delivery link may be a code checking link and a code compilation link.
[0076] The training sample may be a sample set used to train the initial model. The training sample may include sample record information and sample analysis results.
[0077] The sample record information may indicate the record information of the code in the sample code delivery link. The sample analysis result may indicate the analysis result configured for the record information. Specifically, the sample record information may indicate the problem information of the code in the sample code delivery link. The sample analysis result may indicate the answer information to the problem information.
[0078] The loss function can be used to measure the difference or error between the model's predictions and the true results.
[0079] Specifically, the terminal may use each training sample to repeatedly iterate the initial model, and when the loss function converges, obtain a large model for performing abnormal analysis on the link record information.
[0080] Specifically, the terminal may further divide each training sample into a training set and a validation set. The terminal may use the training set to train the initial model, and when the loss function converges, the large model to be verified. The terminal may use the validation set to verify the large model to be verified. The terminal may determine the large model to be verified that has passed the verification as the large model for performing abnormal analysis on the link record information.
[0081] In this embodiment, an initial model and multiple training samples corresponding to the sample code delivery link are obtained, each training sample includes sample record information and sample analysis results of the sample code delivery link, and the initial model is trained using each training sample. When the loss function converges, a large model for performing abnormal analysis on the link record information is obtained, which helps to improve the accuracy of the link analysis results by performing abnormal analysis on the link record information according to the large model.
[0082] In one embodiment, determining the risk level of the exception includes: obtaining multiple reference types configured for the exception in the delivery link, and the reference risk level of each reference type, and determining the reference risk level corresponding to the reference type to which the exception belongs as the risk level of the exception.
[0083] The reference type may be a type of abnormal configuration for the code delivery phase.
[0084] Specifically, the reference type may include an exception type of an exception. For example, the exception type of an exception may be code statement missing, code parameter missing, code parameter error, code statement duplication, link delivery parameter missing, link delivery parameter error, etc. The reference type may be parameter error, parameter missing, parameter duplication, etc. It can be understood that when the exception type is code parameter missing, the reference type to which the exception type belongs is parameter missing.
[0085] The reference risk level is the risk level configured for each reference type. For example, the risk level corresponding to a missing parameter is higher than the risk level corresponding to a duplicate parameter.
[0086] In this embodiment, multiple reference types for abnormal configuration of the delivery link and the reference risk level of each reference type are obtained, and the reference risk level corresponding to the reference type to which the abnormality belongs is determined as the risk level of the abnormality, so as to accurately determine the risk level of the abnormality and then accurately locate the cause of the abnormality.
[0087] In one embodiment, for anomalies, prompt information matching the risk level is output, including: when the risk level is greater than a preset level, a first prompt information is output according to prompt parameters matching the risk level; when the risk level is less than or equal to the preset level, the link delivery parameters of the code delivery link where the abnormality exists are adjusted to obtain new link delivery parameters, and a second prompt information including the new link delivery parameters is output.
[0088] The prompt parameter may be a parameter that characterizes the prompt degree. For example, the prompt parameter may be a parameter that controls the degree of code highlighting. The higher the risk level, the higher the corresponding degree of highlighting, that is, the darker the color of the mark.
[0089] The first prompt information may be specific information used to prompt the developer. For example, the first prompt information may be "XX lines of code have an exception, the risk level of the exception is YY, please eliminate the exception immediately." For another example, the first prompt information may be "XX lines of code have an exception, the risk level of the exception is ZZ, please eliminate the exception today."
[0090] The link delivery parameter may be a processing parameter in the code delivery link. Based on the link delivery parameter, the output result of the previous code delivery link may be processed to obtain the output result of the code delivery link. The output result of the code delivery link is used as the input of the next code delivery link.
[0091] The new link delivery parameters may represent the link delivery parameters after parameter adjustment.
[0092] The second prompt information may be specific information used to prompt the developer. For example, the second prompt information may be "XX lines of code have been modified, the modified part has been highlighted, please confirm whether to modify it."
[0093] There are many ways to adjust the delivery parameters of the link. Specifically, the terminal can obtain multiple candidate delivery parameters of the code delivery link. The terminal can randomly determine the target delivery parameter from each candidate delivery parameter. The terminal can determine the target delivery parameter as the new delivery link parameter.
[0094] The terminal may also determine the number of occurrences of the anomaly in the link analysis result when positive feedback for the second prompt information is obtained. If the number of occurrences reaches a set threshold, the terminal may include the link record information and link delivery parameter adjustment method corresponding to the second prompt information into the knowledge base. If the obtained link record information and the target record information recorded in the knowledge base meet similar conditions, the terminal may adjust the parameters of the code delivery link to which the obtained link record information belongs according to the link delivery parameter adjustment method corresponding to the target record information in the knowledge base.
[0095] In this embodiment, when the risk level is greater than the preset level, the first prompt information is output according to the prompt parameters matching the risk level. When the risk level is less than or equal to the preset level, the link delivery parameters of the code delivery link with the abnormality are adjusted to obtain new link delivery parameters, and the second prompt information including the new link delivery parameters is output. The first prompt information or the second prompt information is provided to the developer, providing the developer with a comprehensive reference to accurately locate the cause of the abnormality.
[0096] In one embodiment, the code delivery processing method further includes: in the case of obtaining positive feedback for the second prompt information, determining the number of occurrences of the anomaly in the link analysis result;
[0097] If the number of occurrences reaches the set threshold, the link record information and link delivery parameter adjustment method corresponding to the second prompt information are correspondingly included in the knowledge base;
[0098] When the acquired link record information and the target record information recorded in the knowledge base meet similar conditions, the parameters of the code delivery link to which the acquired link record information belongs are adjusted according to the link delivery parameter adjustment method corresponding to the target record information in the knowledge base.
[0099] Among them, positive feedback can represent the feedback result of the developer or other personnel on the second prompt information. For example, the second prompt information can be "XX lines of code have been modified, the modified part has been highlighted, please confirm whether to modify". The feedback result can be confirmation of modification.
[0100] The more times an exception appears in the link analysis results, the more times the exception is analyzed, which reduces the number of calls to the large model and saves hardware resources. The link record information and link delivery parameter adjustment method corresponding to the second prompt information corresponding to the exception can be included in the knowledge base accordingly.
[0101] Set the threshold to the configured threshold, such as repeating 3 times or 5 times.
[0102] The link delivery parameter adjustment method can be randomly determined from multiple candidate delivery parameters, or it can be the adjustment direction of the link delivery parameter, such as increasing the parameter value or decreasing the parameter value in sequence.
[0103] Knowledge base plays an important role in the field of artificial intelligence. It can give intelligent agents the ability of deep understanding, precise query and logical reasoning, and is widely used in tasks such as search engines, question-answering systems, intelligent dialogue systems and personalized recommendations. In addition, knowledge base can also simplify knowledge-intensive tasks such as Web search, natural language understanding, data integration and data mining by combining ontologies and examples.
[0104] The knowledge base can be a question-answering model used to answer questions. The space complexity of the question-answering model is smaller than that of the large model. The question-answering model processes simple tasks faster than the large model.
[0105] When the acquired link record information and the target record information recorded in the knowledge base meet similar conditions, it can be indicated that the specific problem in the link record information has been recorded in the knowledge base, in order to improve the efficiency of determining the link delivery parameter adjustment method. Specifically, the terminal can adjust the parameters of the code delivery link to which the acquired link record information belongs according to the link delivery parameter adjustment method corresponding to the target record information in the knowledge base. There is no need to input the link record information into the big model, determine the link analysis results of the code delivery link based on the output of the big model, and determine the risk level of the abnormality when the link analysis results indicate that there is an abnormality in the code delivery link, and output prompt information matching the risk level for the abnormality.
[0106] Determine how to adjust delivery parameters faster through the knowledge base.
[0107] In this embodiment, the situation where the acquired link record information and the target record information recorded in the knowledge base meet similar conditions can indicate that the specific problem in the link record information has been recorded in the knowledge base, in order to improve the efficiency of determining the link delivery parameter adjustment method.
[0108] In one embodiment, the method for tracing and resolving errors in a continuous delivery process based on a large model as shown in FIG3 includes:
[0109] The first part, large model training, includes:
[0110] S301, obtaining an initial model and a plurality of training samples corresponding to the sample code delivery phase.
[0111] Each training sample includes sample record information and sample analysis results of a sample code delivery link. The sample code delivery link is at least one of the multiple code delivery links.
[0112] S302, using each training sample to train the initial model, when the loss function converges, a large model for abnormal analysis of link record information is obtained.
[0113] The second part, large model application, includes:
[0114] S303, obtaining the original record information of each code delivery link through the monitoring probe pre-embedded in each code delivery link.
[0115] For example, each construction stage of the pipeline (pulling code, code checking, code compiling, test case execution, image building, image pushing, application deployment, automated testing and other processes) can be objectified, and the definition content includes process ID, process description, process template, and process knowledge base.
[0116] Build a large model processing center and a push center. The push center is responsible for collecting all abnormal problems in each process of continuous delivery, while the large model processing center is responsible for receiving information from the push center, analyzing and processing abnormal problems, and returning the processing results to the push center. The specific details are as follows: The push center provides agent probes to be injected into each process stage of continuous delivery, which can collect the build logs and abnormal information generated in each process stage. Users can tell the agent what information they want to push to the large model processing center through rule configuration. When the agent collects the information, it will synchronize the information to the push center, and the push center will input the information into the large model for information processing and receive feedback from the large model. After receiving the feedback, the push center will feedback the processing results of different modules to each module through the routing table. It is explained here that since the environment, code, and principles used by each pipeline module are different, the information returned by the push center here is a general information description format.
[0117] The information description format includes: "moduleId" indicates which module it belongs to; "questionID" indicates the question raised under a certain module; "answerID" indicates the result returned for the question; "level" indicates the level of feedback to the user, the low level only shows the output results, and the high level directly helps the user modify the module template or code.
[0118] After each module receives the data returned by the push center, it processes the message as needed. There are many ways to process messages. For example, this article declares a message level that represents the user's acceptance of the feedback results of the large model. It can be defined by building modules or sub-modules in a building module. For example, the acceptability of security issues in code security scanning. For minor security vulnerabilities, the push center is allowed to modify the code directly according to the model recommendation through the agent. For serious or blocking bugs, only obvious prompts are needed, and users can make modifications at their own discretion. The same applies to other situations in the building module.
[0119] The push center can also highlight the processing results on the user continuous delivery pipeline interface by injecting HTML into the front end.
[0120] Users can also evaluate the model processing results and provide reverse feedback to the big model. If the same type of problem occurs more than n times, or the user takes the initiative to include the same type of problem into the knowledge base, the subsequent similar problems will not be processed by the big model, but will be directly returned through the knowledge base to improve processing efficiency.
[0121] S304, filtering each original record information respectively to obtain the link record information of each code delivery link.
[0122] S305, inputting the recorded information of each link into the large model respectively. The large model is used to perform abnormal analysis on the recorded information of each link.
[0123] S306: Based on the output of the big model, determine the analysis results of each code delivery link.
[0124] S307, when the link analysis result indicates that there is an abnormality in the code delivery link, obtain multiple reference types configured for the abnormality in the delivery link, and the reference risk level of each reference type.
[0125] S308: Determine the reference risk level corresponding to the reference type to which the anomaly belongs as the risk level of the anomaly.
[0126] S309: When the risk level is greater than the preset level, output first prompt information according to prompt parameters matching the risk level.
[0127] S310, when the risk level is less than or equal to the preset level, adjust the link delivery parameters of the code delivery link with the abnormality to obtain new delivery link parameters.
[0128] S311, output the second prompt information including the parameters of the new delivery link.
[0129] Wherein, when positive feedback for the second prompt information is obtained, the number of occurrences of the anomaly in the link analysis result is determined.
[0130] If the number of occurrences reaches the set threshold, the link record information and link delivery parameter adjustment method corresponding to the second prompt information will be included in the knowledge base accordingly.
[0131] When the acquired link record information and the target record information recorded in the knowledge base meet similar conditions, the parameters of the code delivery link to which the acquired link record information belongs are adjusted according to the link delivery parameter adjustment method corresponding to the target record information in the knowledge base.
[0132] In this embodiment, the link record information of each of the multiple code delivery links is obtained, and the link record information of each link is input into the big model respectively. The big model is used to perform abnormal analysis on the link record information. The accuracy of the link analysis results is improved by performing abnormal analysis on the link record information by the big model. Based on the output of the big model, the link analysis results of each code delivery link are determined. When the link analysis results indicate that there is an abnormality in the code delivery link, the risk level of the abnormality is determined. The above method is used to output prompt information matching the risk level for the abnormality. The prompt information reflects the existence of abnormalities in the code delivery link and the risk level of the abnormality, providing a comprehensive reference for inexperienced developers, thereby accurately locating the cause of the abnormality.
[0133] The above method can also bring the following beneficial effects: when users are unable to intuitively judge whether errors generated during the construction process are code problems, test case problems, or problems with the delivery pipeline itself, the cause of the problem can be quickly located through a large model, thereby improving delivery accuracy and efficiency.
[0134] 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.
[0135] Based on the same inventive concept, the embodiment of the present application also provides a code delivery processing device for implementing the code delivery processing method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more code delivery processing device embodiments provided below can refer to the limitations of the code delivery processing method above, and will not be repeated here.
[0136] In one embodiment, as shown in FIG. 4 , a code delivery processing device is provided, including: an acquisition module 401, an analysis module 402, a result determination module 403, a level determination module 404 and a prompt module 405, wherein:
[0137] An acquisition module 401 is used to acquire the link record information of each of the multiple code delivery links;
[0138] Analysis module 402, used to input the recorded information of each link into the big model respectively; the big model is used to perform abnormal analysis on the recorded information of each link;
[0139] A result determination module 403 is used to determine the link analysis results of each code delivery link based on the output of the large model;
[0140] The level determination module 404 is used to determine the risk level of the abnormality when the link analysis result indicates that there is an abnormality in the code delivery link;
[0141] The prompt module 405 is used to output prompt information matching the risk level for the abnormality.
[0142] In one of the embodiments, the acquisition module 401 is also used to obtain the original record information of each code delivery link through the monitoring probe pre-embedded in each code delivery link; filter each original record information respectively to obtain the link record information of each code delivery link.
[0143] In one embodiment, the code delivery processing device also includes: a model training module, used to obtain an initial model, and multiple training samples corresponding to the sample code delivery link; each training sample includes sample record information and sample analysis results of the sample code delivery link; the sample code delivery link is at least one of the multiple code delivery links; the initial model is trained using each training sample, and when the loss function converges, a large model for performing abnormal analysis on the link record information is obtained.
[0144] In one of the embodiments, the level determination module 404 is also used to obtain multiple reference types for abnormal configuration of the delivery link, and the reference risk level of each reference type; and determine the reference risk level corresponding to the reference type to which the abnormality belongs as the risk level of the abnormality.
[0145] In one of the embodiments, the prompt module 405 is also used to output a first prompt message according to prompt parameters matching the risk level when the risk level is greater than a preset level; to adjust the link delivery parameters of the code delivery link with the abnormality to obtain new delivery link parameters when the risk level is less than or equal to the preset level; and to output a second prompt message containing the new delivery link parameters.
[0146] In one of the embodiments, the code delivery processing device also includes: a parameter adjustment module, which is used to determine the number of occurrences of the exception in the link analysis result when positive feedback is obtained for the second prompt information; if the number of occurrences reaches a set threshold, the link record information and the link delivery parameter adjustment method corresponding to the second prompt information are included in the knowledge base accordingly; when the acquired link record information and the target record information recorded in the knowledge base meet similar conditions, the code delivery link to which the acquired link record information belongs is adjusted according to the link delivery parameter adjustment method corresponding to the target record information in the knowledge base.
[0147] Each module in the above-mentioned code delivery processing device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0148] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG5. 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 link record information data. 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 code delivery processing method is implemented.
[0149] Those skilled in the art will understand that the structure shown in FIG. 5 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution 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.
[0150] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the above method steps are implemented when the processor executes the computer program.
[0151] 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 above method steps are implemented.
[0152] In one embodiment, a computer program product is provided, comprising a computer program, which implements the above method steps when executed by a processor.
[0153] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods 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 this application can include at least one of non-volatile 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), magnetoresistive 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, etc., but are not limited to this.
[0154] 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 specification.
[0155] 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 construed as limiting the scope of the present application. It should be noted that, for a person of ordinary skill in the art, several modifications 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 code delivery processing method, characterized in that: The method comprises: Obtain the link record information of multiple code delivery links; Inputting the recorded information of each link into the big model respectively; the big model is used to perform abnormal analysis on the recorded information of each link; Based on the output of the large model, determining the link analysis results of each of the code delivery links; If the link analysis result indicates that there is an abnormality in the code delivery link, determine the risk level of the abnormality; In response to the anomaly, a prompt message matching the risk level is output.
2. The method according to claim 1, characterized in that The obtaining of the link record information of each of the multiple code delivery links includes: Obtain the original record information of each code delivery link through the monitoring probes pre-buried in each code delivery link; The original record information is filtered respectively to obtain the link record information of each code delivery link.
3. The method according to claim 1, characterized in that The training method of the large model includes: Acquire an initial model and a plurality of training samples corresponding to the sample code delivery link; each of the training samples includes sample record information and sample analysis results of the sample code delivery link; the sample code delivery link is at least one of the plurality of code delivery links; The initial model is trained using each of the training samples, and when the loss function converges, a large model for performing abnormal analysis on the link record information is obtained.
4. The method according to claim 1, characterized in that: Determining the risk level of the abnormality includes: Obtain multiple reference types for abnormal configuration of the delivery link and respective reference risk levels of the reference types; The reference risk level corresponding to the reference type to which the anomaly belongs is determined as the risk level of the anomaly.
5. The method according to claim 1, characterized in that: The outputting of prompt information matching the risk level for the exception includes: When the risk level is greater than a preset level, outputting a first prompt message according to a prompt parameter matching the risk level; When the risk level is less than or equal to the preset level, adjusting the link delivery parameters of the code delivery link with the abnormality to obtain new link delivery parameters; Output a second prompt message including the delivery parameters of the new link.
6. The method according to claim 5, characterized in that The method further comprises: In case of obtaining positive feedback for the second prompt information, determining the number of occurrences of the anomaly in the link analysis result; If the number of occurrences reaches a set threshold, the link record information and link delivery parameter adjustment method corresponding to the second prompt information are correspondingly included in the knowledge base; When the acquired link record information and the target record information recorded in the knowledge base meet similar conditions, the parameters of the code delivery link to which the acquired link record information belongs are adjusted according to the link delivery parameter adjustment method corresponding to the target record information in the knowledge base.
7. A code delivery processing device, characterized in that: The device comprises: An acquisition module is used to obtain the link record information of multiple code delivery links; An analysis module is used to input the recorded information of each link into a large model respectively; the large model is used to perform abnormal analysis on the recorded information of each link; A result determination module, used to determine the link analysis results of each of the code delivery links based on the output of the large model; A level determination module, configured to determine the risk level of anomaly when the link analysis result indicates that anomaly exists in the code delivery link; The prompt module is used to output prompt information matching the risk level for the abnormality.
8. 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 6 are implemented.
9. 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 6 are implemented.
10. A computer program product, comprising a computer program, 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 6 are implemented.