Micro-service operation control method and device, storage medium and electronic equipment

By using prediction models in microservice systems for fault prediction and operation control, the problem of high failure probability during microservice operation is solved, and rapid response and cost-effective fault management are achieved.

CN119829363APending Publication Date: 2025-04-15INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411822432.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-11
Publication Date
2025-04-15

AI Technical Summary

Technical Problem

In the prior art, the probability of failure during operation of microservices is high, resulting in slow failure detection and response speed, difficulty in adapting to rapid changes in business needs, and relying on expert experience leads to reduced fault handling efficiency and increased costs.

Method used

By introducing prediction models in microservice systems, environmental data is used to predict whether service operations will perform failures, thereby automating fault prediction and operation control and reducing human intervention.

Benefits of technology

It reduces the probability of failure during microservice operation, improves the failure response speed, and reduces the dependence and operation cost of expert resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119829363A_ABST
    Figure CN119829363A_ABST
Patent Text Reader

Abstract

The invention discloses a micro-service operation control method and device, a storage medium and electronic equipment. The method is applied to a target user side in a micro-service system, and comprises the following steps: receiving a micro-service calling request initiated by a target account registered on the target user side; responding to the micro-service calling request, and generating a to-be-executed target service operation matched with the target subscription state of the target micro-service; inputting target environment data corresponding to the target service operation in the micro-service system into a target prediction model matched with the target service operation in the P prediction models to obtain a prediction execution result of the target service operation output by the target prediction model; according to the method and the device, the problems of relatively high fault probability and the like in a micro-service operation process in related technologies are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence, and specifically, to a microservice operation control method and device, a storage medium, and an electronic device. Background Art

[0002] With the acceleration of digital transformation and the popularization of cloud computing technology, microservice architecture has become the preferred architecture for building large and complex systems due to its outstanding flexibility and scalability.

[0003] In the existing technology, the operation monitoring and troubleshooting of microservices mainly rely on manual monitoring and expert experience, which not only leads to slow fault detection and response speed, but also makes it difficult to quickly adapt to the rapid changes in business needs. Taking the financial business system as an example, when a key service such as a transfer service fails, it is usually necessary to rely on experienced IT experts for manual troubleshooting. These experts must check logs and monitoring data based on their personal experience to gradually locate and solve the problem. In addition, in the existing microservice system, service operations are all executed directly, and there is a certain probability of failure. Therefore, the probability of failure during the operation of microservices is relatively high. Once a failure occurs, the troubleshooting and recovery process often takes a long time, which seriously hinders business continuity and user experience. In addition, the existing technology that relies too much on expert experience will lead to reduced fault handling efficiency and increased costs when expert resources are limited.

[0004] There is currently no effective solution to the high probability of failure during the operation of microservices in related technologies. Summary of the invention

[0005] The main purpose of the present application is to provide a microservice operation control method and device, a storage medium and an electronic device to solve the problem of high failure probability during the operation of microservices in related technologies.

[0006] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a method for controlling the operation of a microservice is provided. The microservice system includes: M clients, a cluster server, N user terminals and P prediction models, each of the M clients is allowed to register the corresponding microservice to the cluster server, each of the N user terminals is allowed to subscribe to and call the microservice registered on the cluster server, M, N and P are all integers greater than or equal to 1, and the method is applied to a target user terminal among the N user terminals, including:

[0007] Receive a microservice call request initiated by a target account registered on the target user terminal, wherein the microservice call request is used to request to call a target microservice;

[0008] In response to the microservice call request, generate a target service operation to be executed that matches the target subscription state of the target microservice, wherein the target subscription state is used to indicate whether the target user terminal is currently subscribed to the target microservice;

[0009] Inputting the target environment data corresponding to the target service operation in the microservice system into the target prediction model that matches the target service operation among the P prediction models, and obtaining the predicted execution result of the target service operation output by the target prediction model, wherein the target environment data is the microservice system operation data whose influence on the execution process of the target service operation is greater than the target influence, and the target prediction model is used to predict whether the corresponding service operation will be executed faultily according to the environment data;

[0010] The execution of the target service operation is controlled according to the predicted execution result.

[0011] Optionally, the generating a target service operation to be executed that matches the target subscription state of the target microservice includes:

[0012] Searching for the target microservice from T reference microservices currently subscribed by the target user, where T is an integer greater than or equal to 1;

[0013] In the case that the target microservice is not found in the T reference microservices, determining the target subscription state to indicate that the target user end is not currently subscribed to the target microservice, and determining a target subscription operation as the target service operation, wherein the target subscription operation is used to subscribe to the target microservice registered on the cluster service end;

[0014] In the case where the target microservice is found in the T reference microservices, the target subscription state is determined to indicate that the target user end has currently subscribed to the target microservice, and a target call operation is determined as the target service operation, wherein the target subscription operation is used to call the target microservice registered on the cluster service end.

[0015] Optionally, in the case where the target service operation is the target subscription operation, inputting the target environment data corresponding to the target service operation in the microservice system into a target prediction model matching the target service operation among the P prediction models, and obtaining a prediction execution result of the target service operation output by the target prediction model, comprises:

[0016] Collect the subscription response delay and subscription error rate corresponding to the historical subscription operations performed by the cluster server within the target historical time period, as well as the current subscription resource parameters of the cluster server, wherein the subscription response delay is used to indicate the average response time of the cluster server in response to the historical subscription operations within the target historical time period, the subscription error rate is the ratio of the number of error operations to the total number of operations of the historical subscription operations performed by the cluster server within the target historical time period, and the subscription resource parameters are used to indicate the resource amount of the target subscription resources currently allowed to be provided by the cluster server, and the target subscription resources are the operating resources required by the cluster server to respond to the target subscription operations;

[0017] Determine a subscription prediction model among the P prediction models as the target prediction model;

[0018] The subscription response delay, the subscription error rate and the subscription resource parameters are input into the subscription prediction model to obtain a subscription prediction result of the target subscription operation output by the subscription prediction model, wherein the target environment data includes: the subscription response delay, the subscription error rate and the subscription resource parameters, the subscription prediction model is used to predict whether the corresponding subscription operation will be executed faultily based on the subscription response delay, the subscription error rate and the subscription resource parameters, the predicted execution result includes the subscription prediction result, and the subscription prediction result is used to determine whether the target subscription operation will be executed faultily.

[0019] Optionally, in the case where the target service operation is the target call operation, inputting the target environment data corresponding to the target service operation in the microservice system into a target prediction model matching the target service operation among the P prediction models, and obtaining a predicted execution result of the target service operation output by the target prediction model, comprises:

[0020] Collect the call response delay and call error rate corresponding to the historical call operations executed by the cluster server within the target historical time period, the current network connection parameters between the target user terminal and the cluster server, and the current call resource parameters of the cluster server, wherein the call response delay is used to indicate the average response time of the cluster server in response to the historical call operations within the target historical time period, the call error rate is the ratio of the number of erroneous operations to the total number of operations of the historical call operations executed by the cluster server within the target historical time period, the network connection parameter is used to indicate the stability of the network connection between the target user terminal and the cluster server, the call resource parameter is used to indicate the resource amount of the target call resources currently allowed to be provided by the cluster server, and the target call resources are the operating resources required for the cluster server to respond to the target call operation;

[0021] Determine a calling prediction model among the P prediction models as the target prediction model;

[0022] The call response delay, the call error rate, the network connection parameters and the call resource parameters are input into the call prediction model to obtain a call prediction result of the target call operation output by the call prediction model, wherein the target environment data includes: the call response delay, the call error rate, the network connection parameters and the call resource parameters, the call prediction model is used to predict whether the corresponding subscription operation will be executed faultily based on the call response delay, the call error rate and the call resource parameters, and the predicted execution result includes the call prediction result, and the call prediction result is used to determine whether the target call operation will be executed faultily.

[0023] Optionally, the microservice system further includes: a fault alarm module, wherein the controlling the execution of the target service operation according to the predicted execution result includes:

[0024] In the case where the predicted execution result indicates that the target service operation will be executed faultily, prohibiting execution of the target service operation; generating fault warning information; transmitting the fault warning information to the fault warning module;

[0025] In a case where the predicted execution result indicates that the target service operation will be executed normally, the target service operation is executed on the cluster server; a service operation result returned by the cluster server is received; and the service operation result is transmitted to the target account.

[0026] According to one aspect of the present application, another microservice operation control method is provided. The microservice system includes: M clients, a cluster server, N user terminals and P prediction models, each of the M clients is allowed to register the corresponding microservice to the cluster server, each of the N user terminals is allowed to subscribe to and call the microservice registered on the cluster server, M, N and P are all integers greater than or equal to 1, and the method is applied to a target client among the M clients, including:

[0027] Receive a microservice registration request initiated by a reference account registered on the target client, wherein the microservice registration request is used to request to register the target microservice to the cluster server;

[0028] In response to the microservice registration request, a target registration operation to be executed is generated according to the server address of the cluster server and the target registration parameters corresponding to the target microservice currently to be registered on the target client, wherein the registration parameters are parameters required for the client to register the corresponding microservice with the cluster server, the target microservice is a microservice allowed to be provided by the target client, and the target registration operation is used to register the target microservice to the cluster server indicated by the server address according to the target registration parameters;

[0029] Input the target environment data corresponding to the target registration operation in the microservice system into the target prediction model that matches the target registration operation among the P prediction models, and obtain the predicted execution result of the target registration operation output by the target prediction model, wherein the target environment data is the microservice system operation data whose influence on the execution process of the target registration operation is greater than the target influence, and the target prediction model is used to predict whether the corresponding service operation will be executed faultily according to the environment data;

[0030] The execution of the target registration operation is controlled according to the predicted execution result.

[0031] Optionally, the step of inputting the target environment data corresponding to the target registration operation in the microservice system into a target prediction model that matches the target registration operation among the P prediction models, and obtaining a predicted execution result of the target registration operation output by the target prediction model, comprises:

[0032] Collect the registration response delay and registration error rate corresponding to the historical registration operations performed by the cluster server within the target historical time period, as well as the current registration resource parameters of the cluster server, wherein the registration response delay is used to indicate the average response time of the cluster server in responding to the historical registration operations within the target historical time period, the registration error rate is the ratio of the number of erroneous operations to the total number of operations of the historical registration operations performed by the cluster server within the target historical time period, and the registration resource parameters are used to indicate the resource amount of the target registration resources currently allowed to be provided by the cluster server, and the target registration resources are the operating resources required by the cluster server to respond to the target registration operations;

[0033] Determine a registered prediction model among the P prediction models as the target prediction model;

[0034] The registration response delay, the registration error rate and the registration resource parameters are input into the registration prediction model to obtain a registration prediction result of the target registration operation output by the registration prediction model, wherein the target environment data includes: the registration response delay, the registration error rate and the registration resource parameters, the registration prediction model is used to predict whether the corresponding registration operation will be executed faultily based on the registration response delay, the registration error rate and the registration resource parameters, the predicted execution result includes the registration prediction result, and the registration prediction result is used to determine whether the target registration operation will be executed faultily.

[0035] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a first microservice operation control device is provided. The microservice system includes: M clients, a cluster service end, N user ends and P prediction models, each of the M clients is allowed to register the corresponding microservice to the cluster service end, each of the N user ends is allowed to subscribe to and call the microservice registered on the cluster service end, M, N and P are all integers greater than or equal to 1, and the device is applied to a target user end among the N user ends, including:

[0036] A first receiving module is used to receive a microservice call request initiated by a target account registered on the target user terminal, wherein the microservice call request is used to request to call a target microservice;

[0037] A first response module, used to respond to the microservice call request and generate a target service operation to be executed that matches the target subscription state of the target microservice, wherein the target subscription state is used to indicate whether the target user terminal is currently subscribed to the target microservice;

[0038] A first input module is used to input the target environment data corresponding to the target service operation in the microservice system into the target prediction model that matches the target service operation among the P prediction models, and obtain the predicted execution result of the target service operation output by the target prediction model, wherein the target environment data is the microservice system operation data whose influence on the execution process of the target service operation is greater than the target influence, and the target prediction model is used to predict whether the corresponding service operation will be executed faultily according to the environment data;

[0039] A first control module is used to control the execution of the target service operation according to the predicted execution result.

[0040] According to another aspect of the present application, a second microservice operation control device is provided. The microservice system includes: M clients, a cluster service end, N user ends, and P prediction models, each of the M clients is allowed to register the corresponding microservice to the cluster service end, each of the N user ends is allowed to subscribe to and call the microservice registered on the cluster service end, M, N, and P are all integers greater than or equal to 1, and the device is applied to a target client among the M clients, including:

[0041] A second receiving module is used to receive a microservice registration request initiated by a reference account registered on the target client, wherein the microservice registration request is used to request to register the target microservice to the cluster server;

[0042] A second response module is used to respond to the microservice registration request, and generate a target registration operation to be executed according to the server address of the cluster server and the target registration parameters corresponding to the target microservice currently to be registered on the target client, wherein the registration parameters are parameters required for the client to register the corresponding microservice with the cluster server, the target microservice is a microservice allowed to be provided by the target client, and the target registration operation is used to register the target microservice to the cluster server indicated by the server address according to the target registration parameters;

[0043] A second input module is used to input the target environment data corresponding to the target registration operation in the microservice system into the target prediction model that matches the target registration operation among the P prediction models, and obtain the predicted execution result of the target registration operation output by the target prediction model, wherein the target environment data is the microservice system operation data whose influence on the execution process of the target registration operation is greater than the target influence, and the target prediction model is used to predict whether the corresponding service operation will be executed faultily according to the environment data;

[0044] The second control module is used to control the execution of the target registration operation according to the predicted execution result.

[0045] Through this application, the following steps are adopted: the target user terminal among N user terminals in the microservice system first receives a microservice call request initiated by a target account registered on the target user terminal, and the microservice call request can request to call the target microservice; then, in response to the microservice call request, a target service operation to be executed that matches the target subscription state of the target microservice is generated, and the target subscription state can indicate whether the target user terminal is currently subscribed to the target microservice; then, the target environment data corresponding to the target service operation in the microservice system is input into the target prediction model that matches the target service operation in P prediction models, and the predicted execution result of the target service operation output by the target prediction model is obtained. The target environment data is the microservice system operation data whose impact on the execution process of the target service operation is greater than the target impact degree. The target prediction model can predict whether the corresponding service operation will be executed with failures based on the environmental data; finally, the execution of the target service operation is controlled based on the predicted execution result, that is, after the target user receives the microservice call request initiated by the target account, it can determine the service operation to be executed based on its subscription status to the target microservice. Specifically, when it is not subscribed, the service operation to be executed is determined to be a subscription operation, and when it is subscribed, the service operation to be executed is determined to be a call operation. After determining the service operation to be executed, a model that can predict whether the service operation to be executed will be executed with failures is selected from multiple prediction models as the target prediction model, and then the environmental parameters of the corresponding service operation to be executed are input into the target prediction model to obtain the predicted execution result, and whether to continue to execute the service operation to be executed is controlled based on the predicted execution result. The above scheme is adopted to realize the automatic fault prediction and operation control before the service operation is executed, that is, when the service operation may fail, the microservice system can detect the fault in time and adjust the execution strategy. Compared with traditional methods that rely on manual monitoring and expert experience, this automated predictive model reduces human intervention, reduces the probability of failure in microservice operation, and speeds up fault response, thereby achieving the technical effect of reducing the probability of failure during microservice operation, and further solving the technical problem of high failure probability during microservice operation caused by the lack of predictive models to directly execute service operations in related technologies. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0047] Figure 1 This is a flowchart of a user end of a microservice operation control method provided in an embodiment of the present application;

[0048] Figure 2 is a schematic diagram of a microservice system structure provided according to an embodiment of the present application;

[0049] Figure 3 It is a flowchart of a client of a microservice operation control method provided in an embodiment of the present application;

[0050] Figure 4 is a schematic diagram of a first microservice operation control device according to an embodiment of the present application;

[0051] Figure 5 is a schematic diagram of a second microservice operation control device according to an embodiment of the present application;

[0052] Figure 6 is a schematic diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0053] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0054] In order to enable those skilled in the art to better understand the present application, the technical solutions 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 this application.

[0055] 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 sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. 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.

[0056] It should be noted that the relevant information (including but not limited to target account information, etc.) and data (including but not limited to microservice subscription data, registration data, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties. For example, an interface is set between this system and the relevant user or organization. Before obtaining relevant information, it is necessary to send an acquisition request to the aforementioned user or organization through the interface, and obtain relevant information after receiving the consent information fed back by the aforementioned user or organization.

[0057] The collected information involved in this disclosure is information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with the relevant laws, regulations and standards of the relevant countries and regions, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0058] The present invention is described below in conjunction with preferred implementation steps. Figure 1 is a flowchart of a user end of a microservice operation control method provided in an embodiment of the present application, such as Figure 1 As shown, the microservice system includes: M clients, a cluster server, N user terminals and P prediction models, each of the M clients is allowed to register the corresponding microservice to the cluster server, each of the N user terminals is allowed to subscribe to and call the microservice registered on the cluster server, M, N and P are all integers greater than or equal to 1, and the method is applied to the target user terminal among the N user terminals, and the method includes the following steps:

[0059] Step S102, receiving a microservice call request initiated by a target account registered on the target user terminal, wherein the microservice call request is used to request to call a target microservice;

[0060] Step S104, in response to the microservice call request, generating a target service operation to be executed that matches the target subscription state of the target microservice, wherein the target subscription state is used to indicate whether the target user terminal has currently subscribed to the target microservice;

[0061] Step S106, inputting the target environment data corresponding to the target service operation in the microservice system into the target prediction model that matches the target service operation among the P prediction models, and obtaining the predicted execution result of the target service operation output by the target prediction model, wherein the target environment data is the microservice system operation data whose influence on the execution process of the target service operation is greater than the target influence, and the target prediction model is used to predict whether the corresponding service operation will be executed faultily according to the environment data;

[0062] Step S108: controlling the execution of the target service operation according to the predicted execution result.

[0063] Optionally, in the microservice operation control method provided in the embodiment of the present application, Figure 2 is a schematic diagram of a microservice system structure provided according to an embodiment of the present application, such as Figure 2As shown, the microservice system includes: a client, a cluster server, and a user end, wherein the cluster server can be, but is not limited to, a component in the microservice system that can manage the registration information and status of multiple microservices, such as a ZooKeeper server (ZKServer) or other types of service registration centers. The cluster server allows the client to send microservice information (such as the URL (Uniform Resource Locator) of the microservice) to the client. Locator, Uniform Resource Locator), port and version, etc.) are registered in it and synchronized to all ZKServer nodes in the entire cluster server, and responds to the microservice call request initiated by the user end, and provides the latest microservice registration information to the user end; the client can be but not limited to a service provider that can provide the registration information of the microservice, in which the ZooKeeper client (ZKClient) and the prediction model are deployed. There can be multiple clients in the microservice system, and each client allows the microservice to be registered with the cluster server through ZKClient. The registration method can be to send the service information of the microservice in the client to the cluster server; the user end can be but not limited to a service consumer that can use the microservice, and is allowed to subscribe to and call the microservice from the cluster server. The ZooKeeper client (ZKClient) and the prediction model are deployed. There can be multiple users in the microservice system, and each user end allows the microservice registration information to be queried from the cluster server through ZKClient to subscribe to the microservice in the client and call it. The prediction model can be but not limited to an artificial intelligence model that can predict the failure probability of microservice operations (such as registration, subscription and call, etc.).

[0064] In the technical solution provided in the above step S102, the microservice call request can be a request initiated by a target account registered on the target user end, indicating the need to call a certain microservice (i.e., the target microservice), including the target account ID (Identification), the target microservice name or ID, business parameters, etc.

[0065] In the technical solution provided in the above step S104, the target subscription state of the target microservice indicates the subscription state of the current target user end to the target microservice, including: subscribed and unsubscribed states. After receiving the microservice call request, the target user end responds to the request and generates a corresponding target service operation according to the target subscription state of the target microservice. The target service operation may be, but is not limited to, an operation performed on the target microservice, including subscription and call, etc.

[0066] In an exemplary embodiment, a target service operation to be executed that matches the target subscription state of the target microservice can be generated in the following manner, but is not limited to: searching for the target microservice from T reference microservices currently subscribed by the target user end, where T is an integer greater than or equal to 1; when the target microservice is not found in the T reference microservices, determining the target subscription state to indicate that the target user end is not currently subscribed to the target microservice, and determining the target subscription operation as the target service operation, wherein the target subscription operation is used to subscribe to the target microservice registered on the cluster service end; when the target microservice is found in T reference microservices, determining the target subscription state to indicate that the target user end is currently subscribed to the target microservice, and determining the target call operation as the target service operation, wherein the target subscription operation is used to call the target microservice registered on the cluster service end.

[0067] Optionally, in this embodiment, the method of determining the target subscription status may include: the target user end may cache the service information of the subscribed microservice locally, allowing direct query of the cache list to find out whether the target microservice exists, wherein the cache list contains all multiple subscribed microservices (i.e., reference microservices), and the method of finding out whether the target microservice exists from the cache list includes: first, using a hash table to store the service information of the reference microservice, using the name or ID of the reference microservice as the key and other business parameters as the value, and establishing an index for the cache list; then, searching for matching microservice entries in the cache list based on the name or ID of the target microservice as the query condition, and if a microservice matching the condition is found, the corresponding microservice information and corresponding prompt information, such as "subscribed" are returned; if a microservice matching the condition is found, "NULL" and corresponding prompt information, such as "unsubscribed" are returned.

[0068] Optionally, in this embodiment, the method for determining the target subscription status may also include: the target user end can obtain the latest microservice subscription information by querying the cluster server end, and after the target user end correctly configures the information required to communicate with the cluster server end, such as the address, port, authentication information, etc. of the cluster server end, use ZKClient to connect to ZKServer, and obtain the subscription information of a specific microservice or a list of all subscribed microservices in ZKServer.

[0069] Optionally, in this embodiment, the method of determining the target service operation may include: when the target subscription state indicates that the target user end is not currently subscribed to the target microservice, determining the target service operation as a target subscription operation, that is, subscribing to the registration information of the target microservice on the cluster service end; when the target subscription state indicates that the target user end is currently subscribed to the target microservice, determining the target service operation as a target call operation, that is, calling the registration information of the target microservice on the cluster service end.

[0070] Optionally, in this embodiment, the method for determining the target service operation may also include: when the target subscription state indicates that the target user end is not currently subscribed to the target microservice, determining the target service operation as a target subscription operation, and after completing the subscription to the registration information of the target microservice on the cluster server, again determining the target service operation as a target call operation, that is, calling the registration information of the target microservice.

[0071] In the technical solution provided in the above step S106, after determining the target service operation, a target prediction model matching the target service operation is determined from multiple prediction models. For example, when the target service operation is a target subscription, a prediction model that can predict the probability of microservice subscription failure is determined as the target prediction model, and then the target environment data corresponding to the target service operation in the microservice system is input into the target prediction model, wherein the target environment data is runtime data related to the target service operation, and these data can significantly affect the execution result of the service operation; the prediction model can predict whether the service operation will be executed faultily based on the input environment data. Specifically, the prediction model is based on historical operation data and a learning algorithm related to the service operation, and can evaluate the possibility of service operation failure and output an evaluation result (i.e., a predicted execution result).

[0072] In the technical solution provided in the above step S108, the method of controlling the execution of the target service operation according to the predicted execution result may be, but is not limited to: when the predicted execution result indicates that the microservice operation will fail to execute, the target user end is prohibited from executing the corresponding microservice operation; when the predicted execution result indicates that the microservice operation will not fail to execute, the target user end continues to execute the corresponding microservice operation.

[0073] In an exemplary embodiment, when the target service operation is the target subscription operation, it is possible but not limited to predicting whether the target subscription operation will be executed faultily in the following manner, including: collecting subscription response delay and subscription error rate corresponding to historical subscription operations executed by the cluster server within the target historical time period, and current subscription resource parameters of the cluster server, wherein the subscription response delay is used to indicate the average response time of the cluster server in responding to the historical subscription operation within the target historical time period, the subscription error rate is the ratio of the number of erroneous operations of the historical subscription operations executed by the cluster server within the target historical time period to the total number of operations, the subscription resource parameters are used to indicate the resource amount of the target subscription resources currently allowed to be provided by the cluster server, and the The target subscription resources are the running resources required by the cluster server to respond to the target subscription operation; the subscription prediction model among the P prediction models is determined as the target prediction model; the subscription response delay, the subscription error rate and the subscription resource parameters are input into the subscription prediction model to obtain the subscription prediction result of the target subscription operation output by the subscription prediction model, wherein the target environment data includes: the subscription response delay, the subscription error rate and the subscription resource parameters, the subscription prediction model is used to predict whether the corresponding subscription operation will be executed faultily based on the subscription response delay, the subscription error rate and the subscription resource parameters, the predicted execution result includes the subscription prediction result, and the subscription prediction result is used to determine whether the target subscription operation will be executed faultily.

[0074] Optionally, in this embodiment, when the target service operation is a target subscription operation, firstly, statistics and collection of relevant data of all subscription operations performed by the cluster server in the target historical time period (a preset time period, such as one hour), including average response time, number of error operations, total number of operations, etc., are performed, and the target environment data is calculated through these data, including: subscription response delay (which can be the average response time) and subscription error rate (which can be the ratio of the number of error operations to the total number of operations), as well as the current subscription resource parameters of the cluster server (which can be the operating resources required for the cluster server to respond to the target subscription operation, such as CPU load, memory usage, network bandwidth, etc.). Then, a prediction model (i.e., subscription prediction model) matching the target subscription operation is selected from multiple prediction models to be determined as the target prediction model. The collected subscription response delay, subscription error rate, and subscription resource parameters are then provided as input to the subscription prediction model, which evaluates the possibility of subscription operation failure based on these data and outputs the evaluation result (i.e., subscription prediction result), which can indicate whether the target subscription operation will fail (i.e., fault execution).

[0075] In an exemplary embodiment, when the target service operation is the target call operation, it is possible but not limited to predicting whether the target call operation will be executed faultily in the following manner, including: collecting the call response delay and call error rate corresponding to the historical call operations executed by the cluster server within the target historical time period, the current network connection parameters between the target user terminal and the cluster server, and the current call resource parameters of the cluster server, wherein the call response delay is used to indicate the average response time of the cluster server in responding to the historical call operations within the target historical time period, the call error rate is the ratio of the number of erroneous operations of the historical call operations executed by the cluster server within the target historical time period to the total number of operations, the network connection parameters are used to indicate the stability of the network connection between the target user terminal and the cluster server, and the call resource parameters are used to indicate the cluster The resource amount of the target call resources currently allowed to be provided by the server, the target call resources are the operating resources required by the cluster server to respond to the target call operation; determining a call prediction model among the P prediction models as the target prediction model; inputting the call response delay, the call error rate, the network connection parameters and the call resource parameters into the call prediction model, and obtaining a call prediction result of the target call operation output by the call prediction model, wherein the target environment data includes: the call response delay, the call error rate, the network connection parameters and the call resource parameters, the call prediction model is used to predict whether the corresponding subscription operation will be executed faultily according to the call response delay, the call error rate and the call resource parameters, and the predicted execution result includes the call prediction result, and the call prediction result is used to determine whether the target call operation will be executed faultily.

[0076] Optionally, in this embodiment, when the target service operation is a target call operation, firstly, statistics and collection of relevant data of all call operations performed by the cluster server in the target historical time period (a preset time period, such as one hour), including average response time, number of error operations, total number of operations, etc., are performed, and the target environment data is calculated through these data, including: call response delay (which can be the average response time) and call error rate (which can be the ratio of the number of error operations to the total number of operations), the current network connection parameters between the target user end and the cluster server, and the current call resource parameters of the cluster server (which can be the operating resources required for the cluster server to respond to the target call operation, such as CPU load, memory usage, network bandwidth, etc.). Then, a prediction model (i.e., a call prediction model) matching the target call operation is selected from multiple prediction models to be determined as the target prediction model. The collected call response delay, call error rate, and call resource parameters are then provided as input to the call prediction model, which evaluates the possibility of failure of the call operation based on these data and outputs the evaluation result (i.e., the call prediction result), which can indicate whether the target call operation will fail (i.e., fault execution).

[0077] In an exemplary embodiment, the microservice system also includes: a fault alarm module, which can control the execution of the target service operation according to the predicted execution result in the following ways, including but not limited to: prohibiting the execution of the target service operation when the predicted execution result is used to indicate that the target service operation will be executed faultily; generating fault alarm information; transmitting the fault alarm information to the fault alarm module; executing the target service operation on the cluster server when the predicted execution result is used to indicate that the target service operation will be executed normally; receiving the service operation result returned by the cluster server; and transmitting the service operation result to the target account.

[0078] Optionally, in this embodiment, if Figure 2 As shown, the microservice system also includes a fault alarm module (alarm center). When the predicted execution result indicates that the target service operation will fail to execute, the target user end is prohibited from executing the target service operation, and an alarm message is generated and transmitted to the fault alarm module; when the predicted execution result indicates that the target service operation will not fail to execute, the target user end executes the target service operation on the cluster server, and returns the service operation result to the target account after receiving the service operation result returned by the cluster server.

[0079] In an exemplary embodiment, Figure 3 is a flowchart of a client of a microservice operation control method provided in an embodiment of the present application, such as Figure 3As shown, the microservice system includes: M clients, a cluster server, N user terminals and P prediction models, each of the M clients is allowed to register the corresponding microservice to the cluster server, each of the N user terminals is allowed to subscribe to and call the microservice registered on the cluster server, M, N and P are all integers greater than or equal to 1, and the method is applied to a target client among the M clients, and the method includes the following steps:

[0080] Step S202, receiving a microservice registration request initiated by a reference account registered on the target client, wherein the microservice registration request is used to request to register the target microservice to the cluster server;

[0081] Step S204, in response to the microservice registration request, generating a target registration operation to be executed according to the server address of the cluster server and the target registration parameters corresponding to the target microservice currently to be registered on the target client, wherein the registration parameters are parameters required for the client to register the corresponding microservice with the cluster server, the target microservice is a microservice allowed to be provided by the target client, and the target registration operation is used to register the target microservice to the cluster server indicated by the server address according to the target registration parameters;

[0082] Step S206, inputting the target environment data corresponding to the target registration operation in the microservice system into the target prediction model that matches the target registration operation among the P prediction models, and obtaining the predicted execution result of the target registration operation output by the target prediction model, wherein the target environment data is the microservice system operation data whose influence on the execution process of the target registration operation is greater than the target influence, and the target prediction model is used to predict whether the corresponding service operation will be executed faultily according to the environment data;

[0083] Step S208: controlling the execution of the target registration operation according to the predicted execution result.

[0084] Optionally, in this embodiment, the microservice registration request can be a request initiated by a reference account registered on the target client to indicate the need to register a certain microservice (ie, the target microservice), including the target account ID, the target microservice name or ID, business parameters, etc.

[0085] Optionally, in this embodiment, the target registration parameters of the target microservice to be registered represent the parameters required when the client registers the target microservice with the cluster server, such as the target microservice name or ID, service URL, and service version. After receiving the microservice registration request, the target client responds to the request and generates a corresponding target registration operation according to the server address of the cluster server and the target registration parameters of the target microservice, wherein the target registration operation can register the target microservice to the cluster server indicated by the server address according to the target registration parameters.

[0086] Optionally, in this embodiment, a target prediction model that matches the target registration operation is determined from multiple prediction models, that is, a registration prediction model that can predict the probability of microservice registration failure is determined as the target prediction model, and then the target environment data corresponding to the target registration operation in the microservice system is input into the target prediction model, wherein the target environment data is runtime data related to the target registration operation, and this data can significantly affect the execution result of the registration operation; the prediction model can predict whether the registration operation will be executed faultily based on the input environment data.

[0087] Optionally, in this embodiment, the method of controlling the execution of the target registration operation according to the predicted execution result may be, but is not limited to: when the predicted execution result indicates that the registration operation will fail to execute, the target client is prohibited from executing the registration operation; when the predicted execution result indicates that the registration operation will not fail to execute, the target client is allowed to execute the registration operation.

[0088] In an exemplary embodiment, it is possible but not limited to predicting whether the target registration operation will be executed faultily in the following manner, including: collecting the registration response delay and registration error rate corresponding to the historical registration operations executed by the cluster server within the target historical time period, and the current registration resource parameters of the cluster server, wherein the registration response delay is used to indicate the average response time of the cluster server in responding to the historical registration operations within the target historical time period, the registration error rate is the ratio of the number of erroneous operations of the historical registration operations executed by the cluster server within the target historical time period to the total number of operations, and the registration resource parameters are used to indicate the resource amount of the target registration resources currently allowed to be provided by the cluster server, and the target registration resources are the resources of the cluster server. The server responds to the operating resources required for the target registration operation; determines a registration prediction model among P prediction models as the target prediction model; inputs the registration response delay, the registration error rate and the registration resource parameters into the registration prediction model, and obtains a registration prediction result of the target registration operation output by the registration prediction model, wherein the target environment data includes: the registration response delay, the registration error rate and the registration resource parameters, the registration prediction model is used to predict whether the corresponding registration operation will be executed faultily based on the registration response delay, the registration error rate and the registration resource parameters, the predicted execution result includes the registration prediction result, and the registration prediction result is used to determine whether the target registration operation will be executed faultily.

[0089] Optionally, in this embodiment, the method of predicting whether the target registration operation is executed faultily includes: firstly, statistics and collection of relevant data of all registration operations executed by the cluster server in the target historical time period (a preset time period, such as one hour), including average response time, number of error operations, total number of operations, etc., and the target environment data is calculated through these data, including: registration response delay (which can be the average response time) and registration error rate (which can be the ratio of the number of error operations to the total number of operations), and the current registration resource parameters of the cluster server (which can be the operating resources required for the cluster server to respond to the target registration operation, such as CPU load, memory usage, network bandwidth, etc.). Then, a prediction model (i.e., registration prediction model) matching the target registration operation is selected from multiple prediction models to be determined as the target prediction model. Then, the collected registration response delay, registration error rate, and registration resource parameters are provided as input to the registration prediction model, and the registration prediction model will evaluate the possibility of registration operation failure based on these data, and output the evaluation result (i.e., registration prediction result), which can indicate whether the target registration operation will fail (i.e., fault execution). The microservice operation control method provided in the embodiment of the present application realizes the prediction of the failure probability of microservice registration, registration and call phases by deploying the prediction model on the client and the user end, and solves the problem of high failure probability during the operation of microservices in the related technology. Thus, the technical effect of reducing the failure probability during the operation of microservices is achieved.

[0090] Optionally, in this embodiment, the prediction model predicts whether the registration operation will be executed faultily according to the input environment data, which may include three stages, namely, a data preprocessing stage (the first step to the fourth step), a model training stage (the fifth step to the eighth step) and a model application stage (the ninth step). The specific process is as follows:

[0091] The first step is data collection. The monitoring data SDK (software development kit) deployed on each service node of the microservice collects the operation data of the service operation to be executed in a certain period of time in history, including the average response time, the number of error operations, the total number of operations, etc.

[0092] The second step is feature extraction. Features that are obvious indicators of faults and problems, such as response time, error rate, bit error rate, etc., are extracted from the collected data.

[0093] The third step is feature normalization. The extracted features are normalized to reduce the impact of features of different magnitudes on the model.

[0094] The fourth step is data set division. The processed data set is randomly divided into four parts: a training set, a test set, and two validation sets.

[0095] Step 5: Unsupervised learning and pre-training: Use unsupervised learning methods and tree models to pre-train the standardized unlabeled massive data set, and conduct the first round of testing on the test set.

[0096] Step 6: Manual labeling and secondary training: Based on the pre-training, manually labeled data is added for secondary training, and reinforcement learning is used to score the model's feedback response.

[0097] Step 7: Typical scenario data debugging: Integrate the data traffic of typical scenarios, use a combination of federated learning and reinforcement learning to perform the third debugging, and verify it on the cross-validation set.

[0098] Step 8: Production verification: Verify the model in the actual production environment, score the model's operational performance through both manual and model judgment, and add these scoring data to the new training set to further train the model.

[0099] Step 9: Prediction execution: Using the trained registration prediction model, input the environment parameters corresponding to the service operation. The model evaluates the possibility of failure of the corresponding service operation based on the environment parameters and outputs the evaluation result.

[0100] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0101] The embodiment of the present application also provides a microservice operation control device. It should be noted that the microservice operation control device of the embodiment of the present application can be used to execute the microservice operation control method provided in the embodiment of the present application. The microservice operation control device provided in the embodiment of the present application is introduced below.

[0102] Figure 4 Schematic diagram of the operation control device of the first microservice according to the embodiment of the present application. Figure 4 As shown, the microservice system includes: M clients, a cluster server, N user terminals and P prediction models, each of the M clients is allowed to register the corresponding microservice to the cluster server, each of the N user terminals is allowed to subscribe to and call the microservice registered on the cluster server, M, N and P are all integers greater than or equal to 1, and the device is applied to a target user terminal among the N user terminals, including:

[0103] The first receiving module 402 is used to receive a microservice call request initiated by a target account registered on the target user terminal, wherein the microservice call request is used to request to call a target microservice;

[0104] A first response module 404 is used to respond to the microservice call request and generate a target service operation to be executed that matches the target subscription state of the target microservice, wherein the target subscription state is used to indicate whether the target user terminal is currently subscribed to the target microservice;

[0105] A first input module 406 is used to input the target environment data corresponding to the target service operation in the microservice system into the target prediction model that matches the target service operation among the P prediction models, and obtain the predicted execution result of the target service operation output by the target prediction model, wherein the target environment data is the microservice system operation data whose influence on the execution process of the target service operation is greater than the target influence, and the target prediction model is used to predict whether the corresponding service operation will be executed faultily according to the environment data;

[0106] The first control module 408 is used to control the execution of the target service operation according to the predicted execution result.

[0107] Optionally, in the microservice operation control device provided in the embodiment of the present application, the first response module includes:

[0108] A search unit, configured to search for the target microservice from T reference microservices currently subscribed to by the target user terminal, where T is an integer greater than or equal to 1;

[0109] A first determining unit is configured to, when the target microservice is not found in the T reference microservices, determine that the target subscription state is used to indicate that the target user terminal is not currently subscribed to the target microservice, and determine a target subscription operation as the target service operation, wherein the target subscription operation is used to subscribe to the target microservice registered on the cluster service terminal;

[0110] The second determination unit is used to determine, when the target microservice is found in the T reference microservices, that the target subscription state is used to indicate that the target user terminal has currently subscribed to the target microservice, and determine the target call operation as the target service operation, wherein the target subscription operation is used to call the target microservice registered on the cluster server.

[0111] Optionally, in the microservice operation control device provided in the embodiment of the present application, when the target service operation is the target subscription operation, the first input module includes:

[0112] A first collection unit is used to collect subscription response delays and subscription error rates corresponding to historical subscription operations performed by the cluster server within a target historical time period, as well as current subscription resource parameters of the cluster server, wherein the subscription response delay is used to indicate an average response time of the cluster server in response to historical subscription operations within the target historical time period, the subscription error rate is a ratio of the number of erroneous operations to the total number of operations of historical subscription operations performed by the cluster server within the target historical time period, and the subscription resource parameters are used to indicate the amount of target subscription resources currently allowed to be provided by the cluster server, and the target subscription resources are operating resources required for the cluster server to respond to the target subscription operations;

[0113] A third determining unit, configured to determine a subscription prediction model among the P prediction models as the target prediction model;

[0114] A first input unit is used to input the subscription response delay, the subscription error rate and the subscription resource parameters into the subscription prediction model to obtain a subscription prediction result of the target subscription operation output by the subscription prediction model, wherein the target environment data includes: the subscription response delay, the subscription error rate and the subscription resource parameters, the subscription prediction model is used to predict whether the corresponding subscription operation will be executed faultily based on the subscription response delay, the subscription error rate and the subscription resource parameters, the predicted execution result includes the subscription prediction result, and the subscription prediction result is used to determine whether the target subscription operation will be executed faultily.

[0115] Optionally, in the microservice operation control device provided in the embodiment of the present application, when the target service operation is the target call operation, the first input module further includes:

[0116] A second collection unit is used to collect the call response delay and call error rate corresponding to the historical call operations executed by the cluster server within the target historical time period, the current network connection parameters between the target user terminal and the cluster server, and the current call resource parameters of the cluster server, wherein the call response delay is used to indicate the average response time of the cluster server in response to the historical call operations within the target historical time period, the call error rate is the ratio of the number of erroneous operations to the total number of operations of the historical call operations executed by the cluster server within the target historical time period, the network connection parameter is used to indicate the stability of the network connection between the target user terminal and the cluster server, and the call resource parameter is used to indicate the resource amount of the target call resources currently allowed to be provided by the cluster server, and the target call resources are the running resources required for the cluster server to respond to the target call operation;

[0117] A fourth determining unit, configured to determine a calling prediction model among the P prediction models as the target prediction model;

[0118] A second input unit is used to input the call response delay, the call error rate, the network connection parameters and the call resource parameters into the call prediction model to obtain a call prediction result of the target call operation output by the call prediction model, wherein the target environment data includes: the call response delay, the call error rate, the network connection parameters and the call resource parameters, the call prediction model is used to predict whether the corresponding subscription operation will be executed faultily based on the call response delay, the call error rate and the call resource parameters, and the predicted execution result includes the call prediction result, and the call prediction result is used to determine whether the target call operation will be executed faultily.

[0119] Optionally, in the microservice operation control device provided in the embodiment of the present application, the microservice system further includes: a fault alarm module, and the first control module includes:

[0120] a prohibition unit, configured to prohibit execution of the target service operation if the predicted execution result indicates that the target service operation will be executed faultily; generate fault warning information; and transmit the fault warning information to the fault warning module;

[0121] An execution unit is used to execute the target service operation on the cluster server when the predicted execution result indicates that the target service operation will be executed normally; receive the service operation result returned by the cluster server; and transmit the service operation result to the target account.

[0122] Figure 5 Schematic diagram of a second microservice operation control device according to an embodiment of the present application. Figure 5 As shown, the microservice system includes: M clients, a cluster server, N user terminals and P prediction models, each of the M clients is allowed to register the corresponding microservice to the cluster server, each of the N user terminals is allowed to subscribe to and call the microservice registered on the cluster server, M, N and P are all integers greater than or equal to 1, and the device is applied to a target client among the M clients, including:

[0123] The second receiving module 502 is used to receive a microservice registration request initiated by a reference account registered on the target client, wherein the microservice registration request is used to request to register the target microservice to the cluster server;

[0124] The second response module 504 is used to respond to the microservice registration request, and generate a target registration operation to be executed according to the server address of the cluster server and the target registration parameters corresponding to the target microservice currently to be registered on the target client, wherein the registration parameters are parameters required for the client to register the corresponding microservice with the cluster server, the target microservice is a microservice allowed to be provided by the target client, and the target registration operation is used to register the target microservice to the cluster server indicated by the server address according to the target registration parameters;

[0125] A second input module 506 is used to input the target environment data corresponding to the target registration operation in the microservice system into the target prediction model that matches the target registration operation among the P prediction models, and obtain the predicted execution result of the target registration operation output by the target prediction model, wherein the target environment data is the microservice system operation data whose influence on the execution process of the target registration operation is greater than the target influence, and the target prediction model is used to predict whether the corresponding service operation will be executed faultily according to the environment data;

[0126] The second control module 508 is used to control the execution of the target registration operation according to the predicted execution result.

[0127] Optionally, in the second microservice operation control device provided in the embodiment of the present application, the second input module includes:

[0128] a third collection unit, configured to collect registration response delays and registration error rates corresponding to historical registration operations performed by the cluster server within a target historical time period, and current registration resource parameters of the cluster server, wherein the registration response delay is used to indicate an average response time of the cluster server in response to historical registration operations within the target historical time period, the registration error rate is a ratio of the number of erroneous operations to the total number of operations of historical registration operations performed by the cluster server within the target historical time period, and the registration resource parameters are used to indicate the amount of target registration resources currently allowed to be provided by the cluster server, and the target registration resources are operating resources required for the cluster server to respond to the target registration operations;

[0129] A fifth determining unit, configured to determine a registered prediction model among the P prediction models as the target prediction model;

[0130] A third input unit is used to input the registration response delay, the registration error rate and the registration resource parameter into the registration prediction model to obtain the registration prediction result of the target registration operation output by the registration prediction model, wherein the target environment data includes: the registration response delay, the registration error rate and the registration resource parameter, the registration prediction model is used to predict whether the corresponding registration operation will be executed faultily based on the registration response delay, the registration error rate and the registration resource parameter, the predicted execution result includes the registration prediction result, and the registration prediction result is used to determine whether the target registration operation will be executed faultily.

[0131] The operation control device of the microservice includes a processor and a memory. The above units are stored in the memory as program units, and the processor executes the above program units stored in the memory to realize corresponding functions.

[0132] The processor contains a kernel, which calls the corresponding program unit from the memory. One or more kernels can be set, and the technical effect of reducing the probability of failure during the operation of microservices can be achieved by adjusting the kernel parameters.

[0133] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0134] An embodiment of the present invention provides a computer-readable storage medium on which a program is stored. When the program is executed by a processor, the operation control method of the microservice is implemented.

[0135] An embodiment of the present invention provides a processor, which is used to run a program, wherein the operation control method of the microservice is executed when the program is running.

[0136] Figure 6 is a schematic diagram of an electronic device according to an embodiment of the present application, such as Figure 6 As shown, an embodiment of the present invention provides an electronic device, the electronic device includes a processor, a memory, and a program stored in the memory and executable on the processor, and the processor implements the following steps when executing the program:

[0137] Optionally, the processor may implement the following steps when executing the program:

[0138] S1, receiving a microservice call request initiated by a target account registered on the target user terminal, wherein the microservice call request is used to request to call a target microservice;

[0139] S2, in response to the microservice call request, generating a target service operation to be executed that matches the target subscription state of the target microservice, wherein the target subscription state is used to indicate whether the target user terminal is currently subscribed to the target microservice;

[0140] S3, inputting the target environment data corresponding to the target service operation in the microservice system into the target prediction model that matches the target service operation among the P prediction models, and obtaining the predicted execution result of the target service operation output by the target prediction model, wherein the target environment data is the microservice system operation data whose influence on the execution process of the target service operation is greater than the target influence, and the target prediction model is used to predict whether the corresponding service operation will be executed faultily according to the environment data;

[0141] S4: Controlling the execution of the target service operation according to the predicted execution result.

[0142] Optionally, the processor may further implement the following steps when executing the program:

[0143] S5, receiving a microservice registration request initiated by a reference account registered on the target client, wherein the microservice registration request is used to request to register the target microservice to the cluster server;

[0144] S6, in response to the microservice registration request, generating a target registration operation to be executed according to the server address of the cluster server and the target registration parameters corresponding to the target microservice currently to be registered on the target client, wherein the registration parameters are parameters required for the client to register the corresponding microservice with the cluster server, the target microservice is a microservice allowed to be provided by the target client, and the target registration operation is used to register the target microservice to the cluster server indicated by the server address according to the target registration parameters;

[0145] S7, inputting the target environment data corresponding to the target registration operation in the microservice system into the target prediction model that matches the target registration operation among the P prediction models, and obtaining the predicted execution result of the target registration operation output by the target prediction model, wherein the target environment data is the microservice system operation data whose influence on the execution process of the target registration operation is greater than the target influence, and the target prediction model is used to predict whether the corresponding service operation will be executed faultily according to the environment data;

[0146] S8, controlling the execution of the target registration operation according to the predicted execution result.

[0147] The device in this article can be a server, a PC (Personal Computer), a PAD (Tablet Device), a mobile phone, etc.

[0148] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program for initializing the following method steps:

[0149] Optionally, the above computer program product, when executed on a data processing device, is adapted to execute a program initializing the following method steps:

[0150] S1, receiving a microservice call request initiated by a target account registered on the target user terminal, wherein the microservice call request is used to request to call a target microservice;

[0151] S2, in response to the microservice call request, generating a target service operation to be executed that matches the target subscription state of the target microservice, wherein the target subscription state is used to indicate whether the target user terminal is currently subscribed to the target microservice;

[0152] S3, inputting the target environment data corresponding to the target service operation in the microservice system into the target prediction model that matches the target service operation among the P prediction models, and obtaining the predicted execution result of the target service operation output by the target prediction model, wherein the target environment data is the microservice system operation data whose influence on the execution process of the target service operation is greater than the target influence, and the target prediction model is used to predict whether the corresponding service operation will be executed faultily according to the environment data;

[0153] S4: Controlling the execution of the target service operation according to the predicted execution result.

[0154] Optionally, the above computer program product, when executed on a data processing device, is further adapted to execute a program initializing the following method steps:

[0155] S5, receiving a microservice registration request initiated by a reference account registered on the target client, wherein the microservice registration request is used to request to register the target microservice to the cluster server;

[0156] S6, in response to the microservice registration request, generating a target registration operation to be executed according to the server address of the cluster server and the target registration parameters corresponding to the target microservice currently to be registered on the target client, wherein the registration parameters are parameters required for the client to register the corresponding microservice with the cluster server, the target microservice is a microservice allowed to be provided by the target client, and the target registration operation is used to register the target microservice to the cluster server indicated by the server address according to the target registration parameters;

[0157] S7, inputting the target environment data corresponding to the target registration operation in the microservice system into the target prediction model that matches the target registration operation among the P prediction models, and obtaining the predicted execution result of the target registration operation output by the target prediction model, wherein the target environment data is the microservice system operation data whose influence on the execution process of the target registration operation is greater than the target influence, and the target prediction model is used to predict whether the corresponding service operation will be executed faultily according to the environment data;

[0158] S8, controlling the execution of the target registration operation according to the predicted execution result.

[0159] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM (Compact Disc Read-Only Memory, CD-ROM), optical storage, etc.) that contain computer-usable program code.

[0160] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0161] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0162] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0163] In a typical configuration, a computing device includes one or more processors (Central Processing Unit, CPU), input / output interface, network interface and memory.

[0164] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash random access memory (RAM). The memory is an example of a computer-readable medium.

[0165] Computer readable media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, pseudostatic random-access memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disc read-only memory, digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0166] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0167] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0168] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.

Claims

1. A microservice operation control method, characterized in that: The microservice system includes: M clients, a cluster server, N user terminals and P prediction models, each of the M clients is allowed to register a corresponding microservice to the cluster server, each of the N user terminals is allowed to subscribe to and call the microservice registered on the cluster server, M, N and P are all integers greater than or equal to 1, and the method is applied to a target user terminal among the N user terminals, including: Receive a microservice call request initiated by a target account registered on the target user terminal, wherein the microservice call request is used to request to call a target microservice; In response to the microservice call request, generate a target service operation to be executed that matches the target subscription state of the target microservice, wherein the target subscription state is used to indicate whether the target user terminal is currently subscribed to the target microservice; Inputting the target environment data corresponding to the target service operation in the microservice system into the target prediction model that matches the target service operation among the P prediction models, and obtaining the predicted execution result of the target service operation output by the target prediction model, wherein the target environment data is the microservice system operation data whose influence on the execution process of the target service operation is greater than the target influence, and the target prediction model is used to predict whether the corresponding service operation will be executed faultily according to the environment data; The execution of the target service operation is controlled according to the predicted execution result.

2. The method according to claim 1, characterized in that: The generating a target service operation to be executed that matches the target subscription state of the target microservice includes: Searching for the target microservice from T reference microservices currently subscribed by the target user, where T is an integer greater than or equal to 1; In the case that the target microservice is not found in the T reference microservices, determining the target subscription state to indicate that the target user end is not currently subscribed to the target microservice, and determining a target subscription operation as the target service operation, wherein the target subscription operation is used to subscribe to the target microservice registered on the cluster service end; In the case where the target microservice is found in the T reference microservices, the target subscription state is determined to indicate that the target user end has currently subscribed to the target microservice, and a target call operation is determined as the target service operation, wherein the target subscription operation is used to call the target microservice registered on the cluster service end.

3. The method according to claim 2, characterized in that In the case where the target service operation is the target subscription operation, inputting the target environment data corresponding to the target service operation in the microservice system into a target prediction model that matches the target service operation among the P prediction models, and obtaining a prediction execution result of the target service operation output by the target prediction model, includes: Collect the subscription response delay and subscription error rate corresponding to the historical subscription operations performed by the cluster server within the target historical time period, as well as the current subscription resource parameters of the cluster server, wherein the subscription response delay is used to indicate the average response time of the cluster server in response to the historical subscription operations within the target historical time period, the subscription error rate is the ratio of the number of error operations to the total number of operations of the historical subscription operations performed by the cluster server within the target historical time period, and the subscription resource parameters are used to indicate the resource amount of the target subscription resources currently allowed to be provided by the cluster server, and the target subscription resources are the operating resources required by the cluster server to respond to the target subscription operations; Determine a subscription prediction model among the P prediction models as the target prediction model; The subscription response delay, the subscription error rate and the subscription resource parameters are input into the subscription prediction model to obtain a subscription prediction result of the target subscription operation output by the subscription prediction model, wherein the target environment data includes: the subscription response delay, the subscription error rate and the subscription resource parameters, the subscription prediction model is used to predict whether the corresponding subscription operation will be executed faultily based on the subscription response delay, the subscription error rate and the subscription resource parameters, the predicted execution result includes the subscription prediction result, and the subscription prediction result is used to determine whether the target subscription operation will be executed faultily.

4. The method according to claim 2, characterized in that: In the case where the target service operation is the target call operation, inputting the target environment data corresponding to the target service operation in the microservice system into a target prediction model that matches the target service operation among the P prediction models, and obtaining a prediction execution result of the target service operation output by the target prediction model, includes: Collect the call response delay and call error rate corresponding to the historical call operations executed by the cluster server within the target historical time period, the current network connection parameters between the target user terminal and the cluster server, and the current call resource parameters of the cluster server, wherein the call response delay is used to indicate the average response time of the cluster server in response to the historical call operations within the target historical time period, the call error rate is the ratio of the number of erroneous operations to the total number of operations of the historical call operations executed by the cluster server within the target historical time period, the network connection parameter is used to indicate the stability of the network connection between the target user terminal and the cluster server, the call resource parameter is used to indicate the resource amount of the target call resources currently allowed to be provided by the cluster server, and the target call resources are the operating resources required for the cluster server to respond to the target call operation; Determine a calling prediction model among the P prediction models as the target prediction model; The call response delay, the call error rate, the network connection parameters and the call resource parameters are input into the call prediction model to obtain a call prediction result of the target call operation output by the call prediction model, wherein the target environment data includes: the call response delay, the call error rate, the network connection parameters and the call resource parameters, the call prediction model is used to predict whether the corresponding subscription operation will be executed faultily based on the call response delay, the call error rate and the call resource parameters, and the predicted execution result includes the call prediction result, and the call prediction result is used to determine whether the target call operation will be executed faultily.

5. The method according to claim 1, characterized in that The microservice system further includes: a fault alarm module, wherein the control of the execution of the target service operation according to the predicted execution result includes: In the case where the predicted execution result indicates that the target service operation will be executed faultily, prohibiting execution of the target service operation; generating fault warning information; transmitting the fault warning information to the fault warning module; In a case where the predicted execution result indicates that the target service operation will be executed normally, the target service operation is executed on the cluster server; a service operation result returned by the cluster server is received; and the service operation result is transmitted to the target account.

6. A microservice operation control method, characterized in that: The microservice system includes: M clients, a cluster server, N user terminals and P prediction models, each of the M clients is allowed to register a corresponding microservice to the cluster server, each of the N user terminals is allowed to subscribe to and call the microservice registered on the cluster server, M, N and P are all integers greater than or equal to 1, and the method is applied to a target client among the M clients, including: Receive a microservice registration request initiated by a reference account registered on the target client, wherein the microservice registration request is used to request to register the target microservice to the cluster server; In response to the microservice registration request, a target registration operation to be executed is generated according to the server address of the cluster server and the target registration parameters corresponding to the target microservice currently to be registered on the target client, wherein the registration parameters are parameters required for the client to register the corresponding microservice with the cluster server, the target microservice is a microservice allowed to be provided by the target client, and the target registration operation is used to register the target microservice to the cluster server indicated by the server address according to the target registration parameters; Input the target environment data corresponding to the target registration operation in the microservice system into the target prediction model that matches the target registration operation among the P prediction models, and obtain the predicted execution result of the target registration operation output by the target prediction model, wherein the target environment data is the microservice system operation data whose influence on the execution process of the target registration operation is greater than the target influence, and the target prediction model is used to predict whether the corresponding service operation will be executed faultily according to the environment data; The execution of the target registration operation is controlled according to the predicted execution result.

7. The method according to claim 6, characterized in that The step of inputting the target environment data corresponding to the target registration operation in the microservice system into a target prediction model that matches the target registration operation among the P prediction models, and obtaining a prediction execution result of the target registration operation output by the target prediction model, comprises: Collect the registration response delay and registration error rate corresponding to the historical registration operations performed by the cluster server within the target historical time period, as well as the current registration resource parameters of the cluster server, wherein the registration response delay is used to indicate the average response time of the cluster server in responding to the historical registration operations within the target historical time period, the registration error rate is the ratio of the number of erroneous operations to the total number of operations of the historical registration operations performed by the cluster server within the target historical time period, and the registration resource parameters are used to indicate the resource amount of the target registration resources currently allowed to be provided by the cluster server, and the target registration resources are the operating resources required by the cluster server to respond to the target registration operations; Determine a registered prediction model among the P prediction models as the target prediction model; The registration response delay, the registration error rate and the registration resource parameters are input into the registration prediction model to obtain a registration prediction result of the target registration operation output by the registration prediction model, wherein the target environment data includes: the registration response delay, the registration error rate and the registration resource parameters, the registration prediction model is used to predict whether the corresponding registration operation will be executed faultily based on the registration response delay, the registration error rate and the registration resource parameters, the predicted execution result includes the registration prediction result, and the registration prediction result is used to determine whether the target registration operation will be executed faultily.

8. A microservice operation control device, characterized in that: The microservice system includes: M clients, a cluster server, N user terminals and P prediction models, each of the M clients is allowed to register a corresponding microservice to the cluster server, each of the N user terminals is allowed to subscribe to and call the microservice registered on the cluster server, M, N and P are all integers greater than or equal to 1, and the device is applied to a target user terminal among the N user terminals, including: A first receiving module is used to receive a microservice call request initiated by a target account registered on the target user terminal, wherein the microservice call request is used to request to call a target microservice; A first response module, used to respond to the microservice call request and generate a target service operation to be executed that matches the target subscription state of the target microservice, wherein the target subscription state is used to indicate whether the target user terminal is currently subscribed to the target microservice; A first input module is used to input the target environment data corresponding to the target service operation in the microservice system into the target prediction model that matches the target service operation among the P prediction models, and obtain the predicted execution result of the target service operation output by the target prediction model, wherein the target environment data is the microservice system operation data whose influence on the execution process of the target service operation is greater than the target influence, and the target prediction model is used to predict whether the corresponding service operation will be executed faultily according to the environment data; A first control module is used to control the execution of the target service operation according to the predicted execution result.

9. A microservice operation control device, characterized in that: The microservice system includes: M clients, a cluster server, N user terminals and P prediction models, each of the M clients is allowed to register a corresponding microservice to the cluster server, each of the N user terminals is allowed to subscribe to and call the microservice registered on the cluster server, M, N and P are all integers greater than or equal to 1, and the device is applied to a target client among the M clients, including: A second receiving module is used to receive a microservice registration request initiated by a reference account registered on the target client, wherein the microservice registration request is used to request to register the target microservice to the cluster server; A second response module is used to respond to the microservice registration request, and generate a target registration operation to be executed according to the server address of the cluster server and the target registration parameters corresponding to the target microservice currently to be registered on the target client, wherein the registration parameters are parameters required for the client to register the corresponding microservice with the cluster server, the target microservice is a microservice allowed to be provided by the target client, and the target registration operation is used to register the target microservice to the cluster server indicated by the server address according to the target registration parameters; A second input module is used to input the target environment data corresponding to the target registration operation in the microservice system into the target prediction model that matches the target registration operation among the P prediction models, and obtain the predicted execution result of the target registration operation output by the target prediction model, wherein the target environment data is the microservice system operation data whose influence on the execution process of the target registration operation is greater than the target influence, and the target prediction model is used to predict whether the corresponding service operation will be executed faultily according to the environment data; The second control module is used to control the execution of the target registration operation according to the predicted execution result.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the method according to any one of claims 1 to 7 when executed.

11. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 7 through the computer program.

Citation Information

Patent Citations

  • Active anomaly detection

    CN116569179A

  • Micro-service fault prediction system based on deep learning

    CN117743787A

  • Fault testing method and device, electronic equipment and medium

    CN119088656A

  • Microservices anomaly detection

    US20230385143A1

  • Intelligent Logging of Microservice Failures

    US20240211337A1