CN110598871A - Method and system for flexibly controlling service flow under micro-service architecture - Google Patents

Method and system for flexibly controlling service flow under micro-service architecture Download PDF

Info

Publication number
CN110598871A
CN110598871A CN201810501226.8A CN201810501226A CN110598871A CN 110598871 A CN110598871 A CN 110598871A CN 201810501226 A CN201810501226 A CN 201810501226A CN 110598871 A CN110598871 A CN 110598871A
Authority
CN
China
Prior art keywords
service
fault
information corresponding
historical
target model
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810501226.8A
Other languages
Chinese (zh)
Inventor
冯跃喜
王河
杨斌
李凯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Group Zhejiang Co Ltd
Original Assignee
China Mobile Group Zhejiang Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Mobile Group Zhejiang Co Ltd filed Critical China Mobile Group Zhejiang Co Ltd
Priority to CN201810501226.8A priority Critical patent/CN110598871A/en
Publication of CN110598871A publication Critical patent/CN110598871A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/20Administration of product repair or maintenance

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Human Resources & Organizations (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Artificial Intelligence (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Biomedical Technology (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Biophysics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Economics (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Marketing (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Strategic Management (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Feedback Control In General (AREA)

Abstract

The embodiment of the invention discloses a method and a system for flexibly controlling service flow under a micro-service architecture, aiming at each service of a preset service, judging whether the service is a fault service or not through service information corresponding to the service, and generating a control strategy according to the service information of each fault service.

Description

Method and system for flexibly controlling service flow under micro-service architecture
Technical Field
The embodiment of the invention relates to the technical field of service support of communication, in particular to a method and a system for flexibly controlling service flow under a micro-service architecture.
Background
With the rapid development and change of business requirements, the requirements of agility, flexibility and expandability are continuously increased, a more flexible and efficient software delivery mode is urgently needed, and micro-service is a software architecture style capable of meeting the requirements. Micro-services refer to a monolithic application that is broken up into multiple smaller services, each of which can be deployed separately and then together make up an application. In the era of mobile internet, the burstiness and high traffic of services may cause local service failures inside micro-services to affect the whole micro-services and even a database system, thereby affecting large-scale services, so that a flexible available mechanism needs to be introduced to actively sacrifice the local parts, prevent system avalanche, and improve the robustness of the system.
The first type of flexible available mechanism based on the service deals with an emergency by designing the service in advance, prevents system avalanche, for example, only loads characters to information of a social circle in social software of a user when the network is poor, and ensures that the system is available by an experience degradation mode; the second type of flexible available mechanism based on the technical framework, for example, overload protection and compensation are realized through a distributed service framework, the strategies of service timeout, quick failure, fusing and the like are mainly adopted, and the service is protected when the single service is in overload or failure and other abnormalities, so that the influence of the service on the system is reduced.
However, in the two types of flexible mechanisms, the mode of designing the service in advance is too dependent on the experience and capability of an engineer, so that an unreasonable design caused by unscientific consideration of human factors is easy to exist, and as the service is developed and changed, the scene design is likely to need to be added, and the reusability is poor. Based on the mode that technical framework realized, the consideration is not enough, can't accurately learn the concurrency volume that the service can normally bear under the current environment, can only be when the service fault, through protecting modes such as quick failure and fusing to whole service, the granularity is big, can't accomplish single service flexibility available, can't accomplish the minimizing to the business influence under the prerequisite that guarantee system stability and service are available.
In addition, the two modes can not independently learn experience from the previous fault case processing, so that the mechanism can not be autonomously improved, and the effect of the mechanism is improved.
In the process of implementing the embodiment of the invention, the inventor finds that the existing flexible control method is implemented for the whole service, the granularity is large, and the operation of the whole service is greatly influenced by the fault of a single service.
Disclosure of Invention
The invention aims to solve the technical problem that the existing flexible control method is implemented for the whole service, the granularity is large, and the operation of the whole service is greatly influenced by the fault of a single service.
In view of the above technical problems, an embodiment of the present invention provides a method for flexibly controlling a service flow under a micro-service architecture, including:
obtaining service information corresponding to each service according to the obtained running log corresponding to each service of the preset service, and screening out fault services with faults in each service according to the service information corresponding to each service;
the service information corresponding to each fault service is used as the input quantity of a pre-trained target model, and the target model determines a control strategy for eliminating the fault corresponding to each fault service;
controlling the operation of each fault service according to the control strategy;
the target model is obtained by training historical service information corresponding to each service and a historical control result for controlling the operation of each service according to the historical service information corresponding to each service as training samples.
In a second aspect, the present invention provides a system for flexibly controlling a service flow under a micro-service architecture, including:
the screening module is used for obtaining service information corresponding to each service according to the obtained running log corresponding to each service of the preset service, and screening out fault services with faults in each service according to the service information corresponding to each service;
the generating module is used for taking the service information corresponding to each fault service as the input quantity of a pre-trained target model, and determining a control strategy for eliminating the fault corresponding to each fault service by using the target model;
the execution module is used for controlling the operation of each fault service according to the control strategy;
the target model is obtained by training historical service information corresponding to each service and a historical control result for controlling the operation of each service according to the historical service information corresponding to each service as training samples.
Optionally, the screening module is further configured to obtain an operation log corresponding to each service of the preset service, and obtain service operation data and environmental parameters of each service from the operation log; judging whether data beyond a preset range exists in the service operation data and the environmental parameters, if so, determining that the service corresponding to the data beyond the preset range is a fault service with a fault; the service operation data comprises service concurrency number, service request response time and service request success rate; the environment parameters include CPU occupancy rate, memory occupancy rate, network quality and thread state.
Optionally, the execution module is further configured to adjust the concurrency of each faulty service according to the adjustment scheme corresponding to each faulty service.
Optionally, the method further includes a training module, where the training module is configured to train the target model, and includes using, as a training sample, historical service information corresponding to each service stored offline and a historical control result that controls operation of each service according to the historical service information corresponding to each service, and performing machine learning on the training sample through an RNN to obtain the target model.
Optionally, the training module is further configured to, after controlling the operation of each faulty service according to the control policy, obtain a control result that controls the operation of each faulty service according to the control policy, and optimize the target model by using the service information corresponding to each faulty service and the control result as a training sample.
Optionally, the screening module is further configured to store the operation logs of each service produced by the core package into the memory disk, send the operation logs on the memory disk into the message queue, and sort the operation logs by Storm to obtain service operation data and environmental parameters of each service and historical service information of each service.
The embodiment provides an electronic device, including:
at least one processor, at least one memory, a communication interface, and a bus; wherein the content of the first and second substances,
the processor, the memory and the communication interface complete mutual communication through the bus;
the communication interface is used for information transmission between the electronic equipment and communication equipment of other electronic equipment;
the memory stores program instructions executable by the processor, which when called by the processor are capable of performing the methods described above.
The present embodiments provide a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, cause the computer to perform the method described above.
The embodiment of the invention provides a method and a system for flexibly controlling service flow under a micro-service architecture, aiming at each service of a preset service, judging whether the service is a fault service or not through service information corresponding to the service, and generating a control strategy according to the service information of each fault service.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
Fig. 1 is a schematic flow chart of a method for flexibly controlling a traffic flow under a micro service architecture according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a method for flexibly controlling a traffic flow under a micro-service architecture according to another embodiment of the present invention;
FIG. 3 is a schematic diagram of a traffic flow detection apparatus, a predictable adaptive algorithm, a flexible available controller, and a calling relationship of each component of a micro-service according to another embodiment of the present invention;
fig. 4 is a schematic structural diagram of a call chain formed by services in a service provided by another embodiment of the present invention;
FIG. 5 is a schematic diagram of a model structure provided by another embodiment of the present invention;
fig. 6 is a block diagram of a system for flexibly controlling a traffic flow in a microservice architecture according to another embodiment of the present invention;
fig. 7 is a block diagram of an electronic device according to another embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a schematic flow chart of a method for flexibly controlling a traffic flow under a micro service architecture provided in this embodiment, and referring to fig. 1, the method includes:
101: obtaining service information corresponding to each service according to the obtained running log corresponding to each service of the preset service, and screening out fault services with faults in each service according to the service information corresponding to each service;
102: the service information corresponding to each fault service is used as the input quantity of a pre-trained target model, and the target model determines a control strategy for eliminating the fault corresponding to each fault service;
103: controlling the operation of each fault service according to the control strategy;
the target model is obtained by training historical service information corresponding to each service and a historical control result for controlling the operation of each service according to the historical service information corresponding to each service as training samples.
The method provided in this embodiment is generally executed by a device that monitors whether the service is operating normally, for example, a server, and this embodiment does not specifically limit this. Service operation data and environmental parameters of service operation are recorded in the service operation log, and the service operation data comprises service concurrency number, service request response time and service request success rate; the environmental parameters include CPU occupancy, memory occupancy, network quality, and thread status. Wherein the concurrency amount is the number of times the service is called in a unit time. And analyzing the service information of the running log to determine the fault service with the fault, wherein the service is considered as the fault service as long as any data in the service information is abnormal. For example, when the success rate of the service request is lower than a set success rate threshold, the service is considered as a failure service.
The target model is a model for determining a policy for controlling a fault of a service according to service information of the service, and the target model may be a model obtained through machine learning or a model for determining to eliminate a fault corresponding to a faulty service by using other methods, which is not specifically limited in this embodiment. For example, if the success rate of a service request of a certain service is lower than the set success rate threshold, and the control policy determined by the target model is to control the concurrency amount of the service to be N1, when controlling the failure of the service, the current concurrency amount of the service is N2, the concurrency amount of N2 to N1 needs to be discarded for the service.
The embodiment provides a method for flexibly controlling service flow under a micro-service architecture, which is used for judging whether each service of a preset service is a fault service or not through service information corresponding to the service and generating a control strategy according to the service information of each fault service.
Further, on the basis of the above embodiment, the obtaining service information corresponding to each service according to the obtained operation log corresponding to each service of the preset service, and screening out a faulty service in each service according to the service information corresponding to each service, includes:
acquiring an operation log corresponding to each service of a preset service, and acquiring service operation data and environmental parameters of each service from the operation log;
judging whether data beyond a preset range exists in the service operation data and the environmental parameters, if so, determining that the service corresponding to the data beyond the preset range is a fault service with a fault;
the service operation data comprises service concurrency number, service request response time and service request success rate; the environment parameters include CPU occupancy rate, memory occupancy rate, network quality and thread state.
And sorting and calculating the running logs generated by each service to obtain service running data and environmental parameters corresponding to the service. In the method provided by this embodiment, the service information includes service operation data and environmental parameters. The service operation parameters reflect the current service operation conditions, and the environment parameters reflect the environment of the service and the environment on the service call chain.
When the service is judged to be abnormal, the judgment can be carried out according to any data of the service operation data and the environmental parameters, and whether the data are in a preset normal data range is judged. If the abnormal data exists, the service is judged to be abnormal. For example, if the CPU occupancy of a service is greater than a preset CPU occupancy threshold, it is determined that the service is abnormal.
The embodiment provides a method for flexibly controlling service flow under a micro-service architecture, which judges whether service is abnormal or not through service operation data and environmental parameters in service information, accurately and quickly judges whether the service is abnormal or not, screens out fault service with faults, and obtains a control strategy for controlling the faults through a target model according to the fault service.
Further, on the basis of the foregoing embodiments, the controlling the operation of each fault service according to the control policy includes:
the control strategy comprises an adjusting scheme for adjusting the concurrency of each fault service, and the concurrency of each fault service is adjusted according to the adjusting scheme corresponding to each fault service.
And aiming at the fault service with the fault in the service, determining an adjustment scheme for adjusting the concurrency of each fault service, and adjusting the concurrency of the fault service according to the adjustment scheme corresponding to each fault service, so that the whole service is recovered to normally operate.
The embodiment provides a method for flexibly controlling service flow under a micro-service architecture, which adjusts fault service with a fault in a service under the condition that the service has the fault, and ensures normal operation of the service while eliminating the fault.
Further, on the basis of the above embodiments, the training of the target model includes:
and taking the historical service information corresponding to each service stored off line and the historical control result for controlling the operation of each service according to the historical service information corresponding to each service as training samples, and performing machine learning on the training samples through RNN to obtain the target model.
It should be noted that, as a control result, the abnormal parameter corresponding to the faulty service is controlled by the control strategy, and then the value of the abnormal parameter is obtained. For example, the success rate of a service request of a certain fault service is lower than a preset success rate, and after the control is performed by using a control strategy generated by a target model, the success rate of the service request corresponding to the service also changes correspondingly, and the changed success rate of the service request can be used as a control result.
The embodiment provides a method for flexibly controlling service flows under a micro-service architecture, which uses historical service information of running of each service and a control result controlled according to the historical service information as training samples through machine learning, so that a target model can generate a control strategy for regulating and controlling the service according to a control result to be achieved.
Further, on the basis of the above embodiments, the method further includes:
and after the operation of each fault service is controlled according to the control strategy, obtaining a control result for controlling the operation of each fault service according to the control strategy, and optimizing the target model by taking the service information corresponding to each fault service and the control result as training samples.
The embodiment provides a method for flexibly controlling service flow under a micro-service architecture, in the method, after the service is regulated and controlled each time, the service information and the control result regulated and controlled at this time are used as new training samples, and a target model is continuously optimized through the new training samples, so that forward excitation is continuously obtained, continuous optimization and improvement of a system flexibility available mechanism are finally realized, and the accuracy and the using effect of flexible control are improved.
Further, on the basis of the foregoing embodiments, the obtaining an operation log corresponding to each service of the preset service, and obtaining service operation data and environment parameters of each service from the operation log include:
storing the produced running logs of each service in a memory disk through a core package, sending the running logs on the memory disk to a message queue, and sorting the running logs through a Storm to obtain service running data and environmental parameters of each service and historical service information of each service.
As a specific embodiment, fig. 2 is a schematic flow chart of a method for flexibly controlling a traffic flow under a micro-service architecture provided in this embodiment, and referring to fig. 2, the method is divided into a method executed by 4 parts, where the 4 parts are a traffic flow detection device, a predictable adaptive algorithm, a flexible available controller, and a micro-service, and the method includes:
the service flow detection device completes specific point burying logic in a core packet, each middleware calls an API (application program interface) provided by the core packet at a proper place to complete point burying, logs generated by the core packet are stored in a memory disk and comprise service running conditions (concurrency number, response time, success rate and the like) and environment parameters (CPU, memory, network, thread and the like), the logs are sent to MQ by a log collection Agent, log data in Storm consumption are parallelly sorted and calculated, and results are respectively stored in real-time data storage and offline data storage.
A robot model in a predictable adaptive algorithm is trained by utilizing offline data in a service flow detection device, and the method has the advantages that the concurrency quantity which can be normally borne by the service can be obtained through the current service running condition (concurrency number, response time, success rate and the like) and the environment where the service is located and the environment parameters (CPU, memory, network and thread) on a service calling chain, and a flexible control strategy is generated.
A log analysis module of the service flow detection device finds out the service with faults, and pushes the running condition (concurrency number, response time, success rate and the like) of the service with faults, the environment where the service is located and the environment parameters (CPU, memory, network and thread) on a service call chain to a robot engine of a predictable self-adaptive algorithm module.
The robot engine pushes the fault service information to a robot model trained using RNNs, which gives a flexible control strategy and is pushed by the robot engine to the flexible controller.
The flexible controller sets a service access rule through a service access module in the micro service system framework, discards partial service requests and limits the service concurrency number within a service available range.
The service operation condition and the environmental parameters are recorded by the service flow monitoring device after the flexible strategy is executed and pushed to a robot model in a predictable self-adaptive algorithm for reinforcement learning, so that the system is positively excited and the next flexible control strategy is adjusted.
Fig. 3 is a schematic diagram of the service flow detection device, the predictable adaptive algorithm, the flexible available controller, and the calling relationship of each component of the microservice, referring to fig. 3, the service flow detection device is responsible for recording the service running condition (concurrency number, response time, success rate) and the service environment and the calling chain environment parameters (CPU, memory, network, and thread), storing the service environment parameters in the real-time data and offline data storage, and detecting the fault service through real-time log analysis. The predictable self-adaptive algorithm module comprises a robot engine, a robot model trained by using RNN and a reinforcement learning module, off-line data in the service flow detection device is used for training, a flexible control strategy is generated by comprehensively analyzing service operation conditions and environmental parameters and pushed to the flexible controller when service fails, and the flexible controller sets a service access rule through the service access module in the micro-service system framework to limit service access.
Specifically, in the method provided in this embodiment, the core of the service detection apparatus is a call chain, where one call chain includes all intermediate links from a source request (e.g., a front-end web page request, an APP request, etc.) to a last underlying system (e.g., a database), fig. 4 is a schematic structural diagram of a call chain formed by services in the service provided in this embodiment, and referring to fig. 4, each call generates a globally unique ID (referred to as "TraceId") in a source request, and the TraceId is sequentially transmitted to the next link through the network, the process is called transparent data transmission (transparent transmission), each link in the figure generates log information containing TraceId, the "orphan" logs scattered on different systems in the call chain are tied together by TraceId and then through log analysis, more valuable information is reconverted. DB is a database.
Predictive adaptive algorithm: including a robot engine, a robot model trained using RNN, and a reinforcement learning module.
A robot engine: and analyzing the fault service information of the service flow detection device, pushing the fault service information to the robot model, receiving the flexible control strategy of the robot model, and then pushing the fault service information to the flexible controller.
The robot model comprises: the flexible control strategy under any service operation condition and environmental parameter can be obtained through the training of the neural network. The model is based on a Recurrent Neural Network (RNN), the big data modeling capability of the RNN on the time sequence is superior to that of the CNN and a common predictive adaptive algorithm, and the purpose of modeling the time sequence under a service flexible control scene can be met. Fig. 5 is a schematic diagram of a model structure provided in this embodiment, and referring to fig. 5, an input character x in the model can be represented by the following model:
it=σ(xtUi+ht-1Wi+bi)
ft=σ(xtUf+ht-1Wf+bf)
ot=σ(xtUo+ht-1Wo+bo)
qt=tanh(xtUq+ht-1Wq+bq)
pt=ft*pt-1+it*qt
ht=ot*tanh(pt)
the model consists of three layers: input layer itIntermediate layer ftAnd an output layer ot. Three-layer pass-through integrated input xtAnd its previous hidden state ht-1And a sigmoid function. To generate the hidden state at the current t phase: first, input xtAnd hidden state ht-1Generating an intermediate temporary result q by means of a non-linear tanh functiont. Secondly, the temporary result q is comparedtAnd historical result pt-1Respectively input itLayer and intermediate layer ftTo obtain a new history pt. Finally, a new history p is recordedtThrough the output layer otTo obtain the final hidden state ht
Reinforcement learning: and new data can be generated in the flexible control process, and the robot model can be positively excited by using reinforcement learning. The reinforcement learning module is responsible for completing the robot engine to explore an unknown environment while establishing an environment model and learn to obtain an optimal strategy. The basic components of reinforcement learning include: scenario, environment, action, feedback. We can write the expected feedback under the current scheme as the following equation:
the formula is expected to include that all robots may receive fault service information, and J is the sum of a series of training feedbacks. For example, the command executed by the robot each time is not only generated for the current fault service flexible control strategy, but also includes the consequences after the command is executed.Representing the desired value, theta is a parameter of the complete set of end-to-end systems, H is the maximum length of each session, gamma is a discount factor, rhIs the feedback obtained at the h-th training. In order to optimize the feedback expectation value of the final robot, the current state is trained step by step, and the current state is the current state + alpha (ideal-current state), wherein the difference between the ideal state and the current state is Delta. This process can be achieved by differentiating the form of gradient descent:
wherein p isθ(τ) is the probability of observing a particular path under the current scheme, according to the Markov hypothesisIn theory, we can get:
where θ is a neural network dependent parameter. From the above two equations can be derived:
the final expected value will be equal to the sum of all possible action sequences. The final expected value may be trained in a batch-wise fashion for all message conversations. Meanwhile, the RMSProp gradient algorithm is used for carrying out theta parameter training.
Data: the good data set is the basis for ensuring that the whole end-to-end learning system is well represented in the actual application scene. Especially for flexible control robotic systems it is not a system or algorithm that is most difficult, but data collection and labeling. The standard data set can be used as a good starting point for verifying or constructing a better solution, and can be trained by using service running conditions, service environments and calling environment parameters thereof and service health degrees, and the data set provided by the embodiment can be represented in the form of a table one.
Watch 1
The service flow detection device and the predictable adaptive algorithm in this embodiment comprehensively analyze the service running condition, the service environment and the environmental parameters on the call chain thereof to obtain the concurrency amount which can be normally supported under the current condition of the service, generate the flexible control strategy of the service, and can minimize the influence on the service under the condition of ensuring the stability of the system and the availability of the service. On one hand, the method can obtain the concurrency quantity which can be normally supported under the current service condition through comprehensively analyzing the service running condition, the service environment and the environment parameters on the call chain, generate the flexible control strategy of the service, and minimize the influence on the service under the condition of ensuring the stability of the system and the availability of the service. On the other hand, the method can continuously obtain forward excitation through reinforcement learning of new data generated in the flexible control process, finally realize continuous optimization and improvement of a system flexible available mechanism, and improve the accuracy and the use effect of flexible control.
Fig. 6 is a block diagram of a system for flexibly controlling a traffic flow under a micro-service architecture provided in this embodiment, and referring to fig. 6, the system includes a screening module 601, a generating module 602, and an executing module 603, wherein,
the screening module 601 is configured to obtain service information corresponding to each service according to the obtained operation log corresponding to each service of the preset service, and screen out a faulty service in each service according to the service information corresponding to each service;
a generating module 602, which takes the service information corresponding to each fault service as the input quantity of a pre-trained target model, and determines a control strategy for eliminating the fault corresponding to each fault service according to the target model;
an executing module 603, configured to control operation of each fault service according to the control policy;
the target model is obtained by training historical service information corresponding to each service and a historical control result for controlling the operation of each service according to the historical service information corresponding to each service as training samples.
The system for flexibly controlling the service flow under the micro service architecture provided in this embodiment is suitable for the method for flexibly controlling the service flow under the micro service architecture provided in the above embodiment, and details are not described here.
The embodiment provides a system for flexibly controlling service flows under a micro-service architecture, which is used for judging whether each service of a preset service is a fault service or not through service information corresponding to the service, and generating a control strategy according to the service information of each fault service.
Fig. 7 is a block diagram showing the structure of the electronic apparatus provided in the present embodiment.
Referring to fig. 7, the electronic device includes: a processor (processor)701, a memory (memory)702, a communication Interface (Communications Interface)703, and a bus 704;
wherein the content of the first and second substances,
the processor 701, the memory 702 and the communication interface 703 complete mutual communication through the bus 704;
the communication interface 703 is used for information transmission between the electronic device and communication devices of other electronic devices;
the processor 701 is configured to call the program instructions in the memory 702 to execute the methods provided by the above-mentioned method embodiments, for example, including: obtaining service information corresponding to each service according to the obtained running log corresponding to each service of the preset service, and screening out fault services with faults in each service according to the service information corresponding to each service; the service information corresponding to each fault service is used as the input quantity of a pre-trained target model, and the target model determines a control strategy for eliminating the fault corresponding to each fault service; controlling the operation of each fault service according to the control strategy; the target model is obtained by training historical service information corresponding to each service and a historical control result for controlling the operation of each service according to the historical service information corresponding to each service as training samples.
The present embodiments provide a non-transitory computer-readable storage medium storing computer instructions that cause the computer to perform the methods provided by the above method embodiments, for example, including: obtaining service information corresponding to each service according to the obtained running log corresponding to each service of the preset service, and screening out fault services with faults in each service according to the service information corresponding to each service; the service information corresponding to each fault service is used as the input quantity of a pre-trained target model, and the target model determines a control strategy for eliminating the fault corresponding to each fault service; controlling the operation of each fault service according to the control strategy; the target model is obtained by training historical service information corresponding to each service and a historical control result for controlling the operation of each service according to the historical service information corresponding to each service as training samples.
The present embodiments disclose a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, enable the computer to perform the methods provided by the above-described method embodiments, for example, comprising: obtaining service information corresponding to each service according to the obtained running log corresponding to each service of the preset service, and screening out fault services with faults in each service according to the service information corresponding to each service; the service information corresponding to each fault service is used as the input quantity of a pre-trained target model, and the target model determines a control strategy for eliminating the fault corresponding to each fault service; controlling the operation of each fault service according to the control strategy; the target model is obtained by training historical service information corresponding to each service and a historical control result for controlling the operation of each service according to the historical service information corresponding to each service as training samples.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
The above-described embodiments of the electronic device and the like are merely illustrative, where the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may also be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only used for illustrating the technical solutions of the embodiments of the present invention, and are not limited thereto; although embodiments of the present invention have been described in detail with reference to the foregoing embodiments, those skilled in the art will understand that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (9)

1. A method for flexibly controlling service flow under a micro-service architecture is characterized by comprising the following steps:
obtaining service information corresponding to each service according to the obtained running log corresponding to each service of the preset service, and screening out fault services with faults in each service according to the service information corresponding to each service;
the service information corresponding to each fault service is used as the input quantity of a pre-trained target model, and the target model determines a control strategy for eliminating the fault corresponding to each fault service;
controlling the operation of each fault service according to the control strategy;
the target model is obtained by training historical service information corresponding to each service and a historical control result for controlling the operation of each service according to the historical service information corresponding to each service as training samples.
2. The method according to claim 1, wherein the obtaining service information corresponding to each service according to the obtained running log corresponding to each service of the preset service, and screening out a faulty service in each service according to the service information corresponding to each service, comprises:
acquiring an operation log corresponding to each service of a preset service, and acquiring service operation data and environmental parameters of each service from the operation log;
judging whether data beyond a preset range exists in the service operation data and the environmental parameters, if so, determining that the service corresponding to the data beyond the preset range is a fault service with a fault;
the service operation data comprises service concurrency number, service request response time and service request success rate; the environment parameters include CPU occupancy rate, memory occupancy rate, network quality and thread state.
3. The method of claim 1, wherein controlling operation of each of the plurality of fault services according to the control strategy comprises:
the control strategy comprises an adjusting scheme for adjusting the concurrency of each fault service, and the concurrency of each fault service is adjusted according to the adjusting scheme corresponding to each fault service.
4. The method of claim 1, wherein the training of the target model comprises:
and taking the historical service information corresponding to each service stored off line and the historical control result for controlling the operation of each service according to the historical service information corresponding to each service as training samples, and performing machine learning on the training samples through RNN to obtain the target model.
5. The method of claim 1, further comprising:
and after the operation of each fault service is controlled according to the control strategy, obtaining a control result for controlling the operation of each fault service according to the control strategy, and optimizing the target model by taking the service information corresponding to each fault service and the control result as training samples.
6. The method according to claim 2, wherein the obtaining of the running log corresponding to each service of the preset service and obtaining the service running data and the environmental parameters of each service from the running log comprises:
storing the produced running logs of each service in a memory disk through a core package, sending the running logs on the memory disk to a message queue, and sorting the running logs through a Storm to obtain service running data and environmental parameters of each service and historical service information of each service.
7. A system for flexibly controlling a traffic flow under a micro-service architecture, comprising:
the screening module is used for obtaining service information corresponding to each service according to the obtained running log corresponding to each service of the preset service, and screening out fault services with faults in each service according to the service information corresponding to each service;
the generating module is used for taking the service information corresponding to each fault service as the input quantity of a pre-trained target model, and determining a control strategy for eliminating the fault corresponding to each fault service by using the target model;
the execution module is used for controlling the operation of each fault service according to the control strategy;
the target model is obtained by training historical service information corresponding to each service and a historical control result for controlling the operation of each service according to the historical service information corresponding to each service as training samples.
8. An electronic device, comprising:
at least one processor, at least one memory, a communication interface, and a bus; wherein the content of the first and second substances,
the processor, the memory and the communication interface complete mutual communication through the bus;
the communication interface is used for information transmission between the electronic equipment and communication equipment of other electronic equipment;
the memory stores program instructions executable by the processor, the processor invoking the program instructions to perform the method of any of claims 1-6.
9. A computer program product, characterized in that the computer program product comprises a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions which, when executed by a computer, cause the computer to carry out the method according to any one of claims 1 to 6.
CN201810501226.8A 2018-05-23 2018-05-23 Method and system for flexibly controlling service flow under micro-service architecture Pending CN110598871A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810501226.8A CN110598871A (en) 2018-05-23 2018-05-23 Method and system for flexibly controlling service flow under micro-service architecture

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810501226.8A CN110598871A (en) 2018-05-23 2018-05-23 Method and system for flexibly controlling service flow under micro-service architecture

Publications (1)

Publication Number Publication Date
CN110598871A true CN110598871A (en) 2019-12-20

Family

ID=68848573

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810501226.8A Pending CN110598871A (en) 2018-05-23 2018-05-23 Method and system for flexibly controlling service flow under micro-service architecture

Country Status (1)

Country Link
CN (1) CN110598871A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111581055A (en) * 2020-04-30 2020-08-25 中国工商银行股份有限公司 Business system control method and device, electronic equipment and readable storage medium
CN111698301A (en) * 2020-05-29 2020-09-22 成都新希望金融信息有限公司 Service management method, device and storage medium for ensuring service continuation
CN113079189A (en) * 2020-01-03 2021-07-06 ***通信集团广东有限公司 Capacity control method and device for capacity open platform and electronic equipment
CN116301734A (en) * 2023-05-17 2023-06-23 安徽思高智能科技有限公司 Method and device for recommending flows in RPA flow asset library and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070168201A1 (en) * 2006-01-06 2007-07-19 Chellam Sudhakar V Formula for automatic prioritization of the business impact based on a failure on a service in a loosely coupled application
CN107563528A (en) * 2017-09-07 2018-01-09 朱明增 A kind of intelligent operational system strengthened EMS system defence and quickly healed
CN107769972A (en) * 2017-10-25 2018-03-06 武汉大学 A kind of power telecom network equipment fault Forecasting Methodology based on improved LSTM
CN108038049A (en) * 2017-12-13 2018-05-15 西安电子科技大学 Real-time logs control system and control method, cloud computing system and server

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070168201A1 (en) * 2006-01-06 2007-07-19 Chellam Sudhakar V Formula for automatic prioritization of the business impact based on a failure on a service in a loosely coupled application
CN107563528A (en) * 2017-09-07 2018-01-09 朱明增 A kind of intelligent operational system strengthened EMS system defence and quickly healed
CN107769972A (en) * 2017-10-25 2018-03-06 武汉大学 A kind of power telecom network equipment fault Forecasting Methodology based on improved LSTM
CN108038049A (en) * 2017-12-13 2018-05-15 西安电子科技大学 Real-time logs control system and control method, cloud computing system and server

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李酉戌: "基于卷积神经网络的网络故障诊断模型", 《软件导刊》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113079189A (en) * 2020-01-03 2021-07-06 ***通信集团广东有限公司 Capacity control method and device for capacity open platform and electronic equipment
CN113079189B (en) * 2020-01-03 2023-04-25 ***通信集团广东有限公司 Capacity control method and device of capacity open platform and electronic equipment
CN111581055A (en) * 2020-04-30 2020-08-25 中国工商银行股份有限公司 Business system control method and device, electronic equipment and readable storage medium
CN111581055B (en) * 2020-04-30 2023-09-05 中国工商银行股份有限公司 Control method and device of business system, electronic equipment and readable storage medium
CN111698301A (en) * 2020-05-29 2020-09-22 成都新希望金融信息有限公司 Service management method, device and storage medium for ensuring service continuation
CN116301734A (en) * 2023-05-17 2023-06-23 安徽思高智能科技有限公司 Method and device for recommending flows in RPA flow asset library and electronic equipment

Similar Documents

Publication Publication Date Title
CA3003617C (en) Model building architecture and smart routing of work items
CN110598871A (en) Method and system for flexibly controlling service flow under micro-service architecture
US10601740B1 (en) Chatbot artificial intelligence
WO2019180433A1 (en) Predicting using digital twins
CN105989441A (en) Model parameter adjustment method and device
WO2023066084A1 (en) Computing power distribution method and apparatus, and computing power server
US11689641B2 (en) Resiliency control engine for network service mesh systems
US20200084142A1 (en) Predictive routing in multi-network scenarios
CN111083535A (en) Video data transmission code rate self-adaption method, system, device and storage medium
CN114647525A (en) Diagnostic method, diagnostic device, terminal and storage medium
Jin et al. A congestion control method of SDN data center based on reinforcement learning
EP3803580B1 (en) Efficient incident management in large scale computer systems
CN114024906B (en) Flow control method, device and system for optimizing video transmission user experience quality
US20240231958A1 (en) Systems and methods for routing data payloads through a plurality of microservices using machine learning
US11501155B2 (en) Learning machine behavior related to install base information and determining event sequences based thereon
WO2020240680A1 (en) Failure estimation support device, failure estimation support method, and failure estimation support program
CN113033475B (en) Target object tracking method, related device and computer program product
EP3783547B1 (en) System and methods for reply date response and due date management in manufacturing
US20220019871A1 (en) Method for Adapting a Software Application Executed in a Gateway
US20220414524A1 (en) Incident Paging System
US20240118960A1 (en) Error context for bot optimization
US11797349B2 (en) System of evaluating data production processors for data production, processing, and transfer tasks using neural networks
US11736343B2 (en) Failure influence estimation apparatus, failure influence estimation method and program
US20240244035A1 (en) Categorizing a New User in an Information Technology System
Lin et al. TITE: A transformer-based deep reinforcement learning approach for traffic engineering in hybrid SDN with dynamic traffic

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20191220