WO2021000416A1 - Micro-service early warning method and apparatus based on management platform, and computer device - Google Patents

Micro-service early warning method and apparatus based on management platform, and computer device Download PDF

Info

Publication number
WO2021000416A1
WO2021000416A1 PCT/CN2019/103549 CN2019103549W WO2021000416A1 WO 2021000416 A1 WO2021000416 A1 WO 2021000416A1 CN 2019103549 W CN2019103549 W CN 2019103549W WO 2021000416 A1 WO2021000416 A1 WO 2021000416A1
Authority
WO
WIPO (PCT)
Prior art keywords
microservice
preset
message
designated
communication protocol
Prior art date
Application number
PCT/CN2019/103549
Other languages
French (fr)
Chinese (zh)
Inventor
王丽
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2021000416A1 publication Critical patent/WO2021000416A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0604Management of faults, events, alarms or notifications using filtering, e.g. reduction of information by using priority, element types, position or time
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0631Management of faults, events, alarms or notifications using root cause analysis; using analysis of correlation between notifications, alarms or events based on decision criteria, e.g. hierarchy, tree or time analysis
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers

Definitions

  • This application relates to the computer field, in particular to a microservice early warning method, device, computer equipment and storage medium based on a management platform.
  • the microservice framework is used to replace the original single large-scale enterprise application, and can solve the problems of high complexity, serious coupling, and so on.
  • the number of microservices is increasing day by day, which brings inconvenience to the management of microservices, such as the mutual invocation of multiple microservices, and the interaction between internal microservices and the outside world.
  • the call messages that are called between microservices sometimes have message errors.
  • Traditional technologies cannot recognize the wrong messages and can only report errors, and cannot correct the errors in the request header.
  • the traditional technology modifies the early warning settings in aspects such as microservice invocation, etc., involving server container, load, network, etc., that is, the early warning settings are fixed on the server container, and it is difficult to adjust flexibly.
  • the main purpose of this application is to provide an early warning method, device, computer equipment and storage medium for microservices based on a management platform, aiming to provide early warnings for microservices while realizing corrections to messages, so as to improve the usability of microservice messages And efficiency.
  • this application proposes a microservice early warning method based on a management platform, which includes the following steps:
  • the specified communication protocol is the same as the preset communication protocol of the specified microservice, parse the call message according to the format of the specified communication protocol to obtain the call message header;
  • This application provides a microservice early warning device based on a management platform, including:
  • the invocation message receiving unit is configured to receive an invocation message for invoking a specified microservice attached with invocation information from the first microservice, wherein the invocation message is encapsulated based on a specified communication protocol, and the invocation information includes all At least one of the service name, service URL address or service function of the specified microservice;
  • a communication protocol determining unit configured to determine whether the designated communication protocol is the same as the preset communication protocol of the designated microservice
  • a parsing unit configured to parse the call message according to the format of the designated communication protocol if the designated communication protocol is the same as the preset communication protocol of the designated microservice, so as to obtain a header of the call message;
  • the similarity threshold judgment unit is used to calculate the similarity value between the calling message header and the preset standard calling message header by using a preset similarity algorithm, and to judge whether the similarity value is greater than the preset similarity Threshold
  • a replacement unit configured to, if the similarity value is greater than a preset similarity threshold, replace the call message header in the call message with the standard call message header, so as to obtain a call message after replacement;
  • a called number determining unit configured to obtain the called number of the designated microservice within a predetermined time according to the calling information, and determine whether the called number is greater than a preset first warning number threshold;
  • An early warning information generating unit configured to generate early warning information if the number of calls is greater than a preset first warning number threshold, and send the early warning information and the post-replacement call message to the designated microservice, And use the preset monitoring plug-in to add the specified microservice to the preset monitoring list.
  • the present application provides a computer device including a memory and a processor, the memory stores a computer program, and the processor implements the steps of any one of the above methods when the computer program is executed.
  • the present application provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of any of the above methods are implemented.
  • the microservice early warning method, device, computer equipment, and storage medium based on the management platform of the present application receive a call message for calling a specified microservice with call information attached and sent by the first microservice; if the specified communication protocol is compatible with the If the preset communication protocol of the designated microservice is the same, the call header is obtained; the similarity value between the call header and the preset standard call header is calculated; if the similarity value is greater than the similarity threshold, then Replace the call message header with the standard call message header; if the number of calls is greater than the preset first warning times threshold, the warning information is generated, and the warning information and the replaced call message are sent to the Specify a microservice, and use a preset monitoring plug-in to add the specified microservice to the preset monitoring list. In this way, it can realize the correction of the message at the same time as the early warning of the microservice, so as to improve the availability and use efficiency of the microservice message.
  • FIG. 1 is a schematic flowchart of a microservice early warning method based on a management platform according to an embodiment of the application;
  • FIG. 2 is a schematic block diagram of the structure of a microservice early warning device based on a management platform according to an embodiment of the application;
  • FIG. 3 is a schematic block diagram of the structure of a computer device according to an embodiment of the application.
  • an embodiment of the present application provides a microservice early warning method based on a management platform, including the following steps:
  • the designated communication protocol is the same as the preset communication protocol of the designated microservice, parse the call message according to the format of the designated communication protocol to obtain a call message header;
  • step S1 receiving an invocation message for invoking a specified microservice with invocation information appended by the first microservice, wherein the invocation message is encapsulated based on a specified communication protocol, and the invocation information includes the Specify at least one of the service name, service URL address, or service function of the microservice.
  • Microservices are compared to monolithic applications (concentrating all functions in one application), decomposing an application into small, interconnected microservices.
  • a microservice generally completes a specific function, and can also call or be called by other microservices to jointly complete all or part of the functions in an application.
  • the management platform in this application refers to a platform that manages microservices, where management includes management in any feasible way, such as microservice registration, microservice discovery, gateway control, data monitoring, and so on.
  • management includes management in any feasible way, such as microservice registration, microservice discovery, gateway control, data monitoring, and so on.
  • this application manages the microservices through the management platform, the microservices do not need to expose too much information to the outside, and only need to expose one of the service name, service URL address, or service function.
  • the management platform can determine the accurate microservices from the stored correspondence table, which is not only more convenient, but also improves information security.
  • step S2 it is determined whether the designated communication protocol is the same as the preset communication protocol of the designated microservice. If the designated communication protocol is different from the preset communication protocol of the designated microservice, it cannot be directly sent to the designated microservice according to the invocation request. Therefore, first determine whether the specified communication protocol is the same as the preset communication protocol of the specified microservice.
  • determining whether the specified communication protocol is the same as the preset communication protocol of the specified microservice may be any manner, for example, including: determining whether the first microservice and the specified microservice belong to a preset microservice cluster; If the first microservice does not belong to the preset microservice cluster, and the specified microservice belongs to the preset microservice cluster, check whether the call request is legal according to the preset legality check rule; if said If the call request is legal, it is determined whether the communication protocol of the call request is the same as the preset communication protocol of the designated microservice. In order to determine whether it is necessary to switch between communication protocols.
  • the invocation message is parsed according to the format of the designated communication protocol to obtain the invocation message header.
  • a message consists of a message header and a message body.
  • Different communication protocols have different message headers.
  • the format of the HTTP request message is: request line, request header (HTTP request message header, also known as HEADER) and request body.
  • the call message is parsed according to the format of the designated communication protocol to obtain the call message header.
  • the preset similarity algorithm is used to calculate the similarity value between the call header and the preset standard call header, and it is determined whether the similarity value is greater than the preset similarity threshold .
  • a small amount of errors may occur in the header of the message, such as partial character errors.
  • the traditional technology cannot identify the above-mentioned erroneous message headers, and thus performs a rejection operation. In this application, the correct message header is replaced with the wrong message header, thereby reducing network overhead and improving information transmission efficiency.
  • the standard calling message header can be retrieved from a preset message header library.
  • the method of calculating the similarity value between the call message header and the preset standard call message header by using a preset similarity algorithm may adopt any algorithm, such as an overlapping word algorithm. According to this, no matter whether the calling message header is wrong or not, only the correct message header needs to be replaced.
  • step S5 if the similarity value is greater than the preset similarity threshold, the call message header in the call message is replaced with the standard call message header, so as to obtain the replaced call message. Text. If the similarity value is greater than the preset similarity threshold, it indicates that the preset standard calling message header is the same as the calling message header, and the calling message header needs to be replaced with the preset standard Call message header, no matter whether the call message header is wrong, it will not affect the identification of the call message.
  • the number of times the designated microservice is called within a predetermined time is obtained according to the invocation information, and it is determined whether the number of times is greater than the preset first warning times threshold.
  • the invocation information includes at least one of the service name, service URL address, or service function of the designated microservice.
  • the management platform of the present application can determine the designated microservice according to the invocation information, and can obtain the predetermined time The number of invocations of the designated microservice within, and determine whether the number of invocations is greater than a preset first warning number threshold to determine whether the designated microservice is in an abnormal state.
  • step S7 if the number of times of being called is greater than the preset first warning number threshold, generating warning information, and sending the warning information and the post-replacement call message to the designated microservice, And use the preset monitoring plug-in to add the specified microservice to the preset monitoring list. If the number of calls is greater than the preset first warning threshold, it indicates that the designated microservice may be in an abnormal state, and the warning information is generated accordingly, and the designated microservice is added to the preset monitoring using the preset monitoring plug-in. List.
  • the management platform of the present application adopts a monitoring stripping method, and realizes functions such as monitoring data embedding points through monitoring plug-ins, thereby avoiding affecting server containers, load, network and other aspects when the monitoring settings need to be adjusted.
  • adding the specified microservice to the preset monitoring list can be implemented by modifying the bytecode through java agent.
  • the method further includes: if the number of times of being called is greater than a preset second warning times threshold, rejecting the call message, wherein the second warning times threshold is greater than the first warning times threshold, and the abnormal situation
  • the call application is processed in a hierarchical manner.
  • the warning information When the number of calls is high but is still in a tolerable state (that is, the first warning threshold), the warning information will be generated, and the warning information and the post-replacement call message will be sent To the designated microservice, and use a preset monitoring plug-in to add the designated microservice to the preset monitoring list; when the number of calls is high but in an intolerable state (ie, the second warning threshold), Then the call message is rejected.
  • the method before the step S2 of determining whether the designated communication protocol is the same as the preset communication protocol of the designated microservice, the method includes:
  • the first microservice and the designated microservice do not belong to the same microservice cluster, determine whether the invocation message carries an identity token, wherein the identity token is the target of the management platform The identity authentication information generated by the first microservice;
  • a communication protocol determination instruction is generated, wherein the communication protocol determination instruction is used to instruct to determine whether the designated communication protocol and the designated Whether the preset communication protocols of the microservices are the same.
  • this application also adopts the method of determining whether the first microservice and the designated microservice belong to the same before determining whether the designated communication protocol is the same as the preset communication protocol of the designated microservice.
  • Microservice cluster determine whether the call message carries an identity token; determine whether the identity token carried in the call message has the authority to call the specified microservice; determine whether the call parameters of the call message are the same
  • a multi-step judgment process that matches the predetermined parameters of the designated microservice to ensure that the call message has a basis for identification, and a communication protocol judgment instruction is generated on this basis.
  • the process of pre-generating the identity token includes: the first microservice sends an identity authentication application to the management platform; the management platform sends and generates identity authentication information and sends it to the first microservice; the first microservice receives and saves the identity Token.
  • the invocation parameter of the invocation request matches the predetermined parameter of the designated microservice, which means that the invocation parameter does not exceed the range specified by the predetermined parameter of the designated microservice, for example, the length of the storage field is within a predetermined range.
  • the call message is parsed according to the format of the designated communication protocol, so as to obtain the information of the call header Step S3 includes:
  • S302 Determine whether the content in the position of the message header conforms to a preset message header format
  • the call header is obtained.
  • the call message generally includes a message header and a message body. If the format of the message header does not match the format that the preset message does not have, the call message must not be recognized, and because the format does not match, Nor can it be corrected to determine the correct header. Therefore, this application adopts a scheme of first determining whether the content in the position of the message header conforms to the preset message header format.
  • the format of a communication protocol is the request line, request header, and request body (for example, the format of the HTTP communication protocol), where the first line break exists between the request line and the request header, and the request There is a blank line between the header and the request body, for example.
  • the position of the message header in the call message can be determined. It is then judged whether the content in the position of the message header conforms to the preset message header format, for example, whether it has the format of Content-Type: [type]/[subtype]; parameter.
  • the preset similarity algorithm is used to calculate the similarity value between the call message header and the preset standard call message header, and to determine whether the similarity value is greater than the preset similarity Step S4 of the threshold includes:
  • A is the character frequency vector of the calling message header
  • B is the character frequency vector of the preset standard calling message header
  • Ai and Bi are the i-th component vector of the vectors A and B
  • n is the value of the component vector with the largest number of component vectors in the vectors A and B, and it is determined whether the similarity value is greater than a preset Similarity threshold.
  • the preset similarity algorithm is used to calculate the similarity value between the call header and the preset standard call header, and to determine whether the similarity value is greater than the preset similarity threshold.
  • the cosine similarity calculation method is used to calculate the similarity value between the call message header and the preset standard call message header.
  • the character frequency vector of the call message header refers to the number of times the characters in the call message header appear.
  • the character frequency vector of Content is (1,1,2,2,1), that is, except for n and t appearing twice, other characters only appear once, where (1,1,2,2,1)
  • the 2 is the sub-vector of characters n and t.
  • the cosine similarity calculation method is used to calculate the similarity value between the call message header and the preset standard call message header.
  • the calculating the similarity value between the calling message header and the preset standard calling message header by using the preset similarity algorithm, and determining whether the similarity value is greater than the preset similarity threshold further includes : Use a preset similarity algorithm to calculate the similarity value between the call message header and multiple preset standard call message headers, so as to obtain multiple similarity values, and determine which of the multiple similarity values Whether the maximum value is greater than the preset similarity threshold; if the maximum value of the multiple similarity values is greater than the preset similarity threshold, then the maximum value of the multiple similarity values corresponds to the standard call header As the correct call header.
  • step S6 of acquiring the number of times the designated microservice has been invoked within a predetermined time according to the invocation information, and determining whether the number of invocations is greater than a preset first warning number threshold include:
  • an early warning judgment instruction is generated, where the early warning judgment instruction is used to instruct to obtain the number of times the designated microservice has been called within a predetermined time according to the calling information, and judge Whether the number of times of being called is greater than a preset first warning number threshold.
  • the recognition command is executed to determine whether the replaced call message is correct.
  • this application also executes the identification command of the call message after the replacement; it is judged whether the process of executing the identification command reports an error Way to ensure that the call message can be correctly identified. Accordingly, if the process of executing the recognition command does not report an error, an early warning judgment instruction is generated, where the early warning judgment instruction is used to instruct to obtain the number of times the designated microservice has been called within a predetermined time according to the calling information, and It is determined whether the number of times of being called is greater than a preset first warning number threshold.
  • step S6 of obtaining the number of times of the designated microservice within a predetermined time according to the invocation information, and determining whether the number of times is greater than a preset first warning number threshold include:
  • the abnormal state of a designated microservice may be related to factors such as time. Therefore, only judging the number of calls within a predetermined period of time may lead to inaccurate judgment. Based on this, statistics on the traffic data of the designated microservice within the predetermined period of time are used to determine the traffic data Whether the time-varying distribution is within the preset flow data distribution range is used to determine whether the flow data of the specified microservice is normal. If the distribution of the flow data over time is within the preset flow data distribution range, it indicates that there is no abnormality in the flow data, so the call message after replacement is sent to the designated microservice.
  • the flow data distribution range can be set in any manner, for example, set to the actual value of the flow data of the previous period multiplied by (-M%, +M%), where M is greater than zero.
  • Step S7 includes:
  • S701 If the number of times of being called is greater than a preset first warning number threshold, generate warning information, and send the warning information and the post-replacement call message to the designated microservice;
  • the early warning information and the post-replacement call message are sent to the designated microservice, and the designated microservice is added to the preset monitoring list using a preset monitoring plug-in.
  • the java agent technology is a computer system packaged in a certain environment based on the java language. In order to achieve the design purpose, it can be flexible and autonomous in this environment. When the code is changed in the ordinary way, a manual restart is required to take effect, but because the java agent technology frees some functions of Java from the local code, only a partial restart is required, which is equivalent to only reloading the modified code, thus avoiding the traditional The defect in the technology that all the specified microservices have to be restarted when they are added to the preset monitoring list.
  • the monitoring plug-in based on java agent technology refers to the monitoring plug-in implemented by java agent, which realizes the monitoring stripping.
  • the monitoring list needs to be adjusted, only the bytecode of the java agent is modified, and only a partial restart is required.
  • the microservice early warning method based on the management platform of the present application receives an invocation message for invoking a specified microservice with invoking information appended by the first microservice; if the specified communication protocol is the preset communication protocol of the specified microservice Are the same, get the call message header; calculate the similarity value between the call message header and the preset standard call message header; if the similarity value is greater than the similarity threshold, replace the call message header with the standard Call message header; if the number of calls is greater than the preset first warning times threshold, generate warning information, and send the warning information and the call message after replacement to the designated microservice, and use the preset The monitoring plug-in for adding the specified microservice to the preset monitoring list. In this way, it can realize the correction of the message at the same time as the early warning of the microservice, so as to improve the availability and use efficiency of the microservice message.
  • an embodiment of the present application provides a microservice early warning device based on a management platform, including:
  • the invocation message receiving unit 10 is configured to receive an invocation message for invoking a specified microservice attached with invocation information sent by the first microservice, wherein the invocation message is encapsulated based on a specified communication protocol, and the invocation information includes At least one of the service name, service URL address, or service function of the designated microservice;
  • the communication protocol determining unit 20 is configured to determine whether the designated communication protocol is the same as the preset communication protocol of the designated microservice;
  • the parsing unit 30 is configured to parse the call message according to the format of the designated communication protocol if the designated communication protocol is the same as the preset communication protocol of the designated microservice, so as to obtain the header of the call message;
  • the similarity threshold judging unit 40 is configured to calculate the similarity value between the call message header and the preset standard call message header by using a preset similarity algorithm, and determine whether the similarity value is greater than the preset similarity Degree threshold
  • the replacement unit 50 is configured to, if the similarity value is greater than a preset similarity threshold, replace the call message header in the call message with the standard call message header, so as to obtain the call message after replacement ;
  • the called number determining unit 60 is configured to obtain the called number of the designated microservice within a predetermined time according to the calling information, and determine whether the called number is greater than a preset first warning number threshold;
  • the early warning information generating unit 70 is configured to generate early warning information if the number of calls is greater than a preset first warning number threshold, and send the early warning information and the post-replacement call message to the designated microservice , And use the preset monitoring plug-in to add the specified microservice to the preset monitoring list.
  • the device includes:
  • a microservice cluster judging unit configured to judge whether the first microservice and the specified microservice belong to the same microservice cluster
  • the identity token judging unit is configured to, if the first microservice and the designated microservice do not belong to the same microservice cluster, judge whether the invocation message carries an identity token, wherein the identity token is Identity authentication information generated by the management platform for the first microservice;
  • the authority judgment unit is configured to determine whether the identity token carried in the call message has the ability to call the designated microservice according to the preset correspondence between the identity token and the authority if the call message carries an identity token permission;
  • a parameter matching judgment unit configured to determine whether the invocation parameter of the invocation message matches the predetermined parameter of the designated microservice if the identity token carried in the invocation message has the authority to invoke the designated microservice ;
  • the judgment instruction generating unit is configured to generate a communication protocol judgment instruction if the invocation parameter of the invocation message matches the predetermined parameter of the specified microservice, wherein the communication protocol judgment instruction is used to instruct to judge the specified communication Whether the protocol is the same as the preset communication protocol of the designated microservice.
  • the parsing unit 30 includes:
  • the message header position determining subunit is configured to determine the message in the call message according to the format of the preset designated communication protocol if the designated communication protocol is the same as the preset communication protocol of the designated microservice Head position
  • the calling message header marking subunit is used to extract the content in the position of the message header if the content in the position of the message header conforms to the format of the preset message header, and record it as a calling message head.
  • the similarity threshold judgment unit 40 includes:
  • the similarity threshold judgment subunit is used to adopt the formula:
  • A is the character frequency vector of the calling message header
  • B is the character frequency vector of the preset standard calling message header
  • Ai and Bi are the i-th component vector of the vectors A and B
  • n is the value of the component vector with the largest number of component vectors in the vectors A and B, and it is determined whether the similarity value is greater than a preset Similarity threshold.
  • the device includes:
  • An identification command execution unit configured to execute an identification command for the call message after the replacement
  • An error judgment unit configured to judge whether an error is reported during the execution of the identification command
  • An early warning judgment instruction generating unit configured to generate an early warning judgment instruction if no error is reported in the process of executing the recognition command, wherein the early warning judgment instruction is used to instruct to obtain the specified microservice information within a predetermined time according to the call information And determine whether the number of calls is greater than the preset first warning number threshold.
  • the device includes:
  • the flow data judging unit is configured to, if the number of times of being called is not greater than the preset first warning number threshold, collect the flow data of the designated microservice within a predetermined time, and judge whether the distribution of the flow data over time is in Within the preset flow data distribution range;
  • the call message sending unit is configured to send the replaced call message to the designated microservice if the distribution of the flow data over time is within a preset flow data distribution range.
  • the warning information generating unit 70 includes:
  • An early warning information generating subunit configured to generate early warning information if the number of calls is greater than a preset first warning number threshold, and send the early warning information and the call message after replacement to the designated microservice ;
  • the monitoring list add subunit is used to modify the bytecode by using a preset monitoring plug-in based on java agent technology to add a data embedding point at the communication port of the specified microservice, thereby adding the specified microservice to the preset Set the monitoring list.
  • the microservice early warning device receives the invocation message for invoking a specified microservice with invoking information appended by the first microservice; if the specified communication protocol is the preset communication protocol of the specified microservice Are the same, get the call message header; calculate the similarity value between the call message header and the preset standard call message header; if the similarity value is greater than the similarity threshold, replace the call message header with the standard Call message header; if the number of calls is greater than the preset first warning times threshold, generate warning information, and send the warning information and the call message after replacement to the designated microservice, and use the preset The monitoring plug-in for adding the specified microservice to the preset monitoring list. In this way, it can realize the correction of the message at the same time as the early warning of the microservice, so as to improve the availability and use efficiency of the microservice message.
  • an embodiment of the present invention also provides a computer device.
  • the computer device may be a server, and its internal structure may be as shown in the figure.
  • the computer equipment includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the computer designed processor is used to provide calculation and control capabilities.
  • the memory of the computer device includes a non-volatile storage medium and an internal memory.
  • the non-volatile storage medium stores an operating system, a computer program, and a database.
  • the memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium.
  • the database of the computer equipment is used to store the data used in the microservice early warning method based on the management platform.
  • the network interface of the computer device is used to communicate with an external terminal through a network connection.
  • the computer program is executed by the processor to realize a microservice early warning method based on the management platform.
  • the above-mentioned processor executes the above-mentioned microservice early warning method based on the management platform, wherein the steps included in the method respectively correspond to the steps of executing the microservice early warning method based on the management platform of the foregoing embodiment, and will not be repeated here.
  • An embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored.
  • a computer program is executed by a processor, a microservice warning method based on a management platform is implemented, wherein the steps included in the method are respectively the same as those in the foregoing
  • the steps of the microservice early warning method based on the management platform of the implementation manner correspond to each other, and will not be repeated here.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Telephonic Communication Services (AREA)
  • Debugging And Monitoring (AREA)

Abstract

A micro-service early warning method and apparatus based on a management platform, and a computer device and a storage medium. The method comprises: receiving a calling message sent by a first micro-service; if a specified communication protocol is the same as a pre-set communication protocol of a specified micro-service, obtaining a calling message header; calculating a similarity value between the calling message header and a standard calling message header; if the similarity value is greater than a similarity threshold value, replacing the calling message header with the standard calling message header; and if the number of times that the specified micro-service is called is greater than a first early warning threshold value for the number of times, generating early warning information, sending the early warning information and the replaced calling message to the specified micro-service, and adding the specified micro-service to a monitoring list by means of a monitoring plug-in. Therefore, a message is corrected while early warning is performed on a micro-service, so as to improve the availability and the use efficiency of a micro-service message.

Description

基于管理平台的微服务预警方法、装置和计算机设备Microservice early warning method, device and computer equipment based on management platform
本申请要求于2019年7月3日提交中国专利局、申请号为201910596482.4,发明名称为“基于管理平台的微服务预警方法、装置和计算机设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on July 3, 2019, the application number is 201910596482.4, and the invention title is "microservice early warning methods, devices and computer equipment based on management platforms". The reference is incorporated in this application.
技术领域Technical field
本申请涉及到计算机领域,特别是涉及到一种基于管理平台的微服务预警方法、装置、计算机设备和存储介质。This application relates to the computer field, in particular to a microservice early warning method, device, computer equipment and storage medium based on a management platform.
背景技术Background technique
微服务框架用于取代原先单一大型的企业应用,能够解决复杂度高,耦合严重等等问题。其中随着业务的增多,微服务数量与日俱增,这就给微服务的管理例如多个微服务之间的相互调用,以及内部微服务与外界的交互带来不便。并且在微服务之间进行调用的调用报文有时候会出现报文错误的情况,传统技术在面对错误的报文时无法识别,只能报错,无法对请求报文头的错误进行纠正的。并且,传统技术对于例如微服务调用等方面的预警设置的修改,涉及服务器容器、负载、网络等方面,即预警方面的设置是固化在服务器容器之上的,难以进行灵活调整。The microservice framework is used to replace the original single large-scale enterprise application, and can solve the problems of high complexity, serious coupling, and so on. With the increase in business, the number of microservices is increasing day by day, which brings inconvenience to the management of microservices, such as the mutual invocation of multiple microservices, and the interaction between internal microservices and the outside world. And the call messages that are called between microservices sometimes have message errors. Traditional technologies cannot recognize the wrong messages and can only report errors, and cannot correct the errors in the request header. . In addition, the traditional technology modifies the early warning settings in aspects such as microservice invocation, etc., involving server container, load, network, etc., that is, the early warning settings are fixed on the server container, and it is difficult to adjust flexibly.
技术问题technical problem
本申请的主要目的为提供一种基于管理平台的微服务预警方法、装置、计算机设备和存储介质,旨在对微服务进行预警的同时实现对报文的纠正,以提高微服务报文的可用性和使用效率。The main purpose of this application is to provide an early warning method, device, computer equipment and storage medium for microservices based on a management platform, aiming to provide early warnings for microservices while realizing corrections to messages, so as to improve the usability of microservice messages And efficiency.
技术解决方案Technical solutions
为了实现上述发明目的,本申请提出一种基于管理平台的微服务预警方法,包括以下步骤:In order to achieve the above-mentioned purpose of the invention, this application proposes a microservice early warning method based on a management platform, which includes the following steps:
接收第一微服务发送的附带有调用信息的调用指定微服务的调用报文,其中,所述调用报文基于指定通信协议封装而成,所述调用信息包括所述指定微服务的服务名称、服务URL地址或者服务功能中的至少一项;Receive an invocation message for invoking a specified microservice with invocation information appended by the first microservice, wherein the invocation message is encapsulated based on a specified communication protocol, and the invocation information includes the service name of the specified microservice, At least one of the service URL address or service function;
判断所述指定通信协议与所述指定微服务的预设通信协议是否相同;Determine whether the specified communication protocol is the same as the preset communication protocol of the specified microservice;
若所述指定通信协议与所述指定微服务的预设通信协议相同,则根据所述指定通信协议的格式解析所述调用报文,从而获得调用报文头;If the specified communication protocol is the same as the preset communication protocol of the specified microservice, parse the call message according to the format of the specified communication protocol to obtain the call message header;
采用预设的相似度算法计算所述调用报文头与预设的标准调用报文头的相似度值,并判断所述相似度值是否大于预设的相似度阈值;Using a preset similarity algorithm to calculate a similarity value between the call header and a preset standard call header, and determine whether the similarity value is greater than a preset similarity threshold;
若所述相似度值大于预设的相似度阈值,则将所述调用报文中的调用报文头替换为所述标准调用报文头,从而获得替换后调用报文;If the similarity value is greater than the preset similarity threshold, replacing the invocation message header in the invocation message with the standard invocation message header, so as to obtain the replaced invocation message;
根据所述调用信息,获取预定时间内所述指定微服务的被调用次数,并判断所述被调用次数是否大 于预设的第一预警次数阈值;Acquiring, according to the invocation information, the number of times the designated microservice has been invoked within a predetermined time, and determining whether the number of invoked times is greater than a preset first warning number threshold;
若所述被调用次数大于预设的第一预警次数阈值,则生成预警信息,并将所述预警信息和所述替换后调用报文发送给所述指定微服务,并使用预设的监控插件将所述指定微服务加入预设的监控列表中。If the number of calls is greater than the preset first warning number threshold, generate warning information, and send the warning information and the post-replacement call message to the designated microservice, and use the preset monitoring plug-in Add the specified microservice to the preset monitoring list.
本申请提供一种基于管理平台的微服务预警装置,包括:This application provides a microservice early warning device based on a management platform, including:
调用报文接收单元,用于接收第一微服务发送的附带有调用信息的调用指定微服务的调用报文,其中,所述调用报文基于指定通信协议封装而成,所述调用信息包括所述指定微服务的服务名称、服务URL地址或者服务功能中的至少一项;The invocation message receiving unit is configured to receive an invocation message for invoking a specified microservice attached with invocation information from the first microservice, wherein the invocation message is encapsulated based on a specified communication protocol, and the invocation information includes all At least one of the service name, service URL address or service function of the specified microservice;
通信协议判断单元,用于判断所述指定通信协议与所述指定微服务的预设通信协议是否相同;A communication protocol determining unit, configured to determine whether the designated communication protocol is the same as the preset communication protocol of the designated microservice;
解析单元,用于若所述指定通信协议与所述指定微服务的预设通信协议相同,则根据所述指定通信协议的格式解析所述调用报文,从而获得调用报文头;A parsing unit, configured to parse the call message according to the format of the designated communication protocol if the designated communication protocol is the same as the preset communication protocol of the designated microservice, so as to obtain a header of the call message;
相似度阈值判断单元,用于采用预设的相似度算法计算所述调用报文头与预设的标准调用报文头的相似度值,并判断所述相似度值是否大于预设的相似度阈值;The similarity threshold judgment unit is used to calculate the similarity value between the calling message header and the preset standard calling message header by using a preset similarity algorithm, and to judge whether the similarity value is greater than the preset similarity Threshold
替换单元,用于若所述相似度值大于预设的相似度阈值,则将所述调用报文中的调用报文头替换为所述标准调用报文头,从而获得替换后调用报文;A replacement unit, configured to, if the similarity value is greater than a preset similarity threshold, replace the call message header in the call message with the standard call message header, so as to obtain a call message after replacement;
被调用次数判断单元,用于根据所述调用信息,获取预定时间内所述指定微服务的被调用次数,并判断所述被调用次数是否大于预设的第一预警次数阈值;A called number determining unit, configured to obtain the called number of the designated microservice within a predetermined time according to the calling information, and determine whether the called number is greater than a preset first warning number threshold;
预警信息生成单元,用于若所述被调用次数大于预设的第一预警次数阈值,则生成预警信息,并将所述预警信息和所述替换后调用报文发送给所述指定微服务,并使用预设的监控插件将所述指定微服务加入预设的监控列表中。An early warning information generating unit, configured to generate early warning information if the number of calls is greater than a preset first warning number threshold, and send the early warning information and the post-replacement call message to the designated microservice, And use the preset monitoring plug-in to add the specified microservice to the preset monitoring list.
本申请提供一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现上述任一项所述方法的步骤。The present application provides a computer device including a memory and a processor, the memory stores a computer program, and the processor implements the steps of any one of the above methods when the computer program is executed.
本申请提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现上述任一项所述的方法的步骤。The present application provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of any of the above methods are implemented.
有益效果Beneficial effect
本申请的基于管理平台的微服务预警方法、装置、计算机设备和存储介质,接收第一微服务发送的附带有调用信息的调用指定微服务的调用报文;若所述指定通信协议与所述指定微服务的预设通信协议相同,则获得调用报文头;计算所述调用报文头与预设的标准调用报文头的相似度值;若所述相似度值大于相似度阈值,则将调用报文头替换为标准调用报文头;若被调用次数大于预设的第一预警次数阈值,则生成预警信息,并将所述预警信息和所述替换后调用报文发送给所述指定微服务,并使用预设的监控插件将所述指定微服务加入预设的监控列表中。从而在对微服务进行预警的同时实现对报文的纠正,以提高微服务报文的可用性和使用效率。The microservice early warning method, device, computer equipment, and storage medium based on the management platform of the present application receive a call message for calling a specified microservice with call information attached and sent by the first microservice; if the specified communication protocol is compatible with the If the preset communication protocol of the designated microservice is the same, the call header is obtained; the similarity value between the call header and the preset standard call header is calculated; if the similarity value is greater than the similarity threshold, then Replace the call message header with the standard call message header; if the number of calls is greater than the preset first warning times threshold, the warning information is generated, and the warning information and the replaced call message are sent to the Specify a microservice, and use a preset monitoring plug-in to add the specified microservice to the preset monitoring list. In this way, it can realize the correction of the message at the same time as the early warning of the microservice, so as to improve the availability and use efficiency of the microservice message.
附图说明Description of the drawings
图1为本申请一实施例的基于管理平台的微服务预警方法的流程示意图;FIG. 1 is a schematic flowchart of a microservice early warning method based on a management platform according to an embodiment of the application;
图2为本申请一实施例的基于管理平台的微服务预警装置的结构示意框图;2 is a schematic block diagram of the structure of a microservice early warning device based on a management platform according to an embodiment of the application;
图3为本申请一实施例的计算机设备的结构示意框图。FIG. 3 is a schematic block diagram of the structure of a computer device according to an embodiment of the application.
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization, functional characteristics, and advantages of the purpose of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings.
本发明的最佳实施方式The best mode of the invention
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solutions, and advantages of this application clearer, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the application, and not used to limit the application.
参照图1,本申请实施例提供一种基于管理平台的微服务预警方法,包括以下步骤:1, an embodiment of the present application provides a microservice early warning method based on a management platform, including the following steps:
S1、接收第一微服务发送的附带有调用信息的调用指定微服务的调用报文,其中,所述调用报文基于指定通信协议封装而成,所述调用信息包括所述指定微服务的服务名称、服务URL地址或者服务功能中的至少一项;S1. Receive an invocation message for invoking a specified microservice with invocation information appended by the first microservice, wherein the invocation message is encapsulated based on a specified communication protocol, and the invocation information includes the service of the specified microservice At least one of name, service URL address or service function;
S2、判断所述指定通信协议与所述指定微服务的预设通信协议是否相同;S2. Determine whether the designated communication protocol is the same as the preset communication protocol of the designated microservice;
S3、若所述指定通信协议与所述指定微服务的预设通信协议相同,则根据所述指定通信协议的格式解析所述调用报文,从而获得调用报文头;S3. If the designated communication protocol is the same as the preset communication protocol of the designated microservice, parse the call message according to the format of the designated communication protocol to obtain a call message header;
S4、采用预设的相似度算法计算所述调用报文头与预设的标准调用报文头的相似度值,并判断所述相似度值是否大于预设的相似度阈值;S4. Calculate the similarity value between the call header and the preset standard call header by using a preset similarity algorithm, and determine whether the similarity value is greater than a preset similarity threshold;
S5、若所述相似度值大于预设的相似度阈值,则将所述调用报文中的调用报文头替换为所述标准调用报文头,从而获得替换后调用报文;S5. If the similarity value is greater than the preset similarity threshold, replace the invocation message header in the invocation message with the standard invocation message header, so as to obtain the replaced invocation message;
S6、根据所述调用信息,获取预定时间内所述指定微服务的被调用次数,并判断所述被调用次数是否大于预设的第一预警次数阈值;S6. According to the invocation information, obtain the number of times the designated microservice is invoked within a predetermined time, and determine whether the number of times is greater than a preset first warning times threshold;
S7、若所述被调用次数大于预设的第一预警次数阈值,则生成预警信息,并将所述预警信息和所述替换后调用报文发送给所述指定微服务,并使用预设的监控插件将所述指定微服务加入预设的监控列表中。S7. If the number of calls is greater than the preset first warning number threshold, generate warning information, send the warning information and the post-replacement call message to the designated microservice, and use the preset The monitoring plug-in adds the specified microservice to the preset monitoring list.
如上述步骤S1所述,接收第一微服务发送的附带有调用信息的调用指定微服务的调用报文,其中,所述调用报文基于指定通信协议封装而成,所述调用信息包括所述指定微服务的服务名称、服务URL地址或者服务功能中的至少一项。微服务是相对于单体式应用(将所有功能集中在一个应用中)而言,将一个应用分解为小的、互相连接的微服务。一个微服务一般完成某个特定的功能,同时也能调用其他微服务或者被其他微服务调用,从而共同完成某个应用中的所有或者部分功能。本申请的管理平台指对于微服务进行管理的平台,其中管理包括任意可行方式的管理,例如微服务注册、微服务发现、网关控制、数据监控等等。其中,由于本申请通过管理平台进行微服务的管理,因此微服务并不需要对外部暴 露过多的信息,只需将服务名称、服务URL地址或者服务功能其中之一暴露,当调用报文中附带这些信息之一,管理平台即可从预存的对应表中确定准确的微服务,不仅更便捷,而且还提高了信息安全性。As described in the above step S1, receiving an invocation message for invoking a specified microservice with invocation information appended by the first microservice, wherein the invocation message is encapsulated based on a specified communication protocol, and the invocation information includes the Specify at least one of the service name, service URL address, or service function of the microservice. Microservices are compared to monolithic applications (concentrating all functions in one application), decomposing an application into small, interconnected microservices. A microservice generally completes a specific function, and can also call or be called by other microservices to jointly complete all or part of the functions in an application. The management platform in this application refers to a platform that manages microservices, where management includes management in any feasible way, such as microservice registration, microservice discovery, gateway control, data monitoring, and so on. Among them, because this application manages the microservices through the management platform, the microservices do not need to expose too much information to the outside, and only need to expose one of the service name, service URL address, or service function. When the call message is With one of these pieces of information, the management platform can determine the accurate microservices from the stored correspondence table, which is not only more convenient, but also improves information security.
如上述步骤S2所述,判断所述指定通信协议与所述指定微服务的预设通信协议是否相同。若所述指定通信协议与所述指定微服务的预设通信协议不同,那么根据所述调用请求无法直接发送给所述指定微服务。因此先判断所述指定通信协议与所述指定微服务的预设通信协议是否相同。其中判断所述指定通信协议与所述指定微服务的预设通信协议是否相同可以为任意方式,例如包括:判断所述第一微服务与所述指定微服务是否属于预设的微服务集群;若所述第一微服务不属于预设的微服务集群,而所述指定微服务属于预设的微服务集群,则根据预设的合法性检验规则检验所述调用请求是否合法;若所述调用请求合法,则判断所述调用请求的通信协议与所述指定微服务的预设通信协议是否相同。从而确定是否需要进行通信协议之间的转换。As described in step S2 above, it is determined whether the designated communication protocol is the same as the preset communication protocol of the designated microservice. If the designated communication protocol is different from the preset communication protocol of the designated microservice, it cannot be directly sent to the designated microservice according to the invocation request. Therefore, first determine whether the specified communication protocol is the same as the preset communication protocol of the specified microservice. Wherein determining whether the specified communication protocol is the same as the preset communication protocol of the specified microservice may be any manner, for example, including: determining whether the first microservice and the specified microservice belong to a preset microservice cluster; If the first microservice does not belong to the preset microservice cluster, and the specified microservice belongs to the preset microservice cluster, check whether the call request is legal according to the preset legality check rule; if said If the call request is legal, it is determined whether the communication protocol of the call request is the same as the preset communication protocol of the designated microservice. In order to determine whether it is necessary to switch between communication protocols.
如上述步骤S3所述,若所述指定通信协议与所述指定微服务的预设通信协议相同,则根据所述指定通信协议的格式解析所述调用报文,从而获得调用报文头。一般而言,报文由报文头和报文主体构成,而不同的通信协议的报文头不同,例如HTTP请求报文的格式为:请求行、请求头(HTTP请求报文头,也称HEADER)和请求体。据此,根据所述指定通信协议的格式解析所述调用报文,从而获得调用报文头。As described in step S3 above, if the designated communication protocol is the same as the preset communication protocol of the designated microservice, the invocation message is parsed according to the format of the designated communication protocol to obtain the invocation message header. Generally speaking, a message consists of a message header and a message body. Different communication protocols have different message headers. For example, the format of the HTTP request message is: request line, request header (HTTP request message header, also known as HEADER) and request body. According to this, the call message is parsed according to the format of the designated communication protocol to obtain the call message header.
如上述步骤S4所述,采用预设的相似度算法计算所述调用报文头与预设的标准调用报文头的相似度值,并判断所述相似度值是否大于预设的相似度阈值。在某些情境下,报文头会出现少量的错误,例如部分字符出错,例如,将Content-Type:application/json;charset=utf-8错误写成apolication/json;charset=utf-8等等。传统技术无法识别上述错误的报文头,从而进行拒绝操作。本申请通过将正确的报文头替换错误的报文头,从而减少了网络开销,提高了信息传输效率。其中,所述标准调用报文头可以从预设的报文头库中调取。采用预设的相似度算法计算所述调用报文头与预设的标准调用报文头的相似度值的方法可以采用任意算法,例如重叠词算法等等。据此,无论所述调用报文头是否有误,只需将正确的报文头进行替换处理即可。As described in step S4, the preset similarity algorithm is used to calculate the similarity value between the call header and the preset standard call header, and it is determined whether the similarity value is greater than the preset similarity threshold . In some situations, a small amount of errors may occur in the header of the message, such as partial character errors. For example, write Content-Type: application/json; charset=utf-8 error writes application/json; charset=utf-8 and so on. The traditional technology cannot identify the above-mentioned erroneous message headers, and thus performs a rejection operation. In this application, the correct message header is replaced with the wrong message header, thereby reducing network overhead and improving information transmission efficiency. Wherein, the standard calling message header can be retrieved from a preset message header library. The method of calculating the similarity value between the call message header and the preset standard call message header by using a preset similarity algorithm may adopt any algorithm, such as an overlapping word algorithm. According to this, no matter whether the calling message header is wrong or not, only the correct message header needs to be replaced.
如上述步骤S5所述,若所述相似度值大于预设的相似度阈值,则将所述调用报文中的调用报文头替换为所述标准调用报文头,从而获得替换后调用报文。若所述相似度值大于预设的相似度阈值,表明所述预设的标准调用报文头与所述调用报文头相同,只要将所述调用报文头替换为所述预设的标准调用报文头,那么无论所述调用报文头是否有误,均不会影响调用报文的识别。As described in step S5 above, if the similarity value is greater than the preset similarity threshold, the call message header in the call message is replaced with the standard call message header, so as to obtain the replaced call message. Text. If the similarity value is greater than the preset similarity threshold, it indicates that the preset standard calling message header is the same as the calling message header, and the calling message header needs to be replaced with the preset standard Call message header, no matter whether the call message header is wrong, it will not affect the identification of the call message.
如上述步骤S6所述,根据所述调用信息,获取预定时间内所述指定微服务的被调用次数,并判断所述被调用次数是否大于预设的第一预警次数阈值。所述调用信息中包括所述指定微服务的服务名称、服务URL地址或者服务功能中的至少一项,本申请的管理平台根据所述调用信息可以确定所述指定微服务,进而能够获取预定时间内所述指定微服务的被调用次数,并判断所述被调用次数是否大于预设的 第一预警次数阈值,以确定所述指定微服务是否处于异常状态。As described in step S6, the number of times the designated microservice is called within a predetermined time is obtained according to the invocation information, and it is determined whether the number of times is greater than the preset first warning times threshold. The invocation information includes at least one of the service name, service URL address, or service function of the designated microservice. The management platform of the present application can determine the designated microservice according to the invocation information, and can obtain the predetermined time The number of invocations of the designated microservice within, and determine whether the number of invocations is greater than a preset first warning number threshold to determine whether the designated microservice is in an abnormal state.
如上述步骤S7所述,若所述被调用次数大于预设的第一预警次数阈值,则生成预警信息,并将所述预警信息和所述替换后调用报文发送给所述指定微服务,并使用预设的监控插件将所述指定微服务加入预设的监控列表中。若所述被调用次数大于预设的第一预警次数阈值,表明指定微服务可能处于异常状态,据此生成预警信息,同时还使用预设的监控插件将所述指定微服务加入预设的监控列表中。本申请的管理平台采用监控剥离的方式,将监控的数据埋点等功能通过监控插件实现,从而避免了在需要进行监控设置的调整时,影响服务器容器、负载、网络等方面。其中,所述将所述指定微服务加入预设的监控列表中可以采用通过java agent修改字节码实现。进一步地,还包括:若所述被调用次数大于预设的第二预警次数阈值,则拒绝所述调用报文,其中所述第二预警次数阈值大于所述第一预警次数阈值,将异常状况的调用申请分级处理,当被调用次数较高但还处于可容忍状态下时(即第一预警次数阈值),将则生成预警信息,并将所述预警信息和所述替换后调用报文发送给所述指定微服务,并使用预设的监控插件将所述指定微服务加入预设的监控列表中;当被调用次数较高但处于不可容忍状态下时(即第二预警次数阈值),则拒绝所述调用报文。As described in step S7 above, if the number of times of being called is greater than the preset first warning number threshold, generating warning information, and sending the warning information and the post-replacement call message to the designated microservice, And use the preset monitoring plug-in to add the specified microservice to the preset monitoring list. If the number of calls is greater than the preset first warning threshold, it indicates that the designated microservice may be in an abnormal state, and the warning information is generated accordingly, and the designated microservice is added to the preset monitoring using the preset monitoring plug-in. List. The management platform of the present application adopts a monitoring stripping method, and realizes functions such as monitoring data embedding points through monitoring plug-ins, thereby avoiding affecting server containers, load, network and other aspects when the monitoring settings need to be adjusted. Wherein, adding the specified microservice to the preset monitoring list can be implemented by modifying the bytecode through java agent. Further, the method further includes: if the number of times of being called is greater than a preset second warning times threshold, rejecting the call message, wherein the second warning times threshold is greater than the first warning times threshold, and the abnormal situation The call application is processed in a hierarchical manner. When the number of calls is high but is still in a tolerable state (that is, the first warning threshold), the warning information will be generated, and the warning information and the post-replacement call message will be sent To the designated microservice, and use a preset monitoring plug-in to add the designated microservice to the preset monitoring list; when the number of calls is high but in an intolerable state (ie, the second warning threshold), Then the call message is rejected.
在一个实施方式中,所述判断所述指定通信协议与所述指定微服务的预设通信协议是否相同的步骤S2之前,包括:In one embodiment, before the step S2 of determining whether the designated communication protocol is the same as the preset communication protocol of the designated microservice, the method includes:
S11、判断所述第一微服务与所述指定微服务是否属于同一个微服务集群;S11. Determine whether the first microservice and the designated microservice belong to the same microservice cluster;
S12、若所述第一微服务与所述指定微服务不属于同一个微服务集群,则判断所述调用报文是否携带有身份令牌,其中所述身份令牌是所述管理平台针对所述第一微服务生成的身份认证信息;S12. If the first microservice and the designated microservice do not belong to the same microservice cluster, determine whether the invocation message carries an identity token, wherein the identity token is the target of the management platform The identity authentication information generated by the first microservice;
S13、若所述调用报文携带有身份令牌,则根据预设的身份令牌与权限对应关系,判断所述调用报文携带的身份令牌是否具有调用所述指定微服务的权限;S13. If the invocation message carries an identity token, determine whether the identity token carried in the invocation message has the authority to invoke the designated microservice according to the preset correspondence between the identity token and the authority;
S14、若所述调用报文携带的身份令牌具有调用所述指定微服务的权限,则判断所述调用报文的调用参数是否与所述指定微服务的预定参数相匹配;S14. If the identity token carried in the invocation message has the authority to invoke the designated microservice, determine whether the invocation parameter of the invocation message matches the predetermined parameter of the designated microservice;
S15、若所述调用报文的调用参数与所述指定微服务的预定参数相匹配,则生成通信协议判断指令,其中所述通信协议判断指令用于指示判断所述指定通信协议与所述指定微服务的预设通信协议是否相同。S15. If the invocation parameter of the invocation message matches the predetermined parameter of the designated microservice, a communication protocol determination instruction is generated, wherein the communication protocol determination instruction is used to instruct to determine whether the designated communication protocol and the designated Whether the preset communication protocols of the microservices are the same.
如上所述,实现了生成通信协议判断指令。为了保证正确识别报文,本申请在判断所述指定通信协议与所述指定微服务的预设通信协议是否相同之前还采用了判断所述第一微服务与所述指定微服务是否属于同一个微服务集群;判断所述调用报文是否携带有身份令牌;判断所述调用报文携带的身份令牌是否具有调用所述指定微服务的权限;判断所述调用报文的调用参数是否与所述指定微服务的预定参数相匹配的多步判断过程,以确保所述调用报文是有被识别基础的,并在此基础上生成通信协议判断指令。其中,身份令牌预先生成的过程包括:第一微服务发送身份认证申请至所述管理平台;管理平台发送生 成身份认证信息并发送至第一微服务;第一微服务接收并保存所述身份令牌。所述调用请求的调用参数与所述指定微服务的预定参数相匹配,是指所述调用参数不超过所述指定微服务的预定参数规定的范围,例如存储字段长度在预定的范围内等。As described above, the generation of communication protocol judgment instructions is realized. In order to ensure the correct identification of the message, this application also adopts the method of determining whether the first microservice and the designated microservice belong to the same before determining whether the designated communication protocol is the same as the preset communication protocol of the designated microservice. Microservice cluster; determine whether the call message carries an identity token; determine whether the identity token carried in the call message has the authority to call the specified microservice; determine whether the call parameters of the call message are the same A multi-step judgment process that matches the predetermined parameters of the designated microservice to ensure that the call message has a basis for identification, and a communication protocol judgment instruction is generated on this basis. The process of pre-generating the identity token includes: the first microservice sends an identity authentication application to the management platform; the management platform sends and generates identity authentication information and sends it to the first microservice; the first microservice receives and saves the identity Token. The invocation parameter of the invocation request matches the predetermined parameter of the designated microservice, which means that the invocation parameter does not exceed the range specified by the predetermined parameter of the designated microservice, for example, the length of the storage field is within a predetermined range.
在一个实施方式中,所述若所述指定通信协议与所述指定微服务的预设通信协议相同,则根据所述指定通信协议的格式解析所述调用报文,从而获得调用报文头的步骤S3,包括:In one embodiment, if the designated communication protocol is the same as the preset communication protocol of the designated microservice, the call message is parsed according to the format of the designated communication protocol, so as to obtain the information of the call header Step S3 includes:
S301、若所述指定通信协议与所述指定微服务的预设通信协议相同,则根据预设的指定通信协议的格式,确定所述调用报文中的报文头的位置;S301: If the designated communication protocol is the same as the preset communication protocol of the designated microservice, determine the position of the header in the call message according to the format of the preset designated communication protocol;
S302、判断所述报文头的位置中的内容是否符合预设的报文头的格式;S302: Determine whether the content in the position of the message header conforms to a preset message header format;
S303、若所述报文头的位置中的内容符合预设的报文头的格式,则提取所述报文头的位置中的内容,并记为调用报文头。S303. If the content in the position of the message header conforms to the preset format of the message header, extract the content in the position of the message header and record it as a call message header.
如上所述,实现了获得调用报文头。调用报文一般包括报文头与报文体,其中若报文头的格式与预设的报文并没有的格式不相符,那么肯定无法识别所述调用报文,并且由于格式都不相符,因此也无法进行纠正以确定正确的报文头。因此,本申请采用了先判断所述报文头的位置中的内容是否符合预设的报文头的格式的方案。其中,以一个通信协议的格式举例:预设的通信协议的格式为请求行、请求头和请求体(例如HTTP通信协议的格式),其中请求行与请求头间存在第一个换行符,请求头与请求体之间存在一个空行,来举例。只需在调用报文中找到第一个换行符,并且找到第一个空行,即可确定所述调用报文中的报文头的位置。再判断所述报文头的位置中的内容是否符合预设的报文头的格式,例如判断是否具有Content-Type:[type]/[subtype];parameter的格式。As mentioned above, the call header is obtained. The call message generally includes a message header and a message body. If the format of the message header does not match the format that the preset message does not have, the call message must not be recognized, and because the format does not match, Nor can it be corrected to determine the correct header. Therefore, this application adopts a scheme of first determining whether the content in the position of the message header conforms to the preset message header format. Among them, take the format of a communication protocol as an example: the format of the preset communication protocol is the request line, request header, and request body (for example, the format of the HTTP communication protocol), where the first line break exists between the request line and the request header, and the request There is a blank line between the header and the request body, for example. Only by finding the first newline character in the call message and the first blank line, the position of the message header in the call message can be determined. It is then judged whether the content in the position of the message header conforms to the preset message header format, for example, whether it has the format of Content-Type: [type]/[subtype]; parameter.
在一个实施方式中,所述采用预设的相似度算法计算所述调用报文头与预设的标准调用报文头的相似度值,并判断所述相似度值是否大于预设的相似度阈值的步骤S4,包括:In one embodiment, the preset similarity algorithm is used to calculate the similarity value between the call message header and the preset standard call message header, and to determine whether the similarity value is greater than the preset similarity Step S4 of the threshold includes:
S401、采用公式:S401, adopt the formula:
Figure PCTCN2019103549-appb-000001
Figure PCTCN2019103549-appb-000001
计算所述调用报文头与预设的标准调用报文头的相似度值;其中,A为所述调用报文头的字符频率向量,B为预设的标准调用报文头的字符频率向量,Ai、Bi分别为所述向量A和B的第i个分向量,n为向量A和B二者中分向量数量最多的分向量数量值,并判断所述相似度值是否大于预设的相似度阈值。Calculate the similarity value between the calling message header and the preset standard calling message header; where A is the character frequency vector of the calling message header, and B is the character frequency vector of the preset standard calling message header , Ai and Bi are the i-th component vector of the vectors A and B, and n is the value of the component vector with the largest number of component vectors in the vectors A and B, and it is determined whether the similarity value is greater than a preset Similarity threshold.
如上所述,实现了采用预设的相似度算法计算所述调用报文头与预设的标准调用报文头的相似度值,并判断所述相似度值是否大于预设的相似度阈值。其中,采用余弦相似度的计算方法来计算所述调用报文头与预设的标准调用报文头的相似度值。其中,所述调用报文头的字符频率向量指调用报文头中的字 符出现的次数。例如Content的字符频率向量为(1,1,2,2,1),即除n、t出现2次外,其他字符均只出现1次,其中(1,1,2,2,1)中的2即为字符n、t的分向量。从而,采用余弦相似度的计算方法来计算所述调用报文头与预设的标准调用报文头的相似度值。进一步地,所述采用预设的相似度算法计算所述调用报文头与预设的标准调用报文头的相似度值,并判断所述相似度值是否大于预设的相似度阈值还包括:采用预设的相似度算法计算所述调用报文头与预设的多个标准调用报文头的相似度值,从而获得多个相似度值,并判断多个所述相似度值中的最大值是否大于预设的相似度阈值;若多个所述相似度值中的最大值大于预设的相似度阈值,则将多个所述相似度值中的最大值对应标准调用报文头作为正确调用报文头。As described above, it is achieved that the preset similarity algorithm is used to calculate the similarity value between the call header and the preset standard call header, and to determine whether the similarity value is greater than the preset similarity threshold. Wherein, the cosine similarity calculation method is used to calculate the similarity value between the call message header and the preset standard call message header. Wherein, the character frequency vector of the call message header refers to the number of times the characters in the call message header appear. For example, the character frequency vector of Content is (1,1,2,2,1), that is, except for n and t appearing twice, other characters only appear once, where (1,1,2,2,1) The 2 is the sub-vector of characters n and t. Therefore, the cosine similarity calculation method is used to calculate the similarity value between the call message header and the preset standard call message header. Further, the calculating the similarity value between the calling message header and the preset standard calling message header by using the preset similarity algorithm, and determining whether the similarity value is greater than the preset similarity threshold further includes : Use a preset similarity algorithm to calculate the similarity value between the call message header and multiple preset standard call message headers, so as to obtain multiple similarity values, and determine which of the multiple similarity values Whether the maximum value is greater than the preset similarity threshold; if the maximum value of the multiple similarity values is greater than the preset similarity threshold, then the maximum value of the multiple similarity values corresponds to the standard call header As the correct call header.
在一个实施方式中,所述根据所述调用信息,获取预定时间内所述指定微服务的被调用次数,并判断所述被调用次数是否大于预设的第一预警次数阈值的步骤S6之前,包括:In one embodiment, before the step S6 of acquiring the number of times the designated microservice has been invoked within a predetermined time according to the invocation information, and determining whether the number of invocations is greater than a preset first warning number threshold, include:
S51、执行对所述替换后调用报文的识别命令;S51. Execute an identification command for the call message after the replacement;
S52、判断执行所述识别命令的过程是否报错;S52: Determine whether an error is reported in the process of executing the recognition command;
S53、若执行所述识别命令的过程未报错,则生成预警判断指令,其中所述预警判断指令用于指示根据所述调用信息,获取预定时间内所述指定微服务的被调用次数,并判断所述被调用次数是否大于预设的第一预警次数阈值。S53. If no error is reported during the execution of the recognition command, an early warning judgment instruction is generated, where the early warning judgment instruction is used to instruct to obtain the number of times the designated microservice has been called within a predetermined time according to the calling information, and judge Whether the number of times of being called is greater than a preset first warning number threshold.
如上所述,实现了执行识别命令,从而判断替换后的调用报文是否正确。虽然已经对调用报文进行了替换处理,但是为了进一步保证调用报文的可识别,本申请还通过执行对所述替换后调用报文的识别命令;判断执行所述识别命令的过程是否报错的方式,以确保所述调用报文能够得到正确的识别。据此,若执行所述识别命令的过程未报错,则生成预警判断指令,其中所述预警判断指令用于指示根据所述调用信息,获取预定时间内所述指定微服务的被调用次数,并判断所述被调用次数是否大于预设的第一预警次数阈值。As mentioned above, the recognition command is executed to determine whether the replaced call message is correct. Although the call message has been replaced, in order to further ensure the recognizability of the call message, this application also executes the identification command of the call message after the replacement; it is judged whether the process of executing the identification command reports an error Way to ensure that the call message can be correctly identified. Accordingly, if the process of executing the recognition command does not report an error, an early warning judgment instruction is generated, where the early warning judgment instruction is used to instruct to obtain the number of times the designated microservice has been called within a predetermined time according to the calling information, and It is determined whether the number of times of being called is greater than a preset first warning number threshold.
在一个实施方式中,所述根据所述调用信息,获取预定时间内所述指定微服务的被调用次数,并判断所述被调用次数是否大于预设的第一预警次数阈值的步骤S6之后,包括:In one embodiment, after the step S6 of obtaining the number of times of the designated microservice within a predetermined time according to the invocation information, and determining whether the number of times is greater than a preset first warning number threshold, include:
S61、若所述被调用次数不大于预设的第一预警次数阈值,则统计预定时间内所指定微服务的流量数据,并判断所述流量数据随时间变化的分布是否处于预设的流量数据分布范围内;S61. If the number of times of being called is not greater than the preset first warning number threshold, collect the traffic data of the designated microservice within a predetermined time, and determine whether the distribution of the traffic data over time is within the preset traffic data Distribution range
S62、若所述流量数据随时间变化的分布处于预设的流量数据分布范围内,则将所述替换后调用报文发送给所述指定微服务。S62. If the distribution of the flow data over time is within a preset flow data distribution range, send the call message after replacement to the designated microservice.
如上所述,实现了将所述替换后调用报文发送给所述指定微服务。指定微服务处于异常状态可能与时间等因素相关,因此仅判断预定时间内的调用次数可能导致判断失准,据此还采用统计预定时间内所指定微服务的流量数据,并判断所述流量数据随时间变化的分布是否处于预设的流量数据分布范围内的方式,用以确定所述指定微服务的流量数据是否正常。若所述流量数据随时间变化的分布处于预设的流量数据分布范围内,表明流量数据未发生异常,因此将所述替换后调用报文发送给所述指定微服务。其 中,所述流量数据分布范围可以通过任意方式设置,例如设置为前一周期的流量数据真实值乘以(-M%,+M%),其中M大于0。As described above, it is achieved that the post-replacement invocation message is sent to the designated microservice. The abnormal state of a designated microservice may be related to factors such as time. Therefore, only judging the number of calls within a predetermined period of time may lead to inaccurate judgment. Based on this, statistics on the traffic data of the designated microservice within the predetermined period of time are used to determine the traffic data Whether the time-varying distribution is within the preset flow data distribution range is used to determine whether the flow data of the specified microservice is normal. If the distribution of the flow data over time is within the preset flow data distribution range, it indicates that there is no abnormality in the flow data, so the call message after replacement is sent to the designated microservice. Wherein, the flow data distribution range can be set in any manner, for example, set to the actual value of the flow data of the previous period multiplied by (-M%, +M%), where M is greater than zero.
在一个实施方式中,所述若所述被调用次数大于预设的第一预警次数阈值,则生成预警信息,并将所述预警信息和所述替换后调用报文发送给所述指定微服务,并使用预设的监控插件将所述指定微服务加入预设的监控列表中的步骤S7,包括:In one embodiment, if the number of calls is greater than a preset first warning number threshold, generating warning information, and sending the warning information and the call message after replacement to the designated microservice , And use the preset monitoring plug-in to add the specified microservice to the preset monitoring list. Step S7 includes:
S701、若所述被调用次数大于预设的第一预警次数阈值,则生成预警信息,并将所述预警信息和所述替换后调用报文发送给所述指定微服务;S701: If the number of times of being called is greater than a preset first warning number threshold, generate warning information, and send the warning information and the post-replacement call message to the designated microservice;
S702、使用预设的基于java agent技术的监控插件进行字节码修改,以在所述指定微服务的通信端口处增加数据埋点,从而将所述指定微服务加入预设的监控列表中。S702. Use a preset monitoring plug-in based on java agent technology to modify the bytecode to add a data embedding point at the communication port of the specified microservice, so as to add the specified microservice to the preset monitoring list.
如上所述,实现了将所述预警信息和所述替换后调用报文发送给所述指定微服务,并使用预设的监控插件将所述指定微服务加入预设的监控列表中。其中java agent技术是一种基于java语言的处于一定环境下包装的计算机系统,为实现设计目的,能在该环境下灵活的,自主的活动。普通方式进行改动代码时需要手动重启才能生效,而由于java agent技术将Java的一些功能从本地代码中解放出来,从而只需要部分重启,相当于仅重新加载修改的代码即可,从而避免了传统技术中将所述指定微服务加入预设的监控列表中时不得不全部重启的缺陷。基于java agent技术的监控插件即是指通过java agent来实现的监控插件,从而实现了监控剥离,使需要调整监控列表时,仅通过java agent修改字节码实现,并只需要部分重启即可。As described above, it is achieved that the early warning information and the post-replacement call message are sent to the designated microservice, and the designated microservice is added to the preset monitoring list using a preset monitoring plug-in. The java agent technology is a computer system packaged in a certain environment based on the java language. In order to achieve the design purpose, it can be flexible and autonomous in this environment. When the code is changed in the ordinary way, a manual restart is required to take effect, but because the java agent technology frees some functions of Java from the local code, only a partial restart is required, which is equivalent to only reloading the modified code, thus avoiding the traditional The defect in the technology that all the specified microservices have to be restarted when they are added to the preset monitoring list. The monitoring plug-in based on java agent technology refers to the monitoring plug-in implemented by java agent, which realizes the monitoring stripping. When the monitoring list needs to be adjusted, only the bytecode of the java agent is modified, and only a partial restart is required.
本申请的基于管理平台的微服务预警方法,接收第一微服务发送的附带有调用信息的调用指定微服务的调用报文;若所述指定通信协议与所述指定微服务的预设通信协议相同,则获得调用报文头;计算所述调用报文头与预设的标准调用报文头的相似度值;若所述相似度值大于相似度阈值,则将调用报文头替换为标准调用报文头;若被调用次数大于预设的第一预警次数阈值,则生成预警信息,并将所述预警信息和所述替换后调用报文发送给所述指定微服务,并使用预设的监控插件将所述指定微服务加入预设的监控列表中。从而在对微服务进行预警的同时实现对报文的纠正,以提高微服务报文的可用性和使用效率。The microservice early warning method based on the management platform of the present application receives an invocation message for invoking a specified microservice with invoking information appended by the first microservice; if the specified communication protocol is the preset communication protocol of the specified microservice Are the same, get the call message header; calculate the similarity value between the call message header and the preset standard call message header; if the similarity value is greater than the similarity threshold, replace the call message header with the standard Call message header; if the number of calls is greater than the preset first warning times threshold, generate warning information, and send the warning information and the call message after replacement to the designated microservice, and use the preset The monitoring plug-in for adding the specified microservice to the preset monitoring list. In this way, it can realize the correction of the message at the same time as the early warning of the microservice, so as to improve the availability and use efficiency of the microservice message.
参照图2,本申请实施例提供一种基于管理平台的微服务预警装置,包括:Referring to Figure 2, an embodiment of the present application provides a microservice early warning device based on a management platform, including:
调用报文接收单元10,用于接收第一微服务发送的附带有调用信息的调用指定微服务的调用报文,其中,所述调用报文基于指定通信协议封装而成,所述调用信息包括所述指定微服务的服务名称、服务URL地址或者服务功能中的至少一项;The invocation message receiving unit 10 is configured to receive an invocation message for invoking a specified microservice attached with invocation information sent by the first microservice, wherein the invocation message is encapsulated based on a specified communication protocol, and the invocation information includes At least one of the service name, service URL address, or service function of the designated microservice;
通信协议判断单元20,用于判断所述指定通信协议与所述指定微服务的预设通信协议是否相同;The communication protocol determining unit 20 is configured to determine whether the designated communication protocol is the same as the preset communication protocol of the designated microservice;
解析单元30,用于若所述指定通信协议与所述指定微服务的预设通信协议相同,则根据所述指定通信协议的格式解析所述调用报文,从而获得调用报文头;The parsing unit 30 is configured to parse the call message according to the format of the designated communication protocol if the designated communication protocol is the same as the preset communication protocol of the designated microservice, so as to obtain the header of the call message;
相似度阈值判断单元40,用于采用预设的相似度算法计算所述调用报文头与预设的标准调用报文头的相似度值,并判断所述相似度值是否大于预设的相似度阈值;The similarity threshold judging unit 40 is configured to calculate the similarity value between the call message header and the preset standard call message header by using a preset similarity algorithm, and determine whether the similarity value is greater than the preset similarity Degree threshold
替换单元50,用于若所述相似度值大于预设的相似度阈值,则将所述调用报文中的调用报文头替换为所述标准调用报文头,从而获得替换后调用报文;The replacement unit 50 is configured to, if the similarity value is greater than a preset similarity threshold, replace the call message header in the call message with the standard call message header, so as to obtain the call message after replacement ;
被调用次数判断单元60,用于根据所述调用信息,获取预定时间内所述指定微服务的被调用次数,并判断所述被调用次数是否大于预设的第一预警次数阈值;The called number determining unit 60 is configured to obtain the called number of the designated microservice within a predetermined time according to the calling information, and determine whether the called number is greater than a preset first warning number threshold;
预警信息生成单元70,用于若所述被调用次数大于预设的第一预警次数阈值,则生成预警信息,并将所述预警信息和所述替换后调用报文发送给所述指定微服务,并使用预设的监控插件将所述指定微服务加入预设的监控列表中。The early warning information generating unit 70 is configured to generate early warning information if the number of calls is greater than a preset first warning number threshold, and send the early warning information and the post-replacement call message to the designated microservice , And use the preset monitoring plug-in to add the specified microservice to the preset monitoring list.
其中上述单元分别用于执行的操作与前述实施方式的基于管理平台的微服务预警方法的步骤一一对应,在此不再赘述。The operations performed by the above-mentioned units respectively correspond to the steps of the microservice early warning method based on the management platform of the foregoing embodiment, and will not be repeated here.
在一个实施方式中,所述装置,包括:In one embodiment, the device includes:
微服务集群判断单元,用于判断所述第一微服务与所述指定微服务是否属于同一个微服务集群;A microservice cluster judging unit, configured to judge whether the first microservice and the specified microservice belong to the same microservice cluster;
身份令牌判断单元,用于若所述第一微服务与所述指定微服务不属于同一个微服务集群,则判断所述调用报文是否携带有身份令牌,其中所述身份令牌是所述管理平台针对所述第一微服务生成的身份认证信息;The identity token judging unit is configured to, if the first microservice and the designated microservice do not belong to the same microservice cluster, judge whether the invocation message carries an identity token, wherein the identity token is Identity authentication information generated by the management platform for the first microservice;
权限判断单元,用于若所述调用报文携带有身份令牌,则根据预设的身份令牌与权限对应关系,判断所述调用报文携带的身份令牌是否具有调用所述指定微服务的权限;The authority judgment unit is configured to determine whether the identity token carried in the call message has the ability to call the designated microservice according to the preset correspondence between the identity token and the authority if the call message carries an identity token permission;
参数匹配判断单元,用于若所述调用报文携带的身份令牌具有调用所述指定微服务的权限,则判断所述调用报文的调用参数是否与所述指定微服务的预定参数相匹配;A parameter matching judgment unit, configured to determine whether the invocation parameter of the invocation message matches the predetermined parameter of the designated microservice if the identity token carried in the invocation message has the authority to invoke the designated microservice ;
判断指令生成单元,用于若所述调用报文的调用参数与所述指定微服务的预定参数相匹配,则生成通信协议判断指令,其中所述通信协议判断指令用于指示判断所述指定通信协议与所述指定微服务的预设通信协议是否相同。The judgment instruction generating unit is configured to generate a communication protocol judgment instruction if the invocation parameter of the invocation message matches the predetermined parameter of the specified microservice, wherein the communication protocol judgment instruction is used to instruct to judge the specified communication Whether the protocol is the same as the preset communication protocol of the designated microservice.
其中上述单元分别用于执行的操作与前述实施方式的基于管理平台的微服务预警方法的步骤一一对应,在此不再赘述。The operations performed by the above-mentioned units respectively correspond to the steps of the microservice early warning method based on the management platform of the foregoing embodiment, and will not be repeated here.
在一个实施方式中,所述解析单元30,包括:In one embodiment, the parsing unit 30 includes:
报文头位置确定子单元,用于若所述指定通信协议与所述指定微服务的预设通信协议相同,则根据预设的指定通信协议的格式,确定所述调用报文中的报文头的位置;The message header position determining subunit is configured to determine the message in the call message according to the format of the preset designated communication protocol if the designated communication protocol is the same as the preset communication protocol of the designated microservice Head position
格式判断子单元,用于判断所述报文头的位置中的内容是否符合预设的报文头的格式;A format judging subunit for judging whether the content in the position of the message header conforms to the preset message header format;
调用报文头标记子单元,用于若所述报文头的位置中的内容符合预设的报文头的格式,则提取所述报文头的位置中的内容,并记为调用报文头。The calling message header marking subunit is used to extract the content in the position of the message header if the content in the position of the message header conforms to the format of the preset message header, and record it as a calling message head.
其中上述子单元分别用于执行的操作与前述实施方式的基于管理平台的微服务预警方法的步骤一一对应,在此不再赘述。The operations performed by the above-mentioned sub-units respectively correspond to the steps of the microservice early warning method based on the management platform of the foregoing embodiment, and will not be repeated here.
在一个实施方式中,所述相似度阈值判断单元40,包括:In one embodiment, the similarity threshold judgment unit 40 includes:
相似度阈值判断子单元,用于采用公式:The similarity threshold judgment subunit is used to adopt the formula:
Figure PCTCN2019103549-appb-000002
计算所述调用报文头与预设的标准调用报文头的相似度值;其中,A为所述调用报文头的字符频率向量,B为预设的标准调用报文头的字符频率向量,Ai、Bi分别为所述向量A和B的第i个分向量,n为向量A和B二者中分向量数量最多的分向量数量值,并判断所述相似度值是否大于预设的相似度阈值。
Figure PCTCN2019103549-appb-000002
Calculate the similarity value between the calling message header and the preset standard calling message header; where A is the character frequency vector of the calling message header, and B is the character frequency vector of the preset standard calling message header , Ai and Bi are the i-th component vector of the vectors A and B, and n is the value of the component vector with the largest number of component vectors in the vectors A and B, and it is determined whether the similarity value is greater than a preset Similarity threshold.
其中上述子单元分别用于执行的操作与前述实施方式的基于管理平台的微服务预警方法的步骤一一对应,在此不再赘述。The operations performed by the above-mentioned sub-units respectively correspond to the steps of the microservice early warning method based on the management platform of the foregoing embodiment, and will not be repeated here.
在一个实施方式中,所述装置,包括:In one embodiment, the device includes:
识别命令执行单元,用于执行对所述替换后调用报文的识别命令;An identification command execution unit, configured to execute an identification command for the call message after the replacement;
报错判断单元,用于判断执行所述识别命令的过程是否报错;An error judgment unit, configured to judge whether an error is reported during the execution of the identification command;
预警判断指令生成单元,用于若执行所述识别命令的过程未报错,则生成预警判断指令,其中所述预警判断指令用于指示根据所述调用信息,获取预定时间内所述指定微服务的被调用次数,并判断所述被调用次数是否大于预设的第一预警次数阈值。An early warning judgment instruction generating unit, configured to generate an early warning judgment instruction if no error is reported in the process of executing the recognition command, wherein the early warning judgment instruction is used to instruct to obtain the specified microservice information within a predetermined time according to the call information And determine whether the number of calls is greater than the preset first warning number threshold.
其中上述单元分别用于执行的操作与前述实施方式的基于管理平台的微服务预警方法的步骤一一对应,在此不再赘述。The operations performed by the above-mentioned units respectively correspond to the steps of the microservice early warning method based on the management platform of the foregoing embodiment, and will not be repeated here.
在一个实施方式中,所述装置,包括:In one embodiment, the device includes:
流量数据判断单元,用于若所述被调用次数不大于预设的第一预警次数阈值,则统计预定时间内所指定微服务的流量数据,并判断所述流量数据随时间变化的分布是否处于预设的流量数据分布范围内;The flow data judging unit is configured to, if the number of times of being called is not greater than the preset first warning number threshold, collect the flow data of the designated microservice within a predetermined time, and judge whether the distribution of the flow data over time is in Within the preset flow data distribution range;
调用报文发送单元,用于若所述流量数据随时间变化的分布处于预设的流量数据分布范围内,则将所述替换后调用报文发送给所述指定微服务。The call message sending unit is configured to send the replaced call message to the designated microservice if the distribution of the flow data over time is within a preset flow data distribution range.
其中上述单元分别用于执行的操作与前述实施方式的基于管理平台的微服务预警方法的步骤一一对应,在此不再赘述。The operations performed by the above-mentioned units respectively correspond to the steps of the microservice early warning method based on the management platform of the foregoing embodiment, and will not be repeated here.
在一个实施方式中,所述预警信息生成单元70,包括:In one embodiment, the warning information generating unit 70 includes:
预警信息生成子单元,用于若所述被调用次数大于预设的第一预警次数阈值,则生成预警信息,并将所述预警信息和所述替换后调用报文发送给所述指定微服务;An early warning information generating subunit, configured to generate early warning information if the number of calls is greater than a preset first warning number threshold, and send the early warning information and the call message after replacement to the designated microservice ;
监控列表增加子单元,用于使用预设的基于java agent技术的监控插件进行字节码修改,以在所述 指定微服务的通信端口处增加数据埋点,从而将所述指定微服务加入预设的监控列表中。The monitoring list add subunit is used to modify the bytecode by using a preset monitoring plug-in based on java agent technology to add a data embedding point at the communication port of the specified microservice, thereby adding the specified microservice to the preset Set the monitoring list.
其中上述子单元分别用于执行的操作与前述实施方式的基于管理平台的微服务预警方法的步骤一一对应,在此不再赘述。The operations performed by the above-mentioned sub-units respectively correspond to the steps of the microservice early warning method based on the management platform of the foregoing embodiment, and will not be repeated here.
本申请的基于管理平台的微服务预警装置,接收第一微服务发送的附带有调用信息的调用指定微服务的调用报文;若所述指定通信协议与所述指定微服务的预设通信协议相同,则获得调用报文头;计算所述调用报文头与预设的标准调用报文头的相似度值;若所述相似度值大于相似度阈值,则将调用报文头替换为标准调用报文头;若被调用次数大于预设的第一预警次数阈值,则生成预警信息,并将所述预警信息和所述替换后调用报文发送给所述指定微服务,并使用预设的监控插件将所述指定微服务加入预设的监控列表中。从而在对微服务进行预警的同时实现对报文的纠正,以提高微服务报文的可用性和使用效率。The microservice early warning device based on the management platform of the present application receives the invocation message for invoking a specified microservice with invoking information appended by the first microservice; if the specified communication protocol is the preset communication protocol of the specified microservice Are the same, get the call message header; calculate the similarity value between the call message header and the preset standard call message header; if the similarity value is greater than the similarity threshold, replace the call message header with the standard Call message header; if the number of calls is greater than the preset first warning times threshold, generate warning information, and send the warning information and the call message after replacement to the designated microservice, and use the preset The monitoring plug-in for adding the specified microservice to the preset monitoring list. In this way, it can realize the correction of the message at the same time as the early warning of the microservice, so as to improve the availability and use efficiency of the microservice message.
参照图3,本发明实施例中还提供一种计算机设备,该计算机设备可以是服务器,其内部结构可以如图所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设计的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机程序和数据库。该内存器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的数据库用于存储基于管理平台的微服务预警方法所用数据。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机程序被处理器执行时以实现一种基于管理平台的微服务预警方法。Referring to FIG. 3, an embodiment of the present invention also provides a computer device. The computer device may be a server, and its internal structure may be as shown in the figure. The computer equipment includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the computer designed processor is used to provide calculation and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database of the computer equipment is used to store the data used in the microservice early warning method based on the management platform. The network interface of the computer device is used to communicate with an external terminal through a network connection. The computer program is executed by the processor to realize a microservice early warning method based on the management platform.
上述处理器执行上述基于管理平台的微服务预警方法,其中所述方法包括的步骤分别与执行前述实施方式的基于管理平台的微服务预警方法的步骤一一对应,在此不再赘述。The above-mentioned processor executes the above-mentioned microservice early warning method based on the management platform, wherein the steps included in the method respectively correspond to the steps of executing the microservice early warning method based on the management platform of the foregoing embodiment, and will not be repeated here.
本领域技术人员可以理解,图中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定。Those skilled in the art can understand that the structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied.
本申请一实施例还提供一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现基于管理平台的微服务预警方法,其中所述方法包括的步骤分别与执行前述实施方式的基于管理平台的微服务预警方法的步骤一一对应,在此不再赘述。An embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, a microservice warning method based on a management platform is implemented, wherein the steps included in the method are respectively the same as those in the foregoing The steps of the microservice early warning method based on the management platform of the implementation manner correspond to each other, and will not be repeated here.

Claims (20)

  1. 一种基于管理平台的微服务预警方法,其特征在于,包括:A microservice early warning method based on a management platform is characterized in that it includes:
    接收第一微服务发送的附带有调用信息的调用指定微服务的调用报文,其中,所述调用报文基于指定通信协议封装而成,所述调用信息包括所述指定微服务的服务名称、服务URL地址或者服务功能中的至少一项;Receive an invocation message for invoking a specified microservice with invocation information appended by the first microservice, wherein the invocation message is encapsulated based on a specified communication protocol, and the invocation information includes the service name of the specified microservice, At least one of the service URL address or service function;
    判断所述指定通信协议与所述指定微服务的预设通信协议是否相同;Determine whether the specified communication protocol is the same as the preset communication protocol of the specified microservice;
    若所述指定通信协议与所述指定微服务的预设通信协议相同,则根据所述指定通信协议的格式解析所述调用报文,从而获得调用报文头;If the specified communication protocol is the same as the preset communication protocol of the specified microservice, parse the call message according to the format of the specified communication protocol to obtain the call message header;
    采用预设的相似度算法计算所述调用报文头与预设的标准调用报文头的相似度值,并判断所述相似度值是否大于预设的相似度阈值;Using a preset similarity algorithm to calculate a similarity value between the call header and a preset standard call header, and determine whether the similarity value is greater than a preset similarity threshold;
    若所述相似度值大于预设的相似度阈值,则将所述调用报文中的调用报文头替换为所述标准调用报文头,从而获得替换后调用报文;If the similarity value is greater than the preset similarity threshold, replacing the invocation message header in the invocation message with the standard invocation message header, so as to obtain the replaced invocation message;
    根据所述调用信息,获取预定时间内所述指定微服务的被调用次数,并判断所述被调用次数是否大于预设的第一预警次数阈值;Acquiring, according to the invocation information, the number of times the designated microservice has been invoked within a predetermined time, and determining whether the number of invoked times is greater than a preset first warning number threshold;
    若所述被调用次数大于预设的第一预警次数阈值,则生成预警信息,并将所述预警信息和所述替换后调用报文发送给所述指定微服务,并使用预设的监控插件将所述指定微服务加入预设的监控列表中。If the number of calls is greater than the preset first warning number threshold, generate warning information, and send the warning information and the post-replacement call message to the designated microservice, and use the preset monitoring plug-in Add the specified microservice to the preset monitoring list.
  2. 根据权利要求1所述的基于管理平台的微服务预警方法,其特征在于,所述判断所述指定通信协议与所述指定微服务的预设通信协议是否相同的步骤之前,包括:The microservice early warning method based on a management platform according to claim 1, wherein before the step of determining whether the designated communication protocol is the same as the preset communication protocol of the designated microservice, the method comprises:
    判断所述第一微服务与所述指定微服务是否属于同一个微服务集群;Determining whether the first microservice and the designated microservice belong to the same microservice cluster;
    若所述第一微服务与所述指定微服务不属于同一个微服务集群,则判断所述调用报文是否携带有身份令牌,其中所述身份令牌是所述管理平台针对所述第一微服务生成的身份认证信息;If the first microservice and the designated microservice do not belong to the same microservice cluster, then it is determined whether the invocation message carries an identity token, where the identity token is the management platform’s response to the first microservice cluster. Identity authentication information generated by a microservice;
    若所述调用报文携带有身份令牌,则根据预设的身份令牌与权限对应关系,判断所述调用报文携带的身份令牌是否具有调用所述指定微服务的权限;If the invocation message carries an identity token, determining whether the identity token carried in the invocation message has the authority to invoke the designated microservice according to the preset correspondence between the identity token and the authority;
    若所述调用报文携带的身份令牌具有调用所述指定微服务的权限,则判断所述调用报文的调用参数是否与所述指定微服务的预定参数相匹配;If the identity token carried in the invocation message has the authority to invoke the designated microservice, determining whether the invocation parameter of the invocation message matches the predetermined parameter of the designated microservice;
    若所述调用报文的调用参数与所述指定微服务的预定参数相匹配,则生成通信协议判断指令,其中所述通信协议判断指令用于指示判断所述指定通信协议与所述指定微服务的预设通信协议是否相同。If the invocation parameter of the invocation message matches the predetermined parameter of the designated microservice, a communication protocol determination instruction is generated, wherein the communication protocol determination instruction is used to instruct to determine whether the designated communication protocol and the designated microservice Whether the preset communication protocol is the same.
  3. 根据权利要求1所述的基于管理平台的微服务预警方法,其特征在于,所述若所述指定通信协议与所述指定微服务的预设通信协议相同,则根据所述指定通信协议的格式解析所述调用报文,从而获得调用报文头的步骤,包括:The micro-service early warning method based on the management platform of claim 1, wherein if the designated communication protocol is the same as the preset communication protocol of the designated micro-service, according to the format of the designated communication protocol The step of parsing the call message to obtain the call message header includes:
    若所述指定通信协议与所述指定微服务的预设通信协议相同,则根据预设的指定通信协议的格式, 确定所述调用报文中的报文头的位置;If the designated communication protocol is the same as the preset communication protocol of the designated microservice, determine the position of the message header in the call message according to the format of the preset designated communication protocol;
    判断所述报文头的位置中的内容是否符合预设的报文头的格式;Judging whether the content in the position of the message header conforms to the preset message header format;
    若所述报文头的位置中的内容符合预设的报文头的格式,则提取所述报文头的位置中的内容,并记为调用报文头。If the content in the position of the message header conforms to the format of the preset message header, the content in the position of the message header is extracted and recorded as the calling message header.
  4. 根据权利要求1所述的基于管理平台的微服务预警方法,其特征在于,所述采用预设的相似度算法计算所述调用报文头与预设的标准调用报文头的相似度值,并判断所述相似度值是否大于预设的相似度阈值的步骤,包括:The microservice early warning method based on the management platform according to claim 1, wherein the preset similarity algorithm is used to calculate the similarity value between the call header and the preset standard call header, and And the step of determining whether the similarity value is greater than a preset similarity threshold includes:
    采用公式:Use the formula:
    Figure PCTCN2019103549-appb-100001
    Figure PCTCN2019103549-appb-100001
    计算所述调用报文头与预设的标准调用报文头的相似度值;其中,A为所述调用报文头的字符频率向量,B为预设的标准调用报文头的字符频率向量,Ai、Bi分别为所述向量A和B的第i个分向量,n为向量A和B二者中分向量数量最多的分向量数量值,并判断所述相似度值是否大于预设的相似度阈值。Calculate the similarity value between the calling message header and the preset standard calling message header; where A is the character frequency vector of the calling message header, and B is the character frequency vector of the preset standard calling message header , Ai and Bi are the i-th component vector of the vectors A and B, and n is the value of the component vector with the largest number of component vectors in the vectors A and B, and it is determined whether the similarity value is greater than a preset Similarity threshold.
  5. 根据权利要求1所述的基于管理平台的微服务预警方法,其特征在于,所述根据所述调用信息,获取预定时间内所述指定微服务的被调用次数,并判断所述被调用次数是否大于预设的第一预警次数阈值的步骤之前,包括:The microservice early warning method based on the management platform of claim 1, wherein the number of calls of the designated microservice within a predetermined time is obtained according to the call information, and it is determined whether the number of calls is Before the step that is greater than the preset first warning times threshold, it includes:
    执行对所述替换后调用报文的识别命令;Execute an identification command for the call message after the replacement;
    判断执行所述识别命令的过程是否报错;Determine whether an error is reported in the process of executing the recognition command;
    若执行所述识别命令的过程未报错,则生成预警判断指令,其中所述预警判断指令用于指示根据所述调用信息,获取预定时间内所述指定微服务的被调用次数,并判断所述被调用次数是否大于预设的第一预警次数阈值。If no error is reported in the process of executing the recognition command, an early warning judgment instruction is generated, where the early warning judgment instruction is used to instruct to obtain the number of times the designated microservice has been called within a predetermined time according to the call information, and determine the Whether the number of calls is greater than the preset first warning number threshold.
  6. 根据权利要求1所述的基于管理平台的微服务预警方法,其特征在于,所述根据所述调用信息,获取预定时间内所述指定微服务的被调用次数,并判断所述被调用次数是否大于预设的第一预警次数阈值的步骤之后,包括:The microservice early warning method based on the management platform of claim 1, wherein the number of calls of the designated microservice within a predetermined time is obtained according to the call information, and it is determined whether the number of calls is After the step greater than the preset threshold of the first warning times, it includes:
    若所述被调用次数不大于预设的第一预警次数阈值,则统计预定时间内所指定微服务的流量数据,并判断所述流量数据随时间变化的分布是否处于预设的流量数据分布范围内;If the number of calls is not greater than the preset first warning threshold, then the traffic data of the designated microservice within the predetermined time is counted, and it is determined whether the distribution of the traffic data over time is within the preset traffic data distribution range Inside;
    若所述流量数据随时间变化的分布处于预设的流量数据分布范围内,则将所述替换后调用报文发送给所述指定微服务。If the distribution of the flow data over time is within a preset flow data distribution range, the call message after replacement is sent to the designated microservice.
  7. 根据权利要求1所述的基于管理平台的微服务预警方法,其特征在于,所述若所述被调用次数 大于预设的第一预警次数阈值,则生成预警信息,并将所述预警信息和所述替换后调用报文发送给所述指定微服务,并使用预设的监控插件将所述指定微服务加入预设的监控列表中的步骤,包括:The microservice early warning method based on the management platform according to claim 1, wherein if the number of calls is greater than a preset first warning threshold, the early warning information is generated, and the early warning information is combined with The step of sending the call message after the replacement to the designated microservice and adding the designated microservice to the preset monitoring list using a preset monitoring plug-in includes:
    若所述被调用次数大于预设的第一预警次数阈值,则生成预警信息,并将所述预警信息和所述替换后调用报文发送给所述指定微服务;If the number of calls is greater than the preset first warning number threshold, generating warning information, and sending the warning information and the post-replacement call message to the designated microservice;
    使用预设的基于java agent技术的监控插件进行字节码修改,以在所述指定微服务的通信端口处增加数据埋点,从而将所述指定微服务加入预设的监控列表中。A preset monitoring plug-in based on java agent technology is used to modify the bytecode to add a data embedding point at the communication port of the specified microservice, thereby adding the specified microservice to the preset monitoring list.
  8. 一种基于管理平台的微服务预警装置,其特征在于,包括:A microservice early warning device based on a management platform is characterized in that it comprises:
    调用报文接收单元,用于接收第一微服务发送的附带有调用信息的调用指定微服务的调用报文,其中,所述调用报文基于指定通信协议封装而成,所述调用信息包括所述指定微服务的服务名称、服务URL地址或者服务功能中的至少一项;The invocation message receiving unit is configured to receive an invocation message for invoking a specified microservice attached with invocation information from the first microservice, wherein the invocation message is encapsulated based on a specified communication protocol, and the invocation information includes all At least one of the service name, service URL address or service function of the specified microservice;
    通信协议判断单元,用于判断所述指定通信协议与所述指定微服务的预设通信协议是否相同;A communication protocol determining unit, configured to determine whether the designated communication protocol is the same as the preset communication protocol of the designated microservice;
    解析单元,用于若所述指定通信协议与所述指定微服务的预设通信协议相同,则根据所述指定通信协议的格式解析所述调用报文,从而获得调用报文头;A parsing unit, configured to parse the call message according to the format of the designated communication protocol if the designated communication protocol is the same as the preset communication protocol of the designated microservice, so as to obtain a header of the call message;
    相似度阈值判断单元,用于采用预设的相似度算法计算所述调用报文头与预设的标准调用报文头的相似度值,并判断所述相似度值是否大于预设的相似度阈值;The similarity threshold judgment unit is used to calculate the similarity value between the calling message header and the preset standard calling message header by using a preset similarity algorithm, and to judge whether the similarity value is greater than the preset similarity Threshold
    替换单元,用于若所述相似度值大于预设的相似度阈值,则将所述调用报文中的调用报文头替换为所述标准调用报文头,从而获得替换后调用报文;A replacement unit, configured to, if the similarity value is greater than a preset similarity threshold, replace the call message header in the call message with the standard call message header, so as to obtain a call message after replacement;
    被调用次数判断单元,用于根据所述调用信息,获取预定时间内所述指定微服务的被调用次数,并判断所述被调用次数是否大于预设的第一预警次数阈值;A called number determining unit, configured to obtain the called number of the designated microservice within a predetermined time according to the calling information, and determine whether the called number is greater than a preset first warning number threshold;
    预警信息生成单元,用于若所述被调用次数大于预设的第一预警次数阈值,则生成预警信息,并将所述预警信息和所述替换后调用报文发送给所述指定微服务,并使用预设的监控插件将所述指定微服务加入预设的监控列表中。An early warning information generating unit, configured to generate early warning information if the number of calls is greater than a preset first warning number threshold, and send the early warning information and the post-replacement call message to the designated microservice, And use the preset monitoring plug-in to add the specified microservice to the preset monitoring list.
  9. 根据权利要求8所述的基于管理平台的微服务预警装置,其特征在于,所述装置,包括:The microservice early warning device based on a management platform according to claim 8, wherein the device comprises:
    微服务集群判断单元,用于判断所述第一微服务与所述指定微服务是否属于同一个微服务集群;A microservice cluster judging unit, configured to judge whether the first microservice and the specified microservice belong to the same microservice cluster;
    身份令牌判断单元,用于若所述第一微服务与所述指定微服务不属于同一个微服务集群,则判断所述调用报文是否携带有身份令牌,其中所述身份令牌是所述管理平台针对所述第一微服务生成的身份认证信息;The identity token judging unit is configured to, if the first microservice and the designated microservice do not belong to the same microservice cluster, judge whether the invocation message carries an identity token, wherein the identity token is Identity authentication information generated by the management platform for the first microservice;
    权限判断单元,用于若所述调用报文携带有身份令牌,则根据预设的身份令牌与权限对应关系,判断所述调用报文携带的身份令牌是否具有调用所述指定微服务的权限;The authority judgment unit is configured to determine whether the identity token carried in the call message has the ability to call the designated microservice according to the preset correspondence between the identity token and the authority if the call message carries an identity token permission;
    参数匹配判断单元,用于若所述调用报文携带的身份令牌具有调用所述指定微服务的权限,则判断所述调用报文的调用参数是否与所述指定微服务的预定参数相匹配;A parameter matching judgment unit, configured to determine whether the invocation parameter of the invocation message matches the predetermined parameter of the designated microservice if the identity token carried in the invocation message has the authority to invoke the designated microservice ;
    判断指令生成单元,用于若所述调用报文的调用参数与所述指定微服务的预定参数相匹配,则生成通信协议判断指令,其中所述通信协议判断指令用于指示判断所述指定通信协议与所述指定微服务的预设通信协议是否相同。The judgment instruction generating unit is configured to generate a communication protocol judgment instruction if the invocation parameter of the invocation message matches the predetermined parameter of the specified microservice, wherein the communication protocol judgment instruction is used to instruct to judge the specified communication Whether the protocol is the same as the preset communication protocol of the designated microservice.
  10. 根据权利要求8所述的基于管理平台的微服务预警装置,其特征在于,所述解析单元,包括:The microservice early warning device based on the management platform of claim 8, wherein the analysis unit comprises:
    报文头位置确定子单元,用于若所述指定通信协议与所述指定微服务的预设通信协议相同,则根据预设的指定通信协议的格式,确定所述调用报文中的报文头的位置;The message header position determining subunit is configured to determine the message in the call message according to the format of the preset designated communication protocol if the designated communication protocol is the same as the preset communication protocol of the designated microservice Head position
    格式判断子单元,用于判断所述报文头的位置中的内容是否符合预设的报文头的格式;A format judging subunit for judging whether the content in the position of the message header conforms to the preset message header format;
    调用报文头标记子单元,用于若所述报文头的位置中的内容符合预设的报文头的格式,则提取所述报文头的位置中的内容,并记为调用报文头。The calling message header marking subunit is used to extract the content in the position of the message header if the content in the position of the message header conforms to the format of the preset message header, and record it as a calling message head.
  11. 根据权利要求8所述的基于管理平台的微服务预警装置,其特征在于,所述相似度阈值判断单元,包括:The microservice early warning device based on the management platform according to claim 8, wherein the similarity threshold judgment unit comprises:
    相似度阈值判断子单元,用于采用公式:The similarity threshold judgment subunit is used to adopt the formula:
    Figure PCTCN2019103549-appb-100002
    Figure PCTCN2019103549-appb-100002
    计算所述调用报文头与预设的标准调用报文头的相似度值;其中,A为所述调用报文头的字符频率向量,B为预设的标准调用报文头的字符频率向量,Ai、Bi分别为所述向量A和B的第i个分向量,n为向量A和B二者中分向量数量最多的分向量数量值,并判断所述相似度值是否大于预设的相似度阈值。Calculate the similarity value between the calling message header and the preset standard calling message header; where A is the character frequency vector of the calling message header, and B is the character frequency vector of the preset standard calling message header , Ai and Bi are the i-th component vector of the vectors A and B, and n is the value of the component vector with the largest number of component vectors in the vectors A and B, and it is determined whether the similarity value is greater than a preset Similarity threshold.
  12. 根据权利要求8所述的基于管理平台的微服务预警装置,其特征在于,所述装置,包括:The microservice early warning device based on a management platform according to claim 8, wherein the device comprises:
    识别命令执行单元,用于执行对所述替换后调用报文的识别命令;An identification command execution unit, configured to execute an identification command for the call message after the replacement;
    报错判断单元,用于判断执行所述识别命令的过程是否报错;An error judgment unit, configured to judge whether an error is reported during the execution of the identification command;
    预警判断指令生成单元,用于若执行所述识别命令的过程未报错,则生成预警判断指令,其中所述预警判断指令用于指示根据所述调用信息,获取预定时间内所述指定微服务的被调用次数,并判断所述被调用次数是否大于预设的第一预警次数阈值。An early warning judgment instruction generating unit, configured to generate an early warning judgment instruction if no error is reported in the process of executing the recognition command, wherein the early warning judgment instruction is used to instruct to obtain the specified microservice information within a predetermined time according to the call information And determine whether the number of calls is greater than the preset first warning number threshold.
  13. 根据权利要求8所述的基于管理平台的微服务预警装置,其特征在于,所述装置,包括:The microservice early warning device based on a management platform according to claim 8, wherein the device comprises:
    流量数据判断单元,用于若所述被调用次数不大于预设的第一预警次数阈值,则统计预定时间内所指定微服务的流量数据,并判断所述流量数据随时间变化的分布是否处于预设的流量数据分布范围内;The flow data judging unit is configured to, if the number of times of being called is not greater than the preset first warning number threshold, collect the flow data of the designated microservice within a predetermined time, and judge whether the distribution of the flow data over time is in Within the preset flow data distribution range;
    调用报文发送单元,用于若所述流量数据随时间变化的分布处于预设的流量数据分布范围内,则将所述替换后调用报文发送给所述指定微服务。The call message sending unit is configured to send the replaced call message to the designated microservice if the distribution of the flow data over time is within a preset flow data distribution range.
  14. 根据权利要求8所述的基于管理平台的微服务预警装置,其特征在于,所述预警信息生成单元, 包括:The microservice early warning device based on the management platform of claim 8, wherein the early warning information generating unit comprises:
    预警信息生成子单元,用于若所述被调用次数大于预设的第一预警次数阈值,则生成预警信息,并将所述预警信息和所述替换后调用报文发送给所述指定微服务;An early warning information generating subunit, configured to generate early warning information if the number of calls is greater than a preset first warning number threshold, and send the early warning information and the call message after replacement to the designated microservice ;
    监控列表增加子单元,用于使用预设的基于java agent技术的监控插件进行字节码修改,以在所述指定微服务的通信端口处增加数据埋点,从而将所述指定微服务加入预设的监控列表中。The monitoring list add subunit is used to modify the bytecode by using a preset monitoring plug-in based on java agent technology to add data embedding points at the communication port of the specified microservice, thereby adding the specified microservice to the preset Set the monitoring list.
  15. 一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,其特征在于,所述处理器执行所述计算机程序时实现基于管理平台的微服务预警方法,所述基于管理平台的微服务预警方法,包括:A computer device includes a memory and a processor, the memory stores a computer program, and is characterized in that, when the processor executes the computer program, a management platform-based microservice early warning method is implemented, and the management platform-based microservice Service warning methods, including:
    接收第一微服务发送的附带有调用信息的调用指定微服务的调用报文,其中,所述调用报文基于指定通信协议封装而成,所述调用信息包括所述指定微服务的服务名称、服务URL地址或者服务功能中的至少一项;Receive an invocation message for invoking a specified microservice with invocation information appended by the first microservice, wherein the invocation message is encapsulated based on a specified communication protocol, and the invocation information includes the service name of the specified microservice, At least one of the service URL address or service function;
    判断所述指定通信协议与所述指定微服务的预设通信协议是否相同;Determine whether the specified communication protocol is the same as the preset communication protocol of the specified microservice;
    若所述指定通信协议与所述指定微服务的预设通信协议相同,则根据所述指定通信协议的格式解析所述调用报文,从而获得调用报文头;If the specified communication protocol is the same as the preset communication protocol of the specified microservice, parse the call message according to the format of the specified communication protocol to obtain the call message header;
    采用预设的相似度算法计算所述调用报文头与预设的标准调用报文头的相似度值,并判断所述相似度值是否大于预设的相似度阈值;Using a preset similarity algorithm to calculate a similarity value between the call header and a preset standard call header, and determine whether the similarity value is greater than a preset similarity threshold;
    若所述相似度值大于预设的相似度阈值,则将所述调用报文中的调用报文头替换为所述标准调用报文头,从而获得替换后调用报文;If the similarity value is greater than the preset similarity threshold, replacing the invocation message header in the invocation message with the standard invocation message header, so as to obtain the replaced invocation message;
    根据所述调用信息,获取预定时间内所述指定微服务的被调用次数,并判断所述被调用次数是否大于预设的第一预警次数阈值;Acquiring, according to the invocation information, the number of times the designated microservice has been invoked within a predetermined time, and determining whether the number of invoked times is greater than a preset first warning number threshold;
    若所述被调用次数大于预设的第一预警次数阈值,则生成预警信息,并将所述预警信息和所述替换后调用报文发送给所述指定微服务,并使用预设的监控插件将所述指定微服务加入预设的监控列表中。If the number of calls is greater than the preset first warning number threshold, generate warning information, and send the warning information and the post-replacement call message to the designated microservice, and use the preset monitoring plug-in Add the specified microservice to the preset monitoring list.
  16. 根据权利要求15所述的计算机设备,其特征在于,所述判断所述指定通信协议与所述指定微服务的预设通信协议是否相同的步骤之前,包括:The computer device according to claim 15, wherein before the step of determining whether the designated communication protocol is the same as the preset communication protocol of the designated microservice, the method comprises:
    判断所述第一微服务与所述指定微服务是否属于同一个微服务集群;Determining whether the first microservice and the designated microservice belong to the same microservice cluster;
    若所述第一微服务与所述指定微服务不属于同一个微服务集群,则判断所述调用报文是否携带有身份令牌,其中所述身份令牌是所述管理平台针对所述第一微服务生成的身份认证信息;If the first microservice and the designated microservice do not belong to the same microservice cluster, then it is determined whether the invocation message carries an identity token, where the identity token is the management platform’s response to the first microservice cluster. Identity authentication information generated by a microservice;
    若所述调用报文携带有身份令牌,则根据预设的身份令牌与权限对应关系,判断所述调用报文携带的身份令牌是否具有调用所述指定微服务的权限;If the invocation message carries an identity token, determining whether the identity token carried in the invocation message has the authority to invoke the designated microservice according to the preset correspondence between the identity token and the authority;
    若所述调用报文携带的身份令牌具有调用所述指定微服务的权限,则判断所述调用报文的调用参数是否与所述指定微服务的预定参数相匹配;If the identity token carried in the invocation message has the authority to invoke the designated microservice, determining whether the invocation parameter of the invocation message matches the predetermined parameter of the designated microservice;
    若所述调用报文的调用参数与所述指定微服务的预定参数相匹配,则生成通信协议判断指令,其中所述通信协议判断指令用于指示判断所述指定通信协议与所述指定微服务的预设通信协议是否相同。If the invocation parameter of the invocation message matches the predetermined parameter of the designated microservice, a communication protocol determination instruction is generated, wherein the communication protocol determination instruction is used to instruct to determine whether the designated communication protocol and the designated microservice Whether the preset communication protocol is the same.
  17. 根据权利要求15所述的计算机设备,其特征在于,所述若所述指定通信协议与所述指定微服务的预设通信协议相同,则根据所述指定通信协议的格式解析所述调用报文,从而获得调用报文头的步骤,包括:The computer device according to claim 15, wherein if the specified communication protocol is the same as the preset communication protocol of the specified microservice, the call message is parsed according to the format of the specified communication protocol , So as to obtain the steps of calling the message header, including:
    若所述指定通信协议与所述指定微服务的预设通信协议相同,则根据预设的指定通信协议的格式,确定所述调用报文中的报文头的位置;If the designated communication protocol is the same as the preset communication protocol of the designated microservice, determine the position of the message header in the call message according to the format of the preset designated communication protocol;
    判断所述报文头的位置中的内容是否符合预设的报文头的格式;Judging whether the content in the position of the message header conforms to the preset message header format;
    若所述报文头的位置中的内容符合预设的报文头的格式,则提取所述报文头的位置中的内容,并记为调用报文头。If the content in the position of the message header conforms to the format of the preset message header, the content in the position of the message header is extracted and recorded as the calling message header.
  18. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现基于管理平台的微服务预警方法,所述基于管理平台的微服务预警方法,包括:A computer-readable storage medium with a computer program stored thereon, wherein the computer program implements a management platform-based microservice early warning method when the computer program is executed by a processor, and the management platform-based microservice early warning method includes :
    接收第一微服务发送的附带有调用信息的调用指定微服务的调用报文,其中,所述调用报文基于指定通信协议封装而成,所述调用信息包括所述指定微服务的服务名称、服务URL地址或者服务功能中的至少一项;Receive an invocation message for invoking a specified microservice with invocation information appended by the first microservice, wherein the invocation message is encapsulated based on a specified communication protocol, and the invocation information includes the service name of the specified microservice, At least one of the service URL address or service function;
    判断所述指定通信协议与所述指定微服务的预设通信协议是否相同;Determine whether the specified communication protocol is the same as the preset communication protocol of the specified microservice;
    若所述指定通信协议与所述指定微服务的预设通信协议相同,则根据所述指定通信协议的格式解析所述调用报文,从而获得调用报文头;If the specified communication protocol is the same as the preset communication protocol of the specified microservice, parse the call message according to the format of the specified communication protocol to obtain the call message header;
    采用预设的相似度算法计算所述调用报文头与预设的标准调用报文头的相似度值,并判断所述相似度值是否大于预设的相似度阈值;Using a preset similarity algorithm to calculate a similarity value between the call header and a preset standard call header, and determine whether the similarity value is greater than a preset similarity threshold;
    若所述相似度值大于预设的相似度阈值,则将所述调用报文中的调用报文头替换为所述标准调用报文头,从而获得替换后调用报文;If the similarity value is greater than the preset similarity threshold, replacing the invocation message header in the invocation message with the standard invocation message header, so as to obtain the replaced invocation message;
    根据所述调用信息,获取预定时间内所述指定微服务的被调用次数,并判断所述被调用次数是否大于预设的第一预警次数阈值;Acquiring, according to the invocation information, the number of times the designated microservice has been invoked within a predetermined time, and determining whether the number of invoked times is greater than a preset first warning number threshold;
    若所述被调用次数大于预设的第一预警次数阈值,则生成预警信息,并将所述预警信息和所述替换后调用报文发送给所述指定微服务,并使用预设的监控插件将所述指定微服务加入预设的监控列表中。If the number of calls is greater than the preset first warning number threshold, generate warning information, and send the warning information and the post-replacement call message to the designated microservice, and use the preset monitoring plug-in Add the specified microservice to the preset monitoring list.
  19. 根据权利要求18所述的计算机可读存储介质,其特征在于,所述判断所述指定通信协议与所述指定微服务的预设通信协议是否相同的步骤之前,包括:The computer-readable storage medium according to claim 18, wherein before the step of judging whether the designated communication protocol is the same as the preset communication protocol of the designated microservice, it comprises:
    判断所述第一微服务与所述指定微服务是否属于同一个微服务集群;Determining whether the first microservice and the designated microservice belong to the same microservice cluster;
    若所述第一微服务与所述指定微服务不属于同一个微服务集群,则判断所述调用报文是否携带有身份令牌,其中所述身份令牌是所述管理平台针对所述第一微服务生成的身份认证信息;If the first microservice and the designated microservice do not belong to the same microservice cluster, then it is determined whether the invocation message carries an identity token, where the identity token is the management platform’s response to the first microservice cluster. Identity authentication information generated by a microservice;
    若所述调用报文携带有身份令牌,则根据预设的身份令牌与权限对应关系,判断所述调用报文携带的身份令牌是否具有调用所述指定微服务的权限;If the invocation message carries an identity token, determining whether the identity token carried in the invocation message has the authority to invoke the designated microservice according to the preset correspondence between the identity token and the authority;
    若所述调用报文携带的身份令牌具有调用所述指定微服务的权限,则判断所述调用报文的调用参数是否与所述指定微服务的预定参数相匹配;If the identity token carried in the invocation message has the authority to invoke the designated microservice, determining whether the invocation parameter of the invocation message matches the predetermined parameter of the designated microservice;
    若所述调用报文的调用参数与所述指定微服务的预定参数相匹配,则生成通信协议判断指令,其中所述通信协议判断指令用于指示判断所述指定通信协议与所述指定微服务的预设通信协议是否相同。If the invocation parameter of the invocation message matches the predetermined parameter of the designated microservice, a communication protocol determination instruction is generated, wherein the communication protocol determination instruction is used to instruct to determine whether the designated communication protocol and the designated microservice Whether the preset communication protocol is the same.
  20. 根据权利要求18所述的计算机可读存储介质,其特征在于,所述若所述指定通信协议与所述指定微服务的预设通信协议相同,则根据所述指定通信协议的格式解析所述调用报文,从而获得调用报文头的步骤,包括:The computer-readable storage medium according to claim 18, wherein if the specified communication protocol is the same as the preset communication protocol of the specified microservice, then the specified communication protocol is parsed according to the format of the specified communication protocol. The steps of calling the message to obtain the header of the calling message include:
    若所述指定通信协议与所述指定微服务的预设通信协议相同,则根据预设的指定通信协议的格式,确定所述调用报文中的报文头的位置;If the designated communication protocol is the same as the preset communication protocol of the designated microservice, determine the position of the message header in the call message according to the format of the preset designated communication protocol;
    判断所述报文头的位置中的内容是否符合预设的报文头的格式;Judging whether the content in the position of the message header conforms to the preset message header format;
    若所述报文头的位置中的内容符合预设的报文头的格式,则提取所述报文头的位置中的内容,并记为调用报文头。If the content in the position of the message header conforms to the format of the preset message header, the content in the position of the message header is extracted and recorded as the calling message header.
PCT/CN2019/103549 2019-07-03 2019-08-30 Micro-service early warning method and apparatus based on management platform, and computer device WO2021000416A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910596482.4 2019-07-03
CN201910596482.4A CN110445636B (en) 2019-07-03 2019-07-03 Management platform-based micro-service early warning method and device and computer equipment

Publications (1)

Publication Number Publication Date
WO2021000416A1 true WO2021000416A1 (en) 2021-01-07

Family

ID=68429386

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/103549 WO2021000416A1 (en) 2019-07-03 2019-08-30 Micro-service early warning method and apparatus based on management platform, and computer device

Country Status (2)

Country Link
CN (1) CN110445636B (en)
WO (1) WO2021000416A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113472794A (en) * 2021-07-05 2021-10-01 福州数据技术研究院有限公司 Multi-application system authority unified management method based on micro-service and computer readable storage medium
CN115086394A (en) * 2022-06-15 2022-09-20 亚信科技(中国)有限公司 Service information processing method and device and electronic equipment
CN116094178A (en) * 2023-04-11 2023-05-09 浙江德塔森特数据技术有限公司 Fault early warning control method and device for precise train head cabinet, machine room and medium
CN117146521A (en) * 2023-09-21 2023-12-01 北京快行线冷链物流有限公司 Quality management system and method for cold chain transportation based on temperature

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113194057B (en) * 2020-01-14 2023-06-27 北京京东振世信息技术有限公司 AS 2-based data receiving, transmitting and interacting method and client
CN111371840B (en) * 2020-02-14 2021-05-11 平安科技(深圳)有限公司 Micro-service deployment method, device, computer equipment and storage medium
CN111427557A (en) * 2020-04-06 2020-07-17 中信银行股份有限公司 Application microservice method and device, electronic equipment and readable storage medium
CN113824590B (en) * 2021-09-18 2024-04-26 武汉联影医疗科技有限公司 Method for predicting problem in micro service network, computer device, and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100125474A1 (en) * 2008-11-19 2010-05-20 Harmon J Scott Service evaluation assessment tool and methodology
CN103580937A (en) * 2012-07-24 2014-02-12 阿里巴巴集团控股有限公司 Web service simulating method and system and service agent system thereof
CN106850832A (en) * 2017-03-01 2017-06-13 郑州云海信息技术有限公司 A kind of cloud management system based on micro services framework
CN107070889A (en) * 2017-03-10 2017-08-18 中国电建集团成都勘测设计研究院有限公司 A kind of unified security system of defense based on cloud platform

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103701669B (en) * 2013-12-30 2017-06-20 北京邮电大学 A kind of method and device for detecting type of service
US10778805B2 (en) * 2017-07-18 2020-09-15 International Business Machines Corporation Identifying application preemptive requests
CN107528853A (en) * 2017-09-12 2017-12-29 上海艾融软件股份有限公司 The implementation method of micro services control of authority
CN107682321B (en) * 2017-09-14 2019-03-29 广州西麦科技股份有限公司 A kind of method and device of SDN controller cluster single-sign-on
CN109728969B (en) * 2018-05-18 2022-04-15 平安普惠企业管理有限公司 Abnormal user detection method of application software, monitoring server and storage medium
CN108964987A (en) * 2018-06-15 2018-12-07 平安科技(深圳)有限公司 Data monitoring method, device, computer equipment and storage medium
CN109542718B (en) * 2018-10-22 2023-02-07 中国平安人寿保险股份有限公司 Service call monitoring method and device, storage medium and server
CN109474685A (en) * 2018-11-16 2019-03-15 中国银行股份有限公司 Service monitoring method and system under a kind of framework based on micro services
CN109672612A (en) * 2018-12-13 2019-04-23 中国电子科技集团公司电子科学研究院 API gateway system
CN109739727B (en) * 2019-01-03 2022-07-01 优信拍(北京)信息科技有限公司 Service monitoring method and device in micro-service architecture
CN109617750A (en) * 2019-01-31 2019-04-12 国网电子商务有限公司 A kind of service method for early warning and gateway
CN109936624B (en) * 2019-01-31 2022-03-18 平安科技(深圳)有限公司 Adaptation method and device for HTTP request message header and computer equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100125474A1 (en) * 2008-11-19 2010-05-20 Harmon J Scott Service evaluation assessment tool and methodology
CN103580937A (en) * 2012-07-24 2014-02-12 阿里巴巴集团控股有限公司 Web service simulating method and system and service agent system thereof
CN106850832A (en) * 2017-03-01 2017-06-13 郑州云海信息技术有限公司 A kind of cloud management system based on micro services framework
CN107070889A (en) * 2017-03-10 2017-08-18 中国电建集团成都勘测设计研究院有限公司 A kind of unified security system of defense based on cloud platform

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113472794A (en) * 2021-07-05 2021-10-01 福州数据技术研究院有限公司 Multi-application system authority unified management method based on micro-service and computer readable storage medium
CN113472794B (en) * 2021-07-05 2023-08-15 福州数据技术研究院有限公司 Multi-application system authority unified management method based on micro-service and storage medium
CN115086394A (en) * 2022-06-15 2022-09-20 亚信科技(中国)有限公司 Service information processing method and device and electronic equipment
CN116094178A (en) * 2023-04-11 2023-05-09 浙江德塔森特数据技术有限公司 Fault early warning control method and device for precise train head cabinet, machine room and medium
CN116094178B (en) * 2023-04-11 2023-06-16 浙江德塔森特数据技术有限公司 Fault early warning control method and device for precise train head cabinet, machine room and medium
CN117146521A (en) * 2023-09-21 2023-12-01 北京快行线冷链物流有限公司 Quality management system and method for cold chain transportation based on temperature
CN117146521B (en) * 2023-09-21 2024-04-16 北京快行线冷链物流有限公司 Quality management system and method for cold chain transportation based on temperature

Also Published As

Publication number Publication date
CN110445636B (en) 2022-03-18
CN110445636A (en) 2019-11-12

Similar Documents

Publication Publication Date Title
WO2021000416A1 (en) Micro-service early warning method and apparatus based on management platform, and computer device
US11647009B2 (en) Access request conversion method and apparatus
US10194001B1 (en) Automatic discovery of API information
CN110119292B (en) System operation parameter query method, matching method, device and node equipment
CN110113188B (en) Cross-subdomain communication operation and maintenance method, total operation and maintenance server and medium
CN112788031B (en) Micro-service interface authentication system, method and device based on Envoy architecture
WO2020155483A1 (en) Method and apparatus for adapting http request message header, and computer device
CN112613993B (en) Transaction data processing method and device, computer equipment and storage medium
CN109996219B (en) Internet of things authentication method, network equipment and terminal
WO2020173126A1 (en) Method and device for blockchain-based session data processing, equipment, and medium
CN114221995A (en) Service calling method and device and electronic equipment
US9832198B2 (en) Service-based message access layer frame and implementation method thereof
WO2020258653A1 (en) Cross-node data processing method and apparatus
CN113111666A (en) System and method for realizing multi-language translation of application program
CN111367934A (en) Data consistency checking method, device, server and medium
CN114070624B (en) Message monitoring method, device, electronic equipment and medium
US10481836B2 (en) Machine learning method and system for predicting file controls
CN115328734A (en) Cross-service log processing method and device and server
CN113760398A (en) Interface calling method, server, system and storage medium
CN109840264B (en) Method and device for auditing access of application program database
CN111741032B (en) Data transmission control method
WO2023230797A1 (en) Cross-system test method and apparatus
EP4300306A1 (en) Streaming media processing method and apparatus based on inference service and electronic device
CN111464520B (en) Data processing method and device, storage medium and electronic equipment
CN113282353A (en) Data verification method, electronic equipment and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19935875

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19935875

Country of ref document: EP

Kind code of ref document: A1