Micro-service loading and unloading control method and device and electronic equipment
By collecting basic data and evaluation indicators of microservices, and using evaluation models to control the up and down state of microservices, solving the problem of low microservice management efficiency and improving the reliability of the power grid system.
Patent Information
- Application Number
- CN202411619935.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-13
- Publication Date
- 2025-03-04
AI Technical Summary
The management efficiency of microservices on and off the shelves is low, resulting in poor reliability of the power grid system.
By collecting multiple basic data of microservices, multiple evaluation indicators are determined, such as call frequency, call trend, response time, resource occupancy rate and power grid service correlation, and input these indicators into a pre-established evaluation model to obtain evaluation results to control the up-and-down status of microservices.
It realizes precise control of the state of microservices on and off the shelves, improves the efficiency of microservices management, and improves the reliability of the power grid system.
Smart Images

Figure CN119557501A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of microservice technology, and in particular to a microservice on- and off-shelf control method, device and electronic device. Background Art
[0002] With the rapid development of the information technology industry, the service content of various industries is increasing. In the process of the development of the power grid, with the increase in service content, the microservice architecture has been widely used in the power grid resource business platform. As the number of microservices continues to increase, it is necessary to manage the on-shelf and off-shelf of microservices so that users can choose the microservices they need. The relevant technology uses the arrangement of the on-shelf and off-shelf of microservices based on the experience of relevant personnel, resulting in low management efficiency of the on-shelf and off-shelf of microservices, and there may be unreasonable settings for the on-shelf and off-shelf of microservices, resulting in poor reliability of the power grid system.
[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0004] The embodiments of the present invention provide a method, device and electronic device for controlling the on-boarding and off-boarding of microservices, so as to at least solve the technical problem of poor reliability of the power grid system caused by low management efficiency of on-boarding and off-boarding of microservices.
[0005] According to one aspect of an embodiment of the present invention, a method for controlling the on-shelf and off-shelf of a microservice is provided, comprising: collecting a plurality of basic data corresponding to a microservice, wherein the plurality of basic data are used to characterize the operating status of the microservice; determining a plurality of evaluation indicators corresponding to the microservice based on the plurality of data, wherein the plurality of evaluation indicators are used to evaluate the microservice, and the plurality of evaluation indicators include at least two of the following: call frequency, call trend, response time, resource occupancy rate, and power grid business relevance; inputting the plurality of evaluation indicators into a pre-established evaluation model to obtain an evaluation result, wherein the evaluation result is used to characterize the usage activity of the microservice; and controlling the on-shelf and off-shelf status of the microservice based on the evaluation result.
[0006] Furthermore, multiple evaluation indicators are input into a pre-established evaluation model to obtain evaluation results, including: obtaining multiple weights corresponding to the multiple evaluation indicators, wherein the multiple evaluation indicators correspond one-to-one to the multiple weights; and evaluating the microservice based on the multiple weights and the multiple evaluation indicators to obtain evaluation results.
[0007] Furthermore, the microservice is evaluated based on multiple weights and multiple evaluation indicators to obtain an evaluation result, including: multiplying the multiple weights and the multiple evaluation indicators correspondingly to obtain multiple products; and summing the multiple products to obtain the evaluation result.
[0008] Furthermore, the on-shelf and off-shelf status of the microservice is controlled based on the evaluation result, including: in response to the evaluation result being less than the off-shelf detection threshold, the microservice is off-shelf processed; in response to the evaluation result being greater than the on-shelf detection threshold, the on-shelf status of the microservice is maintained.
[0009] Furthermore, the microservices are evaluated based on multiple weights and multiple evaluation indicators to obtain evaluation results, including: establishing a judgment matrix based on multiple weights and multiple evaluation indicators, the judgment matrix is used to characterize the importance comparison between multiple evaluation indicators; performing a consistency test on the judgment matrix to obtain a test result; when the test result indicates that the consistency test of the judgment matrix is successful, the microservices are evaluated based on the multiple weights and multiple evaluation indicators to obtain an evaluation result.
[0010] Furthermore, in the case where the test result represents that the consistency check of the judgment matrix fails, the method also includes: re-executing the steps of obtaining multiple weights corresponding to multiple evaluation indicators, establishing a judgment matrix based on multiple weights and multiple evaluation indicators, and performing a consistency check on the judgment matrix to obtain the test result, until the test result represents that the consistency check of the judgment matrix is successful.
[0011] Furthermore, evaluating the microservice based on multiple weights and multiple evaluation indicators to obtain evaluation results also includes: normalizing the multiple evaluation indicators to obtain multiple target evaluation indicators; evaluating the microservice based on multiple weights and multiple target evaluation indicators to obtain evaluation results.
[0012] According to another aspect of an embodiment of the present invention, a microservice on-shelf and off-shelf control device is also provided, including: a collection module, used to collect multiple basic data corresponding to the microservice, wherein the multiple basic data are used to characterize the operating status of the microservice; a determination module, which determines multiple evaluation indicators corresponding to the microservice based on the multiple data, wherein the multiple evaluation indicators are used to evaluate the microservice, and the multiple evaluation indicators include at least two of the following: call frequency, call trend, response time, resource occupancy rate and power grid business correlation; an evaluation module, which inputs the multiple evaluation indicators into a pre-established evaluation model to obtain evaluation results, wherein the evaluation results are used to characterize the usage activity of the microservice; and a control module, which is used to control the on-shelf and off-shelf status of the microservice based on the evaluation results.
[0013] According to another aspect of an embodiment of the present invention, there is further provided an electronic device, comprising: a memory storing an executable program; and a processor for running the program, wherein the method in each embodiment of the present invention is executed when the program is running.
[0014] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium includes a stored executable program, wherein when the executable program is running, the device where the computer-readable storage medium is located is controlled to execute the methods in various embodiments of the present invention.
[0015] According to another aspect of an embodiment of the present invention, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the method in each embodiment of the present invention is implemented.
[0016] According to another aspect of the embodiments of the present invention, a computer program is provided. When the computer program is executed by a processor, the methods in the embodiments of the present invention are implemented.
[0017] In an embodiment of the present invention, multiple basic data corresponding to a microservice are collected; multiple evaluation indicators corresponding to the microservice are determined based on the multiple data; the multiple evaluation indicators are input into a pre-established evaluation model to obtain an evaluation result; and the on-shelf and off-shelf status of the microservice is controlled based on the evaluation result. The present application determines multiple evaluation indicators corresponding to a microservice through multiple technical data corresponding to the microservice, and accurately obtains the evaluation results corresponding to the microservice based on evaluation indicators such as call frequency, call trend, response time, resource occupancy rate, and power grid business correlation through a pre-established evaluation model. The use activity of the microservice can be accurately obtained, and then the on-shelf and off-shelf status of the microservice can be accurately controlled according to the evaluation result of the microservice, achieving the purpose of improving the management efficiency of on-shelf and off-shelf of the microservice, thereby achieving the technical effect of improving the reliability of the power grid system, and then solving the technical problem of poor reliability of the power grid system caused by low management efficiency of on-shelf and off-shelf of the microservice. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0019] Figure 1 This is a flowchart of an optional microservice delisting and delisting control method according to an embodiment of the present invention;
[0020] Figure 2 It is a structural schematic diagram of an optional microservice on-and-offline control device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0021] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0022] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention 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 interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0023] According to an embodiment of the present invention, an embodiment of a method for controlling the on- and off-shelf installation of microservices is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0024] Figure 1 is a flowchart of an optional microservice delisting and delisting control method according to an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:
[0025] Step S102: collecting a plurality of basic data corresponding to the microservice, wherein the plurality of basic data is used to characterize the running status of the microservice.
[0026] The above-mentioned microservices refer to decomposing complex applications into multiple small, independent and loosely coupled services. Multiple services are responsible for part of the functions of the application and can communicate through the network, that is, each microservice corresponds to a function. In this application, microservices refer to microservices obtained by decomposing the functions of the power grid resource business middle platform. Among them, the above-mentioned microservices include but are not limited to: personnel query, unified authentication, equipment query or equipment status query, etc.
[0027] The above-mentioned multiple basic data refer to the basic data of microservices. The above-mentioned multiple basic data refer to the call data of microservices in the power grid business collected in real time by the data collection agent deployed in the power grid resource business center. The above-mentioned basic data include but are not limited to: call time, call source, CPU usage, memory usage or network traffic, etc.
[0028] The above-mentioned data collection agent (DCA for short) refers to a software component or service that collects, extracts and transmits data from various data sources. In the present application, the above-mentioned data collection agent collects the basic data of microservices from data collection points set up in power grid nodes such as substations and distribution stations. The above-mentioned data collection agent can be: database data collection agent, local data collection agent, cloud data collection agent, push data collection agent or pull data collection agent, etc.
[0029] The above-mentioned running status refers to the running status of the above-mentioned microservice. In the present application, multiple evaluation indicators of the above-mentioned microservice can be determined through multiple basic data of the above-mentioned microservice, that is, the running status of the microservice can be evaluated through multiple basic data.
[0030] In an optional embodiment, when the basic data of a microservice is stored locally, multiple basic data such as the call time, call source, CPU usage, memory usage, and network traffic corresponding to the microservice can be obtained through a local data collection agent, wherein the above multiple basic data can characterize the operating status of the above microservice.
[0031] In another optional embodiment, when the basic data of a microservice is stored in the cloud, multiple basic data such as the call time, call source, CPU usage or memory occupancy corresponding to the microservice can be obtained through a cloud data agent, wherein the above-mentioned call time, call source, CPU usage and memory occupancy and other basic data can characterize the running status of the above-mentioned microservice.
[0032] In another optional embodiment, when the basic data of a microservice is stored locally, multiple basic data such as the call time, call source or CPU usage rate corresponding to the microservice can be obtained through a local data acquisition agent, wherein the operation status of the above-mentioned microservice can be characterized by the above-mentioned call time, call source and CPU usage rate and other basic data.
[0033] In another optional embodiment, when the basic data of a microservice is stored locally, multiple basic data such as the call time and call source corresponding to the microservice can be obtained through a local data acquisition agent, wherein the call time and call source can characterize the running status of the microservice.
[0034] In this application, by collecting multiple basic data corresponding to microservices, the operating status of microservices can be fully considered when controlling the on- and off-shelf operation of microservices, thereby effectively improving the accuracy of the on- and off-shelf control of microservices and improving the user experience.
[0035] Step S104, determining multiple evaluation indicators corresponding to the microservice based on the multiple data, wherein the multiple evaluation indicators are used to evaluate the microservice, and the multiple evaluation indicators include at least two of the following: call frequency, call trend, response time, resource occupancy rate and power grid business relevance.
[0036] The above-mentioned evaluation indicators refer to indicators for evaluating the usage activity of microservices. Microservices can be evaluated through the above-mentioned multiple evaluation indicators to determine the activity of the above-mentioned microservices. That is, the evaluation results of the above-mentioned microservices can be determined through the above-mentioned evaluation indicators, and the importance of the above-mentioned microservices can be further determined, and then the delisting and delisting of the above-mentioned microservices can be controlled.
[0037] The above-mentioned calling frequency refers to the frequency at which the above-mentioned microservice is called by the power grid business within a specific time period. In this application, different microservices have different corresponding calling frequencies. A microservice with a higher calling frequency is used more times by users within the specific time period, and its activity is also higher.
[0038] The above-mentioned call trend refers to comparing the number of calls of the same microservice in multiple time periods to obtain the comparison results. Since the power grid business has seasonality and periodicity, the above-mentioned comparison results are used to determine the changes in the number of calls of the microservice in different months or seasons, and to judge whether the above-mentioned microservice is related to the seasonality and periodicity of the power grid business. Among them, the microservice with a lower call trend tends to have a more stable number of calls in different seasons or months, while the microservice with a higher call trend has a larger difference in the number of calls in different seasons or months.
[0039] The above response time refers to the average time interval obtained by averaging multiple time intervals from multiple requests to the power grid business to multiple responses returned by the microservice. The response time can be used to judge the response speed of the microservice and the operating efficiency of the microservice. The shorter the response time, the higher the corresponding operating efficiency of the microservice, and the higher the activity of the corresponding microservice.
[0040] The resource utilization rate mentioned above refers to the resource utilization rate of the microservice during operation obtained through the power grid resource business platform and cloud platform, and the proportion of the total resources occupied by the microservice. The lower the resource utilization rate, the smoother the microservice will run. Among them, the above total resources include but are not limited to: CPU resources, memory resources, network bandwidth resources and storage resources.
[0041] The above-mentioned grid business relevance refers to the degree of association between the above-mentioned microservices and the grid-specific business processes. The microservices with higher grid business relevance have a greater impact on the grid business, and the corresponding activity is also higher, and the corresponding importance is higher. Among them, the above-mentioned grid-specific business processes include but are not limited to: power dispatching, fault monitoring or electricity metering, etc.
[0042] In an optional embodiment, evaluation indicators such as call frequency, call trend, response time, resource occupancy rate, and power grid business relevance corresponding to the microservice are determined based on multiple data corresponding to the microservice. Among them, the call frequency can be determined by dividing the total number of calls by the time length, the call trend can be determined by comparing the number of calls in two adjacent quarters, the response time can be determined by querying the data in the power grid resource business center, the resource occupancy rate can be determined by detecting the total resource occupancy rate when the microservice is running, and the power grid business relevance can be determined by querying the data in the power grid resource business center.
[0043] In another optional embodiment, evaluation indicators such as call frequency, call trend, response time, resource occupancy rate, and power grid business relevance corresponding to the microservice are determined based on multiple data corresponding to the microservice. Among them, an evaluation indicator acquisition model can be established in advance, and the multiple basic data corresponding to the collected microservices are used as inputs to the evaluation indicator acquisition model, and the evaluation indicators such as call frequency, call trend, response time, resource occupancy rate, and power grid business relevance are output.
[0044] In another optional embodiment, the call frequency and call trend corresponding to the microservice are determined based on multiple data corresponding to the microservice. The call frequency can be determined by dividing the number of calls by the time length, and the call trend can be determined by comparing the number of calls in two adjacent quarters.
[0045] In another optional embodiment, the call frequency, call trend, response time and resource occupancy evaluation index corresponding to the microservice are determined based on multiple data corresponding to the microservice. Among them, an evaluation index acquisition model can be established in advance, and the multiple basic data corresponding to the collected microservices are input as inputs to the evaluation index acquisition model, and the power grid business relevance is output. The call frequency can also be determined by dividing the total number of calls by the time length, the call trend can also be determined by comparing the number of calls in two adjacent quarters, and the response time can also be determined by querying the data in the power grid resource business center.
[0046] In this application, by setting multiple evaluation indicators, microservices can be evaluated from multiple aspects such as call frequency, call trend, response time, resource occupancy rate and grid business relevance, which effectively improves the comprehensiveness of microservice evaluation, and then improves the comprehensiveness of microservice on- and off-shelf control, thereby improving the user experience.
[0047] Step S106, inputting multiple evaluation indicators into a pre-established evaluation model to obtain evaluation results, wherein the evaluation results are used to characterize the usage activity of the microservice.
[0048] The above-mentioned evaluation model refers to a model used to evaluate the above-mentioned microservices. The input of the above-mentioned evaluation model is a plurality of evaluation indicators corresponding to the microservices, and the output of the above-mentioned evaluation model is an evaluation result. The activity of the above-mentioned microservices can be determined through the above-mentioned evaluation results, and the on-shelf and off-shelf status of the above-mentioned microservices can also be controlled through the evaluation results.
[0049] The above-mentioned activity refers to the activity of the above-mentioned microservice in the operation of the power grid. The activity represents the importance of the operation of the microservice in the power grid. When multiple microservices are controlled to be put on and off the shelves, microservices with higher activity are prioritized for being put on the shelves.
[0050] In an optional embodiment, multiple evaluation indicators are input into a pre-established evaluation model, and the evaluation model obtains an evaluation result corresponding to the microservice based on the multiple evaluation indicators and the weights corresponding to the multiple evaluation indicators, wherein the evaluation result corresponding to the microservice is used to characterize the usage activity of the microservice.
[0051] In another optional embodiment, multiple evaluation indicators are input into a pre-established evaluation model, and the evaluation model sums the multiple evaluation indicators to obtain an evaluation result corresponding to the microservice, wherein the evaluation result corresponding to the microservice is used to characterize the usage activity of the microservice.
[0052] In the present application, a pre-established evaluation model is used to allow multiple evaluation results to be used as input. After being input into the evaluation model, the evaluation results corresponding to the microservice can be quickly obtained, which effectively improves the rate of microservice on- and off-shelf control and improves the user experience.
[0053] Step S108, controlling the on-shelf and off-shelf status of the microservice based on the evaluation result.
[0054] The above-mentioned on-shelf and off-shelf states refer to the states in which the virtual buttons for the above-mentioned microservice operations are displayed or hidden. When the microservice is in the on-shelf state, the user can control the microservice to run or stop through the virtual buttons. When the microservice is in the off-shelf state, the user cannot directly control the microservice to run or stop through the virtual buttons, but can control the microservice to run or stop through background operations.
[0055] In an optional embodiment, after obtaining the evaluation result corresponding to the microservice, the on-shelf and off-shelf status of the above-mentioned microservice is controlled based on the evaluation result, the on-shelf detection threshold and the off-shelf detection threshold. When the evaluation result is less than the off-shelf detection threshold, the microservice is removed from the shelves. When the evaluation result is greater than the on-shelf threshold, the on-shelf status of the microservice is maintained.
[0056] In another optional embodiment, after obtaining the evaluation result corresponding to the microservice, the on-shelf and off-shelf status of the above-mentioned microservice is controlled based on the evaluation result and the on-shelf and off-shelf switching threshold. When the evaluation result is less than the on-shelf and off-shelf switching threshold, the microservice is removed from the shelves. When the evaluation result is greater than or equal to the on-shelf and off-shelf switching threshold, the on-shelf status of the microservice is maintained.
[0057] In this application, the on-shelf and off-shelf status of microservices can be quickly controlled based on the evaluation results, which effectively improves the rate of on-shelf and off-shelf control of microservices and improves the user experience.
[0058] Through the above steps, multiple basic data corresponding to the microservices are collected; multiple evaluation indicators corresponding to the microservices are determined based on the multiple data; multiple evaluation indicators are input into a pre-established evaluation model to obtain evaluation results; and the on-shelf and off-shelf status of the microservices is controlled based on the evaluation results. The present application determines multiple evaluation indicators corresponding to the microservices through multiple technical data corresponding to the microservices, and accurately obtains the evaluation results corresponding to the microservices based on evaluation indicators such as call frequency, call trend, response time, resource occupancy rate, and power grid business relevance through a pre-established evaluation model. The use activity of the microservices can be accurately obtained, and then the on-shelf and off-shelf status of the microservices can be accurately controlled according to the evaluation results of the microservices, achieving the purpose of improving the management efficiency of on-shelf and off-shelf microservices, thereby achieving the technical effect of improving the reliability of the power grid system, and then solving the technical problem of poor reliability of the power grid system caused by low management efficiency of on-shelf and off-shelf microservices.
[0059] Optionally, multiple evaluation indicators are input into a pre-established evaluation model to obtain evaluation results, including: obtaining multiple weights corresponding to the multiple evaluation indicators, wherein the multiple evaluation indicators correspond one-to-one to the multiple weights; and evaluating the microservice based on the multiple weights and the multiple evaluation indicators to obtain evaluation results.
[0060] The above-mentioned weights refer to the importance or influence of the variables or factors in the whole. In this application, the above-mentioned multiple weights correspond to multiple evaluation indicators. The above-mentioned multiple weights refer to the importance or influence of multiple evaluation indicators in the evaluation of microservices. Among them, since the importance of multiple evaluation indicators in different microservices may be different, the above-mentioned multiple weights may be different for different microservices. The weights corresponding to the above-mentioned multiple evaluation indicators can be: manually determined according to the experience of relevant personnel, or a weight determination model can be established in advance, taking microservices and multiple evaluation indicators as input, and outputting weights corresponding to multiple evaluation indicators.
[0061] In an optional embodiment, multiple weights corresponding to multiple evaluation indicators can be manually determined based on the experience of relevant personnel, and multiple evaluation indicators correspond to multiple weights one by one. The microservice is evaluated based on the multiple weights and the multiple evaluation indicators to obtain an evaluation result.
[0062] In another optional embodiment, a weight determination model may be pre-established, and the microservice and multiple evaluation indicators corresponding to the microservice may be input into the weight determination model. The weight determination model evaluates the microservice based on the microservice and multiple evaluation indicators corresponding to the microservice to obtain an evaluation result.
[0063] In this application, by setting weights for multiple evaluation indicators, the evaluation results based on multiple weights and multiple evaluation indicators are made more accurate, which effectively improves the accuracy of microservice on- and off-shelf control and improves the user experience.
[0064] Optionally, the microservice is evaluated based on multiple weights and multiple evaluation indicators to obtain an evaluation result, including: multiplying the multiple weights and the multiple evaluation indicators correspondingly to obtain multiple products; and summing the multiple products to obtain the evaluation result.
[0065] In an optional embodiment, after obtaining multiple weights corresponding to multiple evaluation indicators, the multiple weights and the multiple evaluation indicators are correspondingly multiplied to obtain multiple products, and then the multiple products are summed to obtain the evaluation result corresponding to the microservice, wherein the calculation formula of the above evaluation result is as follows:
[0066] S=W F ×F+W T ×T+W R ×R+W O ×O+W L × L,
[0067] Among them, S is the evaluation result corresponding to the microservice, F is the call frequency corresponding to the microservice, and W F is the weight corresponding to the call frequency, T is the call trend corresponding to the microservice, and W T is the weight corresponding to the call trend, R is the response time corresponding to the microservice, and W R is the weight corresponding to the response time, O is the resource occupancy rate corresponding to the microservice, and W O is the weight corresponding to the resource occupancy rate, L is the grid business correlation corresponding to the microservice, and W L is the weight corresponding to the relevance of the power grid business.
[0068] In another optional embodiment, an evaluation acquisition layer is established in the evaluation model in advance, and after obtaining multiple weights corresponding to multiple evaluation indicators, the multiple evaluation indicators and multiple weights are input into the evaluation acquisition layer as input, and the evaluation result corresponding to the microservice is output.
[0069] In the present application, the evaluation result corresponding to the microservice is quickly obtained by adding or multiplying multiple weights and multiple evaluation indicators, which effectively improves the rate of controlling the on- and off-shelf operation of the microservice and improves the user experience.
[0070] Optionally, controlling the on-shelf and off-shelf status of the microservice based on the evaluation result includes: in response to the evaluation result being less than a delisting detection threshold, delisting the microservice; in response to the evaluation result being greater than a listing detection threshold, maintaining the listing status of the microservice.
[0071] The above-mentioned delisting detection threshold refers to the threshold of the evaluation result for delisting the microservice. When the evaluation result is less than the delisting detection threshold, the microservice is delisted. The above-mentioned delisting detection threshold can be set according to the state of the microservice, the above-mentioned delisting detection threshold can also be set manually according to experience and needs, and the above-mentioned delisting detection threshold can also be set according to the actual application scenario.
[0072] The above-mentioned shelf detection threshold refers to the threshold for maintaining the shelf status of the microservice. When the evaluation result is greater than the shelf detection threshold, the shelf status of the microservice is maintained. Among them, the above-mentioned shelf detection threshold can be set according to the microservice status, the above-mentioned shelf detection threshold can also be set manually according to experience and needs, and the above-mentioned shelf detection threshold can also be set according to the actual application scenario.
[0073] In an optional embodiment, after obtaining the evaluation result corresponding to the microservice, when the evaluation result is less than the delisting detection threshold, the microservice is delisted; when the evaluation result is greater than the listing detection threshold, the listing status of the microservice is maintained; when the evaluation result is greater than or equal to the delisting detection threshold and less than or equal to the listing detection threshold, the microservice is continuously monitored until the evaluation result corresponding to the microservice is less than the delisting detection threshold or the evaluation result corresponding to the microservice is greater than the listing detection threshold.
[0074] In this application, by setting the listing detection threshold and the delisting detection threshold, the user can quickly determine the specific measures for delisting and delisting the microservice through the listing detection threshold and the delisting detection threshold, which effectively improves the rate of delisting and delisting the microservice and improves the user experience.
[0075] Optionally, the microservice is evaluated based on multiple weights and multiple evaluation indicators to obtain an evaluation result, including: establishing a judgment matrix based on multiple weights and multiple evaluation indicators, the judgment matrix is used to characterize the importance comparison between multiple evaluation indicators; performing a consistency test on the judgment matrix to obtain a test result; when the test result indicates that the consistency test of the judgment matrix is successful, the microservice is evaluated based on the multiple weights and multiple evaluation indicators to obtain an evaluation result.
[0076] The above judgment matrix refers to a matrix used to determine the importance relationship between multiple evaluation indicators. The above judgment matrix can be used to determine whether multiple weights corresponding to multiple evaluation indicators can be used.
[0077] The above consistency test refers to a method for evaluating the intrinsic reliability and consistency of data, statistical models or theories. In the present application, the above consistency test is used to evaluate whether the above judgment matrix has appropriate consistency, and then determine whether the above multiple weights can be used.
[0078] In an optional embodiment, a judgment matrix can be established based on multiple weights and multiple evaluation indicators to characterize the importance comparison between multiple evaluation indicators, and the judgment matrix can be checked for consistency to obtain a test result. If the test result does not determine that the consistency test of the judgment matrix is successful, the microservice is evaluated based on multiple weights and multiple evaluation indicators to obtain an evaluation result.
[0079] In another optional embodiment, a consistency verification model can be established, and a judgment matrix can be established based on multiple weights and multiple evaluation indicators. The judgment matrix is used as input and input into the consistency verification model to output the verification result. If the verification result does not determine that the matrix consistency verification is successful, the microservice is evaluated based on multiple weights and multiple evaluation indicators to obtain an evaluation result.
[0080] In this application, through the judgment matrix and consistency check, it can be determined whether multiple weights can be used, thereby effectively improving the accuracy of the evaluation results, improving the accuracy of controlling the on- and off-shelf microservices, and improving the user experience.
[0081] Optionally, in the case where the test result represents that the consistency check of the judgment matrix fails, the method also includes: re-executing the steps of obtaining multiple weights corresponding to multiple evaluation indicators, establishing a judgment matrix based on the multiple weights and the multiple evaluation indicators, and performing a consistency check on the judgment matrix to obtain the test result, until the test result represents that the consistency check of the judgment matrix succeeds.
[0082] In an optional embodiment, when the test result is that the consistency test of the judgment matrix fails, multiple weights corresponding to the multiple evaluation indicators are re-acquired, and the judgment matrix is re-established based on the multiple weights and the multiple evaluation indicators, and the judgment matrix is again checked for consistency to obtain the test result, until the test result is that the consistency test of the judgment matrix is successful, and then the microservice is evaluated based on the multiple weights and the multiple evaluation indicators to obtain the evaluation result.
[0083] In the present application, when the consistency check of the judgment matrix fails, multiple weights corresponding to multiple evaluation indicators are re-obtained, and then the test results are re-obtained until the test result shows that the consistency check of the judgment matrix is successful. The microservice is then evaluated to obtain the evaluation result, which effectively improves the stability of the control of the microservice on and off the shelves and improves the user experience.
[0084] Optionally, evaluating the microservice based on multiple weights and multiple evaluation indicators to obtain an evaluation result also includes: normalizing the multiple evaluation indicators to obtain multiple target evaluation indicators; evaluating the microservice based on the multiple weights and multiple target evaluation indicators to obtain an evaluation result.
[0085] The above-mentioned normalization processing refers to a processing method of adjusting data to a specific range or scale, which can improve the convergence speed of the algorithm. In this application, by normalizing multiple evaluation indicators, multiple target evaluation indicators with faster convergence speed are obtained.
[0086] In an optional embodiment, multiple evaluation indicators are normalized to obtain multiple target evaluation indicators, wherein the calculation formula for normalizing the multiple evaluation indicators is as follows:
[0087]
[0088] Among them, X normalized is the evaluation index after normalization, X is the evaluation index, X min is the minimum value of the evaluation index, X max is the maximum value among the evaluation indicators.
[0089] After normalizing multiple evaluation indicators to obtain multiple target evaluation indicators, the microservices are evaluated based on multiple weights and multiple target evaluation indicators to obtain evaluation results.
[0090] In this application, by normalizing multiple evaluation indicators, multiple target evaluation indicators with faster convergence speed are obtained, which effectively improves the accuracy of obtaining evaluation results, improves the accuracy of controlling the on- and off-shelf release of microservices, and improves the user experience.
[0091] According to an embodiment of the present invention, an embodiment of a microservice on-and-offline control device is provided. It should be noted that the device can be used to execute the above-mentioned microservice on-and-offline control method.
[0092] Figure 2 is a schematic diagram of the structure of an optional microservice on-and-offline control device according to an embodiment of the present invention, such as Figure 2 As shown, the device includes: a collection module 20, which is used to collect multiple basic data corresponding to the microservice, wherein the multiple basic data are used to characterize the operating status of the microservice; a determination module 22, which determines multiple evaluation indicators corresponding to the microservice based on the multiple data, wherein the multiple evaluation indicators are used to evaluate the microservice, and the multiple evaluation indicators include at least two of the following: call frequency, call trend, response time, resource occupancy rate and power grid business relevance; an evaluation module 24, which inputs the multiple evaluation indicators into a pre-established evaluation model to obtain an evaluation result, wherein the evaluation result is used to characterize the usage activity of the microservice; a control module 26, which is used to control the on-shelf and off-shelf status of the microservice based on the evaluation result.
[0093] Optionally, the evaluation module includes: an acquisition unit, used to obtain multiple weights corresponding to multiple evaluation indicators, wherein the multiple evaluation indicators correspond one-to-one to the multiple weights; an evaluation unit, used to evaluate the microservice based on the multiple weights and the multiple evaluation indicators to obtain an evaluation result.
[0094] Optionally, the evaluation unit includes: a first calculation subunit, used for multiplying multiple weights and multiple evaluation indicators correspondingly to obtain multiple products; and a second calculation subunit, used for summing the multiple products to obtain an evaluation result.
[0095] Optionally, the control module includes: a delisting unit, used to delist the microservice in response to the evaluation result being less than the delisting detection threshold; and a listing unit, used to maintain the listing status of the microservice in response to the evaluation result being greater than the listing detection threshold.
[0096] Optionally, the evaluation unit also includes: a judgment subunit, which is used to establish a judgment matrix based on multiple weights and multiple evaluation indicators, and the judgment matrix is used to characterize the importance comparison between multiple evaluation indicators; a test subunit, which is used to perform a consistency test on the judgment matrix to obtain a test result; and a processing unit, which is used to evaluate the microservice based on multiple weights and multiple evaluation indicators to obtain an evaluation result when the test result indicates that the consistency test of the judgment matrix is successful.
[0097] Optionally, when the test result represents that the consistency check of the judgment matrix fails, the processing unit is also used to re-execute the steps of obtaining multiple weights corresponding to multiple evaluation indicators, establishing a judgment matrix based on multiple weights and multiple evaluation indicators, and performing a consistency check on the judgment matrix to obtain the test result, until the test result represents that the consistency check of the judgment matrix succeeds.
[0098] Optionally, the evaluation unit further includes: a normalization subunit, used to normalize multiple evaluation indicators to obtain multiple target evaluation indicators; and an evaluation result subunit, used to evaluate the microservice based on multiple weights and multiple target evaluation indicators to obtain an evaluation result.
[0099] An embodiment of the present application further provides an electronic device, comprising: a memory storing an executable program; and a processor for running the program, wherein the program executes the methods in various embodiments of the present invention when running.
[0100] An embodiment of the present application further provides a computer-readable storage medium, which includes a stored executable program, wherein when the executable program is running, the device where the computer-readable storage medium is located is controlled to execute the methods in various embodiments of the present invention.
[0101] An embodiment of the present application further provides a computer program product, including a computer program, which implements the methods in various embodiments of the present invention when executed by a processor.
[0102] The embodiments of the present application further provide a computer program, which implements the methods in the above-mentioned embodiments of the present invention when executed by a processor.
[0103] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0104] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0105] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0106] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0107] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0108] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A microservice on-shelf and off-shelf control method, characterized in that: include: Collecting a plurality of basic data corresponding to a microservice, wherein the plurality of basic data is used to characterize the running status of the microservice; Determine multiple evaluation indicators corresponding to the microservice based on the multiple data, wherein the multiple evaluation indicators are used to evaluate the microservice, and the multiple evaluation indicators include at least two of the following: call frequency, call trend, response time, resource occupancy rate and power grid business relevance; Inputting the multiple evaluation indicators into a pre-established evaluation model to obtain an evaluation result, wherein the evaluation result is used to characterize the usage activity of the microservice; The on-shelf and off-shelf status of the microservice is controlled based on the evaluation result.
2. The microservice on-shelf and off-shelf control method according to claim 1 is characterized in that: The multiple evaluation indicators are input into a pre-established evaluation model to obtain evaluation results, including: Acquire a plurality of weights corresponding to the plurality of evaluation indicators, wherein the plurality of evaluation indicators correspond to the plurality of weights one-to-one; The microservice is evaluated based on the multiple weights and the multiple evaluation indicators to obtain an evaluation result.
3. The microservice on-shelf and off-shelf control method according to claim 2 is characterized in that: The microservice is evaluated based on the multiple weights and the multiple evaluation indicators to obtain an evaluation result, including: Multiplying the multiple weights and the multiple evaluation indicators correspondingly to obtain multiple products; The multiple products are summed to obtain the evaluation result.
4. The microservice on-shelf and off-shelf control method according to claim 1 is characterized in that: Controlling the on-shelf and off-shelf status of the microservice based on the evaluation result includes: In response to the evaluation result being less than a delisting detection threshold, delisting the microservice; In response to the evaluation result being greater than a shelf detection threshold, maintaining the shelf status of the microservice.
5. The microservice on-shelf and off-shelf control method according to claim 2 is characterized in that: The microservice is evaluated based on the multiple weights and the multiple evaluation indicators to obtain an evaluation result, including: Establishing a judgment matrix based on the multiple weights and the multiple evaluation indicators, wherein the judgment matrix is used to represent the importance comparison between the multiple evaluation indicators; Performing a consistency test on the judgment matrix to obtain a test result; When the test result indicates that the consistency test of the judgment matrix is successful, the microservice is evaluated based on the multiple weights and the multiple evaluation indicators to obtain the evaluation result.
6. The microservice on-shelf and off-shelf control method according to claim 5 is characterized in that: In the case where the test result indicates that the judgment matrix consistency test fails, the method further includes: Re-execute the steps of obtaining multiple weights corresponding to the multiple evaluation indicators, establishing a judgment matrix based on the multiple weights and the multiple evaluation indicators, and performing a consistency check on the judgment matrix to obtain a check result, until the check result indicates that the consistency check of the judgment matrix is successful.
7. The microservice on-shelf and off-shelf control method according to claim 2 is characterized in that: Evaluating the microservice based on the multiple weights and the multiple evaluation indicators to obtain an evaluation result also includes: Normalizing the multiple evaluation indicators to obtain multiple target evaluation indicators; The microservice is evaluated based on the multiple weights and the multiple target evaluation indicators to obtain the evaluation result.
8. A microservice on-and-offline control device, characterized in that: include: A collection module, used to collect a plurality of basic data corresponding to a microservice, wherein the plurality of basic data are used to characterize the running status of the microservice; A determination module, which determines a plurality of evaluation indicators corresponding to the microservice based on the plurality of data, wherein the plurality of evaluation indicators are used to evaluate the microservice, and the plurality of evaluation indicators include at least two of the following: call frequency, call trend, response time, resource occupancy rate, and power grid business relevance; An evaluation module, inputting the multiple evaluation indicators into a pre-established evaluation model to obtain an evaluation result, wherein the evaluation result is used to characterize the usage activity of the microservice; A control module is used to control the on-shelf and off-shelf status of the microservice based on the evaluation result.
9. An electronic device, characterized in that: include: A memory storing an executable program; A processor, configured to run the program, wherein the program executes the method according to any one of claims 1 to 7 when running.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored executable program, wherein when the executable program is executed, the device where the storage medium is located is controlled to execute the method according to any one of claims 1 to 7.