Software gray release method and related device

By periodically collecting device information and using a trained anomaly detection model for canary releases, the problem of misjudgment caused by human experience in canary releases is solved, improving detection accuracy and system stability, and adapting to the needs of different scenarios.

CN121387315APending Publication Date: 2026-01-23TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410947900.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-15
Publication Date
2026-01-23

AI Technical Summary

Technical Problem

In existing technologies, anomaly detection during canary releases relies on human experience, which can lead to misjudgments or omissions, affecting release efficiency and system stability. Furthermore, uniform indicator thresholds are difficult to meet the needs of different scenarios.

Method used

By periodically collecting equipment information and using an anomaly detection model trained on historical software release data, the operating status of the equipment is detected. The model is then optimized to adapt to different scenario requirements, thereby improving detection accuracy and efficiency.

Benefits of technology

It enables more accurate detection of device operating status, reduces the risk of misjudgment, ensures the efficiency and stability of canary releases, and adapts to the needs of different scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121387315A_ABST
    Figure CN121387315A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, and provides a software gray release method and related device.The method comprises the steps that target equipment is indicated to run target version software, and the target equipment is to-be-upgraded equipment which bears the target version software in the first stage of gray release in all to-be-upgraded equipment; the method comprises the following steps: in a first stage, acquiring gray stage information of each acquisition period by utilizing periodically acquired equipment information of target equipment; based on the gray stage information of each collection period, an anomaly detection model is used for detecting the equipment running state, and the anomaly detection model is obtained by training gray stage data in the historical version software release process; and if it is determined that the first stage meets the set stage upgrading condition based on the detection result of each acquisition period, continuing to execute other stages of gray release until gray release is completed. And the abnormal detection model is used for running state detection, so that the gray release efficiency of the software is improved, and the gray release requirements in different scenes are met.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer, and provides a gray release method of software and related device. BACKGROUND

[0002] With the rapid development of network technology, more and more business services are realized based on the Internet. In order to better provide services to objects, the software related to these business services usually needs to be upgraded and updated. However, each version release of the software will affect the use of a large number of objects, resulting in the inability to meet the actual needs of the objects. Therefore, the gray release method is usually used for version release of the software. The gray release is a release method that can smoothly transition, that is, a part of the devices continue to use the old version A of the software, and another part of the devices start to use the upgraded new version B of the software. If the operation of the new version B does not occur abnormally, the use range of the new version B is gradually expanded until all devices use the new version B, so as to realize the release of the new version of the software.

[0003] In the related art, in the gray release process, a plurality of abnormal types are set according to the version characteristics of the new version B, such as a long response time, a high system resource usage, an abnormal object behavior, and the like. For each abnormal type, a corresponding evaluation dimension is set. In this way, by comparing the value of the evaluation dimension after the release of the new version B with an index threshold, it is determined whether to further expand the use range of the new version B.

[0004] However, on the one hand, the design of the index threshold depends on human experience. Since the human experience is unstable, the abnormal judgment process is uncertain, which leads to misjudgment or missed judgment and the like, affecting the release efficiency and system stability. On the other hand, the index thresholds required by different scenarios are different. The use of a unified index threshold cannot meet the needs of different scenarios, and may not effectively detect abnormalities in some specific scenarios. SUMMARY

[0005] The embodiments of the present application provide a gray release method of software and related device to improve the gray release efficiency of the software.

[0006] In a first aspect, the embodiments of the present application provide a gray release method of software, comprising:

[0007] respectively instruct at least one target device to run a target version software, the at least one target device being a to-be-upgraded device in each to-be-upgraded device that carries the target version software in a first stage of gray release;

[0008] In the first stage, device information of the at least one target device is periodically collected, and gray stage information of a corresponding collection period is obtained based on the collected device information in each collection period.

[0009] The device running state detection is performed by using an abnormality detection model based on the gray stage information of each collection period, to obtain a detection result of the corresponding collection period, wherein the abnormality detection model is obtained by training gray stage data in a historical version software release process;

[0010] If it is determined that the first stage meets a set stage upgrade condition based on the detection result of each collection period, then other stages of the gray release are continuously performed until the gray release is completed.

[0011] In a second aspect, an embodiment of the present application provides a gray release device of software, comprising:

[0012] A release unit is configured to instruct at least one target device to run target version software, wherein the at least one target device is a to-be-upgraded device that carries the target version software in a first stage of gray release among to-be-upgraded devices;

[0013] A collection unit is configured to periodically collect device information of the at least one target device in the first stage, and obtain gray stage information of each collection period based on the collected device information in each collection period;

[0014] A detection unit is configured to perform device running state detection by using an abnormality detection model based on the gray stage information of each collection period, to obtain a detection result of the corresponding collection period, wherein the abnormality detection model is obtained by training gray stage data in a historical version software release process;

[0015] A judgment unit is configured to, if it is determined that the first stage meets a set stage upgrade condition based on the detection result of each collection period, continuously perform other stages of the gray release until the gray release is completed.

[0016] In a possible implementation manner, the detection unit is further configured to:

[0017] If the abnormality detection model meets a set optimization condition, the abnormality detection model is optimized based on an actual running state of the at least one target device in the first stage, to obtain an optimized abnormality detection model;

[0018] The continuously performing other stages of the gray release until the gray release is completed comprises:

[0019] The other stages of the gray release are continuously performed by using the optimized abnormality detection model until the gray release is completed.

[0020] In a possible implementation manner, the optimization condition comprises at least one of the following conditions:

[0021] The prediction effect evaluation value of the anomaly detection model does not conform to a set prediction effect range, wherein the prediction effect evaluation value is determined according to the actual running state of the at least one target device;

[0022] The adjustment effect evaluation value of the target version software does not conform to a set adjustment effect range, wherein the adjustment effect evaluation value is used to evaluate the actual running state of the at least one target device after the target version software is adjusted based on the detection result of each collection period;

[0023] The adjustment effect evaluation value of the target version software decreases relative to the target version software before adjustment;

[0024] The prediction effect evaluation value of the anomaly detection model decreases.

[0025] In a possible implementation manner, the detection unit is further configured to obtain the adjustment effect evaluation value in the following manner:

[0026] Based on the detection result of each collection period, a detection report carrying an optimization suggestion is generated, and the detection report is presented to a target object;

[0027] The actual running state of the at least one target device after the target object adjusts the target version software according to the optimization suggestion is received;

[0028] Based on the actual running state of the at least one target device after adjustment, the adjustment effect evaluation value is obtained.

[0029] In a possible implementation manner, when the anomaly detection model is optimized based on the actual running state of the at least one target device in the first stage to obtain an optimized anomaly detection model, the detection unit is specifically configured to:

[0030] Based on the gray stage information of each collection period and in combination with the actual running state of the at least one target device, an optimization sample set used for model optimization is constructed;

[0031] The anomaly detection model is fine-tuned by using the optimization sample set to obtain the optimized anomaly detection model.

[0032] In a possible implementation manner, the detection unit is further configured to:

[0033] By using the optimized anomaly detection model, whether the optimized anomaly detection model conforms to a set optimization condition is detected at a set monitoring time during execution of a process of other stages of the gray release.

[0034] If the optimized anomaly detection model meets the set optimization condition, the model optimization on the optimized anomaly detection model is continued.

[0035] In a possible implementation, when the detection unit detects the equipment running state based on the gray stage information of each collection period respectively by using the anomaly detection model to obtain the detection result of the corresponding collection period, the detection unit is specifically configured to:

[0036] The detection unit detects the equipment running state based on the gray stage information of each collection period respectively by using the anomaly detection model to obtain the first prediction value and the second prediction value of the corresponding collection period, where the first prediction value and the second prediction value respectively represent the probability of the at least one target equipment running normally and abnormally.

[0037] The detection unit obtains the detection result of the corresponding collection period based on the first prediction value and the second prediction value of the corresponding collection period.

[0038] In a possible implementation, when the detection unit detects the equipment running state based on the gray stage information of each collection period respectively by using the anomaly detection model to obtain the detection result of the corresponding collection period, the detection unit is specifically configured to:

[0039] The detection unit detects the equipment running state based on the gray stage information of each collection period respectively by using the anomaly detection model to obtain the prediction result of each type of anomaly of the corresponding collection period; and each prediction result is used to represent the probability of the at least one target equipment existing the corresponding type of anomaly in the corresponding collection period.

[0040] The detection unit obtains the detection result of the corresponding collection period based on the prediction result of each type of anomaly of the corresponding collection period.

[0041] In a possible implementation, the detection unit is further configured to:

[0042] According to the set at least one evaluation dimension, the detection unit collects the related evaluation data in the software release process of the historical version to obtain the initial sample data in each historical collection period.

[0043] The detection unit performs data preprocessing based on the obtained initial sample data in each historical collection period to obtain a training sample set.

[0044] The detection unit iteratively trains the anomaly detection model to be trained by using the training sample set to obtain a trained anomaly detection model.

[0045] In a possible implementation, the evaluation dimension includes at least one of the following indexes:

[0046] Device quantity, the device quantity is used for characterizing: the device quantity of each historical upgrade device installed with the historical version software in a historical collection period;

[0047] CPU usage information, the CPU usage information is used for evaluating: the CPU usage of each historical upgrade device installed with the historical version software in a historical collection period;

[0048] Memory usage information, the memory usage information is used for evaluating the memory usage of each historical upgrade device installed with the historical version software in a historical collection period;

[0049] Error information, the error information is used for characterizing: the number of historical upgrade devices in which abnormal events occur in each historical upgrade device installed with the historical version software in a historical collection period;

[0050] Historical operation data, the historical operation data is used for evaluating: the business processing of each historical upgrade device installed with the historical version software in a historical collection period.

[0051] In a possible implementation, based on the detection results of the collection periods, when the first stage satisfies the set stage upgrade condition, the judging unit 1104 is specifically used for:

[0052] If the detection results of the collection periods all represent that the target device running state is normal in the corresponding collection period, it is determined that the first stage satisfies the set stage upgrade condition; or,

[0053] If the number of collection periods in which the detection results represent that the target device running state is normal reaches a set number threshold, it is determined that the first stage satisfies the set stage upgrade condition.

[0054] In a possible implementation, when the gray stage information of the corresponding collection period is obtained based on the collected device information in each collection period, the collecting unit is specifically used for:

[0055] At least one of the following operations is performed on the device information of the collection periods respectively:

[0056] If there is evaluation data whose value is not located in the reference value range set for the corresponding evaluation dimension in the evaluation data of each evaluation dimension included in the device information in a collection period, the device information in the collection period is discarded;

[0057] The device information in the collection period is normalized in a set normalization manner to obtain the gray stage information of the collection period;

[0058] Based on the evaluation data of each evaluation dimension contained in the device information in one collection period, reference evaluation data of a reference evaluation dimension is constructed, and the reference evaluation data is used to obtain the gray stage information of the one collection period.

[0059] In a third aspect, an electronic device is provided, including a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the above method.

[0060] In a fourth aspect, a computer readable storage medium is provided, including a computer program, and when the computer program is run on an electronic device, the computer program is used to make the electronic device execute the steps of the method of any one of the above aspects.

[0061] In a fifth aspect, a computer program product is provided, including a computer program, the computer program is stored in a computer readable storage medium, and the processor of an electronic device reads and executes the computer program from the computer readable storage medium, so that the electronic device executes the steps of the method of any one of the above aspects.

[0062] In the embodiments of the present application, after indicating the target device to run the target version software, the device information of the target device is periodically collected, and based on the collected device information in each collection period, the gray stage information of the corresponding collection period is obtained; then, based on the gray stage information of each collection period, the device running state detection is performed using the abnormality detection model to obtain the detection result of the corresponding collection period; and further, in the case where the first stage satisfies the set stage upgrade condition according to the detection result, the other stages of the gray release are continuously executed until the gray release is completed.

[0063] In this way, by periodically collecting the gray stage information of the target device carrying the target version software in the first stage of the gray release, and using the gray stage information of each collection period to detect the device running state, since the gray stage information can reflect the actual situation of the target device in the first stage, more accurate device running state detection can be realized, the state detection efficiency and accuracy are improved, and thus the efficiency of the gray release is ensured.

[0064] Meanwhile, the abnormality detection model trained according to the gray stage data in the historical version software release process is used for device running state detection. Since the model can learn the potential rules and relationships between the gray stage information and the device running state from the historical data, the accuracy of the abnormality detection can be ensured, the risk caused by false judgment is reduced, the uncertainty in the detection process is reduced, the stability of the overall system in the gray release process is ensured, in addition, the generalization ability of the model can be improved, so that it can adapt to the needs of different scenes, and the application range is expanded.

[0065] Other features and advantages of the present application will be set forth in the following description, and in part will become apparent to those skilled in the art from the description, or can be learned by practice of the present application. The objects and other advantages of the present application can be realized and achieved by the structure particularly pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF DRAWINGS

[0066] The drawings described herein are intended to provide further understanding of the present application, and constitute a part of the present application. The illustrative embodiments of the present application and their description serve to explain the present application, and do not constitute an improper limitation on the present application. In the drawings:

[0067] Figure 1 An application scenario provided in an embodiment of the present application is shown in the figure;

[0068] Figure 2 A schematic diagram of each stage in the gray release process provided in an embodiment of the present application is shown in the figure;

[0069] Figure 3 A schematic diagram of an abnormality detection model provided in an embodiment of the present application is shown in the figure;

[0070] Figure 4 A flowchart of an abnormality detection model training method provided in an embodiment of the present application is shown in the figure;

[0071] Figure 5 A flowchart of a gray release method of software provided in an embodiment of the present application is shown in the figure;

[0072] Figure 6 A logic diagram of a gray stage information processing process provided in an embodiment of the present application is shown in the figure;

[0073] Figure 7 A logic diagram of a device running state detection process provided in an embodiment of the present application is shown in the figure;

[0074] Figure 8 A logic diagram of a model optimization process provided in an embodiment of the present application is shown in the figure;

[0075] Figure 9 A logic schematic diagram of a model optimization judgment process provided in an embodiment of the present application;

[0076] Figure 10 A logic schematic diagram of a gray release process of software provided in an embodiment of the present application;

[0077] Figure 11 A structure schematic diagram of a gray release device of software provided in an embodiment of the present application;

[0078] Figure 12 A structure schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0079] To make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions of the present application will be described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments described in the present application document, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of protection of the technical solutions of the present application.

[0080] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program with a predetermined function, and works together with other related parts to achieve a predetermined target, and can be implemented entirely or partially by using software, hardware (such as a processing circuit or a memory) or a combination thereof. Similarly, one processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be a part of an overall module or unit that includes the functions of the module or unit.

[0081] It can be understood that when the embodiments of the present application are applied to specific products or technologies, relevant permissions or consents need to be obtained, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of countries and regions.

[0082] The word "exemplary" is used herein in the sense of being an example, illustration, or illustration. Any embodiment described as "exemplary" is not necessarily construed as being superior to or better than other embodiments.

[0083] The terms "first", "second" in the text are only for descriptive purposes, and cannot be understood as explicitly or implicitly indicating relative importance or implicitly indicating the number of indicated technical features. Therefore, the features defined with "first", "second" can explicitly or implicitly include one or more features, and in the description of the embodiments of the present application, unless otherwise specified, the meaning of "multiple" is two or more.

[0084] In the related art, in the gray release process, a plurality of exception types are usually set according to the version characteristics of the new version B, such as long response time, high system resource usage, and object behavior exception, and corresponding evaluation dimensions are set for each exception type. In this way, by comparing the evaluation dimension values after the new version B is released with the index threshold, it is determined whether to further expand the use range of the new version B.

[0085] However, on the one hand, the design of the index threshold depends on human experience, and due to the instability of human experience, the abnormality judgment process is uncertain, which leads to misjudgment or missed judgment, and affects the release efficiency and system stability. On the other hand, the index threshold required by different scenarios is different, and the use of a unified index threshold cannot meet the needs of different scenarios, and may not be able to effectively detect abnormalities in some specific scenarios.

[0086] In the embodiments of the present application, the gray stage information of the target device carrying the target version software in the first stage of the gray release is periodically collected, and the device running state detection is performed using the gray stage information of each collection period. The actual situation of the target device in the first stage can be obtained, and more accurate device running state detection can be performed, thereby improving the state detection efficiency and accuracy.

[0087] In addition, the abnormality detection model is trained using the gray stage data in the release process of the historical version software to perform device running state detection. Since the model can learn the potential rules and relationships between the gray stage information and the device running state from the historical data, the accuracy of the abnormality detection can be improved, and the generalization ability of the model can be improved, so that it can adapt to the needs of different scenarios.

[0088] The scheme provided in the embodiments of the present application mainly relates to machine learning technology in artificial intelligence, and specifically relates to training an abnormality detection model to perform device running state detection using machine learning technology. The machine learning process can be divided into a model training phase and a model application phase. In the model training phase, the abnormality detection model is iteratively trained using the gray stage data in the release process of the historical version software, and when the model converges, the trained abnormality detection model is output. In the model application phase, since the gray release is performed in stages, in each stage, the abnormality detection model can be used to perform device running state detection based on the gray stage information collected in the current stage, and the detection results of each collection period are obtained, so that whether to enter the next stage is determined according to the detection results of each collection period, and then the gray release for each device to be upgraded is gradually realized. The model training process and the model application process are described below, and will not be described here.

[0089] The preferred embodiments of the present application are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to explain and illustrate the present application, and are not used to limit the present application, and the embodiments and features in the embodiments can be combined with each other without conflict.

[0090] Referring to Figure 1 As shown in the figure, it is a possible application scenario provided in the embodiments of the present application. The application scenario at least includes a device to be upgraded 110 and an observation device 120. The number of the device to be upgraded 110 and the observation device 120 is not limited in the present application. The device to be upgraded 110 and the observation device 120 can be directly or indirectly connected through wired or wireless communication mode, which is not limited in the present application.

[0091] The device to be upgraded 110 is a device that needs to install target version software. For example, the device to be upgraded 110 can be, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, an Internet of Things device, a smart voice interaction device, a smart home appliance, a vehicle terminal, an aircraft, a palm swiping device, and the like.

[0092] The device to be upgraded 110 can also be a server. The server can be a standalone physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content distribution networks (CDN), and big data and artificial intelligence platforms, and the like.

[0093] The observation device 120 is a computing device with computing function, such as a terminal device or a server. The terminal device can be, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, an Internet of Things device, a smart voice interaction device, a smart home appliance, a vehicle terminal, an aircraft, and the like. The server can be a standalone physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server.

[0094] It should be noted that, Figure 1 The above is an example introduction to the application scenario of the gray release method of the present application. The application scenario to which the method in the embodiments of the present application can be applied is not limited thereto. Moreover, the embodiments of the present application can be applied to various software gray release scenarios, including but not limited to cloud technology, artificial intelligence, intelligent transportation, and assisted driving.

[0095] Taking a palm swiping payment scenario as an example, referring to Figure 2As shown, the device to be upgraded is a palm brushing device, the target version software is a target version client running in the palm brushing device, the client is used to process palm brushing business, and the observation device is a server. It is assumed that the gray release is divided into three stages, and 20%, 30%, and 50% of the palm brushing devices in each device to be upgraded are upgraded in the three stages. In the first stage, the abnormality detection model is used to detect the running state of the device based on the gray stage information collected in the first stage period, obtain the detection result of each collection period, and enter the second stage when the detection result of each collection period indicates that 20% of the palm brushing devices are upgraded successfully. In the second stage, the abnormality detection model is used to detect the running state of the device based on the gray stage information collected in the second stage period, obtain the detection result of each collection period, and enter the third stage when the detection result of each collection period indicates that 30% of the palm brushing devices are upgraded successfully. In the third stage, the abnormality detection model is used to detect the running state of the device based on the gray stage information collected in the third stage period, obtain the detection result of each collection period, and determine that the gray release is completed when the detection result of each collection period indicates that 50% of the palm brushing devices are upgraded successfully.

[0096] Of course, in actual application, 20%, 50%, and 100% of the palm brushing devices in each device to be upgraded can also be upgraded step by step, that is, 20% of the palm brushing devices are upgraded first, and then gradually increased to 50% and 100%. In each stage, the running state of the device is detected based on the gray stage information collected in the current stage.

[0097] Next, taking the palm brushing payment scenario as an example, the training process of the specific abnormality detection model and the gray release of the software using the trained abnormality detection model (i.e., the application process of the abnormality detection model) are described.

[0098] In the embodiments of the present application, the training process of the abnormality detection model is a process of multiple loop iteration training using training samples, which mainly includes a data preparation stage, a model design stage, and an iteration training stage.

[0099] (1) Data preparation stage

[0100] The data preparation stage is used to construct training samples for model training. The data preparation stage mainly involves two parts of original data collection and data preprocessing.

[0101] 1) Original data collection

[0102] In the embodiments of the present application, the related evaluation data in the historical version software release process is collected according to the set at least one evaluation dimension, and the initial sample data in each historical collection period is obtained. The collected related evaluation data can also be referred to as gray stage data.

[0103] Exemplarily, the evaluation dimensions include, but are not limited to, at least one of the following indexes:

[0104] A, device quantity. The device quantity represents the number of the historical upgrade devices covered by the historical version software in a historical collection period. The historical upgrade device covered by the historical version software refers to the upgrade device installed with the historical version software in a stage. For convenience of distinction, the historical upgrade device covered by the historical version software is referred to as historical upgrade device hereinafter.

[0105] B, CPU usage information. The CPU usage information is used to represent the CPU usage of each historical upgrade device in a historical collection period.

[0106] Exemplarily, the CPU usage information can be represented by CPU usage rate, which can be obtained by averaging the sub-CPU usage rates of each historical upgrade device, but is not limited thereto. The sub-CPU usage rate can be reported by the corresponding historical upgrade device. For example, in the palm swiping payment scenario, the CPU usage rate is the average value of the CPU usage rates of each palm swiping device when processing the palm swiping business.

[0107] C, memory usage information. The memory usage information is used to represent the memory usage of each historical upgrade device in a historical collection period.

[0108] Exemplarily, the memory usage information can be represented by memory usage rate, which can be obtained by averaging the sub-memory usage rates of each historical upgrade device, but is not limited thereto. The sub-memory usage rate can be reported by the corresponding historical upgrade device. For example, in the palm swiping payment scenario, the memory usage rate is the average value of the memory usage rates of each palm swiping device when processing the palm swiping business.

[0109] D, error information. The error information is used to represent the number of the historical upgrade devices in which abnormal events occur in each historical upgrade device in a historical collection period. Exemplarily, the error information can be represented by error rate, which is the proportion of the target devices in which abnormal events occur in each historical upgrade device in a historical collection period. Of course, the error information can also be directly represented by the number of the target devices in which abnormal events occur in each historical upgrade device in a historical collection period, and no limitation is made thereto.

[0110] The history upgrading device can report an abnormal error log to the observation device after an abnormal event occurs, so that the observation device obtains the error rate by acquiring and analyzing the abnormal error log. The abnormal error log can also carry information such as the event type and occurrence time of the abnormal event, but is not limited thereto.

[0111] For example, in the palm payment scenario, if the palm device has a camera abnormality when processing the palm business, an abnormal error log is reported to the server, and the abnormal error log carries an event type representing the camera abnormality. Then, the server obtains the error rate by acquiring and analyzing the abnormal error log.

[0112] E. History operation data. The history operation data is used to evaluate the business processing of each history upgrading device in a history collection period. For example, the history operation data can be represented by at least one of the following information: the number of palm swipes, the number of successful palm swipes, and the number of failed palm swipes of each history upgrading device, but is not limited thereto. The history operation data can be obtained from the operation log reported by each history upgrading device, and the operation log reported by each history upgrading device carries relevant information such as the number of palm swipes, the number of successful palm swipes, and the number of failed palm swipes of the corresponding history upgrading device.

[0113] In addition, the evaluation dimension can also include information such as the release time of the target version software. The index data of the above evaluation dimension can be reported by the target device periodically, and by adjusting the reporting period, the effect of real-time reporting can be achieved, thereby realizing the monitoring of the evaluation dimension.

[0114] Referring to Table 1, which is part of the initial sample data collected in the palm payment scenario in the embodiment of the present application. In the gray release process of the history version software (i.e., the palm client of the history version), the history collection period of a stage is 5 minutes, and the collection times are 6. Each row of data in Table 1 is the initial sample data corresponding to a collection period. The first column to the fifth column are the evaluation data corresponding to the five evaluation dimensions respectively, and the five evaluation dimensions include: device level, CPU usage, memory usage, camera abnormality number (equivalent to error information), and the number of successful palm swipes (equivalent to history operation data). The sixth column is the label corresponding to the initial sample data, which is used to represent whether each history upgrading device is running normally in the corresponding history collection period.

[0115] Table 1 (initial sample data)

[0116] Device magnitude CPU usage Memory usage Camera abnormal number Brush palm success times Whether normal 25 72% 40% 0 102 Yes 1004 75% 42% 4 4123 Yes 500 74% 62% 2 1052 No 802 74% 43% 20 2051 No 1243 0 0 5 5021 Yes …… …… …… …… …… ……

[0117] Taking the first three rows of data in Table 1 as an example, the first row of data represents that, in a historical collection period, the number of palm brushing devices installed with the historical version of the software is 25, the CPU usage rate is 72%, the memory usage rate is 40%, the number of camera abnormalities is 0 times, and the number of successful palm brushing times is 102, and the label data represents that the palm brushing device installed with the historical version of the software is running normally in the historical collection period.

[0118] The second row of data represents that, in a historical collection period, the number of palm brushing devices installed with the historical version of the software is 1004, the CPU usage rate is 75%, the memory usage rate is 42%, the number of camera abnormalities is 4 times, and the number of successful palm brushing times is 4123, and the label data represents that the palm brushing device installed with the historical version of the software is running normally in the historical collection period.

[0119] The third row of data represents that, in a historical collection period, the number of palm brushing devices installed with the historical version of the software is 500, the CPU usage rate is 74%, the memory usage rate is 62%, the number of camera abnormalities is 2 times, and the number of successful palm brushing times is 1052, and the label data represents that the palm brushing device installed with the historical version of the software is running abnormally in the historical collection period.

[0120] In a possible implementation manner, the collected initial sample data can be directly used as training samples.

[0121] In another possible implementation manner, in order to improve the accuracy, reliability and efficiency of data analysis and modeling, in the embodiments of the present application, the collected initial sample data can also be preprocessed, and the preprocessed initial sample data can be used as training samples.

[0122] 2) Data preprocessing

[0123] In the embodiments of the present application, the obtained gray stages in each historical collection period (i.e., each initial sample data) are preprocessed to obtain a training sample set. The data preprocessing includes but is not limited to at least one of the preprocessing operations such as data cleaning, data normalization, feature extraction, etc.

[0124] Preprocessing operation 1: data cleaning. Data cleaning is used to remove noise, outliers, repeated data, missing data and other factors that affect data quality, so as to improve data quality and reliability.

[0125] In a possible implementation manner, if the evaluation data of each evaluation dimension contained in an initial sample data is not located in the reference value range set for the corresponding evaluation dimension, the initial sample data is removed.

[0126] In the embodiments of the present application, the same or different reference value ranges can be set for each evaluation dimension.

[0127] Taking the initial sample data shown in Table 1 as an example, it is assumed that the reference value range set for the device magnitude is a non-negative number, and the reference value ranges set for the CPU usage and the memory usage are both (0, 100]. Obviously, in the first to fourth initial sample data, the values of the device magnitude all conform to the reference value range set for the device magnitude, and the values of the CPU usage and the memory usage all conform to the reference value ranges set for the CPU usage and the memory usage. In the fifth initial sample data, the value of the device magnitude is a positive number, which conforms to the reference value range set for the device magnitude, but the values of the CPU usage and the memory usage are both 0, which do not conform to the reference value ranges set for the CPU usage and the memory usage. Therefore, the fifth initial sample data is removed.

[0128] In addition, data cleaning can be performed on part or all of the evaluation dimensions, that is, when there is an evaluation dimension whose value is not located in the corresponding reference value range in the evaluation data of the three evaluation indexes of the device magnitude, the CPU usage and the memory usage, the initial sample data can be removed, or when there is an evaluation dimension whose value is not located in the corresponding reference value range in the evaluation data of the five evaluation indexes of the device magnitude, the CPU usage, the memory usage, the number of camera abnormalities and the number of successful palm swipes, the initial sample data can be removed.

[0129] Preprocessing operation 2: data normalization. Data normalization is used to adjust the values of the evaluation dimensions to a set value range. Generally, the set value range is [0, 1].

[0130] Since the data ranges of the evaluation data of the evaluation dimensions collected are different, different data ranges can cause some features of the data to dominate. Through data normalization, the sample data can be limited within a certain range, ensuring that each feature plays the same role in model training and data analysis, thereby eliminating the adverse effects of singular sample data. In particular, in a neural network, through data normalization, the neural network model can better learn the data, while accelerating the convergence speed of the model and improving the training efficiency.

[0131] In the embodiments of the present application, each initial sample data is normalized according to a set normalization method. The set normalization method includes but is not limited to maximum-minimum normalization, mean normalization, L2 norm normalization, etc.

[0132] Preprocessing operation 3: feature extraction. Feature extraction is used to extract more useful features from the initial sample data.

[0133] In a possible implementation manner, the evaluation data of the new evaluation dimension is extracted from the evaluation data of each evaluation dimension contained in the initial sample data, and the new sample data is obtained by combining the evaluation data of each evaluation dimension with the extracted evaluation data of the new evaluation dimension.

[0134] The evaluation data of the new evaluation dimension can be extracted according to the evaluation data of one or more evaluation dimensions. The new evaluation dimension can also be referred to as a reference evaluation dimension. For example, the reference evaluation dimension is the change amount of the number of successful palm swipes, and the change amount of the number of successful palm swipes can be obtained by using the number of successful palm swipes. The change amount of the number of palm swipes is the change amount compared with the number of successful palm swipes seven days ago.

[0135] The new sample data can be obtained by combining the evaluation data of each evaluation dimension with the extracted evaluation data of the new evaluation dimension, which can mean that the initial sample data is updated by combining the evaluation data of one or more evaluation dimensions with the evaluation data of the new evaluation dimension, or that a new initial sample data is constructed by combining the evaluation data of one or more evaluation dimensions with the evaluation data of the new evaluation dimension, which is not limited.

[0136] It should be noted that the execution order of the three operations of data cleaning, data normalization and feature extraction is not limited in the embodiments of the present application, and will not be described here.

[0137] Referring to Table 2, which is part of the training sample provided in the embodiments of the present application. Each row of data in Table 2 is obtained after data preprocessing of the initial sample data in Table 1. In the process of data preprocessing, data cleaning, data normalization and feature extraction are performed on each row of data in Table 1.

[0138] Compared with Table 1, in Table 2, the first column to the fifth column are the evaluation data corresponding to the five evaluation dimensions respectively, the five evaluation dimensions include: device level, CPU usage, memory usage, camera exception number, change amount of successful palm swipe number, and the sixth column is the corresponding label. The value range of the data in Table 2 except the fifth row is adjusted to [0, 1]. Since the values of CPU usage and memory usage in the fifth row are both 0, which does not meet the reference value range set for CPU usage and memory usage, the fifth initial sample data is excluded, and the deletion line is used to indicate the data exclusion.

[0139] Table 2 (training sample)

[0140]

[0141] (2) Model design phase

[0142] In the embodiments of the present application, the anomaly detection model can adopt, but is not limited to, a model structure such as a neural network and a deep network. Hereinafter, only a neural network structure is taken as an example for description.

[0143] The anomaly detection model includes an input layer, an output layer and a hidden layer. The input layer and the output layer are used for input and output of data, and the hidden layer is used for internal processing of data.

[0144] The hidden layer is used for transmission and calculation of information in the neural network. The number of layers of the hidden layer can be multiple. Each hidden layer is composed of multiple neurons, each neuron receives input from the previous layer, performs nonlinear conversion on the input, and transmits the conversion result as output to the next layer. Through such a calculation process, the neural network can learn the complex features of the input data and perform pattern recognition and prediction based on these features.

[0145] Referring to Figure 3 Fig. 1 is a schematic diagram of an architecture of an anomaly detection model provided in the embodiments of the present application. The anomaly detection model includes an input layer, an output layer and a hidden layer. The anomaly detection model is implemented by using a multilayer perceptron (MLP). The MLP is a feedforward neural network composed of an input layer, a hidden layer and an output layer. The multilayer perceptron can perform nonlinear mapping on input data and is used to solve classification and regression problems.

[0146] The input layer is composed of 5 nodes (x1 to x5), and the 5 nodes respectively represent the device magnitude, the CPU usage, the memory usage, the number of camera abnormalities and the change in the number of successful palm swipes. The middle layer is composed of two hidden layers, each hidden layer includes 64 nodes (h1 to h64), and the two hidden layers are connected in a full connection manner. The output layer is composed of 2 nodes (o1 and o2), one of the 2 nodes represents the probability of non-existence of anomaly in the corresponding collection period (i.e., the normal probability), and the other represents the probability of existence of anomaly in the corresponding collection period (i.e., the abnormal probability).

[0147] Taking the first row of data in Table 2 as an example, the 5 nodes of the output layer respectively receive the values 0, 0, 0, 0 and 0.937 of the device magnitude, the CPU usage, the memory usage, the number of camera abnormalities and the change in the number of successful palm swipes, respectively. Then, the two hidden layers are used for device running state detection, and the output layer outputs the normal probability and the abnormal probability of the first row of data. Then, according to the abnormal probability and the normal probability, the detection result of the first collection period is obtained.

[0148] Exemplarily, a deep learning-based method can also be used for device running state detection, for example, using an autoencoder as an anomaly detection model. The autoencoder is an unsupervised deep learning model that can learn high-level features of data and reconstruct input data. In the training phase, only training samples with normal labels are used for training, and then in the testing phase, if a data point cannot be reconstructed by the model, it is considered abnormal.

[0149] (3) Iterative training phase

[0150] In an embodiment of the present application, after the training samples are prepared, the constructed model can be trained using these training samples.

[0151] In an embodiment, the parameters and data required for training the anomaly detection model can be set according to the structure of the anomaly detection model, and TensorFlow (a programming architecture) framework can be selected as the training framework. After setting the hyperparameters such as batch size and iteration number, the training starts, and finally the anomaly detection model is obtained.

[0152] For example, the batch size of the anomaly detection model is set to 32, and the epoch is set to 10, i.e. 10 iterations of training, and the number of training samples processed in each batch in each iteration is 32. Of course, the parameter setting here is only one possible example, and in actual situations it can also be adjusted according to needs.

[0153] Referring to Figure 4 FIG. 1 shows a flowchart of an anomaly detection model training method provided by an embodiment of the present application. The anomaly detection model training method can be executed by a terminal device or a server. In the iterative training process, each training sample in the training sample set is divided into several batches, and training is performed based on the training samples in each batch. Since the steps performed when training each batch in each iteration are similar, an example of training a batch is described here.

[0154] S401, input each training sample in a batch into the anomaly detection model to obtain the prediction result of the corresponding training sample.

[0155] In a possible implementation, based on each training sample, the anomaly detection model is used to detect the device running state to obtain a first prediction value and a second prediction value of the corresponding training sample, wherein the first prediction value and the second prediction value respectively represent the probabilities of the historical upgraded device running normally and abnormally after installing the historical version of the software.

[0156] It should be noted that in the embodiments of the present application, the probabilities of normal operation or abnormal operation of each historical upgraded device in a historical collection period are determined, and therefore, whether the probability of normal operation of each historical upgraded device or the probability of abnormal operation of each historical upgraded device is a prediction of the overall device operation state.

[0157] For example, each training sample in Table 2 is input into the anomaly detection model to obtain a first prediction value and a second prediction value corresponding to each training sample, respectively. The first prediction value represents the probability of normal operation of each palm device installed with the historical version software, and the second prediction value represents the probability of abnormal operation of each palm device installed with the historical version software. Taking the first training sample as an example, the first prediction value represents the probability of normal operation of 25 palm devices, and the second prediction value represents the probability of abnormal operation of 25 palm devices.

[0158] In another possible implementation, based on each training sample, the device operation state is detected by using the anomaly detection model respectively to obtain a prediction probability set of the corresponding training sample, each prediction probability set containing at least one prediction probability, and each prediction probability being used to represent the probability of existence of a corresponding type of anomaly.

[0159] For example, each training sample in Table 2 is input into the anomaly detection model to obtain a prediction probability set corresponding to each training sample, respectively. Assuming that there are three types of anomalies, and the three types of anomalies include network delay, device failure and misoperation, each prediction probability set can contain three prediction probabilities, and each prediction probability is used to represent the probability of existence of one type of anomaly. Taking the first training sample as an example, the prediction probability set of the first training sample contains a first prediction probability, a second prediction probability and a third prediction probability. The first prediction value represents the probability of existence of the first type of anomaly (network delay) of 25 palm devices, the second prediction value represents the probability of existence of the second type of anomaly (device failure) of 25 palm devices, and the second prediction value represents the probability of existence of the third type of anomaly (misoperation) of 25 palm devices.

[0160] In the embodiments of the present application, the detection result of the anomaly detection model can also be a classification result directly, such as whether there is an anomaly or a specific type of anomaly. The classification result is obtained by converting the first prediction value and the second prediction value or the prediction probability set.

[0161] S402, based on the obtained prediction results of each training sample, and in combination with the labels of each training sample, a model loss value of the anomaly detection model is determined.

[0162] In the embodiments of the present application, the model loss value can be calculated by using a loss function such as a Cross Entry loss function, a quadratic loss function, and an absolute loss function, but is not limited thereto.

[0163] S403, it is judged whether the anomaly detection model meets a convergence condition. If the convergence condition is not met, S404 is performed, otherwise, S405 is performed.

[0164] In the embodiments of the present application, the convergence condition can include at least one of the following conditions:

[0165] (1) the model loss value is not greater than a preset loss value threshold.

[0166] (2) the number of iterations reaches a preset upper limit value.

[0167] S404, based on the model loss value, the model parameter of the anomaly detection model is adjusted.

[0168] In the embodiments of the present application, a suitable optimization algorithm can be selected to adjust the weight of the neural network to minimize the loss function. For example, if adaptive learning is required, the optimizer is selected as Adam (adaptive moment estimation), and Tensorflow is used for model training. Adam is an optimization algorithm that combines the momentum method and RMSprop, and has the characteristics of adaptive learning rate, which is suitable for scenarios that require fast convergence and adaptive learning rate.

[0169] S505, the trained anomaly detection model is output.

[0170] If the anomaly detection model meets the convergence condition, the anomaly detection model has converged, and the training is completed. If the anomaly detection model does not meet the convergence condition, the model parameter of the anomaly detection model needs to be continuously adjusted, and the adjusted anomaly detection model is used to enter the next training process, that is, jump to S301 for the next batch of training.

[0171] Further, after the training of the anomaly detection model is completed, the anomaly detection model can also be tested. If the evaluation accuracy meets the requirements, it can be put into actual use. According to a certain sample division ratio, each pre-trained initial sample data can be divided into a training sample set and a validation sample set. When the model is tested, the validation sample set is used for testing.

[0172] Referring to Figure 5 As shown in FIG. 5, it is a flowchart of a gray release method of a software provided in the embodiments of the present application. The flowchart can be applied to an observation device, and the specific process is as follows:

[0173] S501, respectively instruct at least one target device to run target version software, the at least one target device is a to-be-upgraded device in each to-be-upgraded device, and the to-be-upgraded device carries target version software in a first stage of gray release.

[0174] The to-be-upgraded device carrying the target version software in the first stage of gray release refers to the to-be-upgraded device that installs the target version software in the first stage.

[0175] Referring to Figure 6 It is assumed that the target version software is a new version of a palm brushing client, each to-be-upgraded device includes 1000 palm brushing devices, and the palm brushing devices carrying the target version software in the first stage of gray release are 200 palm brushing devices in the 1000 palm brushing devices. Therefore, the 200 target devices are respectively instructed to run the target version software to implement client upgrading of the 200 target devices.

[0176] In the embodiment of the application, an installation package of the target version software can be sent to the target device to enable the target device to install the target version software, or an upgrade instruction can be sent to the target device to enable the target device to download and install the target version software, and the application is not limited in this regard.

[0177] S502, periodically collect device information of the at least one target device within the first stage, and obtain gray stage information of a corresponding collection period based on the collected device information within each collection period.

[0178] In the embodiment of the application, data can be collected periodically according to at least one evaluation dimension set in the first stage to obtain device information within a corresponding collection period. The collection process of the device information is similar to the collection process of the initial sample data in the training process, and will not be described herein.

[0179] For example, still referring to Figure 6 The collection period is 5 minutes, and the device magnitude, CPU usage, memory usage, camera abnormal number, and palm brushing success number of the 200 palm brushing devices in the first stage are collected once every five minutes as device information within a corresponding collection period. It is assumed that the device information is collected 6 times, and device information within 6 collection periods can be obtained, and the 6 collection periods include 10:00-10:05, 10:05-10:10, 10:10-10:15, 10:15-10:20, 10:20-10:25, and 10:25-10:30. The device information within each collection period includes the device magnitude, CPU usage, memory usage, camera abnormal number, and palm brushing success number.

[0180] When obtaining grayscale phase information for a given acquisition period based on device information collected within each acquisition period, one possible approach is to directly use the device information from each acquisition period as the grayscale phase information for that period. Another possible approach is to refer to [reference needed]. Figure 6 As shown, the device information in each acquisition cycle can also be preprocessed, and the preprocessed device information can be used as the grayscale stage information in the corresponding acquisition cycle. Since the data preprocessing process of device information is similar to the data preprocessing process of initial sample data in the training process, it will not be described in detail here.

[0181] S503. Based on the grayscale phase information of each acquisition cycle, the anomaly detection model is used to detect the device operating status and obtain the detection results of the corresponding acquisition cycle. The anomaly detection model is trained using grayscale phase data from the historical software release process.

[0182] Each detection result is used to characterize whether the target device is operating normally during the corresponding acquisition cycle.

[0183] In one possible implementation, based on the grayscale phase information of each acquisition cycle, the device operating status is detected using an anomaly detection model to obtain a first predicted value and a second predicted value for the corresponding acquisition cycle. The first predicted value and the second predicted value respectively represent the probability of at least one target device operating normally and abnormally. Based on the first predicted value and the second predicted value of each acquisition cycle, the detection result for the corresponding acquisition cycle is obtained.

[0184] Assuming that the first predicted value represents the probability of normal operation and the second predicted value represents the probability of abnormal operation, the grayscale stage information of each collection period is input into the anomaly detection model to obtain the first predicted value and the second predicted value of the corresponding collection period. The first predicted value represents the probability of each swiping device with the historical version of the software installed operating normally, and the second predicted value represents the probability of each swiping device with the historical version of the software installed operating abnormally.

[0185] See Figure 7 As shown, based on the grayscale phase information of 6 acquisition cycles, the anomaly detection model is used to detect the equipment's operating status and obtain the detection results for the corresponding acquisition cycles. The 6 acquisition cycles include 10:00~10:05, 10:05~10:10, 10:10~10:15, 10:15~10:20, 10:20~10:25, and 10:25~10:30. The detection results for all 6 acquisition cycles show that the equipment is operating normally.

[0186] In another possible implementation, based on the grayscale phase information of each acquisition cycle, an anomaly detection model is used to detect the device's operating status and obtain prediction results for various anomalies in the corresponding acquisition cycle. Each prediction result is used to characterize the probability that at least one target device has a corresponding type of anomaly within the corresponding acquisition cycle. Based on the prediction results of various anomalies in each acquisition cycle, the detection result for the corresponding acquisition cycle is obtained. In other words, the anomaly detection model can also output specific anomaly types.

[0187] S504. If, based on the detection results of each collection cycle, it is determined that the first stage meets the set stage upgrade conditions, then the other stages of the gray-scale release will continue to be executed until the gray-scale release is completed.

[0188] The conditions for phase upgrades include, but are not limited to, any one of the following conditions:

[0189] Condition 1: The detection results of each acquisition cycle all indicate that the target device is operating normally in the corresponding acquisition cycle.

[0190] For example, see Figure 7 As shown, six data collections were performed in the first phase. If the detection results of all six collection cycles indicate that the target device is operating normally in the corresponding collection cycle, then the first phase is determined to meet the set phase upgrade conditions, and the second phase of gray-scale release will continue until the gray-scale release is completed.

[0191] Condition 2: In each acquisition cycle, the number of acquisition cycles in which the detection results indicate that at least one target device is operating normally reaches a set threshold.

[0192] For example, suppose the quantity threshold is set to 4. For the 6 collection cycles in the first stage, if the detection results of 4 consecutive collection cycles in the 6 collection cycles indicate that the target device is operating normally in the corresponding collection cycle, then the first stage is determined to meet the set stage upgrade conditions, and then the second stage, the third stage, and other subsequent stages of gray release will continue to be executed until the gray release is completed.

[0193] Furthermore, to improve the success rate and efficiency of version releases, please refer to... Figure 8 As shown, the anomaly detection model can be optimized using an optimized sample set, and the optimized anomaly detection model can then be used to continue the second phase of the gray-scale release until the gray-scale release is completed. The optimized sample set can be new sample data or sample data generated based on the actual operating status of the target device during the first phase; there are no restrictions on which one is used.

[0194] Specifically, in the embodiments of the present application, if the abnormality detection model meets the set optimization condition, the model optimization is performed on the abnormality detection model based on the actual running state of at least one target device in the first stage, and an optimized abnormality detection model is obtained. Further, the other stages of the gray release are continued to be executed by using the optimized abnormality detection model until the gray release is completed.

[0195] In a possible implementation manner, the optimization condition comprises at least one of the following conditions:

[0196] Condition 1: the prediction effect evaluation value of the abnormality detection model does not meet the set prediction effect range, wherein the prediction effect evaluation value is determined according to the actual running state of at least one target device.

[0197] The actual running state of at least one target device in the first stage comprises the actual running state of each collection period in the first stage, and the actual running state of each collection period represents whether the target device actually normally runs in the corresponding collection period.

[0198] The actual running state of one collection period can be determined in the following ways:

[0199] In a possible implementation manner, in one collection period, if there is a target device that actually runs abnormally among the at least one target device in the first stage, the actual running state of the collection period is running abnormally, otherwise, the actual running state of the collection period is running abnormally.

[0200] Taking the first collection period as an example, for 100 palm brushing devices in the first stage, if there is a palm brushing device that runs abnormally in the actual running process, the actual running state of the first collection period is running abnormally, and if there is no palm brushing device that runs abnormally in the 100 palm brushing devices, the actual running state of the first collection period is running normally.

[0201] In a possible implementation manner, in one collection period, if the number of target devices that actually run abnormally among the at least one target device in the first stage exceeds the set number threshold, the actual running state of the collection period is running abnormally, otherwise, the actual running state of the collection period is running abnormally.

[0202] Still taking the first collection period as an example, for 100 palm brushing devices in the first stage, if there are 20 palm brushing devices that run abnormally in the actual running process, and the set number threshold is 15, the actual running state of the first collection period is running abnormally.

[0203] In a possible implementation, in one collection period, if the proportion of target devices actually running abnormally in the at least one target device in the first stage exceeds a set proportion threshold, the actual running state of the collection period is running abnormally, otherwise, the actual running state of the collection period is running abnormally.

[0204] Still taking the first collection period as an example, for the 100 palm brushing devices in the first stage, if there are 20 palm brushing devices running abnormally in the 100 palm brushing devices in the actual running process, assuming that the set quantity threshold is 10%, at this time, the proportion of target devices actually running abnormally is 20 / 100=20%, and the proportion of target devices actually running abnormally exceeds the set proportion threshold, therefore, the actual running state of the first collection period is running abnormally.

[0205] It should be noted that in the embodiments of the present application, the actual running state is for the whole target device, but in actual application, the actual running state of the at least one target device can also be information such as actual running normally or abnormally of each target device, proportion of target devices actually running normally or abnormally, and the like, for example, the actual running state represents whether each palm brushing device in the 100 palm brushing devices in the first stage actually runs normally or abnormally, or the proportion of palm brushing devices actually running normally in the 100 palm brushing devices in the first stage. The granularity of the actual running state can be set according to actual needs, and no limitation is made thereto.

[0206] In the embodiments of the present application, the actual running state can be determined according to feedback information fed back by a target object. In a possible implementation, the target object inputs feedback information, and the feedback information carries the actual running state, so that the actual running state can be directly obtained according to the feedback information fed back by the target object.

[0207] In another possible implementation, the target object inputs feedback information, and the feedback information includes but is not limited to information such as actual running normally or abnormally of each target device in each collection period in the first stage, proportion of target devices actually running normally or abnormally, and the like, so that the actual running state can be obtained by analyzing the feedback information fed back by the target object.

[0208] In some embodiments, the prediction effect evaluation value of the abnormality detection model can be obtained according to the detection result of each collection period and in combination with the actual running state of the at least one target device.

[0209] As an example, for each collection cycle, by comparing the detection result of the collection cycle and the actual running state, if both are the same, the prediction of the anomaly detection model in the collection cycle is correct, if there is a difference between the two, the prediction of the anomaly detection model in the collection cycle is wrong. After obtaining the prediction effect (prediction correct or prediction wrong) of the anomaly detection model in each collection cycle, the prediction effect of the anomaly detection model in each collection cycle is summarized to obtain the prediction effect evaluation value of the anomaly detection model in the first stage. For example, the proportion of the collection cycle in the first stage that is correctly predicted can be used as the prediction effect evaluation value of the anomaly detection model in the first stage.

[0210] It should be noted that in the implementation of the present application, the prediction effect evaluation value can be represented by a numerical value or a grade, and the comparison is not limited. In this paper, only numerical forms are used as examples for illustration.

[0211] For example, in the first stage, the prediction effect of 5 collection cycles is the same as the actual running state, and the prediction effect of 1 collection cycle is different from the actual running state. Then, the prediction effect evaluation value of the anomaly detection model in the first stage = 5 / 6 ≈ 83%. Assuming that the set prediction effect range is 80% or more, obviously, the prediction effect evaluation value of the anomaly detection model meets the set prediction effect range, that is, the anomaly detection model does not meet the set optimization condition.

[0212] For example, in the first stage, the prediction effect of 4 collection cycles is the same as the actual running state, and the prediction effect of 2 collection cycles is different from the actual running state. Then, the prediction effect evaluation value of the anomaly detection model in the first stage = 4 / 6 ≈ 67%. Assuming that the set prediction effect range is 80% or more, obviously, the prediction effect evaluation value of the anomaly detection model does not meet the set prediction effect range, that is, the anomaly detection model meets the set optimization condition.

[0213] Condition 2: The adjustment effect evaluation value of the target version software does not meet the set adjustment effect range, wherein the adjustment effect evaluation value is used to evaluate the actual running state of at least one target device after adjusting the target version software based on the detection result of each collection cycle.

[0214] The adjustment effect evaluation value can be determined according to the actual running state of at least one target device after adjusting the target version software. The adjustment effect evaluation value can be represented by a numerical value or a grade, and the comparison is not limited. In this paper, only numerical forms are used as examples for illustration. For example, after adjusting the target version software, the proportion of target devices running normally in at least one target device during the actual running process can be used as the adjustment effect evaluation value.

[0215] In a possible implementation, the adjustment effect evaluation value can be, but is not limited to, obtained in the following manner:

[0216] Based on the detection result of each collection cycle, a detection report carrying an optimization suggestion is generated, and the detection report is presented to the target object;

[0217] After receiving the adjustment of the target version software by the target object according to the optimization suggestion, the actual running state of the at least one target device;

[0218] Based on the actual running state of the at least one target device after adjustment, an adjustment effect evaluation value is obtained.

[0219] In the embodiments of the present application, after obtaining the detection result of each collection cycle, a first-stage detection report can also be provided to the target object. The detection report can also be called an observation report. By providing the observation report to the target object, the target object is assisted to adjust the target version software.

[0220] The detection report can carry an optimization suggestion. In this way, after the abnormal situation is found in time by using the anomaly detection model, the optimization suggestion is provided to help the target object to continuously optimize the software in the release process of the target version software, thereby improving the efficiency of version release.

[0221] In the optimization suggestion, the adjustment of the target version software can adopt one or more adjustment operations of optimizing system code and adjusting system parameters, but is not limited thereto. Optimizing system code and adjusting system parameters are an important link in the software development process, and can improve the performance, reliability and maintainability of the system.

[0222] For example, when optimizing system code, the running cost and energy consumption of the system can be reduced by reducing the consumption of resources such as memory, CPU and disk, or the running speed and response time of the system can be improved by optimizing algorithms, data structures and programming skills.

[0223] When adjusting system parameters, the running speed and response time of the system can be improved by adjusting system parameters such as cache size, thread number, memory allocation, or the running cost and energy consumption of the system can be reduced by adjusting system parameters such as power management, disk scheduling, or the stability and fault tolerance of the system can be improved by adjusting system parameters such as timeout setting, retry strategy.

[0224] As an example, the abnormality types predicted by the detection results of each collection period in the first stage output by the abnormality detection model can be summarized to obtain summary information, which includes at least one of the number of occurrences, the proportion of occurrences, the time of occurrences, etc. of each abnormality type. Then, the summary information is analyzed to identify a key abnormality type from the predicted abnormality types, and one or more information such as the possible causes, the impact, the optimization suggestions, etc. of the key abnormality type is analyzed to obtain an analysis report. Finally, the summary information and the analysis report are integrated to obtain an observation report of the first stage. The observation report is further presented to the target object.

[0225] For example, in the observation report, the abnormality type is a long response time, which can be caused by a background service failure, a network communication module failure of the palm brushing device, etc. The long response time can affect the user experience and cause user loss. To address the long response time, the priority of each process in the palm brushing payment system can be dynamically adjusted, or the transmission priority of various information can be adjusted to reduce the waiting time of palm brushing recognition.

[0226] It should be noted that in the embodiments of the present application, the observation report can be generated based on the detection results of each collection period when the detection results of each collection period represent that there is at least one collection period with a running abnormality. The observation report can also be generated based on the detection results of each collection period after the detection results of each collection period are generated in each stage.

[0227] Condition 3: The prediction effect evaluation value of the abnormality detection model decreases. Specifically, if the current stage is the first stage, the prediction effect evaluation value of the abnormality detection model in the first stage decreases relative to the model training stage. If the current stage is another stage, the prediction effect evaluation value of the abnormality detection model in the current stage decreases relative to the previous stage.

[0228] It should be noted that the decrease in the prediction effect evaluation value can mean that the prediction effect evaluation value of the abnormality detection model in the current stage is lower than that of the abnormality detection model in the previous stage. The decrease in the prediction effect evaluation value can also mean that the prediction effect evaluation value of the abnormality detection model in the current stage is lower than that of the abnormality detection model in the previous stage, and the difference between the two exceeds a set threshold.

[0229] Condition 4: the adjustment effect evaluation value of the target version software after adjustment decreases. For example, when the adjustment effect evaluation value of the target version software after adjustment is lower than the adjustment effect evaluation value of the target version software before adjustment, model optimization is needed. Or, when the adjustment effect evaluation value of the target version software after adjustment is lower than the adjustment effect evaluation value of the target version software before adjustment, and the difference between the two exceeds a set threshold, model optimization is needed.

[0230] In the embodiments of the present application, the abnormality detection model can be determined to meet the set optimization condition when conditions 1, 2, 3 or 4 are met, or the abnormality detection model can be determined to meet the set optimization condition when multiple conditions 1 to 4 are met, and this is not limited.

[0231] For example, referring to Figure 9 , whether model optimization is needed is determined according to model effect. Model effect is embodied in two aspects. The first aspect is the prediction effect of the abnormality detection model, which can be obtained by comparing the detection results output by the model and the actual running situation. The second aspect is the adjustment effect of the target object after adjusting the target version software according to the optimization suggestion. The prediction effect can be represented by a prediction effect evaluation value, and the adjustment effect can be represented by an adjustment effect evaluation value.

[0232] In the above implementation manner, through the detection of model effect, model updating and optimization suggestion iteration can be performed in a timely manner to ensure the effectiveness and accuracy of the system.

[0233] In a possible implementation manner, the abnormality detection model is optimized based on the actual running state of at least one target device in the first stage to obtain an optimized abnormality detection model, including but not limited to the following implementation manners:

[0234] Based on the gray stage information of each collection period, in combination with the actual running state of at least one target device, an optimization sample set for model optimization is constructed;

[0235] The optimization sample set is used to fine-tune the abnormality detection model to obtain an optimized abnormality detection model.

[0236] Similar to the construction process of the training sample, in the model optimization process, the gray stage information of each collection period in the first stage is used as an optimization sample, and the feedback information is used as a label of the optimization sample, so as to obtain an optimization sample set for model optimization. In addition, the optimization sample can also include newly collected training samples. Since the construction process of the optimization sample is similar to that of the training sample, it will not be described here.

[0237] In the embodiments of the present application, methods such as transfer learning and incremental learning can be used, and the model can be fine-tuned in combination with the optimized samples to improve the prediction accuracy of the model.

[0238] In the above implementation manner, the model is further trained by using the gray stage information of the first stage, so that the model can make more accurate prediction according to the actual situation, and the prediction accuracy of the model is improved.

[0239] In a possible implementation manner, the optimized anomaly detection model can be used to continue to perform the process of other stages of the gray release, and at the set monitoring time, it is detected whether the optimized anomaly detection model meets the set optimization condition; if the optimized anomaly detection model meets the set optimization condition, the model optimization of the optimized anomaly detection model is continued.

[0240] The set monitoring time can obtain the detection results of each collection period of the corresponding stage, or can be a fixed time interval. The detection process of whether the optimized anomaly detection model meets the set optimization condition is of the same type as the detection process in the first stage, and details are described above and will not be repeated here.

[0241] In the above implementation manner, by adjusting the set monitoring time, the model effect can be continuously monitored, so that the model can be updated in time when model optimization is needed, thereby ensuring the prediction accuracy and adaptability of the model.

[0242] In the above implementation manner, the gray stage information of each collection period in the first stage is used as an optimization sample, the label of each optimization sample can be obtained by using the feedback information, and then the optimization sample is used to fine-tune the anomaly detection model to improve the prediction accuracy of the model.

[0243] Next, the present application will be described in combination with other application scenarios,

[0244] Referring to FIG. 1, Figure 10 As shown in FIG. 1, the device to be upgraded is a mobile phone, the target version software is a social application in the mobile phone, and the observation device is a server. It is assumed that the gray release is divided into five stages, and the mobile phone to be upgraded is divided into 10%, 15%, 20%, 25%, and 30% five parts, and the software of 10%, 15%, 20%, 25%, and 30% of the mobile phone is upgraded in the five stages.

[0245] In the first stage, the server instructs 10% of the mobile phones to run the target version software. Then, the device information of the 10% of the mobile phones is periodically collected, and the gray scale stage information of each collection period is obtained based on the collected device information of each collection period. Then, the abnormality detection model trained according to the training sample set is used to detect the running state of the device based on the gray scale stage information collected in the first stage, and the detection result of each collection period is obtained. Assuming that the detection result of each collection period in the first stage is normal, and the model does not meet the optimization condition, the second stage is entered.

[0246] In the second stage, the server instructs 15% of the mobile phones to run the target version software. Then, the device information of the 15% of the mobile phones is periodically collected, and the gray scale stage information of each collection period is obtained based on the collected device information of each collection period. Then, the abnormality detection model trained according to the training sample set is used to detect the running state of the device based on the gray scale stage information collected in the second stage, and the detection result of each collection period is obtained. Assuming that the detection result of each collection period in the second stage is normal, and the model does not meet the optimization condition, the third stage is entered.

[0247] In the third stage, the server instructs 20% of the mobile phones to run the target version software. Then, the device information of the 20% of the mobile phones is periodically collected, and the gray scale stage information of each collection period is obtained based on the collected device information of each collection period. Then, the abnormality detection model trained according to the training sample set is used to detect the running state of the device based on the gray scale stage information collected in the third stage, and the detection result of each collection period is obtained.

[0248] Assuming that there are two detection results representing running abnormalities in the detection results of each collection period in the third stage, the server aggregates the abnormality types predicted by the detection results of each collection period based on the detection results of each collection period, obtains aggregation information, and the aggregation information includes the number of occurrences and the proportion of each abnormality type. Then, the aggregation information is analyzed, and the key abnormality type is identified from the predicted abnormality types, and an analysis report including the abnormality reason, the impact and the optimization suggestion is generated for the key abnormality type. Finally, the aggregation information and the analysis report are integrated to obtain the observation report of the third stage.

[0249] After the server receives the actual running state of the mobile phone after the target object adjusts the target version software according to the optimization suggestion, the adjustment effect evaluation value is obtained based on the actual running state.

[0250] If the adjustment effect evaluation value of the target version software decreases before the adjustment is made relative to the target version software, it indicates that the model effect decreases, at this time, the anomaly detection model meets the optimization condition, therefore, the anomaly detection model is optimized by using the optimization sample library.

[0251] Further, the server can periodically collect device information of 20% of the mobile phones, and obtain gray stage information of a corresponding collection period based on the collected device information in each collection period. Then, the device running state is detected based on the gray stage information collected in the third stage by using the optimized anomaly detection model, and detection results of each collection period are obtained. Assuming that the detection results of each collection period are all normal, the fourth stage is entered.

[0252] In the fourth stage, 25% of the mobile phones are instructed to run the target version software. Then, device information of 25% of the mobile phones is periodically collected, and gray stage information of a corresponding collection period is obtained based on the collected device information in each collection period. Then, the device running state is detected based on the gray stage information collected in the fourth stage by using the optimized anomaly detection model, and detection results of each collection period are obtained. Assuming that the detection results of each collection period in the fourth stage are all normal, the fifth stage is entered.

[0253] In the fifth stage, 30% of the mobile phones are instructed to run the target version software. Then, device information of 30% of the mobile phones is periodically collected, and gray stage information of a corresponding collection period is obtained based on the collected device information in each collection period. Then, the device running state is detected based on the gray stage information collected in the fifth stage by using the optimized anomaly detection model, and detection results of each collection period are obtained. Assuming that the detection results of each collection period in the fifth stage are all normal, the gray release is completed.

[0254] Based on the same inventive concept, an embodiment of the present application provides a gray release device of software. As shown in FIG. 11, which is a structural schematic diagram of the gray release device 1100 of software, the device can include: Figure 11

[0255] The release unit 1101 is configured to instruct at least one target device to run a target version software, the at least one target device being a target upgraded device in each target upgraded device that carries the target version software in a first stage of gray release;

[0256] The collection unit 1102 is configured to periodically collect device information of the at least one target device in the first stage, and obtain gray stage information of a corresponding collection period based on the collected device information in each collection period;

[0257] ​The detection unit 1103 is configured to perform equipment operation state detection on the basis of the gray stage information of each collection period by using an anomaly detection model respectively, to obtain a detection result of the corresponding collection period, and the anomaly detection model is trained by using gray stage data in a historical version software release process.

[0258] The judgment unit 1104 is configured to continue to perform other stages of the gray release until the gray release is completed, if it is determined that the first stage meets a set stage upgrade condition on the basis of the detection result of each collection period.

[0259] In a possible implementation, the detection unit 1103 is further configured to:

[0260] If the anomaly detection model meets a set optimization condition, the anomaly detection model is optimized on the basis of the actual operation state of the at least one target equipment in the first stage, to obtain an optimized anomaly detection model;

[0261] The continuing to perform other stages of the gray release until the gray release is completed includes:

[0262] The continuing to perform other stages of the gray release until the gray release is completed includes:

[0263] In a possible implementation, the optimization condition includes at least one of the following conditions:

[0264] The prediction effect evaluation value of the anomaly detection model does not meet a set prediction effect range, wherein the prediction effect evaluation value is determined according to the actual operation state of the at least one target equipment;

[0265] The adjustment effect evaluation value of the target version software does not meet a set adjustment effect range, wherein the adjustment effect evaluation value is used to evaluate the actual operation state of the at least one target equipment after the target version software is adjusted on the basis of the detection result of each collection period;

[0266] The adjustment effect evaluation value of the target version software decreases relative to that before the target version software is adjusted;

[0267] The prediction effect evaluation value of the anomaly detection model decreases.

[0268] In a possible implementation, the detection unit 1103 is further configured to obtain the adjustment effect evaluation value by the following manner:

[0269] Generating a detection report carrying an optimization suggestion on the basis of the detection result of each collection period, and presenting the detection report to a target object;

[0270] receiving an adjustment of the target object to the target version software according to the optimization suggestion, an actual running state of the at least one target device;

[0271] obtaining the adjustment effect evaluation value based on the actual running state of the at least one target device after the adjustment.

[0272] In a possible implementation, when the model optimization unit 1102 optimizes the anomaly detection model based on the actual running state of the at least one target device in the first stage to obtain an optimized anomaly detection model, the detection unit 1103 is specifically configured to:

[0273] constructing an optimization sample set for model optimization based on the grayscale stage information of the each collection cycle and in combination with the actual running state of the at least one target device;

[0274] fine-tuning the anomaly detection model by using the optimization sample set to obtain the optimized anomaly detection model.

[0275] In a possible implementation, the detection unit 1103 is further configured to:

[0276] continuing to perform the process of other stages of the grayscale release by using the optimized anomaly detection model, and detecting whether the optimized anomaly detection model meets a set optimization condition according to a set monitoring time;

[0277] if the optimized anomaly detection model meets the set optimization condition, continuing to optimize the optimized anomaly detection model.

[0278] In a possible implementation, when the model optimization unit 1102 respectively detects the device running state by using the anomaly detection model based on the grayscale stage information of the each collection cycle to obtain a detection result of the corresponding collection cycle, the detection unit 1103 is specifically configured to:

[0279] respectively detecting the device running state by using the anomaly detection model based on the grayscale stage information of the each collection cycle to obtain a first prediction value and a second prediction value of the corresponding collection cycle, the first prediction value and the second prediction value respectively representing probabilities of normal running and abnormal running of the at least one target device;

[0280] obtaining the detection result of the corresponding collection cycle based on the first prediction value and the second prediction value of the each collection cycle.

[0281] In a possible implementation, when the model optimization unit 1102 respectively detects the device running state by using the anomaly detection model based on the grayscale stage information of the each collection cycle to obtain a detection result of the corresponding collection cycle, the detection unit 1103 is specifically configured to:

[0282] Based on the gray stage information of each collection period, the device running state detection is performed by using an anomaly detection model respectively, and a prediction result of each type of anomaly in the corresponding collection period is obtained; each prediction result is used to represent a probability of existence of a corresponding type of anomaly of the at least one target device in the corresponding collection period;

[0283] Based on the prediction result of each type of anomaly in each collection period, a detection result of the corresponding collection period is obtained.

[0284] In a possible implementation, the detection unit 1103 is further configured to:

[0285] According to at least one evaluation dimension, related evaluation data in a historical version software release process is collected, and initial sample data in each historical collection period is obtained;

[0286] Based on the obtained initial sample data in each historical collection period, data preprocessing is performed, and a training sample set is obtained;

[0287] The anomaly detection model to be trained is iteratively trained by using the training sample set, and a trained anomaly detection model is obtained.

[0288] In a possible implementation, the evaluation dimension includes at least one of the following indicators:

[0289] Device magnitude, the device magnitude is used to represent a device quantity of each historical upgrade device installing the historical version software in one historical collection period;

[0290] Central processing unit (CPU) usage information, the CPU usage information is used to evaluate a CPU usage of each historical upgrade device installing the historical version software in one historical collection period;

[0291] Memory usage information, the memory usage information is used to evaluate a memory usage of each historical upgrade device installing the historical version software in one historical collection period;

[0292] Error information, the error information is used to represent a quantity of historical upgrade devices in which an abnormal event occurs in each historical upgrade device installing the historical version software in one historical collection period;

[0293] Historical operation data, the historical operation data is used to evaluate a business processing condition of each historical upgrade device installing the historical version software in one historical collection period.

[0294] In a possible implementation, based on the detection result of each collection period, when the first stage satisfies a set stage upgrade condition, the determination unit 1104 is specifically configured to:

[0295] If the detection results of the respective collection periods all represent that the running state of the target device in the corresponding collection period is normal, it is determined that the first stage satisfies the set stage upgrade condition; or,

[0296] If the number of collection periods in which the detection results represent that the running state of the target device is normal reaches a set number threshold, it is determined that the first stage satisfies the set stage upgrade condition.

[0297] In a possible implementation manner, when the collection unit 1102 obtains the gray scale stage information of the respective collection periods based on the device information collected in the respective collection periods, the collection unit 1102 is specifically configured to:

[0298] At least one of the following operations is performed on the device information of the respective collection periods:

[0299] If the evaluation data of each evaluation dimension contained in the device information in one collection period includes evaluation data whose value is not located in the reference value range set for the corresponding evaluation dimension, the device information in the one collection period is discarded.

[0300] The device information in the one collection period is normalized in a set normalization manner to obtain the gray scale stage information of the one collection period.

[0301] Reference evaluation data of a reference evaluation dimension is constructed based on the evaluation data of each evaluation dimension contained in the device information in one collection period, and the gray scale stage information of the one collection period is obtained by using the reference evaluation data.

[0302] For the sake of brevity, each part is described as a module (or unit) according to the function. Of course, in the implementation of the present application, the functions of each module (or unit) can be implemented in the same or multiple software or hardware.

[0303] As to the apparatus in the above embodiments, the specific manners in which each unit performs the request have been described in detail in the embodiments related to the method, and will not be described in detail here.

[0304] Those skilled in the art can understand that each aspect of the present application can be implemented as a system, a method or a program product. Therefore, each aspect of the present application can be specifically implemented as follows: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or an implementation combining hardware and software aspects, which can be collectively referred to as "circuitry", "module" or "system".

[0305] Based on the same inventive concept, the embodiments of the present application further provide an electronic device. In an embodiment, the electronic device can be a server or a terminal device. Refer to Figure 12 Fig. 1 shows a structural schematic diagram of a possible electronic device provided in the embodiments of the present application, Figure 12 In the embodiment, the electronic device 1200 comprises a processor 1210 and a memory 1220.

[0306] The memory 1220 stores a computer program executable by the processor 1210. The processor 1210 can execute the steps of the grayscale publishing method of the software by executing the instructions stored in the memory 1220.

[0307] The memory 1220 can be a volatile memory, such as a random-access memory (RAM); the memory 1220 can also be a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD); or the memory 1220 can be any other medium capable of carrying or storing desired program codes in the form of instructions or data structures and capable of being accessed by a computer, but not limited to the above. The memory 1220 can also be a combination of the above memories.

[0308] The processor 1210 can include one or more central processing units (CPUs) or digital processing units, etc. The processor 1210 is used to execute the computer program stored in the memory 1220 to implement the grayscale publishing method of the software.

[0309] In some embodiments, the processor 1210 and the memory 1220 can be implemented on the same chip, and in some embodiments, they can also be implemented on separate chips respectively.

[0310] The embodiments of the present application do not limit the specific connection medium between the processor 1210 and the memory 1220. In the embodiments of the present application, the processor 1210 and the memory 1220 are connected through a bus, and the bus is Figure 12 In the embodiment, the connection between other components is only schematically described by a thick line, and is not limited. The bus can be divided into an address bus, a data bus, a control bus, etc. For the convenience of description, Figure 12 In the embodiment, only one thick line is used to describe the connection between the processor 1210 and the memory 1220, but it is not described that there is only one bus or only one type of bus.

[0311] Based on the same inventive concept, the embodiments of the present application provide a computer readable storage medium comprising a computer program, when the computer program is run on an electronic device, the computer program is used to make the electronic device execute the steps of the software gray release method described above. In some possible implementation manners, various aspects of the software gray release method provided by the present application can also be implemented in the form of a program product, which comprises a computer program, when the program product is run on an electronic device, the computer program is used to make the electronic device execute the steps in the software gray release method described above, for example, the electronic device can execute the steps as shown in Figure 2 .

[0312] The program product can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium may, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or apparatus, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection having one or more wires, a portable disk, a hard disk, RAM, ROM, erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0313] The program product of the embodiments of the present application can adopt a CD-ROM and include a computer program, and can be run on an electronic device. However, the program product of the present application is not limited to this, and in this document, the readable storage medium can be any tangible medium containing or storing a computer program, which can be used or combined with a command execution system, device or apparatus.

[0314] The readable signal medium can include a data signal propagating in a baseband or as part of a carrier wave, in which a readable computer program is borne. Such a propagating data signal can take various forms, including but not limited to an electromagnetic signal, an optical signal or any suitable combination thereof. The readable signal medium can also be any readable medium other than the readable storage medium, which can send, propagate or transmit a computer program for use by or in connection with a command execution system, device or apparatus.

[0315] Although the preferred embodiments of the present application have been described, those skilled in the art can make additional changes and modifications to the embodiments once they know the basic inventive concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.

[0316] Obviously, numerous modifications and variations of the present application are possible in light of the above teachings. It is therefore to be understood that within the scope of the appended claims and their equivalents, the application can be practiced otherwise than as specifically described.

Claims

1. A method of gray release of software, characterized by, The method comprises the following steps: respectively instructing at least one target device to run a target version of software, the at least one target device being a target device in each of the devices to be upgraded, and the target device carrying the target version of software in a first stage of a gray release; periodically collecting device information of the at least one target device in the first stage, and obtaining gray stage information of each collection cycle based on the collected device information of each collection cycle; respectively performing device running state detection using an anomaly detection model based on the gray stage information of each collection cycle, to obtain a detection result of each collection cycle, the anomaly detection model being trained using gray stage data in a historical version of software release process; if it is determined that the first stage meets a set stage upgrade condition based on the detection result of each collection cycle, then other stages of the gray release are continued to be performed until the gray release is completed.

2. The method of claim 1, wherein, After the step of respectively performing device running state detection using an anomaly detection model based on the gray stage information of each collection cycle, to obtain a detection result of each collection cycle, the method further comprises the following steps: if the anomaly detection model meets a set optimization condition, then model optimization is performed on the anomaly detection model based on actual running states of the at least one target device in the first stage, to obtain an optimized anomaly detection model; the step of continuing to perform other stages of the gray release until the gray release is completed comprises the following step: the step of continuing to perform other stages of the gray release until the gray release is completed comprises the following step:

3. The method of claim 2, wherein, the optimization condition comprises at least one of the following conditions: a prediction effect evaluation value of the anomaly detection model does not meet a set prediction effect range, wherein the prediction effect evaluation value is determined according to actual running states of the at least one target device; an adjustment effect evaluation value of the target version of software does not meet a set adjustment effect range, wherein the adjustment effect evaluation value is used to evaluate actual running states of the at least one target device after the target version of software is adjusted based on the detection result of each collection cycle; the adjustment effect evaluation value of the target version of software decreases relative to the target version of software before adjustment; the prediction effect evaluation value of the anomaly detection model decreases.

4. The method of claim 3, wherein, the adjustment effect evaluation value is obtained by the following steps: generating a detection report carrying an optimization suggestion based on the detection result of each collection cycle, and presenting the detection report to a target object; receiving actual running states of the at least one target device after the target object adjusts the target version of software according to the optimization suggestion; obtaining the adjustment effect evaluation value based on the actual running states of the at least one target device after adjustment.

5. The method of claim 2, 3 or 4, wherein, the step of performing model optimization on the anomaly detection model based on actual running states of the at least one target device in the first stage, to obtain an optimized anomaly detection model comprises the following steps: constructing an optimization sample set for model optimization based on the gray stage information of each collection cycle and the actual running states of the at least one target device. Fine-tune the anomaly detection model by using the optimized sample set to obtain an optimized anomaly detection model.

6. The method of claim 2, 3 or 4, wherein, Further comprising: By using the optimized anomaly detection model, continue to execute the process of other stages of the gray release, according to the set monitoring time, detect whether the optimized anomaly detection model meets the set optimization condition; If the optimized anomaly detection model meets the set optimization condition, continue to optimize the optimized anomaly detection model.

7. The method of any one of claims 1-4, wherein, Based on the gray stage information of each collection period, the device running state is detected by using the anomaly detection model respectively, and the detection result of the corresponding collection period is obtained, including: Based on the gray stage information of each collection period, the device running state is detected by using the anomaly detection model respectively, and the first prediction value and the second prediction value of the corresponding collection period are obtained, wherein the first prediction value and the second prediction value respectively represent the probability of normal and abnormal operation of the at least one target device; Based on the first prediction value and the second prediction value of each collection period, the detection result of the corresponding collection period is obtained.

8. The method of any one of claims 1-4, wherein, Based on the gray stage information of each collection period, the device running state is detected by using the anomaly detection model respectively, and the detection result of the corresponding collection period is obtained, including: Based on the gray stage information of each collection period, the device running state is detected by using the anomaly detection model respectively, and the prediction result of each type of anomaly of the corresponding collection period is obtained; each prediction result is used to represent the probability of existence of corresponding type of anomaly of the at least one target device in the corresponding collection period; Based on the prediction result of each type of anomaly of each collection period, the detection result of the corresponding collection period is obtained.

9. The method of any one of claims 1-4, wherein, The anomaly detection model is trained in the following way: According to the set at least one evaluation dimension, the related evaluation data in the historical version software release process is collected, and the initial sample data in each historical collection period is obtained; Based on the obtained initial sample data in each historical collection period, data preprocessing is performed to obtain a training sample set; By using the training sample set, the anomaly detection model to be trained is iteratively trained to obtain a trained anomaly detection model.

10. The method of claim 9, wherein, The evaluation dimension includes at least one of the following indicators: Device magnitude, the device magnitude is used to represent: the number of devices of each historical upgrade device installed with the historical version software in one historical collection period; Central processing unit (CPU) usage information, the CPU usage information is used to evaluate the CPU usage of each historical upgrade device installed with the historical version software in one historical collection period; Memory usage information, the memory usage information is used to evaluate the memory usage of each historical upgrade device installed with the historical version software in one historical collection period; Error information, the error information is used to represent: the number of historical upgrade devices in which abnormal events occur in each historical upgrade device installed with the historical version software in one historical collection period; Historical operation data, the historical operation data is used to evaluate the business processing of each historical upgrade device installed with the historical version software in one historical collection period.

11. The method of any one of claims 1-4, wherein, The determination of whether the first stage meets the set stage upgrade condition based on the detection results of the collection periods comprises: If the detection results of the collection periods all represent that the target device is in a normal operating state in the corresponding collection period, it is determined that the first stage meets the set stage upgrade condition; or If the number of collection periods in which the detection results represent that the target device is in a normal operating state reaches a set number threshold, it is determined that the first stage meets the set stage upgrade condition.

12. The method of any one of claims 1-4, wherein, The obtaining of the gray scale stage information of the corresponding collection period based on the collected device information in the collection period comprises: At least one of the following operations is performed on the device information of the collection periods: If there is evaluation data in the evaluation data of each evaluation dimension included in the device information in a collection period, the value of which is not located in the reference value range set for the corresponding evaluation dimension, the device information in the collection period is discarded; The device information in the collection period is normalized according to a set normalization method to obtain the gray scale stage information of the collection period; Based on the evaluation data of each evaluation dimension included in the device information in a collection period, reference evaluation data of a reference evaluation dimension is constructed, and the gray scale stage information of the collection period is obtained using the reference evaluation data.

13. A gray release apparatus of software, characterized by comprising: It comprises: A publishing unit is configured to instruct at least one target device to run a target version of software, wherein the at least one target device is a to-be-upgraded device in each to-be-upgraded device that carries the target version of software in a first stage of gray scale publishing; A collection unit is configured to periodically collect device information of the at least one target device in the first stage, and obtain gray scale stage information of a corresponding collection period based on the collected device information in each collection period; A detection unit is configured to use an anomaly detection model to detect the operating state of the device based on the gray scale stage information of each collection period to obtain a detection result of the corresponding collection period, wherein the anomaly detection model is trained using gray scale stage data in a historical version of software publishing process; A judgment unit is configured to continue to perform other stages of the gray scale publishing until the gray scale publishing is completed if it is determined that the first stage meets the set stage upgrade condition based on the detection results of the collection periods.

14. An electronic device, comprising: It comprises a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the method of any one of claims 1-12.

15. A computer-readable storage medium, characterized in that, It comprises a computer program, and when the computer program runs on an electronic device, the computer program is used to make the electronic device execute the steps of the method of any one of claims 1-12.

16. A computer program product, characterised in that, It comprises a computer program, which is stored in a computer readable storage medium, and a processor of an electronic device reads and executes the computer program from the computer readable storage medium, so that the electronic device executes the steps of the method of any one of claims 1-12.

Citation Information

Cited By

  • Intelligent fusion terminal software gray release self-healing method and system

    CN121579027A