A version security management method based on SaaS model
Through automated test case generation, automated deployment and real-time performance monitoring, the problems of low manual input efficiency, long release time and insufficient performance monitoring in traditional version security management are solved, and development efficiency and user experience are improved.
Patent Information
- Application Number
- CN202311852600.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-29
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2043-12-29
AI Technical Summary
The traditional version security management method has low efficiency in manual input test data, long release time and error-prone, high operation and maintenance costs, and the inability to monitor application performance in real time, resulting in increased risk of application crashes and data loss.
Functional test cases are automatically generated using a model-based method, structural test cases are automatically generated using SFLA algorithm, automated deployment and release using automated pipelines, and real-time performance monitoring is performed using a semi-supervised multi-classification support vector machine.
Improves developer productivity and test coverage, reduces deployment time and error rate, promptly detects performance problems, and improves user experience and application reliability.
Smart Images

Figure CN117806698B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of version security management, and in particular to a version security management method based on a SaaS model. Background Art
[0002] Version security management methods are mainly management methods for controlling software version information, automated integrated releases, and security vulnerabilities. Traditional solutions have technical problems such as low efficiency and large deviations in manual input of test data when testing software; manual release of SaaS model software, which is time-consuming, error-prone, and has high operation and maintenance costs; and the inability to monitor the performance of client applications in real time, which easily causes application crashes, affects user use for a long time, and increases the risk of data loss. Summary of the invention
[0003] In view of the above situation, in order to overcome the defects of the prior art, the present invention provides a version security management method based on the SaaS model. In view of the technical problems that manual input of test data is inefficient and has large deviations when testing software, the present invention adopts a model-based method to automatically generate functional test cases, and adopts an SFLA algorithm to automatically generate structural test cases, thereby improving the work efficiency and test coverage of developers; in view of the technical problems that manual release of software in the SaaS model is time-consuming, prone to errors and has high operation and maintenance costs, the present invention adopts an automated pipeline method to automatically deploy and release SaaS programs, thereby improving the efficiency and accuracy of deployment; in view of the technical problems that the performance of applications cannot be monitored in real time, which easily causes application crashes, affects user use for a long time, and increases the risk of data loss, the present invention adopts a multi-classification support vector machine based on a semi-supervised method to monitor the performance of applications in real time, which can detect problems in a timely manner and improve user experience.
[0004] The technical solution adopted by the present invention is as follows: The present invention provides a version security management method based on the SaaS model, which specifically includes the following steps:
[0005] Step S1: Specify the SaaS server cluster address. The developer specifies the IP address, port, and file path of the SaaS server cluster where the application is to be deployed. The file path points to the file address of the original version. The original version is the deployed application, including the original version code, the original executable file, the original class library, the original value file, the original dependency file, the original build file, the original deployment file, and the original pipeline configuration file. The load balancing strategy is configured.
[0006] Step S2: specify the source code. After the developer reviews the source code, he specifies the file path and port information of the source code;
[0007] Step S3: Automated building and testing, compiling the source code to generate executable files, class libraries, value files, dependency files, build files, and deployment files, using a test runner to perform functional and structural tests on the source code, and after the functional and structural tests pass, packaging the source code, executable files, class libraries, value files, dependency files, build files, and deployment files to generate a release version, and uploading the release version to a release server, where the release server includes a container repository;
[0008] Step S4: Automated deployment. After receiving the release version, the publishing server generates an automated pipeline, builds an image version for the release version, and automatically deploys the image version. The automated pipeline includes a pipeline configuration file.
[0009] Step S5: Version release: the release server switches the file path of the SaaS server cluster to the file path of the source code, performs real-time and scheduled release, and generates a release log;
[0010] Step S6: Monitor the performance of the image version and use a multi-classification support vector machine to perform real-time anomaly detection on the performance of the image version. When an anomaly is detected, the publishing server switches the file path of the SaaS server cluster to the file path of the original version.
[0011] Furthermore, in step S3, automated construction and testing specifically include the following steps:
[0012] Step S31: the test runner divides the source code into N functional modules according to its structure. The functional modules include a starting node, an intermediate node and a final node. All functional modules constitute a model. The starting node of the first functional module executed when the test runs the source code is used as the starting node of the model, i.e., the initial node.
[0013] Step S32: Set is any functional module, yes The starting node of yes The middle node of yes The final node of is the initial node, yes arrive All paths of yes arrive A random path of yes arrive All paths of , and Construct a test sequence;
[0014] Step S33: the test runner converts the test sequence into a format executable by the test runner, i.e., a test case;
[0015] Step S34: the test runner performs functional testing on the source code according to the test case and generates a functional test report. If the functional test passes, step S35 is executed. Otherwise, the developer corrects the source code according to the functional test report.
[0016] Step S35: The developer sets the maximum number of iterations, and the test runner randomly generates structural test data using the following formula:
[0017] ;
[0018] In the formula, is the structural test data, yes The lower bound of yes The upper bound of is a random number ranging from 0 to 1;
[0019] Step S36: Calculate the fitness of the structure test data, using the following formula:
[0020] ;
[0021] In the formula, It is Structure test data, yes The fitness of is the number of branches in the source code, It is the source code branches, It is the source code The weight of each branch, is the branch distance function;
[0022] Step S37: Sort the structure test data in descending order according to the fitness, and optimize the structure test data with the smallest fitness. The formula used is as follows:
[0023] ;
[0024] In the formula, is the optimized structural test data, is the structural test data with the minimum fitness, It is the structural test data with the greatest fitness;
[0025] calculate The fitness of The fitness ratio The adaptability is large, replace Otherwise, the test runner randomly generates a structured test data to replace ;
[0026] Step S38: Repeat step S37 until the maximum number of iterations is reached, and all structural test data constitute a structural test set;
[0027] Step S39: The test runner performs a structural test on the source code according to the structural test set and generates a structural test report. If the structural test passes, the release version is uploaded to the release server. Otherwise, the developer corrects the source code according to the structural test report.
[0028] Furthermore, in step S4, the automated deployment specifically includes the following steps:
[0029] Step S41: After receiving the release version, the publishing server automatically creates an automation pipeline;
[0030] Step S42: The publishing server creates a version control lock for the published version through the automated pipeline, checks whether the deployment file in the published version is the same as the original deployment file, and releases the version control lock if they are the same. Otherwise, the automated pipeline rolls back and performs automated testing on the published version. If the test passes, the published version is automatically deployed. Otherwise, the automated pipeline rolls back.
[0031] Step S43: Check whether the build file in the release version is the same as the original build file. If they are the same, use the Docker container to build an image version for the release version and mark the image version with an image tag. Otherwise, the automated pipeline is rolled back.
[0032] Step S44: the automated pipeline generates a universal tag, adds the universal tag to the image tag, and sends the image version to the container repository;
[0033] Step S45: The automated pipeline checks whether the image version has a value file. If so, the automated pipeline triggers an automatic deployment operation. Otherwise, the deployment fails and the automated pipeline rolls back.
[0034] Furthermore, in step S6, monitoring the performance of the image version specifically includes the following steps:
[0035] Step S61: Data extraction, using tracking tools to collect process data of the image version, select a step size of A sliding window is used to access all system call data in the process data according to the step size of the sliding window, wherein the system call data includes system calls and corresponding features, and the system call data is divided into a labeled data set and an unlabeled data set at a ratio of 1:4. Labels are manually assigned to the system call data in the labeled data set, wherein the labels include normal behavior, CPU problem, and memory problem.
[0036] Step S62: data preprocessing, using the z-score method to normalize the features;
[0037] Step S63: Calculate the Fisher score of the features in the labeled data set using the following formula:
[0038] ;
[0039] In the formula, It is Fisher score of features, is the total number of label types, , yes From 1 to The cumulative sum of It is The number of system calls under the label, It is The first system call under the label The average value of the features, It is The average value of the features, It is The first system call under the label The variance of the features;
[0040] Step S64: Sort the Fisher scores of the features in non-increasing order, scan the features by an iterative method, and calculate the similarity between the features. The formula used is as follows:
[0041] ;
[0042] In the formula, and are two different characteristics. yes and The similarity of It is System calls The characteristic value of yes The average value of It is System calls The characteristic value of yes The average value of is the total number of system calls, yes From 1 to The cumulative sum of
[0043] Step S65: set the similarity threshold to F, and select features with similarity lower than F to form a feature set of the labeled data set;
[0044] Step S66: Use the DBSCAN clustering algorithm to cluster the unlabeled data set, assuming the neighborhood radius is , the minimum number of neighborhood samples is , randomly select a system call of an unlabeled dataset as the initial sample, calculate the similarity distance between the initial sample and the system calls in the unlabeled dataset except the initial sample, and find the similarity distance between The system calls in are taken as density connection samples. When the number of density connection samples is greater than or equal to When , the initial sample is marked as a core point, the initial sample and All density-connected samples in the cluster form a cluster. When the number of density-connected samples is less than When , the initial samples are marked as boundary points, all system calls in the unlabeled dataset are iterated, and labels are manually assigned to clusters;
[0045] Step S67: Establish and initialize a multi-classification support vector machine, train the multi-classification support vector machine using a labeled data set and an unlabeled data set, and define the constraints of the multi-classification support vector machine as follows:
[0046] ;
[0047] In the formula, is the weight vector, yes The transpose of is the Gaussian kernel function, is the system call data in the labeled dataset and the unlabeled dataset, is the penalty coefficient for misclassification, is the distance from the misclassified system call data to the hyperplane;
[0048] Step S68: Use a tracking tool to obtain real-time process data of the mirror version and input it into the trained multi-classification support vector machine. When the output of the multi-classification support vector machine is a CPU error or a memory error, the publishing server switches the file path of the SaaS server cluster to the file path of the original version. Otherwise, the file path of the mirror version is maintained.
[0049] The beneficial effects achieved by the present invention using the above scheme are as follows:
[0050] (1) To address the technical issues of low efficiency and large deviation in manually inputting test data when testing software, the present invention adopts a model-based method to automatically generate functional test cases and an SFLA algorithm to automatically generate structural test cases, thereby improving the work efficiency and test coverage of developers;
[0051] (2) To address the technical issues of manually publishing software in the SaaS model, which is time-consuming, error-prone and has high operation and maintenance costs, the present invention uses an automated pipeline method to automatically deploy and publish SaaS programs, thereby improving the efficiency and accuracy of deployment;
[0052] (3) In order to solve the technical problem that the performance of applications cannot be monitored in real time, which easily causes application crashes, affects user usage for a long time, and increases the risk of data loss, the present invention uses a multi-classification support vector machine based on a semi-supervised method to monitor the performance of applications in real time, so as to detect problems in time and improve user experience;
[0053] (4) The present invention classifies the detected anomalies, which can help developers quickly find the causes of the anomalies, narrow the scope of investigation, improve the efficiency of problem solving, provide data support for the continuous improvement and optimization of the system, and improve the reliability of the application. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 A flowchart of a version security management method based on the SaaS model provided by the present invention.
[0055] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention. DETAILED DESCRIPTION
[0056] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments; based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0057] In the description of the present invention, it should be understood that terms such as “upper”, “lower”, “front”, “back”, “left”, “right”, “top”, “bottom”, “inside” and “outside” indicating directions or positional relationships are based on the directions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore should not be understood as limiting the present invention.
[0058] Example 1, see Figure 1 The present invention provides a version security management method based on the SaaS model, and the version security management method based on the SaaS model includes the following steps:
[0059] Step S1: Specify the SaaS server cluster address. The developer specifies the IP address, port, and file path of the SaaS server cluster where the application is to be deployed. The file path points to the file address of the original version. The original version is the deployed application, including the original version code, the original executable file, the original class library, the original value file, the original dependency file, the original build file, the original deployment file, and the original pipeline configuration file. The load balancing strategy is configured.
[0060] Step S2: specify the source code. After the developer reviews the source code, he specifies the file path and port information of the source code;
[0061] Step S3: Automated building and testing, compiling the source code to generate executable files, class libraries, value files, dependency files, build files, and deployment files, using a test runner to perform functional and structural tests on the source code, and after the functional and structural tests pass, packaging the source code, executable files, class libraries, value files, dependency files, build files, and deployment files to generate a release version, and uploading the release version to a release server, where the release server includes a container repository;
[0062] Step S4: Automated deployment. After receiving the release version, the publishing server generates an automated pipeline, builds an image version for the release version, and automatically deploys the image version. The automated pipeline includes a pipeline configuration file.
[0063] Step S5: Version release: the release server switches the file path of the SaaS server cluster to the file path of the source code, performs real-time and scheduled release, and generates a release log;
[0064] Step S6: Monitor the performance of the image version and use a multi-classification support vector machine to perform real-time anomaly detection on the performance of the image version. When an anomaly is detected, the publishing server switches the file path of the SaaS server cluster to the file path of the original version.
[0065] Example 2, see Figure 1 This embodiment is based on the above embodiment. In step S3, automatic construction and testing are performed, specifically including the following steps:
[0066] Step S31: the test runner divides the source code into N functional modules according to its structure. The functional modules include a starting node, an intermediate node and a final node. All functional modules constitute a model. The starting node of the first functional module executed when the test runs the source code is used as the starting node of the model, i.e., the initial node.
[0067] Step S32: Set is any functional module, yes The starting node of yes The middle node of yes The final node of is the initial node, yes arrive All paths of yes arrive A random path of yes arrive All paths of , and Construct a test sequence;
[0068] Step S33: the test runner converts the test sequence into a format executable by the test runner, i.e., a test case;
[0069] Step S34: the test runner performs functional testing on the source code according to the test case and generates a functional test report. If the functional test passes, step S35 is executed. Otherwise, the developer corrects the source code according to the functional test report.
[0070] Step S35: The developer sets the maximum number of iterations, and the test runner randomly generates structural test data using the following formula:
[0071] ;
[0072] In the formula, is the structural test data, yes The lower bound of yes The upper bound of is a random number ranging from 0 to 1;
[0073] Step S36: Calculate the fitness of the structure test data, using the following formula:
[0074] ;
[0075] In the formula, It is Structure test data, yes The fitness of is the number of branches in the source code, It is the source code branches, It is the source code The weight of each branch, is the branch distance function;
[0076] Step S37: Sort the structure test data in descending order according to the fitness, and optimize the structure test data with the smallest fitness. The formula used is as follows:
[0077] ;
[0078] In the formula, is the optimized structural test data, is the structural test data with the minimum fitness, It is the structural test data with the greatest fitness;
[0079] calculate The fitness of The fitness ratio The adaptability is large, replace Otherwise, the test runner randomly generates a structured test data to replace ;
[0080] Step S38: Repeat step S37 until the maximum number of iterations is reached, and all structural test data constitute a structural test set;
[0081] Step S39: The test runner performs a structural test on the source code according to the structural test set and generates a structural test report. If the structural test passes, the release version is uploaded to the release server. Otherwise, the developer corrects the source code according to the structural test report.
[0082] Through the above operations, in order to solve the technical problems of low efficiency and large deviation of manual test data input when software is tested, the present invention adopts a model-based method to automatically generate functional test cases and adopts the SFLA algorithm to automatically generate structural test cases, thereby improving the work efficiency of developers and test coverage.
[0083] Example 3, see Figure 1This embodiment is based on the above embodiment. In step S4, automatic deployment is performed, which specifically includes the following steps:
[0084] Step S41: After receiving the release version, the publishing server automatically creates an automation pipeline;
[0085] Step S42: The publishing server creates a version control lock for the published version through the automated pipeline, checks whether the deployment file in the published version is the same as the original deployment file, and releases the version control lock if they are the same. Otherwise, the automated pipeline rolls back and performs automated testing on the published version. If the test passes, the published version is automatically deployed. Otherwise, the automated pipeline rolls back.
[0086] Step S43: Check whether the build file in the release version is the same as the original build file. If they are the same, use the Docker container to build an image version for the release version and mark the image version with an image tag. Otherwise, the automated pipeline is rolled back.
[0087] Step S44: the automated pipeline generates a universal tag, adds the universal tag to the image tag, and sends the image version to the container repository;
[0088] Step S45: The automated pipeline checks whether the image version has a value file. If so, the automated pipeline triggers an automatic deployment operation. Otherwise, the deployment fails and the automated pipeline rolls back.
[0089] Through the above operations, the present invention adopts an automated pipeline method to automatically deploy and publish SaaS programs, thereby improving the efficiency and accuracy of deployment, in order to solve the technical problems that manual release of SaaS model software is time-consuming, prone to errors and has high operation and maintenance costs.
[0090] Example 4, see Figure 1 Based on the above embodiment, this embodiment monitors the performance of the image version in step S6, which specifically includes the following steps:
[0091] Step S61: Data extraction, using tracking tools to collect process data of the image version, select a step size of A sliding window is used to access all system call data in the process data according to the step size of the sliding window, wherein the system call data includes system calls and corresponding features, and the system call data is divided into a labeled data set and an unlabeled data set at a ratio of 1:4. Labels are manually assigned to the system call data in the labeled data set, wherein the labels include normal behavior, CPU problem, and memory problem.
[0092] Step S62: data preprocessing, using the z-score method to normalize the features;
[0093] Step S63: Calculate the Fisher score of the features in the labeled data set using the following formula:
[0094] ;
[0095] In the formula, It is Fisher score of features, is the total number of label types, , yes From 1 to The cumulative sum of It is The number of system calls under the label, It is The first system call under the label The average value of the features, It is The average value of the features, It is The first system call under the label The variance of the features;
[0096] Step S64: Sort the Fisher scores of the features in non-increasing order, scan the features by an iterative method, and calculate the similarity between the features. The formula used is as follows:
[0097] ;
[0098] In the formula, and are two different characteristics. yes and The similarity of It is System calls The characteristic value of yes The average value of It is System calls The characteristic value of yes The average value of is the total number of system calls, yes From 1 to The cumulative sum of
[0099] Step S65: set the similarity threshold to F, and select features with similarity lower than F to form a feature set of the labeled data set;
[0100] Step S66: Use the DBSCAN clustering algorithm to cluster the unlabeled data set, assuming the neighborhood radius is , the minimum number of neighborhood samples is , randomly select a system call of an unlabeled dataset as the initial sample, calculate the similarity distance between the initial sample and the system calls in the unlabeled dataset except the initial sample, and find the similarity distance between The system calls in are taken as density connection samples. When the number of density connection samples is greater than or equal to When , the initial sample is marked as a core point, the initial sample and All density-connected samples in the cluster form a cluster. When the number of density-connected samples is less than When , the initial samples are marked as boundary points, all system calls in the unlabeled dataset are iterated, and labels are manually assigned to clusters;
[0101] Step S67: Establish and initialize a multi-classification support vector machine, train the multi-classification support vector machine using a labeled data set and an unlabeled data set, and define the constraints of the multi-classification support vector machine as follows:
[0102] ;
[0103] In the formula, is the weight vector, yes The transpose of is the Gaussian kernel function, is the system call data in the labeled dataset and the unlabeled dataset, is the penalty coefficient for misclassification, is the distance from the misclassified system call data to the hyperplane;
[0104] Step S68: Use a tracking tool to obtain real-time process data of the mirror version and input it into the trained multi-classification support vector machine. When the output of the multi-classification support vector machine is a CPU error or a memory error, the publishing server switches the file path of the SaaS server cluster to the file path of the original version. Otherwise, the file path of the mirror version is maintained.
[0105] Through the above operations, in order to solve the technical problem that the performance of the application cannot be monitored in real time, which easily causes the application to crash, affects user use for a long time, and increases the risk of data loss, the present invention adopts a multi-classification support vector machine based on a semi-supervised method to monitor the performance of the application in real time, which can detect problems in time and improve user experience; classifying the monitored anomalies can help developers quickly find the cause of the anomaly, narrow the scope of investigation, improve the efficiency of problem solving, provide data support for the continuous improvement and optimization of the system, and improve the reliability of the application.
[0106] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article 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, article or device.
[0107] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
[0108] The present invention and its embodiments are described above, and such description is not restrictive. The drawings show only one embodiment of the present invention, and the actual structure is not limited thereto. In short, if ordinary technicians in the field are inspired by it, without departing from the purpose of the invention, they can design a structure and embodiment similar to the technical solution without creativity, which should belong to the protection scope of the present invention.
Claims
1. A version security management method based on SaaS mode, characterized in that: The following steps are involved: Step S1: Specify the SaaS server cluster address. The developer specifies the IP address, port, and file path of the SaaS server cluster where the application is to be deployed. The file path points to the file address of the original version. The original version is the deployed application, including the original version code, the original executable file, the original class library, the original value file, the original dependency file, the original build file, the original deployment file, and the original pipeline configuration file. The load balancing strategy is configured. Step S2: specify the source code. After the developer reviews the source code, he specifies the file path and port information of the source code; Step S3: Automated building and testing, compiling the source code to generate executable files, class libraries, value files, dependency files, build files, and deployment files, using a test runner to perform functional and structural tests on the source code, and after the functional and structural tests pass, packaging the source code, executable files, class libraries, value files, dependency files, build files, and deployment files to generate a release version, and uploading the release version to a release server, where the release server includes a container repository; Step S4: Automated deployment. After receiving the release version, the publishing server generates an automated pipeline, builds an image version for the release version, and automatically deploys the image version. The automated pipeline includes a pipeline configuration file. Step S5: Version release: the release server switches the file path of the SaaS server cluster to the file path of the source code, performs real-time release and scheduled release, and generates a release log; Step S6: monitor the performance of the image version and use a multi-classification support vector machine to perform real-time anomaly detection on the performance of the image version. When an anomaly is detected, the publishing server switches the file path of the SaaS server cluster to the file path of the original version. In step S3, the automated construction and testing specifically includes the following steps: Step S31: the test runner divides the source code into N functional modules according to its structure. The functional modules include a starting node, an intermediate node and a final node. All functional modules constitute a model. The starting node of the first functional module executed when the source code test is run is used as the starting node of the model, i.e., the initial node. Step S32: Set is any functional module, yes The starting node of yes The middle node of yes The final node of is the initial node, yes arrive All paths of yes arrive A random path of yes arrive All paths of , and Construct a test sequence; Step S33: the test runner converts the test sequence into a format executable by the test runner, i.e., a test case; Step S34: the test runner performs functional testing on the source code according to the test case and generates a functional test report. If the functional test passes, step S35 is executed. Otherwise, the developer corrects the source code according to the functional test report. Step S35: The developer sets the maximum number of iterations, and the test runner randomly generates structural test data using the following formula: ; In the formula, is the structural test data, yes The lower bound of yes The upper bound of is a random number ranging from 0 to 1; Step S36: Calculate the fitness of the structure test data, using the following formula: ; In the formula, It is Structure test data, yes The fitness of is the number of branches in the source code, It is the source code branches, It is the source code The weight of each branch, is the branch distance function; Step S37: Sort the structure test data in descending order according to the fitness, and optimize the structure test data with the smallest fitness. The formula used is as follows: ; In the formula, is the optimized structural test data, is the structural test data with the minimum fitness, It is the structural test data with the greatest fitness; calculate The fitness of The fitness ratio The adaptability is large, replace Otherwise, the test runner randomly generates a structured test data to replace ; Step S38: Repeat step S37 until the maximum number of iterations is reached, and all structural test data constitute a structural test set; Step S39: The test runner performs a structural test on the source code according to the structural test set and generates a structural test report. If the structural test passes, the release version is uploaded to the release server. Otherwise, the developer corrects the source code according to the structural test report.
2. According to the version security management method based on the SaaS model according to claim 1, it is characterized in that: In step S4, the automated deployment specifically includes the following steps: Step S41: After receiving the release version, the publishing server automatically creates an automation pipeline; Step S42: The publishing server creates a version control lock for the published version through the automated pipeline, checks whether the deployment file in the published version is the same as the original deployment file, and releases the version control lock if they are the same. Otherwise, the automated pipeline rolls back and performs automated testing on the published version. If the test passes, the published version is automatically deployed. Otherwise, the automated pipeline rolls back. Step S43: Check whether the build file in the release version is the same as the original build file. If they are the same, use the Docker container to build an image version for the release version and mark the image version with an image tag. Otherwise, the automated pipeline is rolled back. Step S44: the automated pipeline generates a universal tag, adds the universal tag to the image tag, and sends the image version to the container repository; Step S45: The automated pipeline checks whether the image version has a value file. If so, the automated pipeline triggers an automatic deployment operation. Otherwise, the deployment fails and the automated pipeline rolls back.
3. According to the version security management method based on the SaaS model according to claim 1, it is characterized in that: In step S6, the monitoring of the performance of the image version specifically includes the following steps: Step S61: Data extraction, using tracking tools to collect process data of the image version, select a step size of A sliding window is used to access all system call data in the process data according to the step size of the sliding window, wherein the system call data includes system calls and corresponding features, and the system call data is divided into a labeled data set and an unlabeled data set at a ratio of 1:
4. Labels are manually assigned to the system call data in the labeled data set, wherein the labels include normal behavior, CPU problem, and memory problem. Step S62: data preprocessing, using the z-score method to normalize the features; Step S63: Calculate the Fisher score of the features in the labeled data set using the following formula: ; In the formula, It is Fisher score of features, is the total number of label types, , yes From 1 to The cumulative sum of It is The number of system calls under the label, It is The first system call under the label The average value of the features, It is The average value of the features, It is The first system call under the label The variance of the features; Step S64: Sort the Fisher scores of the features in non-increasing order, scan the features by an iterative method, and calculate the similarity between the features. The formula used is as follows: ; In the formula, and are two different characteristics. yes and The similarity of It is System calls The characteristic value of yes The average value of It is System calls The characteristic value of yes The average value of is the total number of system calls, yes From 1 to The cumulative sum of Step S65: set the similarity threshold to F, and select features with similarity lower than F to form a feature set of the labeled data set; Step S66: Use the DBSCAN clustering algorithm to cluster the unlabeled data set, assuming the neighborhood radius is , the minimum number of neighborhood samples is , randomly select a system call of an unlabeled dataset as the initial sample, calculate the similarity distance between the initial sample and the system calls in the unlabeled dataset except the initial sample, and find the similarity distance between The system calls in are taken as density connection samples. When the number of density connection samples is greater than or equal to When , the initial sample is marked as a core point, the initial sample and All density-connected samples in the cluster form a cluster. When the number of density-connected samples is less than When , the initial samples are marked as boundary points, all system calls in the unlabeled dataset are iterated, and labels are manually assigned to clusters; Step S67: Establish and initialize a multi-classification support vector machine, train the multi-classification support vector machine using a labeled data set and an unlabeled data set, and define the constraints of the multi-classification support vector machine as follows: ; In the formula, is the weight vector, yes The transpose of is the Gaussian kernel function, is the system call data in the labeled dataset and the unlabeled dataset, is the penalty coefficient for misclassification, is the distance from the misclassified system call data to the hyperplane; Step S68: Use a tracking tool to obtain real-time process data of the mirror version and input it into the trained multi-classification support vector machine. When the output of the multi-classification support vector machine is a CPU error or a memory error, the publishing server switches the file path of the SaaS server cluster to the file path of the original version. Otherwise, the file path of the mirror version is maintained.
Citation Information
Patent Citations
Software building and deployment system and method
CA2422682A1
Automatic packaging and releasing method and device
CN106293811A
SaaS platform implementation method and system based on LXC container
CN111143028A
Software development delivery method and system based on cloud native
CN113741958A
Container-based continuous delivery method and device
CN114489934A
