A code release strategy optimization method based on risk assessment

By building a code release platform, pre-risk optimization and data mining, establishing a risk assessment model, generating and executing a code release strategy, selecting a post-risk optimization strategy, solving the problem of inaccurate risk assessment during the code release process, and realizing the entire process Improved risk management and risk prediction accuracy.

CN118228277BActive Publication Date: 2024-11-22天创信用服务有限公司
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202410443255.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-12
Publication Date
2024-11-22
Estimated Expiration
2044-04-12

AI Technical Summary

Technical Problem

The existing technology is difficult to accurately assess the code release process, resulting in a high probability of risk events and a lack of an effective risk management mechanism.

Method used

By building a code publishing platform, pre-risk optimization, data collection, data mining and risk assessment models are established, code publishing strategies are generated, and whether to implement the strategy is determined based on the results of the interim risk assessment, and post-risk optimization strategies are selected to reduce risks.

Benefits of technology

The full-process risk assessment and supervision of the code release process is realized, which reduces risk risks and improves the accuracy of risk prediction through model tuning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118228277B_ABST
    Figure CN118228277B_ABST
Patent Text Reader

Abstract

The invention discloses a code release strategy optimization method based on risk assessment, which relates to the technical field of code release optimization. A code release platform is constructed, and pre-risk optimization is performed on the code release platform. Code development related data is collected through the code release platform that has completed pre-risk optimization, thereby generating a code data set; data mining is performed on the code data set, risk modeling data is obtained through data mining, a risk assessment model is established according to the risk modeling data, and model tuning is performed on the risk assessment model; the code to be released is imported into the code release platform, and the code release platform generates a corresponding code release strategy after review and analysis, a mid-term risk assessment is performed on the code release strategy, and whether to execute the code release strategy is determined according to the result of the mid-term risk assessment; and different post-optimization strategies are selected according to the execution of the code release strategy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of code release optimization, and in particular to a code release strategy optimization method based on risk assessment. Background Art

[0002] Risk assessment refers to the work of quantitatively evaluating the impact and possibility of loss caused by the event on people's lives, lives, property, etc. before or after the risk event occurs (but not yet over). That is, risk assessment is to quantitatively evaluate the possible degree of impact or loss caused by an event or thing. From the perspective of information security, risk assessment is an assessment of the threats faced by information assets, the weaknesses that exist, the impacts caused, and the possibility of risks brought about by the combined effect of the three.

[0003] With the continuous development and iteration of the Internet, various application software have emerged. The underlying layer of the application software is programmed code. Therefore, major Internet companies attach great importance to the uploading and release of code. How to conduct risk assessment of the entire code release process, so as to optimize the code release strategy and minimize the risks brought by code release, this is an issue that we urgently need to consider. Summary of the invention

[0004] In order to solve the above problems, the purpose of the present invention is to provide a code release strategy optimization method based on risk assessment, so as to solve the problem that it is difficult to accurately assess the risk of the entire process of code release in the prior art and minimize the probability of risk events.

[0005] The purpose of the present invention can be achieved by the following technical solution: A code release strategy optimization method based on risk assessment, comprising the following steps:

[0006] Step S1: Build a code release platform and perform pre-risk optimization on the code release platform, collect code development related data through the pre-risk optimized code release platform, and then generate a code data set;

[0007] Step S2: performing data mining on the code data set, obtaining risk modeling data through data mining, establishing a risk assessment model based on the risk modeling data, and performing model tuning on the risk assessment model;

[0008] Step S3: Import the code to be released into the code release platform, which will generate a corresponding code release strategy after review and analysis, conduct a mid-term risk assessment on the code release strategy, and decide whether to execute the code release strategy based on the results of the mid-term risk assessment;

[0009] Step S4: Select different post-optimization strategies according to the execution status of the code release strategy.

[0010] Furthermore, the process of building a code release platform and optimizing pre-risks includes:

[0011] Select a code editing tool and a code architecture template, program a platform script file and a platform building configuration code through the code editing tool, import the programmed platform building configuration code into the platform script file, and then convert the platform script file into a platform architecture file. The platform architecture file includes a number of architecture file vocabularies, and the architecture file vocabularies are used to represent the architecture elements required for the current platform architecture. Set a matching period, and match the architecture file vocabularies in the platform architecture file with the code architecture template within the matching period;

[0012] The initial platform framework is obtained through matching operations, and the communication protocol and configuration server link are associated with the initial platform framework to generate the corresponding code release platform. The pre-risk optimization of the code release platform includes disaster recovery optimization and gray release control.

[0013] Furthermore, the process of collecting code development related data through the code publishing platform and then generating a code data set includes:

[0014] Set the data collection period, denoted as T 采集 , T 采集 =[T1, T2], where T1 is the start time of the data collection period, and T2 is the end time of the data collection period. At T1, a data collection instruction is generated. After the code release platform completes the pre-risk optimization, the code release platform obtains the data collection instruction within the data collection period. When the data collection instruction is obtained, the collection control program set for the code release platform is accessed synchronously;

[0015] The acquisition control program is used to obtain the acquisition speed of the code release platform when collecting code development related data, which is recorded as V, and preset a reasonable speed interval, which is recorded as Ω, to determine the subordinate relationship between V and Ω, and then decide whether to control the acquisition speed;

[0016] When V∈Ω, the acquisition speed is not controlled;

[0017] when When the acquisition speed is controlled;

[0018] The code-related data includes code change history, bug feedback data, and code test results. At the corresponding time T2, a code data set is generated based on the code-related data encapsulation, and the code data set is digitally signed.

[0019] Furthermore, data mining is performed on the code data set to obtain risk modeling data through data mining. The process of establishing a risk assessment model based on the risk modeling data includes:

[0020] Before data mining, determine whether the digital signature corresponding to the code dataset has changed. If so, it means that the code dataset has been illegally tampered with by the outside world. Correct the illegally tampered content of the code dataset and repackage it. If not, directly perform data mining on the code dataset;

[0021] The code data set is unpacked to obtain the code change history, bug feedback data and code test results. The risk modeling data is obtained through data mining. The risk modeling data includes one type of modeling data, two type of modeling data and three type of modeling data. A modeling program is set up. The modeling code corresponding to each type of risk modeling data is pre-entered in the modeling program. All the risk modeling data are imported into the modeling program. Data modeling is then performed according to the corresponding modeling codes in the modeling program, and corresponding sub-models are generated. The sub-models include sub-model one, sub-model two and sub-model three. Sub-model one, sub-model two and sub-model three are fused and spliced, and then a corresponding risk assessment model is established after the fusion and splicing are completed.

[0022] Furthermore, the process of model tuning for the risk assessment model includes:

[0023] The model tuning includes tuning measures 1 and 2, obtaining sample training data, and recording the sample data volume corresponding to the sample training data as D 样本 , input the sample training data into the risk assessment model for model training;

[0024] The tuning measure 1 is executed before model training. The content of the tuning measure 1 is: setting different model hyperparameters corresponding to the risk assessment model, forming different hyperparameter combinations according to different model hyperparameters, and judging whether the evaluation results of the risk assessment model under different hyperparameter combinations meet the expected results, and then selecting the hyperparameter combination that best meets the expected results;

[0025] The model training content is as follows: setting the number of training times of the risk assessment model, denoted as F; the sample training data includes different sample types; the sample training data is classified according to the sample type; each type of sample training data after classification is input into the risk assessment model, and then the risk assessment pass rate corresponding to each sample type is obtained, denoted as R; setting the qualified threshold and the upper limit of the number of training times, denoted as R respectively. 阈 and F 上限 , when R ≥ R 阈 When R < R 阈 When F≤F 上限 In the case of increasing the number of training times F and the amount of sample data D 样本, set the maximum training sample size and record it as D 最大 , to ensure that the increase in sample data volume meets the following conditions: D 样本 ≤D 最大 , until R ≥ R 阈 When , stop model training;

[0026] The second tuning measure is executed after model training. The content of the second tuning measure is: taking the risk assessment model after each sample type successfully completes the model training as a splicing object, performing model fusion on the splicing objects of all sample types, and then generating the final risk assessment model.

[0027] Furthermore, the code to be released is imported into the code release platform, and the code release platform reviews and analyzes the code and generates a corresponding code release strategy, which includes:

[0028] Set up a code library to store all the codes that need to be imported into the code release platform. During the set code transfer period, extract the codes that need to be released from the code library and import them into the code release platform. Connect the code release platform to the risk assessment model, and use the risk assessment model to review and analyze the codes that need to be released by the code release platform.

[0029] After the code release platform reviews and analyzes the code to be released through the risk assessment model, it generates several different types of code release strategies, including full code release, gradual code release, and code AB test release.

[0030] Furthermore, a mid-term risk assessment is conducted on the code release strategy. The process of deciding whether to execute the code release strategy based on the result of the mid-term risk assessment includes:

[0031] Obtain the release environment parameters corresponding to the full code release, gradual code release, and AB code test release, and perform respective mid-term risk assessments based on their respective release environment parameters. When the result of the mid-term risk assessment of each code release strategy is "qualified", the corresponding type of code release strategy is executed; when the result of the mid-term risk assessment of the code release strategy is "unqualified", the corresponding type of code release strategy is not executed.

[0032] Furthermore, the process of selecting different post-optimization strategies according to the execution status of the code release strategy includes:

[0033] The execution conditions of the code release strategy include normal execution, partial abnormal execution and complete abnormal execution. The execution condition of each code release strategy corresponds to a different code execution sequence, and different post-optimization strategies are set. The corresponding post-optimization strategy is selected according to different code execution sequences. The post-optimization strategy includes code monitoring strategy, code rollback strategy and code reconstruction strategy.

[0034] Compared with the prior art, the beneficial effects of the present invention are as follows: by constructing a code publishing platform, and firstly performing pre-risk optimization on the code publishing platform, the code publishing platform collects code development related data and generates a corresponding code data set, performs data mining on the code data set, obtains corresponding risk modeling data to establish a risk assessment model, and performs model tuning on the risk assessment model, the code to be released is imported into the code publishing platform, the code publishing platform generates a code publishing strategy, and performs a mid-term risk assessment, and different post-optimization strategies are selected according to the execution of the code publishing strategy, wherein the coordinated use of pre-risk optimization, mid-term risk assessment and post-optimization strategies realizes the full-process risk assessment and supervision of code release, reduces the risk hazards brought by code release to a certain extent, and performs model tuning on the risk assessment model effectively improves the prediction accuracy of risks. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 It is a flow chart of the present invention. DETAILED DESCRIPTION

[0036] like Figure 1 As shown, a code release strategy optimization method based on risk assessment includes the following steps:

[0037] Step S1: Build a code release platform and perform pre-risk optimization on the code release platform, collect code development related data through the pre-risk optimized code release platform, and then generate a code data set;

[0038] Step S2: performing data mining on the code data set, obtaining risk modeling data through data mining, establishing a risk assessment model based on the risk modeling data, and performing model tuning on the risk assessment model;

[0039] Step S3: Import the code to be released into the code release platform, which will generate a corresponding code release strategy after review and analysis, conduct a mid-term risk assessment on the code release strategy, and decide whether to execute the code release strategy based on the results of the mid-term risk assessment;

[0040] Step S4: Select different post-optimization strategies according to the execution status of the code release strategy.

[0041] It should be further explained that, in the specific implementation process, the process of building a code release platform and optimizing the pre-risk of the code release platform includes:

[0042] Select a code editing tool and a code architecture template, program a platform script file and a platform building configuration code through the code editing tool, the platform script file is initially an empty file, import the programmed platform building configuration code into the platform script file according to the set import speed, and then convert the empty platform script file into a platform architecture file;

[0043] The platform architecture file includes a plurality of architecture file vocabularies, and the architecture file vocabularies are used to represent the architecture elements required for the current platform architecture, and a matching period is set. During the matching period, the architecture file vocabularies in the platform architecture file are matched with the code architecture template;

[0044] The content of the matching operation is as follows: the code architecture template includes several platform architecture frameworks, each platform architecture framework is associated with a corresponding framework vocabulary, and the framework vocabulary is used as the unique identity of each platform architecture framework. The architecture file vocabulary and the framework vocabulary are converted into binary strings and recorded as Str1 and Str2 respectively. When all characters corresponding to Str1 and all characters corresponding to Str2 are compared in position and number, if the number and position are equal, Str1=Str2, and the platform architecture framework of the framework vocabulary corresponding to Str2 is used as the initial platform framework of the code release platform. If either the number or the position is not equal, the match fails;

[0045] Associating the communication protocol with the initial platform framework and configuring the server link for the initial platform framework, when the communication protocol and the server are ready, generating the corresponding code publishing platform;

[0046] The pre-risk optimization of the code release platform includes disaster recovery optimization and gray release control. The content of disaster recovery optimization is: establish several code disaster recovery areas, use any one as the main work area, and the others as backup work areas. The main work area will give priority to data storage of the code release platform. When data abnormalities occur in the main work area, start any backup work area for data storage;

[0047] The contents of grayscale release control are as follows: set a central release point, set several release distances of increasing size, and then form several code release areas with the central release point as the center and several release distances as the radius. Set the smallest code release area as the grayscale area, and set other code release areas as prohibited areas. When it is a grayscale area, release and test the code in the grayscale area. If the test is successful, continue to open the next code release area that is a prohibited area as a grayscale area, and continue to release and test the code. Repeat the above operations until all code release areas are converted to grayscale areas and are in a state of successful testing, which means that the grayscale release control is completed. When the test fails in the grayscale area, locate the abnormal code, repair the abnormal code, and continue to release and test after repair until the test is successful.

[0048] It should be further explained that, in the specific implementation process, the process of collecting code development related data through the code release platform that has completed the pre-risk optimization and then generating the code data set includes:

[0049] Set the data collection period, denoted as T 采集 , there is T 采集 =[T1, T2], where T1 is the start time of the data collection period, T2 is the end time of the data collection period, and at T1, a data collection instruction is generated;

[0050] After the code release platform completes the pre-risk optimization, the code release platform obtains the data collection instruction during the data collection period, and when the data collection instruction is obtained, the collection control program set for the code release platform is accessed synchronously;

[0051] The acquisition control program is used to obtain the acquisition speed of the code release platform when collecting code development related data, record the acquisition speed as V, and preset a reasonable speed interval, record the reasonable speed interval as Ω, judge the subordinate relationship between V and Ω, and then decide whether to control the acquisition speed;

[0052] When V∈Ω, the acquisition speed is not controlled;

[0053] when There are two situations: when V is less than the minimum value of the reasonable speed interval Ω, increase the acquisition speed V until V is greater than or equal to the minimum value of Ω; when V is greater than the maximum value of the reasonable speed interval Ω, reduce the acquisition speed V until V is less than or equal to the maximum value of Ω;

[0054] The code-related data includes code change history, bug feedback data, and code test results. At the corresponding time T2, a code data set is generated based on the code-related data encapsulation, and the code data set is digitally signed. The digital signature serves as an identifier to determine whether the code data set has been illegally tampered with by the outside world;

[0055] It should be further explained that, in the specific implementation process, data mining is performed on the code data set, risk modeling data is obtained through data mining, and the process of establishing a risk assessment model based on the risk modeling data includes:

[0056] Before data mining the code data set, determine whether the digital signature corresponding to the code data set has changed. If so, it means that the code data set has been illegally tampered with by the outside world. Correct the illegally tampered content of the code data set and repackage the code data set. If not, directly perform data mining on the code data set;

[0057] Decapsulate the code data set to obtain the code change history, bug feedback data, and code test results, and obtain risk modeling data through data mining. The risk modeling data includes first-class modeling data, second-class modeling data, and third-class modeling data. The change content with the highest proportion of code change history in the code data set is taken as first-class modeling data. Similarly, the code snippet with the highest proportion of test failures in the code test results is taken as second-class modeling data.

[0058] Obtain bug feedback data, which includes bug feedback frequency, bug feedback content, and final bug resolution at several bug testing time nodes. Take each bug testing time node as a feedback item, and summarize all feedback items in descending order of bug feedback frequency to generate a bug feedback data table, which is used as the three types of modeling data.

[0059] A modeling program is set, in which a modeling code corresponding to each type of risk modeling data is pre-entered, and the first type of modeling data, the second type of modeling data, and the third type of modeling data are all imported into the modeling program, and then data modeling is performed according to the modeling codes corresponding to each of them in the modeling program, and corresponding sub-models are generated, and the sub-models include sub-model one, sub-model two, and sub-model three;

[0060] The correspondence between each type of risk modeling data and its corresponding generated sub-model is as follows: Category 1 modeling data—sub-model 1, Category 2 modeling data—sub-model 2, Category 3 modeling data—sub-model 3. Sub-model 1, sub-model 2 and sub-model 3 are fused and spliced, and then the corresponding risk assessment model is established after the fusion and splicing are completed.

[0061] It should be further explained that, in the specific implementation process, the process of model tuning for the risk assessment model includes:

[0062] The model tuning for the risk assessment model includes tuning measures 1 and 2. Sample training data is obtained, and the sample data volume corresponding to the sample training data is recorded as D 样本 , input the sample training data into the risk assessment model for model training;

[0063] The tuning measure one is executed before model training. The content of the tuning measure one is: setting the model hyperparameters corresponding to the risk assessment model. The set model hyperparameters include model learning rate, regularization parameter and model tree depth, forming different hyperparameter combinations, and judging whether the evaluation results of the risk assessment model under different hyperparameter combinations meet the expected results, and then selecting the hyperparameter combination that best meets the expected results.

[0064] The content of the model training is as follows: the number of training times of the risk assessment model is set, denoted as F, the sample training data includes different sample types, the sample training data is classified according to the sample type, and each type of classified sample training data is input into the risk assessment model in turn, so as to obtain the risk assessment pass rate corresponding to each sample type, and the risk assessment pass rate is denoted as R, and R=Num1 / Num2, where Num1 is the number of correct assessments of the risks of code releases, and Num2 is the total number of risk assessments;

[0065] Set the qualified threshold and the upper limit of the number of training times, and record them as R respectively 阈 and F 上限 , when R ≥ R 阈 When R < R 阈 When F≤F 上限 In the case of increasing the number of training times F and the amount of sample data D 样本 , set the maximum training sample size and record it as D 最大 , to ensure that the increase in sample data volume meets the following conditions: D 样本 ≤D 最大 , until R ≥ R 阈 When , stop model training;

[0066] The second tuning measure is executed after model training. The content of the second tuning measure is: taking the risk assessment model of each sample type after successful model training as a splicing object, performing model fusion on the splicing objects of all sample types, and then generating the final risk assessment model;

[0067] It should be noted that the risk assessment model after model training with the sample training data corresponding to each sample type is used as a splicing object. Each splicing object serves as the best risk assessment model that reflects the code release risk assessment corresponding to this sample type. After model fusion, the risk assessment dimensions of different sample types are more comprehensive and the assessment effect is more accurate.

[0068] It should be further explained that, in the specific implementation process, the code to be released is imported into the code release platform, and the code release platform reviews and analyzes the code and generates the corresponding code release strategy, which includes:

[0069] Setting up a code library, which is used to store all the codes that need to be imported into the code publishing platform, assigning a code manager to the code library, and having the code manager extract the codes that need to be published from the code library within the set code transfer period;

[0070] Then, all the extracted codes are imported into the code release platform, the final risk assessment model is connected to the code release platform, and all permissions corresponding to the risk assessment model are opened. The risk assessment model is used to review and analyze the codes that need to be released by the code release platform;

[0071] After the code release platform reviews and analyzes the code to be released through the risk assessment model, it generates several different types of code release strategies, including full code release, gradual code release, and code AB test release.

[0072] It should be further explained that, in the specific implementation process, the mid-term risk assessment of the code release strategy is carried out, and the process of deciding whether to implement the code release strategy based on the results of the mid-term risk assessment includes:

[0073] Obtain the release environment parameters corresponding to the full code release, gradual code release, and AB test code release included in the code release strategy, and conduct mid-term risk assessments based on their respective release environment parameters;

[0074] The release environment parameters exist in the form of parameter sets, and the release environment parameters corresponding to the full code release, the gradual code release, and the code AB test release are Δ1, Δ2, and Δ3, respectively, where Δ1 = {a1, b1, c1}, Δ2 = {a2, b2, c2}, Δ3 = {a3, b3};

[0075] For Δ1 = {a1, b1, c1}, a1 represents the amount of data released by the full code, b1 represents the external attack information released by the full code, and c1 represents the network communication status of the full code release. For Δ2 = {a2, b2, c2}, a2 represents the release flow of the code asymptotically released, b2 represents the node status of the code asymptotically released, and c2 represents the external interference information of the code asymptotically released. For Δ3 = {a3, b3}, a3 represents the number of groups released by the code AB test, and b3 represents the release version of the code AB test;

[0076] If Δ1={a1,b1,c1}, the data volume corresponding to a1, the external attack information corresponding to b1, and the network communication status corresponding to c1 all meet the preset conditions for the full code release, then the mid-term risk assessment result is "qualified", otherwise, it is "unqualified";

[0077] If Δ2={a2,b2,c2}, the release flow corresponding to a2, the node state corresponding to b2, and the external interference information corresponding to c2 all meet the preset conditions for the code asymptotic release, then the mid-term risk assessment result is "qualified", otherwise, it is "unqualified";

[0078] If Δ3={a3,b3}, the number of groups corresponding to a3 and the release version corresponding to b3 both meet the preset conditions for the code AB test release, then the mid-term risk assessment result is "qualified", otherwise, it is "unqualified";

[0079] When the result of the mid-term risk assessment of the code release strategy is "qualified", the corresponding type of code release strategy will be executed. When the result of the mid-term risk assessment of the code release strategy is "unqualified", the corresponding type of code release strategy will not be executed.

[0080] It should be further explained that, in the specific implementation process, the process of selecting different post-optimization strategies according to the execution of the code release strategy includes:

[0081] The execution conditions of the code release strategy include normal execution, partial abnormal execution and complete abnormal execution. The execution conditions of each code release strategy are associated with different code execution sequences. The code execution sequences corresponding to normal execution, partial abnormal execution and complete abnormal execution are XL1, XL2 and XL3 respectively.

[0082] Set different post-optimization strategies and select corresponding post-optimization strategies according to different code execution sequences. The post-optimization strategies include code monitoring strategy, code rollback strategy and code reconstruction strategy.

[0083] When the acquired code execution sequence is XL1, the corresponding post-optimization strategy is the code monitoring strategy. The content of the code monitoring strategy is: set a monitoring cycle, continuously monitor the execution of the code release strategy during the monitoring cycle, and repair and correct the code in time when abnormal code execution is found;

[0084] When the acquired code execution sequence is XL2, the corresponding post-optimization strategy is the code rollback strategy. The content of the code rollback strategy is: mark the abnormal part of the code in the code release strategy as an error code fragment, roll back the code for the error code fragment, and do nothing with the other normal parts of the code;

[0085] When the acquired code execution sequence is XL3, the corresponding post-optimization strategy is the code refactoring strategy, and the content of the code refactoring strategy is: clearing all the code snippets corresponding to the code release strategy and re-editing the code snippets.

[0086] The above embodiments are only used to illustrate the technical method of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical method of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical method of the present invention.

Claims

1. A code release strategy optimization method based on risk assessment, characterized in that: The following steps are involved: Step S1: Build a code release platform and perform pre-risk optimization on the code release platform, collect code development related data through the pre-risk optimized code release platform, and then generate a code data set; Step S2: performing data mining on the code data set, obtaining risk modeling data through data mining, establishing a risk assessment model based on the risk modeling data, and performing model tuning on the risk assessment model; Step S3: Import the code to be released into the code release platform, which will generate a corresponding code release strategy after review and analysis, conduct a mid-term risk assessment on the code release strategy, and decide whether to execute the code release strategy based on the results of the mid-term risk assessment; Step S4: Select different post-optimization strategies according to the execution of the code release strategy; The process of collecting code development related data through the code publishing platform and then generating a code data set includes: Set the data collection period, denoted as T 采集 , T 采集 =[T1, T2], where T1 is the start time of the data collection period, and T2 is the end time of the data collection period. At T1, a data collection instruction is generated. After the code release platform completes the pre-risk optimization, the code release platform obtains the data collection instruction within the data collection period. When the data collection instruction is obtained, the collection control program set for the code release platform is accessed synchronously; The acquisition control program is used to obtain the acquisition speed of the code release platform when collecting code development related data, which is recorded as V, and preset a reasonable speed interval, which is recorded as Ω, to determine the subordinate relationship between V and Ω, and then decide whether to control the acquisition speed; When V∈Ω, the acquisition speed is not controlled; when When the acquisition speed is controlled; The code development related data includes code change history, bug feedback data and code test results. At the corresponding time T2, a code data set is generated based on the code development related data encapsulation, and the code data set is digitally signed; The process of performing data mining on the code data set, obtaining risk modeling data through data mining, and establishing a risk assessment model based on the risk modeling data includes: Before data mining, determine whether the digital signature corresponding to the code dataset has changed. If so, it means that the code dataset has been illegally tampered with by the outside world. Correct the illegally tampered content of the code dataset and repackage it. If not, directly perform data mining on the code dataset; The code data set is unpacked to obtain the code change history, bug feedback data and code test results. The risk modeling data is obtained through data mining. The risk modeling data includes one type of modeling data, two type of modeling data and three type of modeling data. A modeling program is set up. The modeling code corresponding to each type of risk modeling data is pre-entered in the modeling program. All the risk modeling data are imported into the modeling program. Data modeling is then performed according to the corresponding modeling codes in the modeling program, and corresponding sub-models are generated. The sub-models include sub-model one, sub-model two and sub-model three. Sub-model one, sub-model two and sub-model three are fused and spliced, and then a corresponding risk assessment model is established after the fusion and splicing are completed.

2. The method for optimizing a code release strategy based on risk assessment according to claim 1, characterized in that: The construction of the code release platform and the pre-risk optimization of the code release platform include: Select a code editing tool and a code architecture template, use the code editing tool to program a platform script file and a platform build configuration code, import the programmed platform build configuration code into the platform script file, and then convert the platform script file into a platform architecture file; The platform architecture file includes a plurality of architecture file vocabularies, and the architecture file vocabularies are used to represent the architecture elements required for the current platform architecture. A matching period is set, and within the matching period, the architecture file vocabularies in the platform architecture file are matched with the code architecture template; Obtain the initial platform framework through matching operations, associate the communication protocol and configuration server link with the initial platform framework, and generate the corresponding code publishing platform; The pre-risk optimization of the code release platform includes: disaster recovery optimization and grayscale release control.

3. The method for optimizing a code release strategy based on risk assessment according to claim 2, characterized in that: The process of model tuning for risk assessment models includes: The model tuning includes tuning measures 1 and 2, obtaining sample training data, and recording the sample data volume corresponding to the sample training data as D 样本 , input the sample training data into the risk assessment model for model training; The first tuning measure is executed before model training, and the first tuning measure includes: setting different model hyperparameters corresponding to the risk assessment model, forming different hyperparameter combinations according to different model hyperparameters, and judging whether the evaluation results of the risk assessment model under different hyperparameter combinations meet the expected results, and then selecting the hyperparameter combination that best meets the expected results; The model training includes: setting the number of training times of the risk assessment model, denoted as F, the sample training data includes different sample types, classifying the sample training data according to the sample type, inputting each type of classified sample training data into the risk assessment model, and then obtaining the risk assessment pass rate corresponding to each sample type, denoted as R, and setting the qualified threshold R 阈 And the upper limit of training times F 上限 , when R ≥ R 阈 When R < R 阈 When F≤F 上限 In the case of increasing the number of training times F and the amount of sample data D 样本 , set the maximum training sample size and record it as D 最大 , to ensure that the increase in sample data volume meets the following conditions: D 样本 ≤D 最大 , until R ≥ R 阈 When , stop model training; The second tuning measure is executed after model training. The second tuning measure includes: taking the risk assessment model after each sample type successfully completes model training as a splicing object, performing model fusion on the splicing objects of all sample types, and then generating the final risk assessment model.

4. The method for optimizing a code release strategy based on risk assessment according to claim 3, characterized in that: The code to be released is imported into the code release platform, and the code release platform reviews and analyzes the code and generates the corresponding code release strategy. The process includes: Set up a code library to store all the codes that need to be imported into the code release platform. During the set code transfer period, extract the codes that need to be released from the code library and import them into the code release platform. Connect the code release platform to the risk assessment model, and use the risk assessment model to review and analyze the codes that need to be released by the code release platform. After the code release platform reviews and analyzes the code to be released through the risk assessment model, it generates several different types of code release strategies, including full code release, gradual code release, and code AB test release.

5. The method for optimizing code release strategy based on risk assessment according to claim 4, characterized in that: Conduct a mid-term risk assessment on the code release strategy. The process of deciding whether to implement the code release strategy based on the results of the mid-term risk assessment includes: Obtain the release environment parameters corresponding to the full code release, gradual code release, and AB test code release, and perform mid-term risk assessments based on their respective release environment parameters. When the result of the mid-term risk assessment of each code release strategy is "qualified", the corresponding type of code release strategy is executed; when the result of the mid-term risk assessment of the code release strategy is "unqualified", the corresponding type of code release strategy is not executed.

6. A code release strategy optimization method based on risk assessment according to claim 5, characterized in that: The process of selecting different post-optimization strategies based on the execution of the code release strategy includes: The execution conditions of the code release strategy include normal execution, partial abnormal execution and complete abnormal execution. The execution condition of each code release strategy corresponds to a different code execution sequence, and different post-optimization strategies are set. The corresponding post-optimization strategy is selected according to different code execution sequences. The post-optimization strategy includes code monitoring strategy, code rollback strategy and code reconstruction strategy.

Citation Information

Patent Citations

  • Research and development continuous integration method and device, computer device and storage medium

    CN112148269A

  • Method and device for determining online risk of software application program and electronic equipment

    CN116303081A

  • Risk assessment model establishment method and device, computer equipment and storage medium

    CN116611682A

  • Automatic code merging and deploying method

    CN117609100A