CN114139091A - Evaluation method, device, medium, and electronic device for processing delay - Google Patents

Evaluation method, device, medium, and electronic device for processing delay Download PDF

Info

Publication number
CN114139091A
CN114139091A CN202111448421.7A CN202111448421A CN114139091A CN 114139091 A CN114139091 A CN 114139091A CN 202111448421 A CN202111448421 A CN 202111448421A CN 114139091 A CN114139091 A CN 114139091A
Authority
CN
China
Prior art keywords
monitored
file
target keyword
micro
matching result
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111448421.7A
Other languages
Chinese (zh)
Inventor
谢鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Life Insurance Company of China Ltd
Original Assignee
Ping An Life Insurance Company of China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Life Insurance Company of China Ltd filed Critical Ping An Life Insurance Company of China Ltd
Priority to CN202111448421.7A priority Critical patent/CN114139091A/en
Publication of CN114139091A publication Critical patent/CN114139091A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • G06F16/972Access to data in other repository systems, e.g. legacy data or dynamic Web page generation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/1734Details of monitoring file system events, e.g. by the use of hooks, filter drivers, logs

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The disclosure relates to the field of artificial intelligence and micro-service, and discloses a method, a device, a medium and an electronic device for evaluating processing delay in multi-micro-service application. The method comprises the following steps: acquiring a path of a file to be monitored and a target keyword to be monitored, wherein the content of the file to be monitored is generated by a first micro service in an application of a multi-micro service architecture when a first event is triggered; accessing the file to be monitored according to the path, and searching the file to be monitored based on the target keyword to obtain a matching result; and if the matching result is matching, triggering the specified network request so that the monitoring client can monitor the specified network request and evaluate the processing delay of the micro-service in the application according to the monitoring time, wherein the specified network request is a second event triggered by a second micro-service in the application. The method does not need secondary development, has low cost and high efficiency, can more accurately evaluate the processing delay of event linkage in the multi-micro service, and has wide adaptation range of the monitored object and strong universality.

Description

Evaluation method, device, medium, and electronic device for processing delay
Technical Field
The present disclosure relates to the field of artificial intelligence and micro-service technologies, and in particular, to a method, an apparatus, a medium, and an electronic device for evaluating processing delay in multi-micro-service applications.
Background
In a background logic processing delay evaluation scene, event linkage among multiple microservices is often involved, and the generation of some events is not reflected in HTTP requests and responses and cannot be monitored by a client, so that next-level events cannot be triggered in time, delay statistics needs to be filtered out of the reaction time, and the error between a delay statistical result and an actual situation is large.
The solution of the related art needs to encapsulate event processing into an HTTP interface for client invocation, and trigger the event by monitoring the response. However, such packaging behavior requires additional development effort, and this partial interface exposure to the outside may also present a security risk.
Disclosure of Invention
In the technical field of artificial intelligence and micro-services, in order to solve the technical problem that the processing delay of event linkage between multiple micro-services cannot be accurately evaluated, the disclosure aims to provide an evaluation method, an evaluation device, a medium and electronic equipment for processing delay in multiple micro-service application.
According to an aspect of the present disclosure, there is provided a method for evaluating a processing delay in a multi-microservice application, the method comprising:
acquiring a path of a file to be monitored and a target keyword to be monitored, wherein the content of the file to be monitored is generated by a first micro service in an application of a multi-micro service architecture when a first event is triggered;
accessing the file to be monitored according to the path, and searching the content of the file to be monitored based on the target keyword to obtain a matching result of the file to be monitored and the target keyword;
and if the matching result is matching, triggering a specified network request so that a monitoring client can monitor the specified network request and evaluate the processing delay of the micro-service in the application according to the monitoring time, wherein the specified network request is a second event triggered by a second micro-service in the application.
According to another aspect of the present disclosure, there is provided an apparatus for evaluating a processing delay in a multi-microservice application, the apparatus comprising:
the system comprises an acquisition module, a monitoring module and a monitoring module, wherein the acquisition module is configured to acquire a path of a file to be monitored and a target keyword to be monitored, and the content of the file to be monitored is generated by a first micro service in an application of a multi-micro service architecture when a first event is triggered;
the searching module is configured to access the file to be monitored according to the path, and perform searching operation on the content of the file to be monitored based on the target keyword to obtain a matching result of the file to be monitored and the target keyword;
and the triggering module is configured to trigger a specified network request if the matching result is matching, so that the monitoring client can monitor the specified network request and evaluate the processing delay of the micro-service in the application according to the monitoring time, wherein the specified network request is a second event triggered by a second micro-service in the application.
According to another aspect of the present disclosure, there is provided a computer readable program medium storing computer program instructions which, when executed by a computer, cause the computer to perform the method as previously described.
According to another aspect of the present disclosure, there is provided an electronic apparatus including:
a processor;
a memory having computer readable instructions stored thereon which, when executed by the processor, implement the method as previously described.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
for the method, the device, the medium and the electronic equipment for evaluating the processing delay in the multi-micro service application provided by the disclosure, the method comprises the following steps: acquiring a path of a file to be monitored and a target keyword to be monitored, wherein the content of the file to be monitored is generated by a first micro service in an application of a multi-micro service architecture when a first event is triggered; accessing the file to be monitored according to the path, and searching the content of the file to be monitored based on the target keyword to obtain a matching result of the file to be monitored and the target keyword; and if the matching result is matching, triggering a specified network request so that a monitoring client can monitor the specified network request and evaluate the processing delay of the micro-service in the application according to the monitoring time, wherein the specified network request is a second event triggered by a second micro-service in the application.
According to the method, the whole scheme can be realized in a script mode, so that secondary development is not needed, the cost is low, the efficiency is high, the monitoring script can be used for automatically searching the keywords of the file to be monitored, and the specified network request can be triggered according to the searching result, so that the triggering of the corresponding next-stage event is realized, the processing delay of the stage can be monitored by the monitoring client, and the processing delay of event linkage in the multi-microservice service can be more accurately evaluated; in addition, monitoring can be realized only by generating the text file by the microservice, so that the text file which can be read can be monitored, the adaptation range of the monitored object is wide, and the universality is high.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
FIG. 1 is a system architecture diagram illustrating a method for evaluating processing delay in a multi-microservice application, according to an example embodiment;
FIG. 2 is a flow diagram illustrating a method for evaluating processing delays in a multi-microservice application in accordance with an exemplary embodiment;
FIG. 3 is a flowchart illustrating details of step 220 according to one embodiment illustrated in the FIG. 2 embodiment;
FIG. 4 is a flowchart illustrating details of step 220 and step 230 according to one embodiment illustrated in the embodiment of FIG. 2;
FIG. 5 is a block diagram illustrating an apparatus for evaluating processing delays in a multi-microservice application in accordance with an exemplary embodiment;
FIG. 6 is a block diagram illustrating an example of an electronic device implementing the method for evaluating processing delay in a multi-microservice application described above, according to an example embodiment;
fig. 7 is a program product for implementing the method for evaluating processing delay in a multi-microservice application described above, according to an example embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repetitive description will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities.
As described in the background section, in the related art, the error between the delay statistical result of event linkage among multiple microservices and the actual situation is large, the problem of poor accuracy of the delay statistical result exists in the related art, and the delay statistical result is realized through interface packaging and calling in the related art, which requires additional development work, so that the defects of high cost, low efficiency and poor safety risk also exist.
To this end, the present disclosure first provides a method for evaluating processing delay in a multi-microservice application. The method can overcome the defects, and therefore evaluation of processing delay in multi-microservice application can be efficiently, accurately and inexpensively achieved.
The implementation terminal of the present disclosure may be any device having computing, processing, and communication functions, which may be connected to an external device for receiving or sending data, and specifically may be a portable mobile device, such as a smart phone, a tablet computer, a notebook computer, a pda (personal Digital assistant), or the like, or may be a fixed device, such as a computer device, a field terminal, a desktop computer, a server, a workstation, or the like, or may be a set of multiple devices, such as a physical infrastructure of cloud computing or a server cluster.
Optionally, the implementation terminal of the present disclosure may be a server or a physical infrastructure of cloud computing.
Fig. 1 is a system architecture diagram illustrating a method for evaluating processing delay in a multi-microservice application according to an example embodiment. As shown in fig. 1, the system architecture includes a personal computer 110 and a server 120 that establishes a communication connection with the personal computer 110 through a network, wherein a container 121 is disposed on the server 120, an application having three microservices is disposed in the container 121, and a script 122 and a monitoring client 123 are further disposed on the server 120. When the method for evaluating processing delay in multi-micro service application provided by the present disclosure is applied to the system architecture shown in fig. 1, the specific process may be as follows: first, a first micro service in the container 121 triggers a first event, which is embodied by a network request sent out or a network response received, at this time, the monitoring client 123 may perform a delay evaluation, and after triggering the first event, a file to be monitored is generated and output to a directory of the container 121; then, adding a file path of a file to be monitored and a target keyword to be monitored to the script 122; then, the script 122 can perform a search operation on the file to be monitored, and determine a matching result between the file to be monitored and the target keyword; next, the script 122 may further trigger a corresponding network request based on the obtained matching result, so that a second event is triggered by a second micro service in the container 121, and at this time, the monitoring client 123 may listen to the network request, so that the linked delay between the first event of the first micro service and the second event of the second micro service may be evaluated.
In one embodiment of the present disclosure, the script 122 and the file to be monitored are deployed under the same container directory.
It should be noted that fig. 1 is only one embodiment of the present disclosure, and although the implementation terminal in the embodiment of fig. 1 is a server, in other embodiments of the present disclosure, the implementation terminal may also be various terminal devices as described above; although all the micro-services of the application program are deployed on the same server and in the same container in the embodiment of fig. 1, in other embodiments of the present disclosure, multiple micro-services in the application program may be deployed in different containers, and may even be deployed on different terminal devices; although in the embodiment shown in fig. 1, the monitoring client monitors only the delay between two events triggered by two microservices, it is easy to understand that monitoring two events may be only one link of the monitoring client to evaluate the delay of event linkage between microservices, that is, the delay between events triggered by more microservices may also be evaluated. The present disclosure is not intended to be limited thereby, nor should the scope of the present disclosure be limited thereby.
Fig. 2 is a flow chart illustrating a method for evaluating processing delay in a multi-microservice application, according to an example embodiment. Logically, the evaluation method for processing delay in the multi-micro service application provided by the embodiment can be executed by a script; physically, the method may be executed by a server, as shown in fig. 2, and includes the following steps:
step 210, obtaining a path of a file to be monitored and a target keyword to be monitored, where the content of the file to be monitored is generated by a first micro-service in an application of a multi-micro-service architecture when a first event is triggered.
The application is an application program adopting a multi-microservice architecture, and comprises a plurality of microservices, each microservice is small, so that a designated business function or business requirement can be focused, and therefore, the business is clear and the code amount is small. The microservice can be developed and maintained by a small team independently, and the readability of the code is improved. Micro-services may communicate with each other using lightweight communication mechanisms (typically HTTP-based RESTful APIs).
The first event triggered by the first micro-service may be an unsuccessful network request or response event, and the file to be monitored can be automatically generated whenever the first micro-service triggers the first event. The target keyword may be a keyword set according to actual business needs.
The path of the file to be monitored may be an absolute path. The type of the file to be monitored can be various, for example, it can be various text files that can be read.
In an embodiment of the present disclosure, the file to be monitored is a log file.
In one embodiment of the present disclosure, the method is performed by a script, and the script is located in a container directory where a file to be monitored is located.
Specifically, the first micro service is deployed in a container, and when generating a file to be monitored, the first micro service outputs the file to be monitored to the container directory, and sets the script in the container directory.
In the embodiment of the disclosure, the script is placed in the container directory where the file to be monitored is located, so that the file to be monitored can be conveniently analyzed.
The first micro-service and the file to be monitored can be both located in one container, which can facilitate the deployment and modification of the first micro-service.
Step 220, accessing the file to be monitored according to the path, and performing a search operation on the content of the file to be monitored based on the target keyword to obtain a matching result of the file to be monitored and the target keyword.
And finding the file to be monitored according to the path, so that the file to be monitored can be analyzed.
As described above, the file to be monitored may be a text file, so that the content of the file to be monitored may include a plurality of words, and the matching condition between the words in the file to be monitored and the target keywords may be determined by searching the content of the file to be monitored, so as to obtain a corresponding matching result.
Fig. 3 is a flowchart illustrating details of step 220 according to one embodiment illustrated in the fig. 2 embodiment. As shown in fig. 3, step 220 may include the steps of:
step 220', traversing and searching the content of the file to be monitored from the first character which is not searched in the file to be monitored each time until the file to be monitored is traversed or a keyword matched with the target keyword is found.
Specifically, the initial point of the file to be monitored is set to be 0 row, in the while 1 loop, the file to be monitored can be positioned to the initial position point ═ α by using the seek () function provided by python, the matching is skipped out by traversing the file to be monitored to search the keyword, the skipped-out position β is obtained by using the tell () function provided by python, the point ═ β is set, and the next loop is positioned to β by the seek () function to start traversing until the file is traversed completely.
Entering sleep to wait for the refreshing of the file to be monitored, and balancing the scanning precision and the performance consumption by setting the cycle interval delta.
In an embodiment of the present disclosure, the accessing the file to be monitored according to the path, and performing a search operation on the content of the file to be monitored based on the target keyword to obtain a matching result between the file to be monitored and the target keyword includes: accessing the file to be monitored according to the path so as to monitor whether the file to be monitored is updated or not; and searching the file to be monitored when the file to be monitored is monitored to be updated, and obtaining a matching result of the file to be monitored and the target keyword.
Specifically, each time the first micro service triggers the first event, the file to be monitored is updated, and a part of content is newly added to the file to be monitored, where the newly added content may be a log generated when the first micro service triggers the first event at this time.
Whether the file to be monitored is updated or not can be monitored by monitoring whether the file size of the file to be monitored is changed or not or monitoring whether the modification date of the file to be monitored is changed or not.
In the embodiment, whether the file to be monitored is updated or not is monitored, once the file to be monitored is updated, the file to be monitored is searched, a corresponding matching result can be found more quickly, and further the processing delay of event linkage between micro services can be evaluated more timely.
In an embodiment of the present disclosure, the accessing the file to be monitored according to the path, and performing a search operation on the content of the file to be monitored based on the target keyword to obtain a matching result between the file to be monitored and the target keyword includes: monitoring whether the file to be monitored is updated every a preset time period; and searching the file to be monitored according to the monitored update of the file to be monitored to obtain a matching result of the file to be monitored and the target keyword.
The predetermined period of time may be arbitrarily set empirically, and may be set to one day, one week, or the like, for example.
In this embodiment, the files to be monitored are monitored according to the set time interval, and after it is monitored that the files to be monitored are updated, the files to be monitored are searched, so that the performance of delayed evaluation and the overhead of computing resources are considered.
In one embodiment of the present disclosure, the predetermined period of time is determined by: acquiring the average value of time intervals between all the two adjacent historical updating times of the file to be monitored as a first average value; acquiring the average value of the time intervals between all the two adjacent updating times of the file to be monitored in a specified time interval before the current time, and taking the average value as a second average value; determining the predetermined time period according to the first average value and the second average value.
The specified time interval is a time interval in which the current time is the end time.
Specifically, an average value of the first average value and the second average value may be calculated as the predetermined period.
In one embodiment of the present disclosure, the determining the predetermined time period according to the first average value and the second average value includes: and determining a weighted sum of the first average value and the second average value as the preset time period, wherein the weight of the second average value is greater than that of the first average value.
In this embodiment, the weighted sum of the first average value and the second average value is used as the predetermined time period, so that the determined predetermined time period sufficiently reflects the functions of the first average value and the second average value, and since the weight of the second average value is greater than the weight of the first average value, the function of the update time interval of the file to be monitored in the latest time period in calculating the predetermined time period is greater, and since the actual update time interval of the file to be monitored is more likely to be related to the recent update time interval, the predetermined time period can be determined more accurately.
Step 230, if the matching result is matching, triggering a specified network request so that the monitoring client can monitor the specified network request, and evaluating the processing delay of the micro service in the application according to the monitoring time, wherein the specified network request is a second event triggered by a second micro service in the application.
The specified network request may be, for example, an HTTP (hypertext Transfer Protocol) request, which is a second event triggered in the second microservice, and the second event may be, for example, an event that is logged according to the network request. The second micro-service and the first micro-service belong to the application of the multi-micro-service architecture.
The monitoring client is a preset monitoring program, and can calculate the processing time length between each stage of events by monitoring the network request, for example, the processing delay can be determined according to the time difference between the first event and the second event, so that the delay evaluation of the event linkage between the multi-microservice services can be realized.
The action specifically executed by the triggered second event may be writing logic according to actual business needs.
In an embodiment of the present disclosure, the performing a search operation on the content of the file to be monitored based on the target keyword to obtain a matching result between the file to be monitored and the target keyword includes:
searching the content of the file to be monitored based on the target keyword, and determining whether the keyword consistent with the target keyword is found;
if the matching result is matching, triggering a specified network request, including:
and if the keywords consistent with the target keywords are found, triggering the specified network request.
Specifically, the content of the document to be monitored can be divided into words, and keywords are extracted from the divided words; and then judging whether each keyword is consistent with the target keyword one by one.
When the content of the file to be monitored contains the keyword consistent with the target keyword, the file to be monitored is generated according to the expected event triggered by the first micro service, so that the corresponding event can be monitored by triggering the specified network request when the keyword consistent with the target keyword is found, and further the processing delay of event linkage can be evaluated.
Fig. 4 is a flowchart illustrating the details of step 220 and step 230 according to one embodiment illustrated in the fig. 2 embodiment. Referring to fig. 4, the steps 220 and 230 may specifically include the following steps:
step 220", based on the target keyword, performing a search operation on the content of the file to be monitored, and determining whether a keyword associated with the target keyword is found.
The keyword associated with the target keyword means a keyword which is different from the target keyword but has an association relationship therewith. For example, the two words of directory and path have similarity, and there is an association relationship between them.
In an embodiment of the present disclosure, performing a search operation on the content of the file to be monitored based on the target keyword, and determining whether a keyword associated with the target keyword is found includes: inputting the content of the file to be monitored and the target keywords into a preset text analysis model to obtain the association scores of the target keywords and the keywords in the content of the file to be monitored, which are output by the preset text analysis model; determining whether there are words with an association score greater than a predetermined association score threshold; determining to find a keyword associated with the target keyword if a word with an association score greater than a predetermined association score threshold exists; otherwise, determining that the keywords associated with the target keywords are not found.
The preset text analysis model can be various models which can be used for calculating the association scores among different words, and can be constructed based on various algorithms such as machine learning and deep learning.
In the embodiment, by determining the association scores between the words by using the preset text analysis model, the keywords associated with the target keywords can be found more accurately.
Step 230", if the keyword associated with the target keyword is found, the specified network request is triggered.
In the embodiment of the disclosure, the specified network request is triggered when the keywords associated with the target keywords exist in the file to be monitored, so that the monitoring range is expanded, and the universality of the scheme of the embodiment of the disclosure is improved.
In an embodiment of the present disclosure, the performing a search operation on the content of the file to be monitored based on the target keyword to determine whether the keyword associated with the target keyword is found includes: querying in a preset dictionary by using the target keyword to obtain a relevant word corresponding to the target keyword; and determining whether the keywords associated with the target keywords are found according to whether the associated words are found in the content of the file to be monitored.
Specifically, the preset dictionary may include preset keywords and corresponding associated words, and when it is determined that an associated word is found in the document to be monitored, it is determined that a keyword associated with the target keyword is found. That is, the related word corresponding to the keyword is the keyword related to the target keyword.
In the embodiment of the disclosure, the fuzzy matching of the keywords is realized through the preset dictionary, that is, the matching can be realized under the condition that the file to be monitored does not contain the target keywords, so that the text in the file to be monitored can be monitored more accurately.
In an embodiment of the present disclosure, the searching operation performed on the content of the file to be monitored based on the target keyword to obtain a matching result between the file to be monitored and the target keyword includes:
searching the content of the file to be monitored according to a logic expression containing a plurality of target keywords, and determining whether the logic expression is established;
if the matching result is matching, triggering a specified network request, including:
and if the logic expression is established, triggering the specified network request.
The logic expression may be a regular expression or other expressions. The logical expression can be established by logical operators of AND, OR and the like among a plurality of target keywords. The plurality of target keywords may be set in a manner of a keyword list.
The logical expression may be, for example, (weather OR climate) AND change, AND then the weather, the climate AND the change are all target keywords, AND the logical expression is only established when the content of the file to be monitored contains at least one word of the weather AND the climate AND also contains a word of the change.
In the embodiment of the present disclosure, by allowing the matching result to be obtained in the form of a logical expression containing a plurality of target keywords, it is possible to set richer keyword matching conditions, thereby expanding the scope of event monitoring.
In summary, according to the evaluation method for processing delay in multi-microservice application provided by the embodiment of the present disclosure, the whole scheme can be implemented by means of a script, and only the script needs to be placed in the container directory where the monitored object is located, so that secondary development is not needed, the cost is low, the efficiency is high, the monitoring script can be used for automatically performing keyword retrieval on the monitored file, and an appointed network request can be triggered according to the retrieval result, so that corresponding next-stage event triggering is realized, the processing delay at this stage can be timely monitored by the monitoring client, the triggering response is fast, and the processing delay of event linkage in the multi-microservice can be more accurately evaluated; in addition, monitoring can be realized only by generating the text file by the microservice, so that the text file which can be read can be monitored, the adaptation range of the monitored object is wide, and the universality is high.
The present disclosure also provides an apparatus for evaluating processing delay in multi-microservice applications, the apparatus having a script disposed thereon, and the following are apparatus embodiments of the present disclosure.
Fig. 5 is a block diagram illustrating an apparatus for evaluating processing delay in a multi-microservice application, according to an example embodiment. As shown in fig. 5, the apparatus 500 includes:
an obtaining module 510, configured to obtain a path of a file to be monitored and a target keyword to be monitored, where content of the file to be monitored is generated by a first micro service in an application of a multi-micro service architecture when a first event is triggered;
the searching module 520 is configured to access the file to be monitored according to the path, and perform searching operation on the content of the file to be monitored based on the target keyword to obtain a matching result between the file to be monitored and the target keyword;
a triggering module 530 configured to trigger a specified network request if the matching result is a match, so that the monitoring client can monitor the specified network request and evaluate a processing delay of the micro-service in the application according to the monitoring time, where the specified network request is a second event triggered by a second micro-service in the application.
According to a third aspect of the present disclosure, there is also provided an electronic device capable of implementing the above method.
As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as a system, method or program product. Thus, various aspects of the invention may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
An electronic device 600 according to this embodiment of the invention is described below with reference to fig. 6. The electronic device 600 shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 6, the electronic device 600 is embodied in the form of a general purpose computing device. The components of the electronic device 600 may include, but are not limited to: the at least one processing unit 610, the at least one memory unit 620, and a bus 630 that couples the various system components including the memory unit 620 and the processing unit 610.
Wherein the storage unit stores program code that is executable by the processing unit 610 such that the processing unit 610 performs the steps according to various exemplary embodiments of the present invention as described in the section "example methods" above in this specification.
The storage unit 620 may include readable media in the form of volatile memory units, such as a random access memory unit (RAM)621 and/or a cache memory unit 622, and may further include a read only memory unit (ROM) 623.
The storage unit 620 may also include a program/utility 624 having a set (at least one) of program modules 625, such program modules 625 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 630 may be one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 600 may also communicate with one or more external devices 800 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 600, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 600 to communicate with one or more other computing devices. Such communication may occur via an input/output (I/O) interface 650, such as with a display unit 640. Also, the electronic device 600 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the Internet) via the network adapter 660. As shown, the network adapter 660 communicates with the other modules of the electronic device 600 over the bus 630. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
According to a fourth aspect of the present disclosure, there is also provided a computer-readable storage medium having stored thereon a program product capable of implementing the above-mentioned method of the present specification. In some possible embodiments, aspects of the invention may also be implemented in the form of a program product comprising program code means for causing a terminal device to carry out the steps according to various exemplary embodiments of the invention described in the above section "exemplary methods" of the present description, when said program product is run on the terminal device.
Referring to fig. 7, a program product 700 for implementing the above method according to an embodiment of the present invention is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited in this regard and, in the present document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
A computer readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
Furthermore, the above-described figures are merely schematic illustrations of processes involved in methods according to exemplary embodiments of the invention, and are not intended to be limiting. It will be readily understood that the processes shown in the above figures are not intended to indicate or limit the chronological order of the processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, e.g., in multiple modules.
It will be understood that the invention is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.

Claims (10)

1. A method for evaluating processing delay in a multi-microservice application, the method comprising:
acquiring a path of a file to be monitored and a target keyword to be monitored, wherein the content of the file to be monitored is generated by a first micro service in an application of a multi-micro service architecture when a first event is triggered;
accessing the file to be monitored according to the path, and searching the content of the file to be monitored based on the target keyword to obtain a matching result of the file to be monitored and the target keyword;
and if the matching result is matching, triggering a specified network request so that a monitoring client can monitor the specified network request and evaluate the processing delay of the micro-service in the application according to the monitoring time, wherein the specified network request is a second event triggered by a second micro-service in the application.
2. The method according to claim 1, wherein the searching the content of the file to be monitored based on the target keyword to obtain the matching result between the file to be monitored and the target keyword comprises:
searching the content of the file to be monitored based on the target keyword, and determining whether the keyword consistent with the target keyword is found;
if the matching result is matching, triggering a specified network request, including:
and if the keywords consistent with the target keywords are found, triggering the specified network request.
3. The method according to claim 1, wherein the searching the content of the file to be monitored based on the target keyword to obtain the matching result between the file to be monitored and the target keyword comprises:
searching the content of the file to be monitored based on the target keyword, and determining whether the keyword associated with the target keyword is found;
if the matching result is matching, triggering a specified network request, including:
and if the keywords associated with the target keywords are found, triggering the specified network request.
4. The method according to claim 1, wherein the number of the target keywords is plural, and the obtaining of the matching result between the file to be monitored and the target keyword by performing the search operation on the content of the file to be monitored based on the target keyword comprises:
searching the content of the file to be monitored according to a logic expression containing a plurality of target keywords, and determining whether the logic expression is established;
if the matching result is matching, triggering a specified network request, including:
and if the logic expression is established, triggering the specified network request.
5. The method according to claim 1, wherein the searching the content of the file to be monitored based on the target keyword to obtain the matching result between the file to be monitored and the target keyword comprises:
and traversing and searching the content of the file to be monitored from the first character which is not searched in the file to be monitored each time until the file to be monitored is traversed and completed or a keyword matched with the target keyword is found.
6. The method according to claim 1, wherein the accessing the file to be monitored according to the path and performing a search operation on the content of the file to be monitored based on the target keyword to obtain a matching result between the file to be monitored and the target keyword comprises:
accessing the file to be monitored according to the path so as to monitor whether the file to be monitored is updated or not;
and searching the file to be monitored when the file to be monitored is monitored to be updated, and obtaining a matching result of the file to be monitored and the target keyword.
7. The method according to claim 1, wherein the accessing the file to be monitored according to the path and performing a search operation on the content of the file to be monitored based on the target keyword to obtain a matching result between the file to be monitored and the target keyword comprises:
monitoring whether the file to be monitored is updated every a preset time period;
and searching the file to be monitored according to the monitored update of the file to be monitored to obtain a matching result of the file to be monitored and the target keyword.
8. An apparatus for evaluating processing delay in a multi-microservice application, the apparatus comprising:
the system comprises an acquisition module, a monitoring module and a monitoring module, wherein the acquisition module is configured to acquire a path of a file to be monitored and a target keyword to be monitored, and the content of the file to be monitored is generated by a first micro service in an application of a multi-micro service architecture when a first event is triggered;
the searching module is configured to access the file to be monitored according to the path, and perform searching operation on the content of the file to be monitored based on the target keyword to obtain a matching result of the file to be monitored and the target keyword;
and the triggering module is configured to trigger a specified network request if the matching result is matching, so that the monitoring client can monitor the specified network request and evaluate the processing delay of the micro-service in the application according to the monitoring time, wherein the specified network request is a second event triggered by a second micro-service in the application.
9. A computer-readable program medium, characterized in that it stores computer program instructions which, when executed by a computer, cause the computer to perform the method according to any one of claims 1 to 7.
10. An electronic device, characterized in that the electronic device comprises:
a processor;
a memory having stored thereon computer readable instructions which, when executed by the processor, implement the method of any of claims 1 to 7.
CN202111448421.7A 2021-11-30 2021-11-30 Evaluation method, device, medium, and electronic device for processing delay Pending CN114139091A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111448421.7A CN114139091A (en) 2021-11-30 2021-11-30 Evaluation method, device, medium, and electronic device for processing delay

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111448421.7A CN114139091A (en) 2021-11-30 2021-11-30 Evaluation method, device, medium, and electronic device for processing delay

Publications (1)

Publication Number Publication Date
CN114139091A true CN114139091A (en) 2022-03-04

Family

ID=80386453

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111448421.7A Pending CN114139091A (en) 2021-11-30 2021-11-30 Evaluation method, device, medium, and electronic device for processing delay

Country Status (1)

Country Link
CN (1) CN114139091A (en)

Similar Documents

Publication Publication Date Title
US9934260B2 (en) Streamlined analytic model training and scoring system
KR102485179B1 (en) Method, device, electronic device and computer storage medium for determining description information
US11775501B2 (en) Trace and span sampling and analysis for instrumented software
US11403303B2 (en) Method and device for generating ranking model
US9529926B2 (en) Snapshot refreshment for search results page preview
US20190095400A1 (en) Analytic system to incrementally update a support vector data description for outlier identification
US8639559B2 (en) Brand analysis using interactions with search result items
US20120030664A1 (en) Processing of software objects moved into a dropzone region of an application
CN106844744B (en) Click model application method and device and search system
US20210319359A1 (en) Method and server for training machine learning algorithm for ranking objects
CN111737443B (en) Answer text processing method and device and key text determining method
CN110704390B (en) Method, device, electronic equipment and medium for acquiring server maintenance script
CN115080514A (en) Index data generation method, information retrieval method, device and computer system
CN113297287B (en) Automatic user policy deployment method and device and electronic equipment
WO2022052633A1 (en) Text backup method, apparatus, and device, and computer readable storage medium
US20200110815A1 (en) Multi contextual clustering
US10127192B1 (en) Analytic system for fast quantile computation
CN111581356B (en) User behavior path analysis method and device
CN114139091A (en) Evaluation method, device, medium, and electronic device for processing delay
CN113449886A (en) Data processing method, processing device, equipment and storage medium
RU2721159C1 (en) Method and server for generating meta-attribute for ranging documents
CN109325198B (en) Resource display method and device and storage medium
US20200089714A1 (en) Method and server for indexing web page in index
CN111539208B (en) Sentence processing method and device, electronic device and readable storage medium
US11301473B1 (en) Dataset overlap query system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination