Automatic gray release method and system, electronic equipment and storage medium
Through the automated grayscale release method, the release plan and the release stop strategy are used to realize automatic monitoring of grayscale release, solving the problem of inefficient manual monitoring and improving the accuracy and efficiency of monitoring.
Patent Information
- Application Number
- CN202510213421.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-26
- Publication Date
- 2025-03-28
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art relies on manual monitoring during the grayscale release process, resulting in inefficiency, prone to human errors and waste of resources.
By obtaining the total number of devices, set the release plan and stop publishing policy, automatically generate release tasks and monitoring tasks, collect and aggregate monitoring data, and automate the grayscale release based on the stop publishing policy.
It realizes automated, accurate and fast response monitoring of grayscale releases, reduces the waste of human resources, and improves the accuracy and efficiency of monitoring.
Smart Images

Figure CN119718841A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of software updating, and more specifically, to an automated grayscale publishing method, system, electronic device and storage medium. Background Art
[0002] Nowadays, it is necessary to install a functional client on the device to meet work needs or business needs; and in the process of using the client, it is necessary to fix discovered or potential errors, defects and problems, so it is necessary to iterate and upgrade the client to a new version. When the usage scale of the client reaches a certain data volume level, the iterative upgrade operation of the new version needs to be more cautious, because the version upgrade of the client involves compatibility issues, traffic issues, client performance issues, etc. These problems occur concurrently in a large number of clients, which will cause serious update accidents and affect the user experience. The current common practice in the industry is to use grayscale release, starting with a small amount and gradually increasing the amount. Through small-scale updates, abnormalities can be terminated in time to avoid the spread of accidents; gradually increase the number of updates and steadily expand the number of released samples.
[0003] However, during the grayscale release process, it is necessary to continuously collect the operating data in the upgraded client as monitoring data. These monitoring data include many types: upgrade traffic data, client operation data, abnormal data, etc., which have diversified characteristics. At different upgrade stages, the measurement standards of indicators are also different. Ordinary logical processing cannot meet the monitoring of the release process. Therefore, most of the time, grayscale releases are still monitored by manual indicators, and manual operations are gradually added to increase the volume. This results in a large amount of long-term manual input during grayscale releases, which is inefficient and easily causes excessive tension in operators during monitoring, increasing the risk of human uncertainty. Therefore, it is necessary to make necessary improvements to the grayscale release method. Summary of the invention
[0004] The present invention aims to overcome at least one defect (shortcoming) of the above-mentioned prior art and provide an automated grayscale release method, system, electronic device and storage medium for realizing automated, accurate and fast response monitoring during grayscale release and reducing the waste of manual resources.
[0005] According to a first aspect of the present application, an automated grayscale publishing method is provided, the method comprising: Get the total number of devices for each grayscale release, set a corresponding release plan based on the total number of devices, and configure several stop release policies accordingly; Generate a corresponding release task according to the release plan, generate a corresponding monitoring task according to the release task, and perform a grayscale release on the device according to the release task and the monitoring task; Collecting data from corresponding devices according to the monitoring task to obtain several types of monitoring data, and aggregating the several types of monitoring data to obtain aggregated data; The aggregated data is monitored according to the stop release strategy, and the grayscale release is automatically completed.
[0006] It is understandable that grayscale release is widely used in today's application upgrade release, but because the data that needs to be monitored for grayscale release is numerous and complex, and all the indicators followed are not the same, it is still stuck in using manual monitoring data, which leads to a waste of a lot of manpower and material resources, and unnecessary human errors. The present application proposes an automated grayscale release method, which can automatically execute grayscale release after formulating a release plan, stopping release strategies and monitoring tasks, automatically execute monitoring tasks, save a lot of human resources, and accurately monitor various indicators in monitoring tasks, reduce monitoring errors, thereby realizing automated, accurate and fast response monitoring during grayscale release, and reducing the waste of human resources.
[0007] Optionally, obtaining the total number of devices for each grayscale release and setting a corresponding release plan according to the total number of devices includes: The interval time of each release batch in each grayscale release is set, and the number of devices in each release batch is set according to the total number of devices, and the release plan corresponding to the grayscale release is set according to the interval time of each release batch and the number of devices in each release batch.
[0008] It is understandable that the grayscale release can release a large number of devices that need to be released in batches, reduce the comprehensive coverage of abnormal data on a large number of devices, control the impact range of defects in the new version of the program, and achieve the effect of smooth upgrade of the devices. This application sets the interval time of each release batch and the number of devices in each release batch for grayscale release, which can ensure that batches of devices are released and upgraded first, and observe whether the new version has program defects by monitoring its data, predict the risks of the new version in advance, and upgrade the next batch after the upgrade is stable within the interval time, so as to reduce the large-scale coverage of program defects.
[0009] Optionally, generating a corresponding publishing task according to the publishing plan, and generating a corresponding monitoring task according to the publishing task, includes: A release task is generated for each release batch in each release plan, wherein each release task in each release plan is executed in sequence according to the interval time; and all release tasks of a release plan correspond to a release execution queue, and different release execution queues constitute asynchronous release queues for grayscale release; Each publishing task generates a corresponding monitoring task, wherein each monitoring task corresponding to the publishing plan is executed in sequence according to the interval time; and a monitoring task corresponding to the publishing plan corresponds to a monitoring execution queue, and different monitoring execution queues construct asynchronous monitoring execution queues for monitoring.
[0010] It is understandable that each release task or each monitoring task in each release plan is carried out in sequence, which can ensure that the release process of each release plan can be carried out in an organized and sequential manner; different release execution queues and monitoring execution queues corresponding to different release plans are carried out asynchronously, ensuring that different grayscale releases can be carried out simultaneously, thereby increasing the throughput of the grayscale release and realizing simultaneous monitoring and simultaneous response to the grayscale release of different versions of applications.
[0011] Optionally, the corresponding configuration includes several stop publishing strategies, specifically including: Preset several monitoring indicators; Divide the total number of devices corresponding to each grayscale release into quantity intervals to obtain one or more release device quantity intervals; Corresponding to each release device quantity interval, one or more monitoring indicators are selected from the monitoring indicators as interval monitoring indicators, and interval thresholds corresponding to the interval monitoring indicators and trigger conditions based on the interval monitoring indicators and the interval thresholds are configured; A release device quantity interval, a corresponding interval monitoring indicator, a corresponding interval threshold and a corresponding trigger condition form one or more stop release strategies.
[0012] It is understandable that when a new version of the application has a code or business upgrade error, the grayscale release needs to be stopped immediately, and the condition for stopping the grayscale release is that any aggregate data in the device triggers one or more stop release policies. The stop release policy needs to divide the applicable release device quantity intervals in advance, so that the aggregate data of devices in different release stages follow different release stop policies, in line with the monitoring focus of different stages; selecting the interval monitoring indicator corresponding to each stop release policy can provide a specific monitoring direction for each stop release policy, and can trigger the stop release operation after the aggregate data exceeds the interval threshold set by the interval monitoring indicator, so as to achieve the effect of precise monitoring; all stop release policies are parallel, and the monitoring of aggregate data is based on parallel stop release policies, which can monitor multiple aggregate data at the same time and achieve the effect of high-response monitoring.
[0013] Optionally, collecting data from a corresponding device according to the monitoring task to obtain several types of monitoring data, and aggregating the several types of monitoring data to obtain aggregated data specifically includes: Obtain the various types of monitoring data that need to be collected according to the monitoring task; According to various types of monitoring data, the corresponding device is connected by request and data is collected to obtain several types of monitoring data; Standardization processing is performed on several types of monitoring data, and the aggregated data is obtained according to the correlation between the monitoring data and the monitoring indicators.
[0014] It is understandable that the monitoring task can point out the important upgrade data that needs to be monitored for the device during the grayscale release. Therefore, during the grayscale release, it is necessary to find the data source of these important upgrade data, and select the acquisition and upload methods to collect them. Collecting data through the request method can ensure the high real-time and reliability of the data; standardizing the collected monitoring data can provide a unified data format for generating aggregated data, facilitate processing, and improve the efficiency of data processing.
[0015] Optionally, acquiring the aggregated data according to the correlation between the monitoring data and the monitoring indicator includes: Determine whether the standardized monitoring data is directly related to the monitoring indicator, and if so, use the standardized monitoring data as the aggregated data corresponding to the monitoring indicator; Otherwise, determine whether the monitoring data is indirectly related to the monitoring data. If so, calculate the standardized monitoring data according to a preset formula to obtain the aggregate data corresponding to the monitoring indicator. Otherwise, determine that the standardized monitoring data is not related to the monitoring indicator, then configure the corresponding custom monitoring indicator according to the monitoring data, and use the standardized monitoring data as the aggregate data corresponding to the custom monitoring indicator.
[0016] It is understandable that because grayscale release requires monitoring of a wide variety of data, and the indicators and thresholds followed are not in a single form, if the collected monitoring data is monitored directly, a lot of comparison and response time is required. This application generates aggregated data based on the correlation between the monitoring data and the monitoring indicators, and is compatible with the use of monitoring data directly associated with the monitoring indicators, monitoring data indirectly associated with the monitoring indicators, and monitoring data that requires customized monitoring indicators. It provides a methodology for aggregated data, improves the response speed to monitoring data, and provides a monitorable interface for new monitoring data, improves the monitoring loopholes of the entire monitoring work, and improves the accuracy of monitoring.
[0017] Optionally, monitoring the aggregated data according to the stop release strategy and automatically completing the phased release includes: If the aggregated data triggers one or more of the stop-release policies, an alarm is issued according to the aggregated data and the stop-release policies, and the grayscale release is stopped or completed.
[0018] It is understandable that the release anomalies in the grayscale release can be monitored, and the stop release strategy can be used as the judgment standard. If any stop release strategy is triggered, it means that there is an abnormal situation in the grayscale release or the grayscale release has been completed; if an abnormal situation occurs, it is necessary to stop the grayscale release and check the problem. In this way, the abnormal situation can be quantified by data, the degree of the abnormal situation can be observed more clearly, the problem can be accurately located, and accurate monitoring of the grayscale release can be achieved; for example, because the upgrade of all equipment has been completed, the grayscale release will be prompted to complete, and the entire grayscale release process will be clearly displayed.
[0019] According to a second aspect of the present application, an automated grayscale publishing system is provided, specifically comprising: The policy management module is used to obtain the total number of devices for each grayscale release, set a corresponding release plan according to the total number of devices, and configure several stop release policies accordingly; A release plan execution module, used to generate a corresponding release task according to the release plan, generate a corresponding monitoring task according to the release task, and perform a grayscale release on the device according to the release task and the monitoring task; A monitoring data aggregation module, used to collect data from corresponding devices according to the monitoring task to obtain several types of monitoring data, and aggregate the several types of monitoring data to obtain aggregated data; A monitoring task execution module is used to monitor the aggregated data according to the stop release strategy and automatically complete the grayscale release.
[0020] According to a third aspect of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores computer-readable instructions, and the processor executes the computer-readable instructions to implement an automated grayscale release method as described in the first aspect above.
[0021] According to a fourth aspect of the present application, a computer storage medium is provided, on which a computer program is stored. When the computer program is executed, an automated grayscale release method as described in the first aspect above is implemented.
[0022] Based on any one of the above aspects, an automated grayscale release method, system, electronic device, and storage medium provided in an embodiment of the present application can obtain the total number of devices for each grayscale release, set a corresponding release plan based on the total number of devices, and configure a number of corresponding stop release policies; generate a corresponding release task based on the release plan, generate a corresponding monitoring task based on the release task, and perform grayscale release on the device based on the release task and the monitoring task; collect data from the corresponding device based on the monitoring task to obtain several types of monitoring data, and aggregate the several types of monitoring data to obtain aggregated data; monitor the aggregated data according to the stop release policy, and automatically complete the grayscale release; in this way, automated grayscale release can be achieved, and various monitoring data can be monitored with high response, so as to achieve automated, accurate, and fast response monitoring during grayscale release, thereby reducing the waste of human resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0024] Figure 1 A flow chart of an automated grayscale publishing method provided in this embodiment.
[0025] Figure 2 A flow chart of a method for configuring a stop publishing policy provided in this embodiment.
[0026] Figure 3 A flow chart of a method for generating a publishing task and generating a monitoring task provided in this embodiment.
[0027] Figure 4 A flow chart of a method for obtaining aggregated data provided in this embodiment.
[0028] Figure 5 This is a structural diagram of an automated grayscale publishing system of this embodiment.
[0029] Figure 6 This is a device structure diagram of the electronic device provided in this embodiment. DETAILED DESCRIPTION
[0030] The drawings of this application are only used for illustrative purposes and should not be construed as limiting the present application. In order to better illustrate the following embodiments, some parts of the drawings may be omitted, enlarged or reduced, and do not represent the size of the actual product; it is understandable to those skilled in the art that some well-known structures and their descriptions in the drawings may be omitted.
[0031] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0032] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0033] At present, grayscale release is widely used in application upgrades to avoid major upgrade accidents caused by program defects in the new version of the application that cause comprehensive coverage of a large number of upgraded clients. However, since the data sources that need to be monitored in grayscale release are numerous and complex, the indicators followed by data from various sources are not the same, and the measurement standards of indicators at different stages are also different. Ordinary logical processing cannot meet the monitoring of the release process, so most of the monitoring of grayscale releases nowadays uses manual mode for monitoring. However, the use of manual monitoring will inevitably lead to problems such as long monitoring response time, untimely exception handling due to many monitoring indicators and frequent manual operations, easy errors in operation, and waste of human resources. Therefore, it is necessary to improve the method or process of grayscale release.
[0034] This embodiment provides a technical solution that can solve the above-mentioned problem. The specific implementation methods of this application are described in detail below in conjunction with the accompanying drawings.
[0035] For example, Figure 1 As shown, an automated grayscale release method is provided, the method comprising: S110, obtaining the total number of devices for each grayscale release, setting a corresponding release plan according to the total number of devices, and configuring a number of stop release policies accordingly; In this embodiment, grayscale release is a way to smoothly release a new version of an application. Usually, it is released in a small range first, and then gradually increased in volume and various indicators are collected to confirm that the new version meets the online standards, so as to conduct a full release or accept the function; In this embodiment, the device carries an application, which may be a PC (Personal Computer) client program, an Android application Android APP, an Apple application IOS APP, and also includes an autonomously upgradeable software development kit SDK (Software Development Kit) and the like.
[0036] It is understandable that application developers need to upgrade old versions for purposes such as bug fixes, performance optimization, new features, and compatibility improvements. In the early stages of application use, there are relatively few users, and the applications in all devices can be upgraded at once. However, when the scale of devices carrying the application reaches a certain data volume level, the iterative upgrade operation of the new version needs to be more cautious, because if there are abnormalities in the upgrade of the new version, all upgraded applications will be abnormal, which will affect the customer experience and cause serious upgrade accidents. The current popular practice in the industry is to use grayscale release, starting with a small amount and gradually increasing the amount of release. Through small-scale updates, abnormalities can be terminated in time to avoid the spread of accidents. Gradually increase the amount and steadily expand the number of release samples; however, due to the diversification of monitoring data during grayscale release, the measurement standards of indicators at different stages are also different, and ordinary logical processing cannot meet the monitoring of the release process. Therefore, most of the time, grayscale release is still carried out through manual indicator monitoring, and manual operation gradually adds and releases.
[0037] In this embodiment, an automated grayscale release upgrade method will be introduced to solve the drawbacks of manual monitoring and realize automated grayscale release. When performing grayscale release work, it is necessary to first obtain the total number of devices that need to be upgraded for the application, and formulate a release plan based on the total number of devices, which can lay the foundation for the entire grayscale release and the detailed release process, so that the release work has a specific plan to rely on; Specifically, obtaining the total number of devices for each grayscale release and setting a corresponding release plan according to the total number of devices includes: The interval time of each release batch in each grayscale release is set, and the number of devices in each release batch is set according to the total number of devices, and the release plan corresponding to the grayscale release is set according to the interval time of each release batch and the number of devices in each release batch.
[0038] In this embodiment, the interval time and number of devices to be released for each release batch need to be pre-set as a release plan, so that the devices can be released and upgraded in batches; for example, a grayscale release plan can be configured to release 20,000 devices every 30 minutes, and stop when the total number of developed devices reaches 400,000. In this way, it can be configured that every 20,000 devices are upgraded in 30 minutes as a release batch, and the stop release strategy can be configured for each device in different release batches, so as to achieve the effect of accurately monitoring the upgrade work at different stages; Specifically, Figure 2 As shown, the corresponding configuration has several stop publishing strategies, which can be specifically divided into the following steps: S111. Preset several monitoring indicators; In this embodiment, based on historical experience, several conventional monitoring indicators can be pre-set as monitoring directions corresponding to monitoring data, so that when the monitoring data is related to the monitoring indicators, the aggregated data generated by the monitoring data can be directly monitored according to the monitoring indicators, thereby improving the response speed to the monitoring data.
[0039] S112, dividing the total number of devices corresponding to each grayscale release into quantity intervals to obtain one or more release device quantity intervals; In this embodiment, because it is necessary to monitor the device upgrade work of different release batches, it is necessary to divide the number of released devices into several intervals, and corresponding to each interval of the number of released devices, select the interval monitoring index and configure the interval threshold; each stop release policy has a specific release device number interval, so that if the number of devices being upgraded at this time falls into the interval, the device is monitored according to the stop release policy applicable to the interval; S113, corresponding to each release device quantity interval, selecting one or more monitoring indicators from the monitoring indicators as interval monitoring indicators, configuring interval thresholds corresponding to the interval monitoring indicators and triggering conditions based on the interval monitoring indicators and the interval thresholds; In this embodiment, because the indicators used to measure the monitoring data are not uniform, it is necessary to select a corresponding monitoring indicator for each stop release policy, and set a threshold for the monitoring indicator as a trigger condition for stopping the grayscale release; S114: A publishing device quantity interval, a corresponding interval monitoring indicator, a corresponding interval threshold and a corresponding trigger condition form one or more stop publishing strategies.
[0040] In this embodiment, due to the diversity of monitoring data sources and types, the indicators used for measurement are not unified, so more than one stop release strategy is configured, which can realize multi-faceted monitoring of device upgrade and release work; therefore, if the aggregated data obtained by the device meets one or more stop release strategies, it will be considered that an abnormal situation has occurred; and each stop release strategy is a parallel relationship. In the applicable release device quantity range, each stop release strategy can monitor the device at the same time to achieve the effect of multi-party monitoring; understandably, when the upgrade work of all device release quantities in the release plan has been successfully completed, a stop release strategy for completing the grayscale release will be triggered, and a prompt completion message will be issued, making the entire grayscale release process clearer.
[0041] Exemplarily, the configured partial stop publishing strategy is: ·Configure the interval of the number of devices to be released as [50,500], select [crash rate] as the interval monitoring indicator of the policy, set the corresponding interval threshold to 10%, and the trigger condition is that the crash rate exceeds 10%; this stop release policy means that if the number of devices being released for upgrade falls within the interval of [50,500] and the crash rate obtained from the aggregated data exceeds 10%, the grayscale release will be terminated. In the specific implementation process, a larger interval threshold can be used in the early stage of grayscale release to avoid abnormal termination of grayscale release due to abnormal noise data of individual devices; The configured release device quantity interval is [500, total number of devices], and [crash rate] is selected as the interval monitoring indicator of the policy, and the corresponding interval threshold is set to 0.7%. The trigger condition is that the crash rate exceeds 0.7%. This stop release policy means that when the number of released devices is greater than 500, the grayscale release will be terminated if the crash rate obtained from the aggregated data exceeds 0.7%. In the specific implementation process, a smaller interval threshold can be used in the middle and late stages of grayscale release to increase the sensitivity of grayscale release.
[0042] Preferably, the stop publishing strategy can also be independently configured using the default publishing device quantity interval. Preferably, the default publishing device quantity interval is [0, total number of devices]: If the number of top issue crashed devices is greater than 5 and the percentage of top issue crashes is greater than or equal to 30%, the grayscale release is terminated. This stop release policy is used to monitor whether grayscale release introduces new crashes.
[0043] In the above configurations, parallel conditions are used for judgment, so that different stop release strategies are adopted at different stages of the grayscale release process to achieve precise control.
[0044] S120, generating a corresponding release task according to the release plan, generating a corresponding monitoring task according to the release task, and performing a grayscale release on the device according to the release task and the monitoring task; In this embodiment, the release plan is a brief general plan. Corresponding release tasks are generated according to the release plan, which clearly specifies the number of devices that need to be released and upgraded in each release batch, as well as the corresponding device information for the release and upgrade; corresponding monitoring tasks can be generated according to the device information; the monitoring task generates important data that needs to be monitored according to the device information, and obtains the source and upload method of the important data, collects the important data, and provides monitoring information for subsequent monitoring work; it is understandable that the release task and the monitoring task are one-to-one corresponding, reflecting the release and monitoring process of the grayscale release of this version; it is understandable that the device information records the basic properties and docking methods of the devices that need to be upgraded, and provides necessary information for subsequent monitoring work and data collection work.
[0045] Specifically, Figure 3 As shown, generating a corresponding release task according to the release plan, and generating a corresponding monitoring task according to the release task, includes the following steps: S121, generating a release task for each release batch in each release plan, wherein each release task in each release plan is executed in sequence according to the interval time; and all release tasks of a release plan correspond to a release execution queue, and different release execution queues constitute asynchronous release queues for grayscale release; S122. Each publishing task generates a corresponding monitoring task, wherein each monitoring task corresponding to each publishing plan is executed in sequence according to the interval time; and a monitoring task corresponding to a publishing plan corresponds to a monitoring execution queue, and different monitoring execution queues constitute asynchronous monitoring execution queues for monitoring.
[0046] In this embodiment, multiple grayscale releases may be generated in the same time period, because different applications upgrade the device in the same time period, the upgraded content and the data used are different, and multiple different grayscale releases need to be executed simultaneously; it is understandable that different grayscale releases can generate different release plans, and one release plan corresponds to several release tasks and monitoring tasks; each release task in a release plan is a release execution queue, and the release tasks in a release execution queue are executed sequentially in sequence, ensuring the orderliness of a grayscale release process; release tasks of different release plans correspond to different multiple release execution queues, and different release execution queues are asynchronously performed simultaneously, which can increase the throughput of release task processing; similarly, each monitoring task in a release plan is a monitoring execution queue, and the monitoring tasks in a monitoring execution queue are executed sequentially in sequence, ensuring the orderliness of a grayscale release process; monitoring tasks of different release plans correspond to different multiple monitoring execution queues, and different monitoring execution queues are asynchronously performed simultaneously, which can increase the throughput of monitoring task processing The throughput of the system; preferably, in the specific implementation process, when some grayscale distributions are being executed, there are other applications that need to be upgraded, so a new grayscale distribution needs to be generated; it is understandable that the new grayscale distribution and the grayscale distribution being executed are executed in different processes, and the two do not interfere with each other; in the specific implementation process, when the new grayscale distribution needs to be executed, a new release plan needs to be generated accordingly, and a new release task is generated according to the release plan, and a new monitoring task is generated according to the new release task; preferably, there is a timed polling mechanism that will periodically search whether there are new release tasks. If so, the new release task will be formed into an asynchronous release queue together with the ongoing release task, and the release tasks in the asynchronous release queue can be carried out simultaneously later; similarly, the timed polling mechanism will also periodically search whether there are new monitoring tasks. If so, the new monitoring task will be formed into an asynchronous monitoring queue together with the ongoing monitoring task, and the monitoring tasks in the asynchronous monitoring queue can be carried out simultaneously later, thereby improving the execution efficiency of multiple grayscale releases.
[0047] S130, collecting data from corresponding devices according to the monitoring task to obtain several types of monitoring data, and aggregating the several types of monitoring data to obtain aggregated data; In this embodiment, since the sources and types of monitoring data are diversified, several types of monitoring data can be obtained from different sources. Preferably, the types of monitoring data include one or more of installation data, crash data, and abnormal user feedback data. If multiple monitoring data are directly monitored, different indicators will be used to measure the multiple monitoring data, which will increase a lot of comparison and query work and greatly reduce the efficiency of monitoring. If multiple monitoring data are aggregated and monitored according to certain rules, the responsiveness of the monitoring data can be improved, thereby improving the efficiency and accuracy of monitoring. Specifically, Figure 4 As shown, the data of the corresponding device is collected according to the monitoring task to obtain several types of monitoring data, and the several types of monitoring data are aggregated to obtain aggregated data, which specifically includes the following steps: S131, obtaining various types of monitoring data that need to be collected according to the monitoring task; In this embodiment, when the device is released and upgraded, a lot of data may be generated. The monitoring task needs to determine the type of monitoring data that needs to be collected, so as to select some monitoring data types that are strongly related to the upgrade work and have good monitoring effects, so that the data monitored by the entire monitoring work can more clearly reflect abnormal situations and improve the accuracy of monitoring.
[0048] S132, according to various types of monitoring data, docking with the corresponding device through a request method and collecting data to obtain several types of monitoring data; In this embodiment, the monitoring task will record the source, transmission mode and type of important data to be collected. Preferably, the corresponding device can be connected to collect data through HTTP (Hyper Text Transfer Protocol Request) hypertext transfer protocol request, which has the advantages of high security and compatibility with different platforms; the corresponding device can be connected to collect data through RPC (Remote Procedure Call) remote procedure call protocol request, which has the advantages of easy remote call and multiple function expansion; S133: performing standardization processing on several types of monitoring data, and obtaining the aggregated data according to the correlation between the monitoring data and the monitoring indicators.
[0049] In this embodiment, it is necessary to standardize various monitoring data separately to provide a unified data format for generating aggregate data; because the correlation between the acquired monitoring data and the monitoring indicators is inconsistent, the method of generating aggregate data is also different, and the aggregate data needs to be obtained based on the correlation between the monitoring data and the monitoring indicators.
[0050] Specifically, obtaining the aggregated data according to the correlation between the monitoring data and the monitoring indicator includes: Determine whether the standardized monitoring data is directly related to the monitoring indicator, and if so, use the standardized monitoring data as the aggregated data corresponding to the monitoring indicator; In this embodiment, if the monitoring data is directly associated with the monitoring indicator, the monitoring data can be directly standardized as the aggregated data corresponding to the monitoring indicator, and the aggregated data can be directly monitored later; Otherwise, determine whether the monitoring data is indirectly related to the monitoring data. If so, calculate the standardized monitoring data according to a preset formula to obtain the aggregate data corresponding to the monitoring indicator. Otherwise, determine that the standardized monitoring data is not related to the monitoring indicator, then configure the corresponding custom monitoring indicator according to the monitoring data, and use the standardized monitoring data as the aggregate data corresponding to the custom monitoring indicator.
[0051] In this embodiment, if the monitoring data is indirectly associated with the monitoring data, preferably, the monitoring data is the basic data of the aggregated data corresponding to a certain monitoring indicator, or the monitoring data is heterogeneous and cannot be used directly, but the corresponding monitoring indicator can be obtained according to the basic data, or the corresponding monitoring indicator can be obtained after the heterogeneous data is processed and calculated. At this time, the standardized monitoring data needs to be calculated according to a preset formula to obtain the aggregated data; wherein, the formula is obtained according to historical experience or a specific mathematical method, and a plurality of monitoring data can be used in the formula for aggregate calculation, then it is necessary to collect a plurality of monitoring data and calculate to obtain the aggregated data; illustratively, the aggregated data [percentage of crashed devices] depends on the monitoring data [number of installed devices] and [number of crashed devices], and the above two types of monitoring data need to be collected to obtain the corresponding aggregated data; If the monitoring data is not associated with the monitoring indicator, it is necessary to configure the corresponding custom monitoring indicator and standardize the monitoring data as aggregated data of the custom monitoring indicator.
[0052] In this embodiment, since some data that need to be monitored are not associated with the preset monitoring indicators, or the collected monitoring data has changing business characteristics, it is impossible to generate the preset corresponding monitoring indicators in advance, so it is necessary to configure the custom monitoring indicators after obtaining the monitoring data; preferably, in this embodiment, the SQL query engine (PrestoStructured Query Language) can be used to query the data lake warehouse to meet the customized monitoring indicators based on the business customization of the monitoring data.
[0053] Preferably, there will be a calculation function in the custom monitoring indicator, and Aviator is specifically used to complete the mathematical calculation of the custom monitoring indicator; Aviator is a high-performance, lightweight expression engine based on Java, which dynamically compiles the expression of the character String type into Java bytecode Java Byte Code and hands it to the Java virtual machine JVM (Java Virtual Machine) for execution; Preferably, a fault-tolerant validity fallback mechanism is adopted when querying the custom monitoring indicator, that is, when a custom monitoring indicator fails to be queried in the data lake warehouse, it automatically falls back to the result of the most recent successful query at the most recent preset time; if there is no query result that meets the conditions, the query fails, the abnormal situation is reported, and the grayscale release is terminated, wherein the preset time is set in advance, preferably, the preset time is 10 minutes; the above-mentioned fault-tolerant validity fallback mechanism can ensure the robustness of the custom monitoring indicator query operation.
[0054] S140: Monitor the aggregated data according to the stop release strategy, and automatically complete the grayscale release.
[0055] In this embodiment, after setting the stop release strategy and obtaining the aggregated data, it is necessary to monitor the aggregated data according to the stop release strategy to control the execution of the grayscale release; Specifically, the monitoring of the aggregated data according to the stop release strategy and automatically completing the grayscale release includes the following situations: If the aggregated data triggers one or more of the stop-release policies, an alarm is issued according to the aggregated data and the stop-release policies, and the grayscale release is stopped or completed.
[0056] In this embodiment, each aggregated data corresponds to an interval monitoring indicator in the stop release strategy, and the stop release strategy sets an interval threshold for the interval monitoring indicator that triggers the stop of grayscale release. It is only necessary to compare the aggregated data with the interval threshold. If the aggregated data exceeds the interval threshold, it means that the aggregated data has triggered the stop release strategy, and the aggregated data and the triggered stop release strategy need to be reported and an alarm is issued, and the grayscale release is stopped; if the stop of grayscale release is triggered by an abnormal situation, the abnormal situation can be avoided from affecting more devices; if the stop of grayscale release is triggered because of the completion of a normal upgrade, the completion time and situation of the grayscale release can be obtained in time; it is understandable that each stop release strategy is in parallel, that is, multiple aggregated data can be monitored at the same time. When one or more aggregated data exceed the interval threshold of one or more strategies, the aggregated data will be reported at the same time, an alarm will be issued, and the grayscale release will be stopped. In this way, multiple aspects of the device can be monitored to achieve the effect of accurate monitoring.
[0057] like Figure 5 As shown, the embodiment of the present application also provides an automated grayscale publishing system. Optionally, the system may include: Strategy management module 211, release plan execution module 212, monitoring data aggregation module 213, monitoring task execution module 214, wherein: The policy management module 211 is used to obtain the total number of devices for each grayscale release, set a corresponding release plan according to the total number of devices, and configure a number of stop release policies accordingly; In this embodiment, the policy management module 211 can be used to execute Figure 1 As shown in step S110 , for a detailed description of the policy management module 211 , reference may be made to the description of step S110 .
[0058] A release plan execution module 212, configured to generate a corresponding release task according to the release plan, generate a corresponding monitoring task according to the release task, and perform a grayscale release on the device according to the release task and the monitoring task; In this embodiment, the release plan execution module 212 can be used to execute Figure 1 As shown in step S120, for the specific description of the release plan execution module 212, please refer to the description of step S120.
[0059] A monitoring data aggregation module 213 is used to collect data from the corresponding device according to the monitoring task to obtain several types of monitoring data, and aggregate the several types of monitoring data to obtain aggregated data; In this embodiment, the monitoring data aggregation module 213 can be used to perform Figure 1 As shown in step S130, for a detailed description of the monitoring data aggregation module 213, reference may be made to the description of step S130.
[0060] A monitoring task execution module 214 is used to monitor the aggregated data according to the stop release strategy and automatically complete the grayscale release; In this embodiment, the monitoring task execution module 214 can be used to execute Figure 1 As shown in step S140, for the detailed description of the monitoring task execution module 214, reference may be made to the description of the step S140.
[0061] The present application also provides an electronic device, the structure of which is as follows: Figure 6As shown, the electronic device includes a memory 311, a processor 312, a communication module 313 and an input / output interface 314, etc. Optionally, the memory 311, the processor 312, the communication module 313 and the input / output interface 314 can be connected and communicated through a bus 315.
[0062] The memory 311 is used to store one or more computer programs and transmit the code of the computer program to the processor 312; when the one or more computer programs are executed by the processor 312, an automated grayscale release method in an embodiment of the present application is implemented.
[0063] Optionally, the electronic device can be connected to a network via a communication module 313 to communicate with other devices, such as a terminal or a server, through the network to achieve data interaction. The electronic device can be various forms of digital computers, such as desktop computers, servers, workstations, mainframe computers or other types of computers. The electronic device can also be various forms of mobile terminals, such as smart phones, tablet computers, wearable devices (such as helmets, glasses, watches, etc.) and other similar mobile terminals.
[0064] Optionally, the electronic device can be connected to the required input / output devices, such as a keyboard, a display device, etc., through the input / output interface 314. The electronic device itself can have a display device, and can also be connected to other display devices through the input / output interface 314. Optionally, a storage device, such as a hard disk, can also be connected through the input / output interface 314, so that data in the electronic device can be stored in the storage device, or data in the storage device can be read, and data in the storage device can also be stored in the memory 311. It can be understood that the input / output interface 314 can be a wired interface or a wireless interface. Depending on the actual application scenario, the device connected to the input / output interface 314 can be a component of the electronic device, or it can be an external device connected to the electronic device when needed.
[0065] Optionally, the memory 311 may be a volatile memory and / or a non-volatile memory, the volatile memory may be a random access memory, etc., and the non-volatile memory may be a read-only memory, a programmable read-only memory, an erasable programmable read-only memory, an electrically erasable programmable read-only memory or a flash memory, etc.
[0066] Optionally, the computer program stored in the processor 312 may be divided into one or more modules, which are stored in the memory 311 and executed by the processor 312 to complete the method provided in the embodiment. The one or more modules may be a series of computer program instruction segments capable of completing specific functions, and the computer program instruction segments are used to describe the execution process of the computer program in the electronic device.
[0067] Optionally, the processor 312 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 312 include, but are not limited to, a central processing unit, a graphics processing unit, a digital signal processor, various special artificial intelligence computing chips, various processors running machine learning model algorithms, and any appropriate controller, microcontroller, processor, etc. The processor 312 executes the various methods and processes of this embodiment, illustratively, such as an automated grayscale release method of an embodiment of the present application.
[0068] Optionally, the bus 315 may include a path for transmitting information. The bus 315 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. According to different functions, the bus 315 may be divided into an address bus, a data bus, a control bus, etc.
[0069] In an optional implementation, the embodiment of the present application further provides a computer storage medium on which a computer program is stored, and when the computer program is executed by a computer, the computer is enabled to perform the method of the above method embodiment. Part or all of the computer program can be loaded and / or installed on the memory 311 of the electronic device. When the computer program is executed by the processor 312, one or more steps of an automated grayscale publishing method of the embodiment of the present application can be performed.
[0070] Optionally, the computer-readable storage medium may be a random access memory, a read-only memory, a programmable read-only memory, an erasable programmable read-only memory, an electrically erasable programmable read-only memory, or the like.
[0071] Obviously, the above embodiments of the present application are merely examples for clearly illustrating the technical solution of the present application, and are not intended to limit the specific implementation methods of the present application. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the claims of the present application shall be included in the protection scope of the claims of the present application.
Claims
1. An automated grayscale release method, characterized in that: The method comprises: Get the total number of devices for each grayscale release, set a corresponding release plan based on the total number of devices, and configure several stop release policies accordingly; Generate a corresponding release task according to the release plan, generate a corresponding monitoring task according to the release task, and perform a grayscale release on the device according to the release task and the monitoring task; Collecting data from corresponding devices according to the monitoring task to obtain several types of monitoring data, and aggregating the several types of monitoring data to obtain aggregated data; The aggregated data is monitored according to the stop release strategy, and the grayscale release is automatically completed.
2. The method for automatic grayscale release according to claim 1, characterized in that: The obtaining the total number of devices for each grayscale release and setting a corresponding release plan according to the total number of devices includes: The interval time of each release batch in each grayscale release is set, and the number of devices in each release batch is set according to the total number of devices, and the release plan corresponding to the grayscale release is set according to the interval time of each release batch and the number of devices in each release batch.
3. The method for automatic grayscale release according to claim 2, characterized in that: Generating a corresponding release task according to the release plan, and generating a corresponding monitoring task according to the release task, includes: A release task is generated for each release batch in each release plan, wherein each release task in each release plan is executed in sequence according to the interval time; and all release tasks of a release plan correspond to a release execution queue, and different release execution queues constitute asynchronous release queues for grayscale release; Each publishing task generates a corresponding monitoring task, wherein each monitoring task corresponding to the publishing plan is executed in sequence according to the interval time; and a monitoring task corresponding to the publishing plan corresponds to a monitoring execution queue, and different monitoring execution queues constitute asynchronous monitoring execution queues for monitoring.
4. The method for automatic grayscale release according to claim 1, characterized in that: The corresponding configuration includes several stop publishing strategies, including: Preset several monitoring indicators; Divide the total number of devices corresponding to each grayscale release into quantity intervals to obtain one or more release device quantity intervals; Corresponding to each release device quantity interval, one or more monitoring indicators are selected from the monitoring indicators as interval monitoring indicators, and interval thresholds corresponding to the interval monitoring indicators and trigger conditions based on the interval monitoring indicators and the interval thresholds are configured; A release device quantity interval, a corresponding interval monitoring indicator, a corresponding interval threshold and a corresponding trigger condition form one or more stop release strategies.
5. The method for automatic grayscale release according to claim 4, characterized in that: The data of the corresponding device is collected according to the monitoring task to obtain several types of monitoring data, and the several types of monitoring data are aggregated to obtain aggregated data, specifically including: Obtain the various types of monitoring data that need to be collected according to the monitoring task; According to various types of monitoring data, the corresponding device is connected by request and data is collected to obtain several types of monitoring data; Standardization processing is performed on several types of monitoring data, and the aggregated data is obtained according to the correlation between the monitoring data and the monitoring indicators.
6. The method for automatic grayscale release according to claim 5, characterized in that: The acquiring the aggregated data according to the correlation between the monitoring data and the monitoring indicator includes: Determine whether the standardized monitoring data is directly related to the monitoring indicator, and if so, use the standardized monitoring data as the aggregated data corresponding to the monitoring indicator; Otherwise, determine whether the monitoring data is indirectly related to the monitoring data. If so, calculate the standardized monitoring data according to a preset formula to obtain the aggregate data corresponding to the monitoring indicator. Otherwise, determine that the standardized monitoring data is not related to the monitoring indicator, then configure the corresponding custom monitoring indicator according to the monitoring data, and use the standardized monitoring data as the aggregate data corresponding to the custom monitoring indicator.
7. An automated grayscale publishing method according to any one of claims 1 to 6, characterized in that: The monitoring of the aggregated data according to the stop release strategy and automatically completing the grayscale release includes: If the aggregated data triggers one or more of the stop-release policies, an alarm is issued according to the aggregated data and the stop-release policies, and the grayscale release is stopped or completed.
8. An automated grayscale release system, specifically comprising: The policy management module is used to obtain the total number of devices for each grayscale release, set a corresponding release plan according to the total number of devices, and configure several stop release policies accordingly; A release plan execution module, used to generate a corresponding release task according to the release plan, generate a corresponding monitoring task according to the release task, and perform a grayscale release on the device according to the release task and the monitoring task; A monitoring data aggregation module, used to collect data from corresponding devices according to the monitoring task to obtain several types of monitoring data, and aggregate the several types of monitoring data to obtain aggregated data; A monitoring task execution module is used to monitor the aggregated data according to the stop release strategy and automatically complete the grayscale release.
9. An electronic device comprising a memory and a processor, characterized in that: The memory stores computer-readable instructions, and the processor executes the computer-readable instructions to implement an automated grayscale release method as described in any one of claims 1-7.
10. A computer storage medium having a computer program stored thereon, characterized in that: When the computer program is executed, an automated grayscale release method as described in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Automatic gray release method and device
CN110046083A
Product gray release method, device and equipment and storage medium
CN112130892A
Micro-service gray release method and device, computer equipment and storage medium
CN112822272A
Artificial intelligence-based gray scale test method and device, electronic equipment and medium
CN116107894A
Asynchronous and Parallel Application Processing
US20210240523A1