Code commissioning result judgment method, code commissioning method and code commissioning device
By automatically obtaining and analyzing the data of the target server, calculating the target deviation data and determining whether it is within an acceptable range, the problems of inefficient judgment of code production results in the existing technology are solved, and the error rate is achieved quickly and accurately Judgment of production results.
Patent Information
- Application Number
- CN202411473538.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-22
- Publication Date
- 2025-02-18
AI Technical Summary
The prior art is inefficient in judging the results after the code is put into production, and it is prone to misjudgment and omissions, resulting in uncertainty in the production process and potential risks.
By automatically obtaining the service of the target server, processing data sequence, request and error data sequence, and server load data sequence, calculate the set of indicator values of multiple indicators, and calculate the target deviation data based on the preset normal probability of the target indicator to determine whether it is possible Determine the production results within the acceptance range.
It realizes the rapid, accurate and automatic judgment of code production results, reduces labor costs, improves production efficiency and accuracy, and reduces uncertainty and risks.
Smart Images

Figure CN119473810A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a method for determining a code production result, a code production method and a device. Background Art
[0002] In today's era of rapid digital development, the successful launch of software and services is crucial to the business operations of enterprises. An accurate, timely and reliable launch assessment result is directly related to whether the enterprise can smoothly advance its business, gain competitive advantages, and meet the needs and expectations of users.
[0003] At present, generally after the production is put into operation, specific indicators are collected manually at a specific time point, and the success of the production is judged manually based on the collection results and the monitored system operation status. The manual judgment method is not only inefficient, but also prone to misjudgment and omissions. This brings many uncertainties and potential risks to the production process. Summary of the invention
[0004] In view of the above situation, the embodiments of the present disclosure provide a method for determining a code production result, a code production method and a device, aiming to solve the above problem or at least partially solve the above problem.
[0005] In a first aspect, an embodiment of the present disclosure provides a method for determining a code production result, the method comprising:
[0006] After the target code is deployed on the target server, using the service processing data sequence, request and error data sequence, and server load data sequence of the target server obtained, a set of indicator values of multiple indicators of the target server is calculated, wherein the multiple indicators include request error rate, request rate, delay, and server saturation;
[0007] For any first target indicator, the target deviation data is calculated according to the first target indicator value set corresponding to the first target indicator and the preset target indicator normal probability;
[0008] Determine the acceptable range centered around the preset target historical deviation data;
[0009] If all the target deviation data are within the corresponding acceptable range, the production result judgment conclusion is determined to be that the target code is successfully put into production; otherwise, the production result judgment conclusion is determined to be that the target code fails to be put into production.
[0010] In a second aspect, the embodiment of the present disclosure further provides a code production method, the method comprising:
[0011] Using the deployment instruction, the traffic indicated by the traffic proportion increment data carried in the deployment instruction is allocated to the new deployment server; wherein the new deployment server has new code deployed on it;
[0012] Adopting the method for judging the code production result described in the first aspect to judge whether this round of production is successful;
[0013] If the current round of production fails, a rollback instruction is output; the rollback instruction is used to delete the new code on the newly deployed server and allocate all traffic to the old server;
[0014] If this round of production is successful, return to the step of using the deployment instruction to allocate the traffic indicated by the traffic proportion incremental data carried in the deployment instruction to the newly deployed server until the current traffic allocated to the newly deployed server reaches 100%.
[0015] In a third aspect, the embodiment of the present disclosure further provides a device for determining a code production result, the device comprising:
[0016] an acquisition module, configured to calculate a set of indicator values of multiple indicators of the target server by using the service processing data sequence, request and error data sequence, and server load data sequence of the target server acquired after the target code is deployed on the target server, wherein the multiple indicators include request error rate, request rate, delay, and server saturation;
[0017] A calculation module, configured to calculate, for any first target indicator, target deviation data according to a first target indicator value set corresponding to the first target indicator and a preset target indicator normal probability;
[0018] A determination module, used for determining an acceptable interval centered on preset target historical deviation data;
[0019] The judgment module is used to determine that the production result judgment conclusion is that the target code is successfully put into production if all the target deviation data are within the corresponding acceptable range; otherwise, determine that the production result judgment conclusion is that the target code is unsuccessful in production.
[0020] In a fourth aspect, the present disclosure also provides a code production device, the device comprising:
[0021] An allocation module, configured to allocate the traffic indicated by the traffic proportion increment data carried in the deployment instruction to a new deployment server using the deployment instruction; wherein the new deployment server has new code deployed thereon;
[0022] A judgment module, used to use the judgment method of the code production result described in the first aspect to judge whether the current round of production is successful;
[0023] The production and rollback module is used to output a rollback instruction if the current round of production fails; the rollback instruction is used to delete the new code on the newly deployed server and allocate all traffic to the old server; if the current round of production is successful, it returns to the step of using the deployment instruction to allocate the traffic indicated by the traffic proportion incremental data carried in the deployment instruction to the newly deployed server, until the current traffic allocated to the newly deployed server reaches 100%.
[0024] In a fifth aspect, an embodiment of the present disclosure further provides an electronic device, comprising: a processor; and a memory arranged to store computer executable instructions, wherein when the executable instructions are executed, the processor executes the above-mentioned method for determining the result of code production or the steps of the code production method.
[0025] In a sixth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium, which stores one or more programs. When the one or more programs are executed by an electronic device including multiple application programs, the electronic device executes the above-mentioned method for determining the code production result or the steps of the code production method.
[0026] In a seventh aspect, an optional implementation of the present disclosure further provides a computer program product, which carries a program code, and the instructions included in the program code can be used to execute the aforementioned method for determining the result of code production or the steps of the code production method.
[0027] By means of the above technical scheme, the code production result judgment method, code production method and device provided by the embodiment of the present disclosure can automatically obtain the service processing data sequence, request and error data sequence, and server load data sequence of the target server after the target code is deployed on the target server, and use these data to calculate the indicator value set of multiple indicators of the current target server; for each indicator, the corresponding indicator value set is used to calculate the target deviation data used to characterize the relative deviation degree between the actual performance and the expected performance of the target indicator, and the preset target historical deviation data is used as a reference to judge whether the target deviation data is within the acceptable range determined based on the target historical deviation data, and finally determine whether the target code is successfully put into production according to the judgment result corresponding to each indicator. It can be seen that the embodiment of the present disclosure standardizes and automates the judgment process of the code production result, without manual intervention, greatly improves the judgment efficiency and accuracy of the production result, reduces labor costs, and fills the gap in the prior art in judging the production result.
[0028] The above description is only an overview of the technical solution of the present disclosure. In order to more clearly understand the technical means of the present disclosure, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present disclosure more obvious and easy to understand, the specific implementation methods of the present disclosure are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] The drawings described herein are used to provide a further understanding of the present disclosure and constitute a part of the present disclosure. The illustrative embodiments of the present disclosure and their descriptions are used to explain the present disclosure and do not constitute an improper limitation on the present disclosure. In the drawings:
[0030] Figure 1 A schematic diagram showing a flow chart of a method for determining a code production result provided by an embodiment of the present disclosure;
[0031] Figure 2 A schematic diagram of the process of the code production method provided by the embodiment of the present disclosure is shown;
[0032] Figure 3 A schematic diagram showing the structure of a device for determining a code production result provided by an embodiment of the present disclosure;
[0033] Figure 4 A schematic diagram of the structure of a code production device provided by an embodiment of the present disclosure is shown;
[0034] Figure 5 A schematic structural diagram of an electronic device provided by an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0035] In order to make the purpose, technical solutions and advantages of the present disclosure clearer, the technical solutions of the present disclosure will be clearly and completely described below in combination with the specific embodiments of the present disclosure and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present disclosure.
[0036] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0037] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that such usage is interchangeable where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. In addition, the term "including" and its variants are to be interpreted as open-ended terms meaning "including but not limited to".
[0038] As described above, the prior art generally involves manually collecting specific indicators at a specific time point after commissioning, and manually judging whether the commissioning is successful based on the collected results and the monitored system operating status. However, the manual judgment method is not only inefficient, but also prone to misjudgment and omissions. This brings many uncertainties and potential risks to the commissioning process. Based on this, the present invention proposes a method for judging the results of code commissioning, a code commissioning method and a device, and the present disclosure is described in detail below through specific embodiments.
[0039] To facilitate understanding of this embodiment, a method for determining a code production result disclosed in an embodiment of the present disclosure is first introduced in detail. The execution subject of the method for determining a code production result provided in an embodiment of the present disclosure is generally a computer device with a certain computing capability, and the computer device includes, for example: a terminal device or a server or other processing device, and the terminal device may be a user equipment (UE), a mobile device, a user terminal, a terminal, etc. In some possible implementations, the method for determining a code production result may be implemented by a processor calling a computer-readable instruction stored in a memory.
[0040] Figure 1 The flowchart of the method for judging the code production result provided by the embodiment of the present disclosure is shown. Figure 1 It can be seen that the embodiment of the present disclosure at least includes steps S101-S104:
[0041] S101: After the target code is deployed on the target server, a set of indicator values of multiple indicators of the target server is calculated using the service processing data sequence, request and error data sequence, and server load data sequence of the target server. The multiple indicators include request error rate, request rate, latency, and server saturation.
[0042] In this embodiment, the target code is a newly developed, modified, or computer program code that needs to be focused on its performance and effect. For example, in the field of banking and finance, the target code can be a code for verifying user identity, checking whether the account balance is sufficient, calculating transfer fees, updating transaction records, and interacting with relevant databases to complete fund transfers.
[0043] The elements in the service processing data sequence are composed of the start time and end time of processing each request within a certain time period. The request and error data sequence includes a sequence of the number of requests processed by the server per second, a sequence whose elements are the number of errors caused by the client at the current time point, the number of errors caused by the server, the total number of requests received by the server, etc. The elements in the server load data sequence can be composed of the memory load, CPU load, disk IO load, network IO load, etc. at a certain moment. During implementation, the service processing data sequence, request and error data sequence, and server load data sequence can be obtained through logs, network monitoring tools, operating system monitoring tools, etc. The embodiment of the present disclosure does not limit the method for obtaining each sequence.
[0044] The request error rate is the ratio of the number of system errors to the total number of requests. Here, system errors include client errors and server errors, that is, the request error rate Y1 = (Ec + Es) / N (req), N (req) represents the total number of requests, Ec represents the number of client errors, and Es represents the number of server errors. Among them, the codes and explanations of common client errors are shown in Table 1 below, and the codes and explanations of common server errors are shown in Table 2 below. During implementation, other server and client error codes can also be customized.
[0045] Table 1
[0046]
[0047] Table 2
[0048]
[0049] The request rate is a reflection of the target system's requirements. Assume that the total number of requests received within a certain period of time is N(req) and the time length is t seconds, then the request rate Y2 = N(req) / t.
[0050] Delay refers to the time interval in a system from the moment a user or other system initiates an operation request to the moment the system completes the request and returns a response result. Here, the delay can be calculated by: average delay, maximum delay, minimum delay, percentile delay, weighted average delay, etc. This embodiment does not limit the calculation method of the delay.
[0051] Server saturation is used to measure the resource utilization of the target server. This indicator reflects the status and load condition of the service resources. Among them, resources include but are not limited to: memory, CPU, network I / O, etc. Specifically, server saturation Y4=∑biki, where bi represents the load of the i-th resource, and ki represents the weight of the i-th resource. Exemplarily, Y4=b1k1+b2k2+b3k3+b4k4, b1 represents CPU load, k1 represents CPU load weight, b2 represents memory load, k2 represents memory load weight, b3 represents disk I / O load, k3 represents disk load weight, b4 represents network I / O load, and k4 represents network load weight. The weight of resources can be set according to actual needs, which is not limited in this disclosure. For example, k1, k2, k3, and k4 can all be set to 25%.
[0052] During implementation, the service processing data sequence, the request and error data sequence, and the server load data sequence can be used to calculate the index value sets corresponding to the request error rate, the request rate, the delay, and the server saturation. Exemplarily, for the request error rate, the total number of requests, the number of client errors, and the number of server errors corresponding to each element in the request and error data sequence can be substituted into the formula Y1=(Ec+Es) / N(req) to obtain multiple request error rates, and the multiple request error rates constitute the index value set corresponding to the request error rate.
[0053] S102: For any first target indicator, target deviation data is calculated based on a first target indicator value set corresponding to the first target indicator and a preset target indicator normal probability.
[0054] Here, the preset normal probability of the target indicator indicates the proportion of the indicator value of the first target indicator that can be observed to be within the normal range under ideal conditions. During implementation, the normal probability of the target indicator corresponding to the first target indicator can be set according to actual conditions or needs. The target deviation data is used to measure the relative deviation between the actual indicator value of the target indicator and the expected indicator value.
[0055] S103: Determine an acceptable interval centered on preset target historical deviation data.
[0056] In this step, the preset target historical deviation data is used to reflect the historical overall level of the target deviation data. During implementation, the target historical deviation data and the corresponding acceptable range can be set according to actual needs, which is not limited in this embodiment.
[0057] S104: If all the target deviation data are within the corresponding acceptable range, then the production result judgment conclusion is determined to be that the target code is successfully put into production; otherwise, the production result judgment conclusion is determined to be that the target code fails to be put into production.
[0058] from Figure 1 It can be seen from the method shown that after the target code is deployed on the target server, the disclosed embodiment can automatically obtain the service processing data sequence, request and error data sequence, and server load data sequence of the target server, and use these data to calculate the indicator value set of multiple indicators of the current target server; for each indicator, the corresponding indicator value set is used to calculate the target deviation data used to characterize the relative deviation degree between the actual performance and the expected performance of the target indicator, and the preset target historical deviation data is used as a benchmark to determine whether the target deviation data is within the acceptable range determined based on the target historical deviation data, and finally, according to the judgment result corresponding to each indicator, it is determined whether the target code is successfully put into production. It can be seen that the disclosed embodiment standardizes and automates the judgment process of the code production results, without manual intervention, greatly improves the judgment efficiency and accuracy of the production results, reduces labor costs, and fills the gap in the prior art in judging the production results.
[0059] Further, in order to better illustrate the process of the method for determining the result of the above code production, as a refinement and extension of the above embodiment, the embodiment of the present invention provides several optional embodiments, but is not limited thereto, which are specifically as follows:
[0060] In a possible implementation manner, the target deviation data is calculated using the following formula (1):
[0061]
[0062] Among them, Z represents the target deviation data, Y represents the average value of each element in the first target indicator value set, n represents the total number of elements in the first target indicator value set, and p represents the normal probability of the target indicator.
[0063] During implementation, the target deviation data may also be calculated according to the following formula (2) or (3):
[0064]
[0065] In a possible implementation manner, the target historical deviation data is determined according to the following method:
[0066] For any target historical code among a preset number of historical codes that have been successfully put into production before the target code, after the target historical code is deployed on the target server, the historical service processing data sequence, historical request and error data sequence, and historical server load data sequence of the target server are obtained; the historical indicator value set of multiple indicators of the target server is calculated using the historical service processing data sequence, the historical request and error data sequence, and the historical server load data sequence; for any indicator to be processed, the historical deviation data is calculated based on the indicator value set to be processed corresponding to the indicator to be processed and the preset normal probability of the indicator to be processed; based on each of the historical deviation data, the target historical deviation data reflecting the overall level of each of the historical deviation data is calculated.
[0067] Here, the number of historical codes can be set according to actual needs, and this embodiment does not limit this. For example, the preset number can be set to 5. This embodiment does not limit the selection method of historical codes. For example, the first 5 production codes that were successfully put into production before the target code can be selected as historical codes. It is also possible to randomly select 5 production codes from multiple historical codes that were successfully put into production before the target code as historical codes.
[0068] For any target historical code, after the target historical code is deployed on the target server, the historical service processing data sequence, historical request and error data sequence, and historical server load data sequence of the target server can be obtained; and based on these sequences, the historical indicator value set of multiple indicators of the target server is calculated; for any indicator to be processed, the historical deviation data is calculated based on the corresponding indicator value set to be processed and the preset normal probability of the indicator to be processed. Here, the specific implementation method of calculating the historical deviation data is similar to the specific implementation method of calculating the target deviation data in the above steps S101-S102, and will not be repeated here.
[0069] After obtaining the historical deviation data of each historical code, the target historical deviation data can be calculated based on each historical deviation data. During implementation, the average value of each historical deviation data can be used as the target historical deviation data. The median of each historical deviation data can also be taken as the target historical deviation data. When the target historical deviation data is the average value of each historical deviation data, the acceptable interval centered on the preset target historical deviation data can be [target historical deviation data-kσ, target historical deviation data+kσ], where k can be set according to actual needs and σ is the standard deviation of each historical deviation data.
[0070] The method for determining the target historical deviation data proposed in this embodiment makes the calculated target historical deviation data more accurate, objective and adaptable. Specifically, the method proposed in this embodiment does not rely on people's subjective experience and judgment, but is obtained through statistical analysis of actual historical data, which can more accurately reflect the actual situation of the production process, and therefore has objectivity and higher accuracy. The production process is dynamically changing, and the target historical deviation data calculated by this method can be continuously adjusted as the production process changes, so it can better adapt to different production conditions and environments and has adaptability.
[0071] In one possible implementation, if it is determined that the production result judgment conclusion is that the target code has been successfully put into production, the method also includes: obtaining a set of historical code production results, and after the target code is deployed on the target server, obtaining a set of second target indicator values corresponding to any second target indicator; using the set of historical code production results and the preset target code production results as features, and using each element in the second target indicator value set as a label, constructing a multivariate linear regression model; wherein the multivariate linear regression model reflects the relationship between the target code production result and the historical code production result, and the second target indicator, and the preset target code production result is a successful production; performing a validity test on the multivariate linear regression model by at least one of residual analysis, significance test, and correlation test to obtain at least one sub-test result; and obtaining a final test result based on each of the sub-test results; and updating the production result judgment conclusion based on the final test results corresponding to each of the second target indicators.
[0072] In this embodiment, the historical code production result set includes one or more historical code production results Xi, and the value of Xi is 0 or 1. If the i-th historical code is successfully produced, Xi=1; otherwise Xi=0. During implementation, for example, the results of each historical code production can be extracted from the project management system or database to which the historical code belongs; the corresponding code production results can also be obtained from the log files of each historical code deployment and release. The generation method of the second target indicator value set is similar to the generation method of the indicator value set in the aforementioned step S101, and will not be repeated here.
[0073] Then, a multivariate linear regression model is constructed with the historical code production result set and the preset target code production result as features, and each element in the second target indicator value set as a label. For the samples used to build the model, for example, if there are 4 historical codes and the second target indicator is the request error rate, the features of a sample used to build the multivariate linear regression model can be (0, 1, 1, 0, 1), and the label can be 1%. The multivariate linear regression model is expressed as: Yk=b0+b1X1+b2X2+...+biXi+epsilon, where Yk represents the second target indicator, k=1,2,3,4, representing the above 4 indicators, bi is the unknown coefficient in the model, and epsilon is the residual. During specific training, the initial variables b0, b1, b2,..., bi can be randomized first to obtain represents the initialization value of b0, represents the initialization value of b1, represents the initialization value of bi. Then, the gradient of Yk under each variable is calculated according to the following formula (4): Here, t represents the number of iterations.
[0074]
[0075] Next, update the values of each variable along the negative gradient direction according to the following formula (5):
[0076]
[0077] Among them, j = 1, 2, ..., n, α is the learning rate, and during implementation, α can be taken as 0.05.
[0078] When the iteration stop condition is met, the update of each coefficient is terminated to obtain the final multiple linear regression model that can reflect the relationship between the target code production results and the historical code production results and the second target indicator. This embodiment does not limit the iteration stop condition and can be set according to actual needs. For example, a maximum number of iterations can be preset, such as 10 million times. When the number of iterations reaches the maximum number of iterations, the iteration is stopped. The change of the function value in two adjacent iterations can also be calculated. If the change is less than a preset threshold, such as 10e-8, it is considered that the algorithm has converged and the algorithm iteration is stopped. The difference between the modulus of the gradient and 0 can also be judged. If the difference is less than the preset threshold, it means that the rate of change of the function at the current point is very small, and the algorithm iteration is stopped.
[0079] Next, the validity of the multivariate linear regression model is tested by at least one of residual analysis, significance test, and correlation test to obtain at least one sub-test result. When all sub-test results pass the test, the final test result is determined to be passed; otherwise, the final test result is determined to be failed. Finally, if the final test result is failed, the production result judgment conclusion is determined as the failure of the target code production; otherwise, the production result judgment conclusion is determined as the success of the target code production. During implementation, the validity test method of the multivariate linear regression model can also be multicollinearity test, prediction effect test, stability test, etc.
[0080] In a possible implementation of the present disclosure, the validity of the multivariate linear regression model is tested through residual analysis to obtain sub-test results, including: taking the historical code production result set and the preset target code production result as features, and taking the difference between each element in the second target indicator value set and the corresponding prediction indicator value as a label, to construct a residual regression model corresponding to the multivariate linear regression model; constructing a first null hypothesis and a first alternative hypothesis; the first null hypothesis is that the coefficients of the independent variables in the residual regression model are all 0, and the first alternative hypothesis is that at least one of the coefficients of the independent variables in the residual regression model is not 0; based on the second target indicator value set, calculating the BP test statistic; if the BP test statistic is greater than the critical value determined according to the first preset significance level, determining the sub-test result as failed; otherwise, determining the sub-test result as passed.
[0081] In this embodiment, the expression of the residual regression model is: ut^2=a0+a1X1+a2X2+...aiXi+epsilonT, where ut^2=epsilon, and epsilonT is the residual of the residual regression model. In order to perform residual analysis on the multivariate linear regression model, a residual regression model can be constructed first. The fitting process of the residual regression model in this embodiment is similar to the fitting process of the aforementioned multivariate linear regression model, and will not be repeated here.
[0082] Reconstruct the first null hypothesis and the first alternative hypothesis; calculate the BP test statistic based on the second target indicator value set. Specifically, the BP test statistic can be calculated according to the following formula (6):
[0083] BP=nR 2 / 2(6)
[0084] Where n is the total number of elements in the second target indicator value set, R2=ESS / TSS, and the calculation formulas of ESS and TSS are shown in the following formulas (7) and (8), respectively:
[0085]
[0086] in, Represents the average value of each element in the second target indicator value set, y i represents the i-th index value in the second target index value set, Represents the predicted value corresponding to the i-th indicator value in the second target indicator value set.
[0087] The first preset significance level can be set according to actual needs, for example, it can be set to 0.05, and then according to the first preset significance level, i-1, the critical value 1 is found from the chi-square distribution table. Finally, the BP test statistic can be compared with the critical value 1. If the BP test statistic is greater than the critical value 1, the first null hypothesis is rejected, it is believed that heteroscedasticity exists, and this production has a significant impact on the performance of the second target indicator, and the sub-test result is determined to be failed; if the BP test statistic is less than or equal to the critical value 1, the first null hypothesis is not rejected, it is believed that heteroscedasticity does not exist, and the sub-test result is determined to be passed.
[0088] In one possible implementation, the validity of the multivariate linear regression model is tested through a significance test to obtain a sub-test result, including: constructing a second null hypothesis and a second alternative hypothesis; the second null hypothesis is that the coefficient to be tested corresponding to the target code production result in the multivariate linear regression model is 0, and the second alternative hypothesis is that the coefficient to be tested is not 0; based on the second target indicator value set, a t-test statistic is calculated; if the absolute value of the t-test statistic is greater than a critical value determined according to a second preset significance level, the sub-test result is determined to be failed; otherwise, the sub-test result is determined to be passed.
[0089] This embodiment performs a significance test on the coefficients to be tested corresponding to the target code production results in the multivariate linear regression model. Specifically, a second null hypothesis and a second alternative hypothesis are constructed, and a t-test statistic is calculated based on the second target indicator value set. In specific implementation, the t-test statistic can be calculated using the following formula (9):
[0090]
[0091] in, represents the estimated value of the coefficient to be tested, β 1,0 =0, is the standard error of the sample data used when fitting the multiple linear regression model.
[0092] The second preset significance level can be set according to actual needs, for example, it can be set to 0.05. The critical value 2 can be determined according to the second preset significance level, the degree of freedom i-1, and the t distribution table. If the absolute value of the t-test statistic is greater than the critical value 2, the second null hypothesis is rejected, and it is considered that the target code production result (this production) has a significant impact on the second target indicator at the selected significance level (for example, this production significantly increases the request error rate, or causes a significant increase in server saturation), and the sub-test result is determined to be failed; otherwise, the sub-test result is determined to be passed.
[0093] In one possible implementation, the validity of the multivariate linear regression model is tested through a correlation test to obtain a sub-test result, including: based on the second target indicator value set, calculating the correlation coefficient between the coefficient corresponding to the target code production result in the multivariate linear regression model and the coefficient corresponding to the adjacent historical code bidding result; if the absolute value of the correlation coefficient is greater than a preset linear relationship threshold, the sub-test result is determined to be failed; otherwise, the sub-test result is determined to be passed.
[0094] Here, the correlation coefficient between the coefficient corresponding to the target code production result and the coefficient corresponding to the adjacent historical code bidding result is calculated first, and then the relationship between the correlation coefficient and the preset linear relationship threshold is determined. The preset linear relationship threshold can be set according to actual needs. If the correlation coefficient is greater than the preset linear relationship threshold, it means that the correlation coefficient shows a strong linear relationship, and it can be inferred that there is a strong correlation between this production and a certain historical production, and the variables in the multivariate linear regression model are independent of each other, which indicates that there are certain problems in the multivariate linear regression model. At this time, the sub-test result is determined to be failed; if the correlation coefficient is less than or equal to the preset linear relationship threshold, the sub-test result is determined to be passed.
[0095] This embodiment first makes a preliminary judgment on the results of this production based on the target deviation data and the target historical deviation data, and then fits a multivariate linear regression model that reflects the relationship between the results of this production and the historical production results and the various indicators. This model can mine the potential complex relationship patterns between the indicators and the results of each production. By testing the effectiveness of the multivariate linear regression model and judging whether the multivariate linear regression model will reduce certain effectiveness and credibility due to the existence of this production based on the test results, the correctness of the preliminary judgment can be further verified, thereby significantly improving the accuracy of the judgment results and reducing the risk of misjudgment.
[0096] The present disclosure also provides a method for determining a code production result, comprising the following steps:
[0097] Step S1: After the target code is deployed on the target server, the target server's service processing data sequence, request and error data sequence, and server load data sequence are used to calculate the target server's request error rate, request rate, delay, and server saturation corresponding to the indicator value set.
[0098] Step S2: For any first target indicator, the target deviation data is calculated based on the first target indicator value set corresponding to the first target indicator and the preset target indicator normal probability. Specifically, the target deviation data is calculated using the above formula (1).
[0099] Step S3: Determine an acceptable interval centered on the preset target historical deviation data. Specifically, the target historical deviation data is determined according to the following method: for any target historical code among the five historical codes that have been successfully put into production before the target code, after the target historical code is deployed on the target server, obtain the historical service processing data sequence, historical request and error data sequence, and historical server load data sequence of the target server; use the historical service processing data sequence, historical request and error data sequence, and historical server load data sequence to calculate the historical indicator value set of multiple indicators of the target server; for any indicator to be processed, calculate the historical deviation data according to the indicator value set to be processed corresponding to the indicator to be processed and the preset normal probability of the indicator to be processed; and use the average value of each historical deviation data as the target historical deviation data.
[0100] Step S4: If all target deviation data are within the corresponding acceptable range, the production result judgment conclusion is determined to be that the target code is successfully put into production, and go to step S5; otherwise, the production result judgment conclusion is determined to be that the target code fails to be put into production.
[0101] Step S5: Obtain a historical code production result set, and after the target code is deployed on the target server, obtain a second target indicator value set corresponding to any second target indicator.
[0102] Step S6: Using the historical code production result set and the preset target code production result as features and each element in the second target indicator value set as a label, a multivariate linear regression model is constructed.
[0103] Step S7: Using the historical code production result set and the preset target code production result as features, and using the difference between each element in the second target indicator value set and the corresponding predicted indicator value as a label, construct a residual regression model corresponding to the multivariate linear regression model.
[0104] Step S8: Construct the first null hypothesis and the first alternative hypothesis.
[0105] Step S9: Calculate the BP test statistic based on the second target indicator value set.
[0106] Step S10: If the BP test statistic is greater than the critical value determined according to the first preset significance level, the sub-test result is determined as failed; otherwise, the sub-test result is determined as passed.
[0107] Step S11: Construct the second null hypothesis and the second alternative hypothesis.
[0108] Step S12: Calculate the t-test statistic based on the second target indicator value set.
[0109] Step S13: If the absolute value of the t-test statistic is greater than the critical value determined according to the second preset significance level, the sub-test result is determined as failed; otherwise, the sub-test result is determined as passed.
[0110] Step S14: Based on the second target indicator value set, calculate the correlation coefficient between the coefficient corresponding to the target code production result in the multivariate linear regression model and the coefficient corresponding to the adjacent historical code bidding results.
[0111] Step S15: If the absolute value of the correlation coefficient is greater than the preset linear relationship threshold, the sub-test result is determined as failed; otherwise, the sub-test result is determined as passed.
[0112] Step S16: If all sub-test results are passed, the final test result is passed; otherwise, the final test result is failed.
[0113] Step S17: If the final inspection result of at least one indicator is failure to pass the inspection, the production result judgment conclusion is re-determined as the target code production failure.
[0114] Figure 2 The schematic diagram of the code production method provided by the embodiment of the present disclosure is shown. Figure 2 It can be seen that the embodiment of the present disclosure at least includes steps S201-S204:
[0115] Step S201: using a deployment instruction, allocating the traffic indicated by the traffic proportion increment data carried in the deployment instruction to a new deployment server; wherein, new code is deployed on the new deployment server.
[0116] Step S202: using any of the above-mentioned methods for determining the results of code production to determine whether this round of production is successful.
[0117] Step S203: If the current round of production fails, a rollback instruction is output; the rollback instruction is used to delete the new code on the newly deployed server and allocate all traffic to the old server.
[0118] Step S204: If this round of production is successful, return to the step of using the deployment instruction to allocate the traffic indicated by the traffic proportion incremental data carried in the deployment instruction to the newly deployed server until the current traffic allocated to the newly deployed server reaches 100%.
[0119] In this embodiment, the flow rate percentage incremental data can be selected from a pre-set flow rate percentage incremental set, and the sum of the elements in the flow rate percentage incremental set is 100%. It can also be input by the user through the terminal. This embodiment does not limit the method for obtaining the flow rate percentage incremental data.
[0120] Suppose that the traffic proportion increment set includes the following traffic proportion increment data: 10%, 15%, 25%, 25%, 25%. During implementation, you can first use the deployment instruction to allocate 10% of the traffic to the newly deployed server, and then use any of the aforementioned code production result judgment methods to determine whether this round of production is successful; if it is determined that this round of production fails, then output the rollback instruction; if it is determined that this round of production is successful, then output the deployment instruction again to allocate 15% of the traffic to the newly deployed server, and then use any of the aforementioned code production result judgment methods to determine whether this round of production is successful; if it is determined that this round of production fails, then output the rollback instruction; if it is determined that this round of production is successful, then output the deployment instruction again to allocate 25% of the traffic to the newly deployed server, and then use any of the aforementioned code production result judgment methods to determine whether this round of production is successful. Whether the production is successful, if it is judged that this round of production has failed, a rollback instruction is output; if it is judged that this round of production is successful, a deployment instruction is output again, and 25% of the traffic is allocated to the newly deployed server, and then any of the aforementioned code production result judgment methods are used to judge whether the production is successful. If it is judged that this round of production has failed, a rollback instruction is output. If it is judged that this round of production is successful, a deployment instruction is output again, and 25% of the traffic is allocated to the newly deployed server, and then any of the aforementioned code production result judgment methods are used to judge whether the production is successful. If it is judged that this round of production has failed, a rollback instruction is output. Otherwise, the production is successful (the traffic allocated to the newly deployed system reaches 100% at this time).
[0121] This embodiment proposes a new type of automated production method, which realizes the gradual and controllable release of risks by gradually increasing the traffic allocated to the newly deployed server. During the advancement process, each step can accurately evaluate the performance of the new code according to standardized mathematical logic. If a round of production fails, the new code on the newly deployed server can be quickly deleted using the rollback instruction to ensure that the old server continues to run stably, ensure business continuity, control the scope of impact to a minimum, and ensure that the labor cost required for production is reduced to about 5%-10% of the original under the premise of high-reliability production quality, significantly increasing the production efficiency.
[0122] Those skilled in the art will appreciate that, in the above method of the specific implementation manner, the writing order of the steps does not mean a strict execution order, but does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.
[0123] It should be noted that, in practical applications, all possible implementations described above can be combined in any manner to form possible embodiments of the present disclosure, which will not be described one by one here.
[0124] Based on the same concept, the embodiment of the present disclosure also provides a device for determining the result of code production. Figure 3 A schematic diagram showing the structure of a device for determining the code production result provided by an embodiment of the present disclosure is shown. Figure 3 As shown, the device 300 for determining the code production result provided by the embodiment of the present disclosure includes:
[0125] The acquisition module 301 is used to calculate the indicator value set of multiple indicators of the target server by using the service processing data sequence, request and error data sequence, and server load data sequence of the target server obtained after the target code is deployed on the target server, and the multiple indicators include request error rate, request rate, delay, and server saturation;
[0126] A calculation module 302 is used to calculate target deviation data for any first target indicator according to a first target indicator value set corresponding to the first target indicator and a preset target indicator normal probability;
[0127] A determination module 303, for determining an acceptable interval centered around a preset target historical deviation data;
[0128] The judgment module 304 is used to determine that the production result judgment conclusion is that the target code is successfully put into production if all the target deviation data are within the corresponding acceptable range; otherwise, determine that the production result judgment conclusion is that the target code is unsuccessful in production.
[0129] In a possible implementation manner, in the above device, the target deviation data is calculated using the following formula:
[0130]
[0131] Among them, Z represents the target deviation data, Y represents the average value of each element in the first target indicator value set, n represents the total number of elements in the first target indicator value set, and p represents the normal probability of the target indicator.
[0132] In one possible implementation, the device also includes a historical deviation data determination module, which is used to: for any target historical code among a preset number of historical codes that have been successfully put into production before the target code, after the target historical code is deployed on the target server, obtain the historical service processing data sequence, historical request and error data sequence, and historical server load data sequence of the target server; use the historical service processing data sequence, the historical request and error data sequence, and the historical server load data sequence to calculate a set of historical indicator values of multiple indicators of the target server; for any indicator to be processed, calculate the historical deviation data according to the set of indicator values to be processed corresponding to the indicator to be processed and the preset normal probability of the indicator to be processed; based on each of the historical deviation data, calculate the target historical deviation data reflecting the overall level of each of the historical deviation data.
[0133] In one possible implementation, if it is determined that the production result judgment conclusion is that the target code has been successfully put into production, the above-mentioned device also includes a re-judgment module, which is used to: obtain a set of historical code production results, and after the target code is deployed on the target server, obtain a set of second target indicator values corresponding to any second target indicator; using the set of historical code production results and the preset target code production results as features, and using each element in the second target indicator value set as a label, to construct a multivariate linear regression model; wherein the multivariate linear regression model reflects the relationship between the target code production result and the historical code production result, and the second target indicator, and the preset target code production result is a successful production; the multivariate linear regression model is tested for validity by at least one of residual analysis, significance test, and correlation test to obtain at least one sub-test result; and based on each of the sub-test results, a final test result is obtained; based on the final test results corresponding to each of the second target indicators, the production result judgment conclusion is updated.
[0134] In a possible implementation, in the above-mentioned device, the re-judgment module is used to: construct a residual regression model corresponding to the multivariate linear regression model with the historical code production result set and the preset target code production result as features, and with the difference between each element in the second target indicator value set and the corresponding prediction indicator value as a label; construct a first null hypothesis and a first alternative hypothesis; the first null hypothesis is that the coefficients of the independent variables in the residual regression model are all 0, and the first alternative hypothesis is that at least one of the coefficients of the independent variables in the residual regression model is not 0; based on the second target indicator value set, calculate the BP test statistic; if the BP test statistic is greater than the critical value determined according to the first preset significance level, determine the sub-test result as failed; otherwise, determine the sub-test result as passed.
[0135] In a possible implementation, in the above-mentioned device, the re-judgment module is used to: construct a second null hypothesis and a second alternative hypothesis; the second null hypothesis is that the coefficient to be tested corresponding to the target code production result in the multivariate linear regression model is 0, and the second alternative hypothesis is that the coefficient to be tested is not 0; based on the second target indicator value set, calculate the t-test statistic; if the absolute value of the t-test statistic is greater than the critical value determined according to the second preset significance level, determine the sub-test result as failed; otherwise, determine the sub-test result as passed.
[0136] In a possible implementation, in the above-mentioned device, the re-judgment module is used to: calculate the correlation coefficient between the coefficient corresponding to the target code production result in the multivariate linear regression model and the coefficient corresponding to the adjacent historical code bidding result based on the second target indicator value set; if the absolute value of the correlation coefficient is greater than a preset linear relationship threshold, the sub-inspection result is determined to be failed; otherwise, the sub-inspection result is determined to be passed.
[0137] It should be noted that any of the above-mentioned devices for determining the results of code production can implement the above-mentioned methods for determining the results of code production in a one-to-one correspondence manner, which will not be repeated here.
[0138] Based on the same concept, the embodiment of the present disclosure also provides a code production device. Figure 4 The schematic diagram of the structure of the code production device provided by the embodiment of the present disclosure is shown in FIG. Figure 4 As shown, the code production device 400 provided in the embodiment of the present disclosure includes:
[0139] The allocation module 401 is used to allocate the traffic indicated by the traffic proportion increment data carried in the deployment instruction to the new deployment server using the deployment instruction; wherein the new deployment server has new code deployed on it;
[0140] A judgment module 402 is used to judge whether the current round of production is successful by using any of the above-mentioned methods for judging the results of the code production;
[0141] The production and rollback module 403 is used to output a rollback instruction if the current round of production fails; the rollback instruction is used to delete the new code on the newly deployed server and allocate all traffic to the old server; if the current round of production is successful, it returns to the step of using the deployment instruction to allocate the traffic indicated by the traffic proportion incremental data carried in the deployment instruction to the newly deployed server until the current traffic allocated to the newly deployed server reaches 100%.
[0142] Figure 5 FIG. 1 shows a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Figure 5As shown, at the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and a memory. Among them, the memory may include a memory, such as a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk storage, etc. Of course, the electronic device may also include hardware required for other services.
[0143] The processor, network interface and memory can be interconnected through an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0144] The memory is used to store programs. Specifically, the program may include program code, and the program code includes computer operation instructions. The memory may include internal memory and non-volatile memory, and provides instructions and data to the processor.
[0145] The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, forming a judgment device or a code production device for the code production result at the logical level. The processor executes the program stored in the memory and is specifically used to execute the above method.
[0146] The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software. The above processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The disclosed methods, steps and logic block diagrams in the embodiments of the present disclosure may be implemented or executed. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present disclosure may be directly embodied as being executed by a hardware decoding processor, or may be executed by a combination of hardware and software modules in a decoding processor. The software module may be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
[0147] The electronic device can execute the code production result judgment method provided by the multiple embodiments of the present disclosure, and realize the code production result judgment device in Figure 3 The functions of the embodiments shown in the figure, or the code production methods provided by the embodiments of the present disclosure are executed, and the code production device is implemented in Figure 4 The functions of the illustrated embodiments will not be described in detail in the embodiments of the present disclosure.
[0148] The embodiments of the present disclosure also provide a computer-readable storage medium, which stores one or more programs, and the one or more programs include instructions. When the instructions are executed by an electronic device including multiple application programs, the electronic device can execute the code production result judgment method or code production method provided by multiple embodiments of the present disclosure.
[0149] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, systems, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0150] The present disclosure is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present disclosure. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0151] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0152] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0153] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0154] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0155] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape, disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0156] The embodiments of the present disclosure also provide a computer program product, which carries a program code. The instructions included in the program code can be used to execute the method for determining the code production result or the steps of the code production method described in the above method embodiment. For details, please refer to the above method embodiment, which will not be repeated here.
[0157] The computer program product may be implemented in hardware, software or a combination thereof. In one optional embodiment, the computer program product is implemented as a computer storage medium. In another optional embodiment, the computer program product is implemented as a software product, such as a software development kit (SDK).
[0158] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity or device including the element.
[0159] It will be appreciated by those skilled in the art that the embodiments of the present disclosure may be provided as methods, systems or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0160] The above are only embodiments of the present disclosure and are not intended to limit the present disclosure. For those skilled in the art, the present disclosure may have various modifications and variations. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present disclosure shall be included in the scope of the claims of the present disclosure.
Claims
1. A method for determining a code production result, characterized in that: The method comprises: After the target code is deployed on the target server, using the service processing data sequence, request and error data sequence, and server load data sequence of the target server obtained, a set of indicator values of multiple indicators of the target server is calculated, wherein the multiple indicators include request error rate, request rate, delay, and server saturation; For any first target indicator, the target deviation data is calculated according to the first target indicator value set corresponding to the first target indicator and the preset target indicator normal probability; Determine the acceptable range centered around the preset target historical deviation data; If all the target deviation data are within the corresponding acceptable range, the production result judgment conclusion is determined to be that the target code is successfully put into production; otherwise, the production result judgment conclusion is determined to be that the target code fails to be put into production.
2. The method according to claim 1, characterized in that The target deviation data is calculated using the following formula: Among them, Z represents the target deviation data, Y represents the average value of each element in the first target indicator value set, n represents the total number of elements in the first target indicator value set, and p represents the normal probability of the target indicator.
3. The method according to claim 1, characterized in that The target historical deviation data is determined according to the following method: For any target historical code among a preset number of historical codes that have been successfully put into production before the target code, after the target historical code is deployed on the target server, a historical service processing data sequence, a historical request and error data sequence, and a historical server load data sequence of the target server are obtained; Calculate a set of historical indicator values of multiple indicators of the target server by using the historical service processing data sequence, the historical request and error data sequence, and the historical server load data sequence; For any indicator to be processed, historical deviation data is calculated based on the indicator value set to be processed corresponding to the indicator to be processed and the preset normal probability of the indicator to be processed; Based on the historical deviation data, target historical deviation data reflecting the overall level of the historical deviation data is calculated.
4. The method according to any one of claims 1 to 3, characterized in that: If it is determined that the production result is that the target code is successfully produced, the method further includes: Obtaining a historical code production result set, and after the target code is deployed on the target server, obtaining a second target indicator value set corresponding to any second target indicator; A multivariate linear regression model is constructed with the historical code production result set and the preset target code production result as features and each element in the second target indicator value set as a label; wherein the multivariate linear regression model reflects the relationship between the target code production result and the historical code production result and the second target indicator, and the preset target code production result is a successful production; Performing validity test on the multivariate linear regression model by at least one of residual analysis, significance test and correlation test to obtain at least one sub-test result; and obtaining a final test result according to each of the sub-test results; Based on the final inspection results corresponding to each of the second target indicators, the production result judgment conclusion is updated.
5. A code production method, characterized in that: The method comprises: Using the deployment instruction, the traffic indicated by the traffic proportion increment data carried in the deployment instruction is allocated to the new deployment server; wherein the new deployment server has new code deployed on it; Adopting the method for judging the code production result according to any one of claims 1 to 4 to judge whether the current round of production is successful; If the current round of production fails, a rollback instruction is output; the rollback instruction is used to delete the new code on the newly deployed server and allocate all traffic to the old server; If this round of production is successful, return to the step of using the deployment instruction to allocate the traffic indicated by the traffic proportion incremental data carried in the deployment instruction to the newly deployed server until the current traffic allocated to the newly deployed server reaches 100%.
6. A device for determining the result of code production, characterized in that: The device comprises: an acquisition module, configured to calculate a set of indicator values of multiple indicators of the target server by using the service processing data sequence, request and error data sequence, and server load data sequence of the target server acquired after the target code is deployed on the target server, wherein the multiple indicators include request error rate, request rate, delay, and server saturation; A calculation module, configured to calculate, for any first target indicator, target deviation data according to a first target indicator value set corresponding to the first target indicator and a preset target indicator normal probability; A determination module, used for determining an acceptable interval centered on preset target historical deviation data; The judgment module is used to determine that the production result judgment conclusion is that the target code is successfully put into production if all the target deviation data are within the corresponding acceptable range; otherwise, determine that the production result judgment conclusion is that the target code is unsuccessful in production.
7. A code production device, characterized in that: The device comprises: An allocation module, configured to allocate the traffic indicated by the traffic proportion increment data carried in the deployment instruction to a new deployment server using the deployment instruction; wherein the new deployment server has new code deployed thereon; A judgment module, used to use the code production result judgment method described in any one of claims 1 to 4 to judge whether the current round of production is successful; The production and rollback module is used to output a rollback instruction if the current round of production fails; the rollback instruction is used to delete the new code on the newly deployed server and allocate all traffic to the old server; if the current round of production is successful, it returns to the step of using the deployment instruction to allocate the traffic indicated by the traffic proportion incremental data carried in the deployment instruction to the newly deployed server, until the current traffic allocated to the newly deployed server reaches 100%.
8. An electronic device, comprising: processor; as well as A memory arranged to store computer executable instructions, characterized in that when the executable instructions are executed, the processor performs the steps of the method according to any one of claims 1 to 4 or the method according to claim 5.
9. A computer-readable storage medium storing one or more programs, characterized in that: When the one or more programs are executed by an electronic device including a plurality of application programs, the electronic device executes the steps of the method according to any one of claims 1 to 4 or the method according to claim 5.
10. A computer program product, characterized in that The computer program product carries a program code, and the program code includes instructions that can be used to execute the method according to any one of claims 1 to 4 or the steps of the method according to claim 5.