WO2021051546A1 - Link abnormality recognition method, server and computer-readable storage medium - Google Patents

Link abnormality recognition method, server and computer-readable storage medium Download PDF

Info

Publication number
WO2021051546A1
WO2021051546A1 PCT/CN2019/117338 CN2019117338W WO2021051546A1 WO 2021051546 A1 WO2021051546 A1 WO 2021051546A1 CN 2019117338 W CN2019117338 W CN 2019117338W WO 2021051546 A1 WO2021051546 A1 WO 2021051546A1
Authority
WO
WIPO (PCT)
Prior art keywords
interface
identifiers
software module
link
server
Prior art date
Application number
PCT/CN2019/117338
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 WO2021051546A1 publication Critical patent/WO2021051546A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/3636Software debugging by tracing the execution of the program
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/366Software debugging using diagnostics

Definitions

  • This application relates to the field of data processing technology, and in particular to a link abnormality identification method, a server and a computer-readable storage medium.
  • An Internet request (for example, a search service request) often involves multiple services.
  • Internet applications are built on different sets of software modules. These software modules include: It may be developed by different teams, may be implemented in different programming languages, and may be deployed on thousands of servers. At the same time, a software module will provide a large number of interfaces.
  • the link generated by the system per unit time (the server responds to the user’s Request, the multiple software modules and interfaces that are called are connected in series according to the calling sequence. The path formed by the link is thousands of data. When the system is abnormal, it is difficult to accurately locate the abnormal software modules and interfaces.
  • a method for identifying link abnormalities provided in this application includes:
  • the first obtaining step obtaining, in real time, abnormal request information that the second server fails to respond normally over timeout, and the abnormal request information includes the link tracking ID corresponding to the abnormal request;
  • the second obtaining step obtaining multiple software module information of one or more business systems invoked by the second server when processing the abnormal request according to the link tracking ID corresponding to the abnormal request, where the software module information includes the software module identifier And interface identification, data generation time and link tracking ID;
  • Recognition step sort the multiple software module identifiers and interface identifiers according to the first preset rule, splice the sorted software module identifiers and interface identifiers to generate a data number, and combine the data number with the pre-built
  • the prefix tree is compared to identify abnormal software module identifiers and interface identifiers.
  • the present application also provides a first server, the first server includes: a memory, a processor, the memory stores a link abnormality recognition program that can run on the processor, and the link When the path abnormality recognition program is executed by the processor, any steps in the above-mentioned link abnormality recognition method are realized.
  • the present application also provides a computer-readable storage medium having a link abnormality recognition program stored on the computer-readable storage medium, and the link abnormality recognition program can be executed by one or more processors to realize the above-mentioned link Any step of the anomaly identification method.
  • this application obtains multiple software module identifiers and interface identifiers of one or more business systems called by the second server when processing the abnormal request according to the link tracking ID corresponding to the abnormal request, and performs Sorting and splicing, generate a data number, and compare the data number with a pre-constructed prefix tree to identify abnormal software module identifiers and interface identifiers. It realizes the accurate traceability and positioning of abnormal software modules and interfaces in the application calling process.
  • FIG. 1 is a schematic diagram of an application environment of an embodiment of the first server of this application
  • FIG. 2 is a schematic structural diagram of an embodiment of the first server in FIG. 1;
  • FIG. 3 is a schematic diagram of an embodiment of a prefix tree constructed in advance in this application.
  • Fig. 4 is a flowchart of an embodiment of a method for identifying link anomalies according to this application.
  • FIG. 1 it is a schematic diagram of the application environment of an embodiment of the first server of this application.
  • the user sends a request to the second server 2 through the client 3, and the second server 2 responds to the request and sends the result data to the client 3.
  • the first server 1 responds to the request of the second server 2 in real time. Time to monitor.
  • the first server 1 and the second server 2 can be computing devices such as rack servers, blade servers, tower servers, or cabinet servers.
  • the first server 1 and the second server 2 can be independent servers or multiple servers.
  • a server cluster composed of two servers.
  • the client 3 can be a desktop computer, a notebook, a tablet computer, a mobile phone, or other terminal devices that can communicate with the first server 1.
  • the first server 1 is used to:
  • the abnormal request information includes the link tracking ID corresponding to the abnormal request; obtain the second server 2 to handle the abnormality according to the link tracking ID corresponding to the abnormal request Information about multiple software modules of one or more business systems called upon request, where the software module information includes the software module identification and interface identification, the time when the data is generated, and the link tracking ID; Sort the software module identifiers and interface identifiers, splicing the sorted software module identifiers and interface identifiers to generate a data number, and compare the data number with a pre-constructed prefix tree to identify abnormal software Module identification and interface identification.
  • FIG. 2 it is a schematic structural diagram of an embodiment of the first server 1 in FIG. 1 of this application.
  • the first server 1 includes, but is not limited to, a memory 11, a processor 12, and a network interface 13 that can be communicably connected to each other through a system bus.
  • the memory 11 stores a link abnormality recognition program 10,
  • the link abnormality recognition program 10 can be executed by the processor 12.
  • FIG. 2 only shows the first server 1 with components 11-13 and the link abnormality recognition program 10. Those skilled in the art can understand that the structure shown in FIG. 2 does not constitute a limitation on the first server 1. It may include fewer or more components than shown, or a combination of certain components, or a different component arrangement.
  • the memory 11 includes a memory and at least one type of readable storage medium.
  • the memory provides a cache for the operation of the first server 1;
  • the readable storage medium can be, for example, flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory ( Non-volatile storage media such as SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disks, and optical disks.
  • the readable storage medium may be an internal storage unit of the first server 1, for example, the hard disk of the first server 1.
  • the non-volatile storage medium may also be the first server 1.
  • the external storage device of 1 such as the plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, Flash Card (Flash Card), etc., equipped on the first server 1.
  • the readable storage medium of the memory 11 is generally used to store the operating system and various application software installed in the first server 1, for example, to store the code of the link abnormality identification program 10 in an embodiment of the present application.
  • the memory 11 can also be used to temporarily store various types of data that have been output or will be output.
  • the processor 12 may be a central processing unit (Central Processing Unit, CPU), a controller, a microcontroller, a microprocessor, or other data processing chips.
  • the processor 12 is generally used to control the overall operation of the first server 1, such as performing data interaction or communication-related control and processing with other devices.
  • the processor 12 is used to run the program code or processing data stored in the memory 11, for example, to run the link abnormality recognition program 10 and so on.
  • the network interface 13 may include a wireless network interface or a wired network interface, and the network interface 13 is used to establish a communication connection between the first server 1 and the second server 2.
  • the first server 1 may further include a user interface.
  • the user interface may include a display (Display) and an input unit such as a keyboard (Keyboard).
  • the optional user interface may also include a standard wired interface and a wireless interface.
  • the display may be an LED display, a liquid crystal display, a touch liquid crystal display, an OLED (Organic Light-Emitting Diode, organic light-emitting diode) touch device, etc.
  • the display can also be appropriately called a display screen or a display unit, which is used to display the information processed in the first server 1 and to display a visualized user interface.
  • the link anomaly recognition program 10 when executed by the processor 12, the following first acquisition step, second acquisition step, and identification step are implemented.
  • the first obtaining step obtaining, in real time, abnormal request information that the second server 2 does not respond normally after a timeout, and the abnormal request information includes the link tracking ID corresponding to the abnormal request.
  • the second server 2 When the user initiates a request (for example, a search service request) to the second server 2 based on the client 3, the second server 2 generates a random number, and uses a hash algorithm to calculate the random number to generate a unique chain Path tracking ID, the link tracking ID will be recorded in the information of each software module called when the second server 2 processes the request.
  • a request for example, a search service request
  • the second server 2 uses a hash algorithm to calculate the random number to generate a unique chain Path tracking ID
  • the request is an abnormal request that has not responded normally after a timeout.
  • the second obtaining step obtaining, according to the link tracking ID corresponding to the abnormal request, multiple software module information of one or more business systems invoked by the second server 2 when processing the abnormal request, the software module information includes software modules Identification and interface identification, time of data generation, and link tracking ID.
  • the second server 2 calls the query module, cleaning module, and summary module when processing a search service request
  • the first server 1 obtains the query module, cleaning module, and summary module through the link tracking ID corresponding to the search service request I1082
  • the query module information includes: query module identifier S101, query interface identifier A001, link tracking ID I1082, the time point when the query module created the query interface June 4, 2019, 12:05 minutes and 02 seconds
  • cleaning module information Including: cleaning module identification S102, cleaning interface identification A002, link tracking ID I1082, the time point when the cleaning module created the cleaning interface June 4, 2019, 12:05 minutes and 03 seconds
  • summary module information includes: summary module identification S103, summary Interface identification A003, link tracking ID I1082, and the time point when the summary module created the summary interface is 12:05:05 on June 4, 2019.
  • Recognition step sort the multiple software module identifiers and interface identifiers according to the first preset rule, splice the sorted software module identifiers and interface identifiers to generate a data number, and combine the data number with the pre-built
  • the prefix tree is compared to identify abnormal software module identifiers and interface identifiers.
  • the first preset rule is to sort according to the time sequence of data generation.
  • the time sequence in which the data of each software module information is generated is the sequence in which each software module and interface is called by the second server 2. For example, according to the chronological order of data generation of query module information, cleaning module information, and summary module information, it can be confirmed that the calling sequence of the second server 2 when processing the search service request is: query module and query interface, cleaning module and cleaning interface, Summary module and summary interface.
  • the generated data number is S101A001S102A002S103A003.
  • FIG. 3 it is a schematic diagram of an embodiment of a prefix tree constructed in advance in this application.
  • the prefix tree also known as the dictionary tree, is a multi-way tree structure. It mainly uses the common prefix of the string to improve the query speed and efficiency.
  • the identification step is replaced with:
  • the calling sequence of the second server 2 when processing the search service request is: query module and query interface, cleaning module and cleaning interface, Summary module and summary interface.
  • the generated data number is S101A001S102A002S103A003.
  • Regular expression is a kind of logical formula for string manipulation. It uses some pre-defined specific characters and the combination of these specific characters to form a "rule string”. This "rule string" is used to express the pair of characters.
  • a regular expression is a text pattern that describes one or more strings to be matched when searching for text.
  • the construction process of the prefix tree includes:
  • the third acquiring step acquiring historical link data in a predetermined database, where the historical link data includes multiple software module information of the one or more business systems called when the second server 2 processes the user request, so
  • the software module information includes software module identification and interface identification, link tracking ID and data generation time.
  • Grouping step grouping the multiple software module identifiers and interface identifiers according to a second preset rule.
  • the second preset rule is to group each software module identifier and interface identifier according to the link tracking ID, and group the software module identifiers and interface identifiers that contain the same link tracking ID into the same A group, the software module identifiers and interface identifiers containing different link tracking IDs are grouped into different groups.
  • the inventory module information in the historical link data contains the same link tracking ID I2291, so the inventory module identification and interface identification, order Module identification and interface identification, payment module identification and interface identification are grouped into the same group. If the link tracking ID of the cleaning module information is 15043, the inventory module identification and interface identification and the cleaning module identification and interface identification are classified into different groups.
  • Numbering step sort the multiple software module identifiers and interface identifiers in the same group according to the first preset rule, and splice each group of sorted software module identifiers and interface identifiers to provide each group of software module identifiers and interfaces The identification generates a corresponding data number.
  • the calling sequence of the software modules and interfaces corresponding to the link tracking ID I2291 can be determined as inventory module and inventory interface, order module and order interface, payment Module and payment interface.
  • the first server 1 splices the sorted software module identifiers and interface identifier groups, and the generated data numbers are S201A101S202A102S203A103.
  • the module identification and interface identification of the software module need to be spliced multiple times according to the time sequence of data generation To generate the data number.
  • the first server 1 sorts the software module information corresponding to the link tracking ID of I1084 according to the time sequence of data generation: inventory module and inventory interface, inventory module and inventory interface, order module and order interface, inventory Interface and inventory interface, order module and order interface, payment module and payment interface.
  • inventory module and inventory interface are called three times, the order module is called twice, and the payment module and payment interface are called once.
  • the corresponding data number is S201A101S201A101S202A102S201A101S202A102S203A103.
  • Construction steps Construct a prefix tree according to each data number.
  • the constructing a prefix tree according to each data number includes:
  • step B2 Repeat step B2 until all data numbers are added to the prefix tree.
  • the user request is the root node of the prefix tree
  • S201A101 is the first layer node after the prefix tree root node
  • S202A102 is the second layer node after the prefix tree root node
  • S203A103 is the third-level node after the root node of the prefix tree, that is, the leaf node.
  • the process of generating the regular expression set includes a third obtaining step, a grouping step, and a generating step.
  • the third obtaining step and grouping step in the process of generating the regular expression set are the same as the third obtaining step and grouping step in the construction process of the prefix tree described above, and will not be repeated here.
  • Generation steps sort the multiple software module IDs and interface IDs in the same group according to the time sequence of data generation, splicing each group of sorted software module IDs and interface IDs, according to the regular expression writing rules for each group
  • the software module identification and interface identification generate a corresponding regular expression.
  • a regular expression is a text pattern that includes ordinary characters (for example, the letters between a and z) and special characters (called “metacharacters”).
  • " ⁇ ” means the beginning of a character string
  • "$” means the end of a character string
  • " ⁇ ” means the number of times a character or a string of characters repeats.
  • the calling sequence of the software modules and interfaces corresponding to the link tracking ID I2291 can be determined as inventory module and inventory interface, order module and order interface, payment Module and payment interface.
  • the first server 1 splices the ordered software module IDs and interface ID groups, and the generated regular expression is ⁇ S201A101S202A102S203A103$.
  • the module identification and interface identification of the software module need to be spliced multiple times according to the time sequence of data generation To generate regular expressions.
  • the first server 1 sorts the software module information corresponding to the link tracking ID of I1084 according to the time sequence of data generation: inventory module and inventory interface, inventory module and inventory interface, order module and order interface, inventory Interface and inventory interface, order module and order interface, payment module and payment interface, where inventory module and inventory interface are called three times, order module is called twice, payment module and payment interface are called once, the corresponding regular expression is ⁇ (S201A101) ⁇ 2 ⁇ S202A102S201A101S202A102S203A103$.
  • the prefix tree is updated according to the historical link data updated in the predetermined database.
  • this is a flowchart of an embodiment of a method for identifying link anomalies according to this application.
  • the method for identifying link anomalies includes steps S1-S3.
  • the abnormal request information includes a link tracking ID corresponding to the abnormal request.
  • the second server 2 When the user initiates a request (for example, a search service request) to the second server 2 based on the client 3, the second server 2 generates a random number, and uses a hash algorithm to calculate the random number to generate a unique chain Path tracking ID, the link tracking ID will be recorded in the information of each software module called when the second server 2 processes the request.
  • a request for example, a search service request
  • the second server 2 uses a hash algorithm to calculate the random number to generate a unique chain Path tracking ID
  • the request is an abnormal request that has not responded normally after a timeout.
  • the second server 2 calls the query module, cleaning module, and summary module when processing a search service request
  • the first server 1 obtains the query module, cleaning module, and summary module through the link tracking ID corresponding to the search service request I1082
  • the query module information includes: query module identifier S101, query interface identifier A001, link tracking ID I1082, the time point when the query module created the query interface June 4, 2019, 12:05 minutes and 02 seconds
  • cleaning module information Including: cleaning module identification S102, cleaning interface identification A002, link tracking ID I1082, the time point when the cleaning module created the cleaning interface June 4, 2019, 12:05 minutes and 03 seconds
  • summary module information includes: summary module identification S103, summary Interface identification A003, link tracking ID I1082, and the time point when the summary module created the summary interface is 12:05:05 on June 4, 2019.
  • the first preset rule is to sort according to the time sequence of data generation.
  • the time sequence in which the data of each software module information is generated is the sequence in which each software module and interface is called by the second server 2. For example, according to the chronological order of data generation of query module information, cleaning module information, and summary module information, it can be confirmed that the calling sequence of the second server 2 when processing the search service request is: query module and query interface, cleaning module and cleaning interface, Summary module and summary interface.
  • the generated data number is S101A001S102A002S103A003.
  • FIG. 3 it is a schematic diagram of an embodiment of a prefix tree constructed in advance in this application.
  • the prefix tree also known as the dictionary tree, is a multi-way tree structure. It mainly uses the common prefix of the string to improve the query speed and efficiency.
  • the identification step is replaced with:
  • the calling sequence of the second server 2 when processing the search service request is: query module and query interface, cleaning module and cleaning interface, Summary module and summary interface.
  • the generated data number is S101A001S102A002S103A003.
  • Regular expression is a kind of logical formula for string manipulation. It uses some pre-defined specific characters and the combination of these specific characters to form a "rule string”. This "rule string" is used to express the pair of characters.
  • a regular expression is a text pattern that describes one or more strings to be matched when searching for text.
  • the construction process of the prefix tree includes:
  • the third acquiring step acquiring historical link data in a predetermined database, where the historical link data includes multiple software module information of the one or more business systems called when the second server 2 processes the user request, so
  • the software module information includes software module identification and interface identification, link tracking ID and data generation time.
  • Grouping step grouping the plurality of software module identifiers and interface identifiers according to a second preset rule.
  • the second preset rule is to group each software module identifier and interface identifier according to the link tracking ID, and group the software module identifiers and interface identifiers that contain the same link tracking ID into the same A group, the software module identifiers and interface identifiers containing different link tracking IDs are grouped into different groups.
  • the inventory module information in the historical link data contains the same link tracking ID I2291, so the inventory module identification and interface identification, order Module identification and interface identification, payment module identification and interface identification are grouped into the same group. If the link tracking ID of the cleaning module information is 15043, the inventory module identification and interface identification and the cleaning module identification and interface identification are classified into different groups.
  • Numbering step sort the multiple software module identifiers and interface identifiers in the same group according to the first preset rule, and splice each group of sorted software module identifiers and interface identifiers to provide each group of software module identifiers and interfaces The identification generates a corresponding data number.
  • the calling sequence of the software modules and interfaces corresponding to the link tracking ID I2291 can be determined as inventory module and inventory interface, order module and order interface, payment Module and payment interface.
  • the first server 1 splices the sorted software module identifiers and interface identifier groups, and the generated data numbers are S201A101S202A102S203A103.
  • the module identification and interface identification of the software module need to be spliced multiple times according to the time sequence of data generation To generate the data number.
  • the first server 1 sorts the software module information corresponding to the link tracking ID of I1084 according to the time sequence of data generation: inventory module and inventory interface, inventory module and inventory interface, order module and order interface, inventory Interface and inventory interface, order module and order interface, payment module and payment interface.
  • inventory module and inventory interface are called three times, the order module is called twice, and the payment module and payment interface are called once.
  • the corresponding data number is S201A101S201A101S202A102S201A101S202A102S203A103.
  • Construction steps Construct a prefix tree according to each data number.
  • the constructing a prefix tree according to each data number includes:
  • step B2 Repeat step B2 until all data numbers are added to the prefix tree.
  • the user request is the root node of the prefix tree
  • S201A101 is the first layer node after the prefix tree root node
  • S202A102 is the second layer node after the prefix tree root node
  • S203A103 is the third-level node after the root node of the prefix tree, that is, the leaf node.
  • the process of generating the regular expression set includes a third obtaining step, a grouping step, and a generating step.
  • the third obtaining step and grouping step in the process of generating the regular expression set are the same as the third obtaining step and grouping step in the construction process of the prefix tree described above, and will not be repeated here.
  • Generation steps sort the multiple software module IDs and interface IDs in the same group according to the time sequence of data generation, splicing each group of sorted software module IDs and interface IDs, according to the regular expression writing rules for each group
  • the software module identification and interface identification generate a corresponding regular expression.
  • a regular expression is a text pattern that includes ordinary characters (for example, the letters between a and z) and special characters (called “metacharacters”).
  • " ⁇ ” means the beginning of a character string
  • "$” means the end of a character string
  • " ⁇ ” means the number of times a character or a string of characters repeats.
  • the calling sequence of the software modules and interfaces corresponding to the link tracking ID I2291 can be determined as inventory module and inventory interface, order module and order interface, payment Module and payment interface.
  • the first server 1 splices the sorted software module identifiers and interface identifier groups, and the generated regular expression is ⁇ S201A101S202A102S203A103$.
  • the module identification and interface identification of the software module need to be spliced multiple times according to the time sequence of data generation To generate regular expressions.
  • the first server 1 sorts the software module information corresponding to the link tracking ID of I1084 according to the time sequence of data generation: inventory module and inventory interface, inventory module and inventory interface, order module and order interface, inventory Interface and inventory interface, order module and order interface, payment module and payment interface, where inventory module and inventory interface are called three times, order module is called twice, payment module and payment interface are called once, the corresponding regular expression is ⁇ (S201A101) ⁇ 2 ⁇ S202A102S201A101S202A102S203A103$.
  • the prefix tree is updated according to the historical link data updated in the predetermined database.
  • the embodiment of the present application also proposes a computer-readable storage medium.
  • the computer-readable storage medium may be a hard disk, a multimedia card, an SD card, a flash memory card, an SMC, a read-only memory (ROM), an erasable programmable read-only Any one or any combination of memory (EPROM), portable compact disk read-only memory (CD-ROM), USB memory, etc.
  • the computer-readable storage medium includes the link abnormality recognition program 10.
  • the specific implementation of the computer-readable storage medium of this application is substantially the same as the specific implementation of the above-mentioned link abnormality recognition method and the electronic device, and will not be repeated here.
  • the technical solution of this application essentially or the part that contributes to the existing technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium (such as ROM/RAM, magnetic disk, The optical disc) includes several instructions to enable a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the method described in each embodiment of the present application.
  • a terminal device which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.

Abstract

The present application relates to the technical field of data processing. Disclosed is a link abnormality recognition method. The method comprises: acquiring, according to a link tracking ID corresponding to an abnormal request, a plurality of pieces of software module information of one or more service systems called when a second server processes the abnormal request; sorting a plurality of software module identifiers and interface identifiers according to a first preset rule and splicing same to generate a data number; and comparing the data number with a preconstructed prefix tree, so as to recognize an abnormal software module identifier and an abnormal interface identifier. Further disclosed are a server and a computer-readable storage medium. By means of the present application, the accurate tracing and positioning of an abnormal software module and an abnormal interface in an application calling process are realized.

Description

一种链路异常识别方法、服务器及计算机可读存储介质Method for identifying link abnormality, server and computer readable storage medium
本申请基于巴黎公约申明享有2019年9月16日递交的申请号为CN201910878476.8、名称为“一种链路异常识别方法、服务器及计算机可读存储介质”的中国专利申请的优先权,该中国专利申请的整体内容以参考的方式结合在本申请中。Based on the Paris Convention, this application declares that it enjoys the priority of the Chinese patent application filed on September 16, 2019, with the application number CN201910878476.8 and titled "A method for link anomaly identification, server and computer-readable storage medium". The entire content of the Chinese patent application is incorporated into this application by reference.
技术领域Technical field
本申请涉及数据处理技术领域,尤其涉及一种链路异常识别方法、服务器及计算机可读存储介质。This application relates to the field of data processing technology, and in particular to a link abnormality identification method, a server and a computer-readable storage medium.
背景技术Background technique
随着微服务框架的流行,互联网服务的实现越来越复杂,一次互联网请求(例如,搜索服务请求)往往涉及到多个服务,互联网应用构建在不同的软件模块集上,这些软件模块,有可能是由不同的团队开发、可能使用不同的编程语言来实现,有可能布在几千台服务器上,同时一个软件模块会提供大量的接口,系统单位时间内产生的链路(服务器响应用户的请求,所调用的多个软件模块及接口按照调用顺序串联起来所形成的路径即为链路)数据成千上万,当系统出现异常时,很难准确定位到异常的软件模块及接口。With the popularity of microservice frameworks, the implementation of Internet services is becoming more and more complex. An Internet request (for example, a search service request) often involves multiple services. Internet applications are built on different sets of software modules. These software modules include: It may be developed by different teams, may be implemented in different programming languages, and may be deployed on thousands of servers. At the same time, a software module will provide a large number of interfaces. The link generated by the system per unit time (the server responds to the user’s Request, the multiple software modules and interfaces that are called are connected in series according to the calling sequence. The path formed by the link is thousands of data. When the system is abnormal, it is difficult to accurately locate the abnormal software modules and interfaces.
综上所述,如何对应用调用过程中异常的软件模块及接口进行准确的追溯定位,已经成为一个亟待解决的技术问题。In summary, how to accurately trace and locate abnormal software modules and interfaces in the application call process has become a technical problem to be solved urgently.
发明内容Summary of the invention
鉴于以上内容,有必要提供一种链路异常识别方法,旨在实现对应用调用过程中异常的软件模块及接口进行准确的追溯定位。In view of the above, it is necessary to provide a link anomaly identification method, which aims to achieve accurate traceability and positioning of abnormal software modules and interfaces during application invocation.
本申请提供的一种链路异常识别方法,包括:A method for identifying link abnormalities provided in this application includes:
第一获取步骤:实时获取第二服务器超时未正常响应的异常请求信息,所述异常请求信息包括异常请求对应的链路追踪ID;The first obtaining step: obtaining, in real time, abnormal request information that the second server fails to respond normally over timeout, and the abnormal request information includes the link tracking ID corresponding to the abnormal request;
第二获取步骤:根据所述异常请求对应的链路追踪ID获取第二服务器处理所述异常请求时调用的一个或多个业务系统的多个软件模块信息,所述软件模块信息包括软件模块标识及接口标识、数据产生的时间及链路追踪ID;The second obtaining step: obtaining multiple software module information of one or more business systems invoked by the second server when processing the abnormal request according to the link tracking ID corresponding to the abnormal request, where the software module information includes the software module identifier And interface identification, data generation time and link tracking ID;
识别步骤:根据第一预设规则对所述多个软件模块标识及接口标识进行排序,将排序后的软件模块标识及接口标识进行拼接,生成一个数据编号,将所述数据编号与预先构造好的前缀树进行比对,以识别出异常的软件模块标识及接口标识。Recognition step: sort the multiple software module identifiers and interface identifiers according to the first preset rule, splice the sorted software module identifiers and interface identifiers to generate a data number, and combine the data number with the pre-built The prefix tree is compared to identify abnormal software module identifiers and interface identifiers.
为实现上述目的,本申请还提供一种第一服务器,该第一服务器包括:存储器、处理器,所述存储器上存储有可在所述处理器上运行的链路异常识别程序,所述链路异常识别程序被所述处理器执行时实现如上述链路异常识别方法中的任意步骤。In order to achieve the above objective, the present application also provides a first server, the first server includes: a memory, a processor, the memory stores a link abnormality recognition program that can run on the processor, and the link When the path abnormality recognition program is executed by the processor, any steps in the above-mentioned link abnormality recognition method are realized.
本申请还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有链路异常识别程序,所述链路异常识别程序可被一个或者多个处理器执行,以实现上述链路异常识别方法的任意步骤。The present application also provides a computer-readable storage medium having a link abnormality recognition program stored on the computer-readable storage medium, and the link abnormality recognition program can be executed by one or more processors to realize the above-mentioned link Any step of the anomaly identification method.
相较现有技术,本申请通过根据异常请求对应的链路追踪ID获取第二服务器处理所述异常请求时调用的一个或多个业务系统的多个软件模块标识及接口标识,并对其进行排序和拼接,生成一个数据编号,将所述数据编号与预先构造好的前缀树进行比对,即可识别出异常的软件模块标识及接口标识。实现了对应用调用过程中异常的软件模块及接口进行准确的追溯定位。Compared with the prior art, this application obtains multiple software module identifiers and interface identifiers of one or more business systems called by the second server when processing the abnormal request according to the link tracking ID corresponding to the abnormal request, and performs Sorting and splicing, generate a data number, and compare the data number with a pre-constructed prefix tree to identify abnormal software module identifiers and interface identifiers. It realizes the accurate traceability and positioning of abnormal software modules and interfaces in the application calling process.
附图说明Description of the drawings
图1为本申请第一服务器一实施例的应用环境示意图;FIG. 1 is a schematic diagram of an application environment of an embodiment of the first server of this application;
图2为图1中的第一服务器一实施例的结构示意图;FIG. 2 is a schematic structural diagram of an embodiment of the first server in FIG. 1;
图3为本申请预先构造好的前缀树一实施例的示意图;FIG. 3 is a schematic diagram of an embodiment of a prefix tree constructed in advance in this application;
图4为本申请链路异常识别方法一实施例的流程图。Fig. 4 is a flowchart of an embodiment of a method for identifying link anomalies according to this application.
具体实施方式detailed description
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本申请,并不用于限定本申请。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。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 present application, and are not used to limit the present application. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of this application.
需要说明的是,在本申请中涉及“第一”、“第二”等的描述仅用于描述目的,而不能理解为指示或暗示其相对重要性或者隐含指明所指示的技术特征的数量。 由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个该特征。另外,各个实施例之间的技术方案可以相互结合,但是必须是以本领域普通技术人员能够实现为基础,当技术方案的结合出现相互矛盾或无法实现时应当认为这种技术方案的结合不存在,也不在本申请要求的保护范围之内。It should be noted that the descriptions related to "first", "second", etc. in this application are only for descriptive purposes, and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of indicated technical features . Therefore, the features defined with "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but it must be based on what can be achieved by a person of ordinary skill in the art. When the combination of technical solutions is contradictory or cannot be achieved, it should be considered that such a combination of technical solutions does not exist. , Is not within the scope of protection required by this application.
如图1所示,为本申请第一服务器一实施例的应用环境示意图。在本实施例中,用户通过客户端3向第二服务器2发送请求,第二服务器2响应所述请求并将结果数据发送给客户端3,第一服务器1实时对第二服务器2响应请求的时间进行监控。As shown in FIG. 1, it is a schematic diagram of the application environment of an embodiment of the first server of this application. In this embodiment, the user sends a request to the second server 2 through the client 3, and the second server 2 responds to the request and sends the result data to the client 3. The first server 1 responds to the request of the second server 2 in real time. Time to monitor.
第一服务器1和第二服务器2可以是机架式服务器、刀片式服务器、塔式服务器或者机柜式服务器等计算设备,第一服务器1和第二服务器2可以是独立的服务器,也可以是多个服务器所组成的服务器集群。The first server 1 and the second server 2 can be computing devices such as rack servers, blade servers, tower servers, or cabinet servers. The first server 1 and the second server 2 can be independent servers or multiple servers. A server cluster composed of two servers.
客户端3可以为桌上型计算机、笔记本、平板电脑、手机,或其它可以与第一服务器1进行通信的终端装置。The client 3 can be a desktop computer, a notebook, a tablet computer, a mobile phone, or other terminal devices that can communicate with the first server 1.
在本申请的一个实施例中,第一服务器1用于:In an embodiment of the present application, the first server 1 is used to:
实时获取第二服务器2超时未正常响应的异常请求信息,所述异常请求信息包括异常请求对应的链路追踪ID;根据所述异常请求对应的链路追踪ID获取第二服务器2处理所述异常请求时调用的一个或多个业务系统的多个软件模块信息,所述软件模块信息包括软件模块标识及接口标识、数据产生的时间及链路追踪ID;根据第一预设规则对所述多个软件模块标识及接口标识进行排序,将排序后的软件模块标识及接口标识进行拼接,生成一个数据编号,将所述数据编号与预先构造好的前缀树进行比对,以识别出异常的软件模块标识及接口标识。Acquire in real time abnormal request information that the second server 2 fails to respond normally over time, the abnormal request information includes the link tracking ID corresponding to the abnormal request; obtain the second server 2 to handle the abnormality according to the link tracking ID corresponding to the abnormal request Information about multiple software modules of one or more business systems called upon request, where the software module information includes the software module identification and interface identification, the time when the data is generated, and the link tracking ID; Sort the software module identifiers and interface identifiers, splicing the sorted software module identifiers and interface identifiers to generate a data number, and compare the data number with a pre-constructed prefix tree to identify abnormal software Module identification and interface identification.
如图2所示,为本申请图1中第一服务器1一实施例的结构示意图。As shown in FIG. 2, it is a schematic structural diagram of an embodiment of the first server 1 in FIG. 1 of this application.
在本实施例中,第一服务器1包括,但不仅限于,可通过系统总线相互通信连接的存储器11、处理器12、网络接口13,该存储器11中存储有链路异常识别程序10,所述链路异常识别程序10可被所述处理器12执行。图2仅示出了具有组件11-13以及链路异常识别程序10的第一服务器1,本领域技术人员可以理解的是,图2示出的结构并不构成对第一服务器1的限定,可以包括比图示更少或者更多的部件,或者组合某些部件,或者不同的部件布置。In this embodiment, the first server 1 includes, but is not limited to, a memory 11, a processor 12, and a network interface 13 that can be communicably connected to each other through a system bus. The memory 11 stores a link abnormality recognition program 10, The link abnormality recognition program 10 can be executed by the processor 12. FIG. 2 only shows the first server 1 with components 11-13 and the link abnormality recognition program 10. Those skilled in the art can understand that the structure shown in FIG. 2 does not constitute a limitation on the first server 1. It may include fewer or more components than shown, or a combination of certain components, or a different component arrangement.
其中,存储器11包括内存及至少一种类型的可读存储介质。内存为第一服务器1的运行提供缓存;可读存储介质可为如闪存、硬盘、多媒体卡、卡型存 储器(例如,SD或DX存储器等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘等的非易失性存储介质。在一些实施例中,可读存储介质可以是第一服务器1的内部存储单元,例如该第一服务器1的硬盘;在另一些实施例中,该非易失性存储介质也可以是第一服务器1的外部存储设备,例如第一服务器1上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。本实施例中,存储器11的可读存储介质通常用于存储安装于第一服务器1的操作系统和各类应用软件,例如存储本申请一实施例中的链路异常识别程序10的代码等。此外,存储器11还可以用于暂时地存储已经输出或者将要输出的各类数据。Among them, the memory 11 includes a memory and at least one type of readable storage medium. The memory provides a cache for the operation of the first server 1; the readable storage medium can be, for example, flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory ( Non-volatile storage media such as SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disks, and optical disks. In some embodiments, the readable storage medium may be an internal storage unit of the first server 1, for example, the hard disk of the first server 1. In other embodiments, the non-volatile storage medium may also be the first server 1. The external storage device of 1, such as the plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, Flash Card (Flash Card), etc., equipped on the first server 1. In this embodiment, the readable storage medium of the memory 11 is generally used to store the operating system and various application software installed in the first server 1, for example, to store the code of the link abnormality identification program 10 in an embodiment of the present application. In addition, the memory 11 can also be used to temporarily store various types of data that have been output or will be output.
处理器12在一些实施例中可以是中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器、或其他数据处理芯片。该处理器12通常用于控制所述第一服务器1的总体操作,例如执行与其他设备进行数据交互或者通信相关的控制和处理等。本实施例中,所述处理器12用于运行所述存储器11中存储的程序代码或者处理数据,例如运行链路异常识别程序10等。In some embodiments, the processor 12 may be a central processing unit (Central Processing Unit, CPU), a controller, a microcontroller, a microprocessor, or other data processing chips. The processor 12 is generally used to control the overall operation of the first server 1, such as performing data interaction or communication-related control and processing with other devices. In this embodiment, the processor 12 is used to run the program code or processing data stored in the memory 11, for example, to run the link abnormality recognition program 10 and so on.
网络接口13可包括无线网络接口或有线网络接口,该网络接口13用于在所述第一服务器1与第二服务器2之间建立通信连接。The network interface 13 may include a wireless network interface or a wired network interface, and the network interface 13 is used to establish a communication connection between the first server 1 and the second server 2.
可选的,所述第一服务器1还可以包括用户接口,用户接口可以包括显示器(Display)、输入单元比如键盘(Keyboard),可选的用户接口还可以包括标准的有线接口、无线接口。可选的,在一些实施例中,显示器可以是LED显示器、液晶显示器、触控式液晶显示器以及OLED(Organic Light-Emitting Diode,有机发光二极管)触摸器等。其中,显示器也可以适当的称为显示屏或显示单元,用于显示在第一服务器1中处理的信息以及用于显示可视化的用户界面。Optionally, the first server 1 may further include a user interface. The user interface may include a display (Display) and an input unit such as a keyboard (Keyboard). The optional user interface may also include a standard wired interface and a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch liquid crystal display, an OLED (Organic Light-Emitting Diode, organic light-emitting diode) touch device, etc. Among them, the display can also be appropriately called a display screen or a display unit, which is used to display the information processed in the first server 1 and to display a visualized user interface.
在本申请的一实施例中,所述链路异常识别程序10被所述处理器12执行时实现如下第一获取步骤、第二获取步骤及识别步骤。In an embodiment of the present application, when the link anomaly recognition program 10 is executed by the processor 12, the following first acquisition step, second acquisition step, and identification step are implemented.
第一获取步骤:实时获取第二服务器2超时未正常响应的异常请求信息,所述异常请求信息包括异常请求对应的链路追踪ID。The first obtaining step: obtaining, in real time, abnormal request information that the second server 2 does not respond normally after a timeout, and the abnormal request information includes the link tracking ID corresponding to the abnormal request.
当用户基于客户端3向第二服务器2发起一个请求(例如,搜索服务请求)时,第二服务器2会产生一个随机数,并采用哈希算法对所述随机数进行计算生成一个唯一的链路追踪ID,所述链路追踪ID会被记录在第二服务器2处理所 述请求时所调用的各个软件模块信息中。When the user initiates a request (for example, a search service request) to the second server 2 based on the client 3, the second server 2 generates a random number, and uses a hash algorithm to calculate the random number to generate a unique chain Path tracking ID, the link tracking ID will be recorded in the information of each software module called when the second server 2 processes the request.
当第二服务器2超过预设时间阈值(例如20秒)尚未将某一请求对应的结果数据发送给客户端3时,则所述请求为超时未正常响应的异常请求。When the second server 2 exceeds a preset time threshold (for example, 20 seconds) and has not sent the result data corresponding to a certain request to the client 3, the request is an abnormal request that has not responded normally after a timeout.
第二获取步骤:根据所述异常请求对应的链路追踪ID获取第二服务器2处理所述异常请求时调用的一个或多个业务系统的多个软件模块信息,所述软件模块信息包括软件模块标识及接口标识、数据产生的时间及链路追踪ID。The second obtaining step: obtaining, according to the link tracking ID corresponding to the abnormal request, multiple software module information of one or more business systems invoked by the second server 2 when processing the abnormal request, the software module information includes software modules Identification and interface identification, time of data generation, and link tracking ID.
例如,第二服务器2处理某个搜索服务请求时调用了查询模块、清洗模块、汇总模块,第一服务器1通过搜索服务请求对应的链路追踪ID I1082获取到所述查询模块、清洗模块和汇总模块的信息,其查询模块信息包括:查询模块标识S101、查询接口标识A001、链路追踪ID I1082、查询模块创建查询接口的时间点2019年6月4日12:05分02秒;清洗模块信息包括:清洗模块标识S102、清洗接口标识A002、链路追踪ID I1082、清洗模块创建清洗接口的时间点2019年6月4日12:05分03秒;汇总模块信息包括:汇总模块标识S103、汇总接口标识A003、链路追踪ID I1082、汇总模块创建汇总接口的时间点2019年6月4日12:05分05秒。For example, the second server 2 calls the query module, cleaning module, and summary module when processing a search service request, and the first server 1 obtains the query module, cleaning module, and summary module through the link tracking ID corresponding to the search service request I1082 Module information, the query module information includes: query module identifier S101, query interface identifier A001, link tracking ID I1082, the time point when the query module created the query interface June 4, 2019, 12:05 minutes and 02 seconds; cleaning module information Including: cleaning module identification S102, cleaning interface identification A002, link tracking ID I1082, the time point when the cleaning module created the cleaning interface June 4, 2019, 12:05 minutes and 03 seconds; summary module information includes: summary module identification S103, summary Interface identification A003, link tracking ID I1082, and the time point when the summary module created the summary interface is 12:05:05 on June 4, 2019.
识别步骤:根据第一预设规则对所述多个软件模块标识及接口标识进行排序,将排序后的软件模块标识及接口标识进行拼接,生成一个数据编号,将所述数据编号与预先构造好的前缀树进行比对,以识别出异常的软件模块标识及接口标识。Recognition step: sort the multiple software module identifiers and interface identifiers according to the first preset rule, splice the sorted software module identifiers and interface identifiers to generate a data number, and combine the data number with the pre-built The prefix tree is compared to identify abnormal software module identifiers and interface identifiers.
在本申请的一个实施例中,所述第一预设规则为按照数据产生的时间顺序进行排序。In an embodiment of the present application, the first preset rule is to sort according to the time sequence of data generation.
各个软件模块信息的数据产生的时间顺序即为各个软件模块及接口被第二服务器2调用的顺序。例如,根据查询模块信息、清洗模块信息、汇总模块信息的数据产生的时间顺序排序,可确认第二服务器2处理搜索服务请求时的调用顺序为:查询模块及查询接口、清洗模块及清洗接口、汇总模块及汇总接口。第一服务器对查询模块标识及查询接口标识、清洗模块标识及清洗接口标识、汇总模块标识及汇总接口标识进行拼接后,所生成的数据编号为S101A001S102A002S103A003。The time sequence in which the data of each software module information is generated is the sequence in which each software module and interface is called by the second server 2. For example, according to the chronological order of data generation of query module information, cleaning module information, and summary module information, it can be confirmed that the calling sequence of the second server 2 when processing the search service request is: query module and query interface, cleaning module and cleaning interface, Summary module and summary interface. After the first server splicing the query module identifier and query interface identifier, cleaning module identifier and cleaning interface identifier, summary module identifier and summary interface identifier, the generated data number is S101A001S102A002S103A003.
如图3所示,为本申请预先构造好的前缀树一实施例的示意图。As shown in FIG. 3, it is a schematic diagram of an embodiment of a prefix tree constructed in advance in this application.
前缀树又名字典树,是一种多路树形结构,主用利用字符串的公共前缀来提升查询速度和效率。The prefix tree, also known as the dictionary tree, is a multi-way tree structure. It mainly uses the common prefix of the string to improve the query speed and efficiency.
将数据编号S101A001S102A002S103A003与图3所示的前缀树进行对比,会发现所述数据编号与所述前缀树的左侧第一条分支对应,数据编号仅包含所述分支根节点后的前三个节点,缺少第四个和第五个节点,因前缀树是根据软件模块及接口被第二服务器2调用的顺序进行构造的,故可确定第二服务器2在调用第四个节点S104A004对应的软件模块及接口时出现了异常。Comparing the data number S101A001S102A002S103A003 with the prefix tree shown in Figure 3, you will find that the data number corresponds to the first branch on the left side of the prefix tree, and the data number only includes the first three nodes after the branch root node , The fourth and fifth nodes are missing. Because the prefix tree is constructed according to the order in which the software modules and interfaces are called by the second server 2, it can be determined that the second server 2 is calling the software module corresponding to the fourth node S104A004 An exception occurred during the interface.
在本申请的另一个实施例中,识别步骤被替换为:In another embodiment of the present application, the identification step is replaced with:
根据第一预设规则对所述多个软件模块标识及接口标识进行排序,将排序后的软件模块及接口标识进行拼接,生成一个数据编号,将所述数据编号与预先确定的正则表达式集进行比对,以识别出异常的软件模块标识及接口标识。Sort the multiple software module identifiers and interface identifiers according to the first preset rule, splice the sorted software modules and interface identifiers to generate a data number, and combine the data number with a predetermined regular expression set Make comparisons to identify abnormal software module IDs and interface IDs.
例如,根据查询模块信息、清洗模块信息、汇总模块信息的数据产生的时间顺序排序,可确认第二服务器2处理搜索服务请求时的调用顺序为:查询模块及查询接口、清洗模块及清洗接口、汇总模块及汇总接口。第一服务器1对查询模块标识及查询接口标识、清洗模块标识及清洗接口标识、汇总模块标识及汇总接口标识进行拼接后,所生成的数据编号为S101A001S102A002S103A003。For example, according to the chronological order of data generation of query module information, cleaning module information, and summary module information, it can be confirmed that the calling sequence of the second server 2 when processing the search service request is: query module and query interface, cleaning module and cleaning interface, Summary module and summary interface. After the first server 1 splices the query module identification and the query interface identification, the cleaning module identification and the cleaning interface identification, the summary module identification and the summary interface identification, the generated data number is S101A001S102A002S103A003.
正则表达式是对字符串操作的一种逻辑公式,就是用事先定义好的一些特定字符、及这些特定字符的组合,组成一个“规则字符串”,这个“规则字符串”用来表达对字符串的一种过滤逻辑。正则表达式是一种文本模式,该模式描述在搜索文本时要匹配的一个或多个字符串。Regular expression is a kind of logical formula for string manipulation. It uses some pre-defined specific characters and the combination of these specific characters to form a "rule string". This "rule string" is used to express the pair of characters. A kind of filtering logic for strings. A regular expression is a text pattern that describes one or more strings to be matched when searching for text.
以下为预先确定的正则表达式集的一部分:The following is part of a predetermined set of regular expressions:
^S101A001S102A002S103A003S104A004S104A004$^S101A001S102A002S103A003S104A004S104A004$
^S201A101S202A102S203A103$^S201A101S202A102S203A103$
^(S201A101){2}S202A102S201A101S202A102S203A103$^(S201A101){2}S202A102S201A101S202A102S203A103$
……...
将数据编号S101A001S102A002S103A003与正则表达式集进行比对,发现数据编号与正则表达式集中第一个正则表达式对应,缺少的字符串为“S104A004S105A005”,因为正则表达式是根据各个软件模块标识及接口标识的调用顺序来生成的,故可确定第二服务器2在调用S104A104对应的软件模块及接口时出现了异常。Comparing the data number S101A001S102A002S103A003 with the regular expression set, it is found that the data number corresponds to the first regular expression in the regular expression set. The missing string is "S104A004S105A005", because the regular expression is based on the identification and interface of each software module The identification is generated in the calling sequence, so it can be determined that the second server 2 is abnormal when calling the software module and interface corresponding to S104A104.
在本申请的一个实施例中,所述前缀树的构造过程包括:In an embodiment of the present application, the construction process of the prefix tree includes:
第三获取步骤:获取预先确定的数据库中的历史链路数据,所述历史链路 数据包括第二服务器2处理用户请求时调用的所述一个或多个业务系统的多个软件模块信息,所述软件模块信息包括软件模块标识及接口标识、链路追踪ID及数据产生的时间。The third acquiring step: acquiring historical link data in a predetermined database, where the historical link data includes multiple software module information of the one or more business systems called when the second server 2 processes the user request, so The software module information includes software module identification and interface identification, link tracking ID and data generation time.
分组步骤:按照第二预设规则对所述多个软件模块标识及接口标识进行分组。Grouping step: grouping the multiple software module identifiers and interface identifiers according to a second preset rule.
在本申请的一个实施例中,所述第二预设规则为根据链路追踪ID对各个软件模块标识及接口标识进行分组,将包含同一链路追踪ID的软件模块标识及接口标识归为同一个分组,将包含不同链路追踪ID的软件模块标识及接口标识归为不同的分组。In an embodiment of the present application, the second preset rule is to group each software module identifier and interface identifier according to the link tracking ID, and group the software module identifiers and interface identifiers that contain the same link tracking ID into the same A group, the software module identifiers and interface identifiers containing different link tracking IDs are grouped into different groups.
例如,历史链路数据中的库存模块信息(库存模块标识S201、库存接口标识A101、链路追踪ID I2291、库存模块创建库存接口的时间点2018年12月1日12:05分02秒)、订单模块信息(订单模块标识S202、订单接口标识A102、链路追踪ID I2291、订单模块创建订单接口的时间点2018年12月1日12:05分03秒)、支付模块信息(支付模块标识S203、支付接口标识A103、链路追踪ID I2291、库存模块创建库存接口的时间点2018年12月1日12:05分05秒)包含同一链路追踪ID I2291,故库存模块标识及接口标识、订单模块标识及接口标识、支付模块标识及接口标识被归为同一个分组。若清洗模块信息的链路追踪ID为I5043,则所述库存模块标识及接口标识与所述清洗模块标识及接口标识被归为不同的分组。For example, the inventory module information in the historical link data (inventory module identification S201, inventory interface identification A101, link tracking ID I2291, the time point when the inventory module created the inventory interface December 1, 2018 12:05 minutes and 02 seconds), Order module information (order module identification S202, order interface identification A102, link tracking ID I2291, the time point when the order module created the order interface December 1, 2018 12:05 minutes and 03 seconds), payment module information (payment module identification S203 , Payment interface identification A103, link tracking ID I2291, the time point when the inventory module created the inventory interface December 1, 2018 12:05:05) contains the same link tracking ID I2291, so the inventory module identification and interface identification, order Module identification and interface identification, payment module identification and interface identification are grouped into the same group. If the link tracking ID of the cleaning module information is 15043, the inventory module identification and interface identification and the cleaning module identification and interface identification are classified into different groups.
编号步骤:按照所述第一预设规则对同一组中的多个软件模块标识及接口标识进行排序,对每组已排序的软件模块标识及接口标识进行拼接,为每组软件模块标识及接口标识生成一个对应的数据编号。Numbering step: sort the multiple software module identifiers and interface identifiers in the same group according to the first preset rule, and splice each group of sorted software module identifiers and interface identifiers to provide each group of software module identifiers and interfaces The identification generates a corresponding data number.
例如,从库存模块信息、订单模块信息、支付模块信息的数据产生时间顺序,可确定链路追踪ID I2291对应的软件模块及接口的调用顺序为库存模块及库存接口、订单模块及订单接口、支付模块及支付接口。第一服务器1对已排序的软件模块标识及接口标识组进行拼接,生成的数据编号为S201A101S202A102S203A103。For example, from the data generation sequence of inventory module information, order module information, and payment module information, the calling sequence of the software modules and interfaces corresponding to the link tracking ID I2291 can be determined as inventory module and inventory interface, order module and order interface, payment Module and payment interface. The first server 1 splices the sorted software module identifiers and interface identifier groups, and the generated data numbers are S201A101S202A102S203A103.
在本申请的一个实施例中,若同一分组中同一软件模块及接口被第二服务器2多次调用,则需按照数据产生的时间顺序对所述软件模块的模块标识及接口标识进行多次拼接,以生成数据编号。In an embodiment of the present application, if the same software module and interface in the same group are called by the second server 2 multiple times, the module identification and interface identification of the software module need to be spliced multiple times according to the time sequence of data generation To generate the data number.
例如,第一服务器1根据数据产生的时间顺序,对链路追踪ID为I1084对 应的软件模块信息进行排序的结果为:库存模块及库存接口、库存模块及库存接口、订单模块及订单接口、库存接口及库存接口、订单模块及订单接口、支付模块及支付接口,其中库存模块及库存接口被调用三次,订单模块被调用两次,支付模块及支付接口被调用一次,则其对应的数据编号为S201A101S201A101S202A102S201A101S202A102S203A103。For example, the first server 1 sorts the software module information corresponding to the link tracking ID of I1084 according to the time sequence of data generation: inventory module and inventory interface, inventory module and inventory interface, order module and order interface, inventory Interface and inventory interface, order module and order interface, payment module and payment interface. The inventory module and inventory interface are called three times, the order module is called twice, and the payment module and payment interface are called once. The corresponding data number is S201A101S201A101S202A102S201A101S202A102S203A103.
构造步骤:根据各个数据编号构造前缀树。Construction steps: Construct a prefix tree according to each data number.
在本申请的一个实施例中,所述根据各个数据编号构造前缀树包括:In an embodiment of the present application, the constructing a prefix tree according to each data number includes:
B1、将用户请求作为前缀树的根节点;B1. Take the user request as the root node of the prefix tree;
B2、读取一个数据编号,按照从左到右的顺序,将所述数据编号中第一个模块标识及接口标识作为前缀树根节点后的第一层节点,将数据编号中第二个模块标识及接口标识作为前缀树根节后点的第二层节点,依此类推,直至将数据编号中的最后一个模块标识及接口标识作为前缀树的叶子节点;B2. Read a data number, and use the first module identifier and interface identifier in the data number as the first-level node after the root node of the prefix tree in the order from left to right, and the second module in the data number The identifier and interface identifier are used as the second-level nodes after the root node of the prefix tree, and so on, until the last module identifier and interface identifier in the data number are used as the leaf nodes of the prefix tree;
B3、重复执行步骤B2,直至所有的数据编号都添加至所述前缀树中。B3. Repeat step B2 until all data numbers are added to the prefix tree.
例如,链路追踪ID I2291对应的数据编号为S201A101S202A102S203A103,则用户请求为前缀树的根节点,S201A101为前缀树根节点后的第一层节点,S202A102为前缀树根节点后的第二层节点,S203A103为前缀树根节点后的第三层节点即叶子节点。For example, if the data number corresponding to the link tracking ID I2291 is S201A101S202A102S203A103, the user request is the root node of the prefix tree, S201A101 is the first layer node after the prefix tree root node, and S202A102 is the second layer node after the prefix tree root node. S203A103 is the third-level node after the root node of the prefix tree, that is, the leaf node.
在本申请的另一个实施例中,正则表达式集的生成过程包括第三获取步骤、分组步骤及生成步骤。In another embodiment of the present application, the process of generating the regular expression set includes a third obtaining step, a grouping step, and a generating step.
其中,正则表达式集的生成过程中的第三获取步骤、分组步骤与上述前缀树的构造过程中的第三获取步骤及分组步骤相同,此处不再赘述。Wherein, the third obtaining step and grouping step in the process of generating the regular expression set are the same as the third obtaining step and grouping step in the construction process of the prefix tree described above, and will not be repeated here.
生成步骤:按照数据产生的时间顺序对同一组中的多个软件模块标识及接口标识进行排序,对每组已排序的软件模块标识及接口标识进行拼接,按照正则表达式的编写规则为每组软件模块标识及接口标识生成一个对应的正则表达式。Generation steps: sort the multiple software module IDs and interface IDs in the same group according to the time sequence of data generation, splicing each group of sorted software module IDs and interface IDs, according to the regular expression writing rules for each group The software module identification and interface identification generate a corresponding regular expression.
正则表达式是一种文本模式,包括普通字符(例如,a到z之间的字母)和特殊字符(称为“元字符”)。“^”表示一个字符串的开始,“$”表示一个字符串的结束,“{}”表示一个或一串字符重复出现的次数。A regular expression is a text pattern that includes ordinary characters (for example, the letters between a and z) and special characters (called "metacharacters"). "^" means the beginning of a character string, "$" means the end of a character string, and "{}" means the number of times a character or a string of characters repeats.
例如,从库存模块信息、订单模块信息、支付模块信息的数据产生时间顺序,可确定链路追踪ID I2291对应的软件模块及接口的调用顺序为库存模块及库存接口、订单模块及订单接口、支付模块及支付接口。第一服务器1对已排 序的软件模块标识及接口标识组进行拼接,生成的正则表达式为^S201A101S202A102S203A103$。For example, from the data generation sequence of inventory module information, order module information, and payment module information, the calling sequence of the software modules and interfaces corresponding to the link tracking ID I2291 can be determined as inventory module and inventory interface, order module and order interface, payment Module and payment interface. The first server 1 splices the ordered software module IDs and interface ID groups, and the generated regular expression is ^S201A101S202A102S203A103$.
在本申请的一个实施例中,若同一分组中同一软件模块及接口被第二服务器2多次调用,则需按照数据产生的时间顺序对所述软件模块的模块标识及接口标识进行多次拼接,以生成正则表达式。In an embodiment of the present application, if the same software module and interface in the same group are called by the second server 2 multiple times, the module identification and interface identification of the software module need to be spliced multiple times according to the time sequence of data generation To generate regular expressions.
例如,第一服务器1根据数据产生的时间顺序,对链路追踪ID为I1084对应的软件模块信息进行排序的结果为:库存模块及库存接口、库存模块及库存接口、订单模块及订单接口、库存接口及库存接口、订单模块及订单接口、支付模块及支付接口,其中库存模块及库存接口被调用三次,订单模块被调用两次,支付模块及支付接口被调用一次,则对应的正则表达式为^(S201A101){2}S202A102S201A101S202A102S203A103$。For example, the first server 1 sorts the software module information corresponding to the link tracking ID of I1084 according to the time sequence of data generation: inventory module and inventory interface, inventory module and inventory interface, order module and order interface, inventory Interface and inventory interface, order module and order interface, payment module and payment interface, where inventory module and inventory interface are called three times, order module is called twice, payment module and payment interface are called once, the corresponding regular expression is ^(S201A101){2}S202A102S201A101S202A102S203A103$.
在本申请的一个实施例中,所述链路异常识别程序10被所述处理器12执行时还实现如下步骤:In an embodiment of the present application, when the link abnormality recognition program 10 is executed by the processor 12, the following steps are further implemented:
每隔预设时间(例如1个月),根据所述预先确定的数据库中更新的历史链路数据更新所述前缀树。Every preset time (for example, one month), the prefix tree is updated according to the historical link data updated in the predetermined database.
如图4所示,为本申请链路异常识别方法一实施例的流程图,该链路异常识别方法包括步骤S1-S3。As shown in FIG. 4, this is a flowchart of an embodiment of a method for identifying link anomalies according to this application. The method for identifying link anomalies includes steps S1-S3.
S1、实时获取第二服务器2超时未正常响应的异常请求信息,所述异常请求信息包括异常请求对应的链路追踪ID。S1. Acquire in real time abnormal request information that the second server 2 does not respond normally after a timeout, and the abnormal request information includes a link tracking ID corresponding to the abnormal request.
当用户基于客户端3向第二服务器2发起一个请求(例如,搜索服务请求)时,第二服务器2会产生一个随机数,并采用哈希算法对所述随机数进行计算生成一个唯一的链路追踪ID,所述链路追踪ID会被记录在第二服务器2处理所述请求时所调用的各个软件模块信息中。When the user initiates a request (for example, a search service request) to the second server 2 based on the client 3, the second server 2 generates a random number, and uses a hash algorithm to calculate the random number to generate a unique chain Path tracking ID, the link tracking ID will be recorded in the information of each software module called when the second server 2 processes the request.
当第二服务器2超过预设时间阈值(例如20秒)尚未将某一请求对应的结果数据回传给客户端3时,则所述请求为超时未正常响应的异常请求。When the second server 2 has exceeded the preset time threshold (for example, 20 seconds) and has not returned the result data corresponding to a certain request to the client 3, the request is an abnormal request that has not responded normally after a timeout.
S2、根据所述异常请求对应的链路追踪ID获取第二服务器2处理所述异常请求时调用的一个或多个业务系统的多个软件模块信息,所述软件模块信息包括软件模块标识及接口标识、数据产生的时间及链路追踪ID。S2. Acquire multiple software module information of one or more business systems called by the second server 2 when processing the abnormal request according to the link tracking ID corresponding to the abnormal request, where the software module information includes a software module identifier and an interface Identification, time of data generation, and link tracking ID.
例如,第二服务器2处理某个搜索服务请求时调用了查询模块、清洗模块、汇总模块,第一服务器1通过搜索服务请求对应的链路追踪ID I1082获取到所述查询模块、清洗模块和汇总模块的信息,其查询模块信息包括:查询模块标 识S101、查询接口标识A001、链路追踪ID I1082、查询模块创建查询接口的时间点2019年6月4日12:05分02秒;清洗模块信息包括:清洗模块标识S102、清洗接口标识A002、链路追踪ID I1082、清洗模块创建清洗接口的时间点2019年6月4日12:05分03秒;汇总模块信息包括:汇总模块标识S103、汇总接口标识A003、链路追踪ID I1082、汇总模块创建汇总接口的时间点2019年6月4日12:05分05秒。For example, the second server 2 calls the query module, cleaning module, and summary module when processing a search service request, and the first server 1 obtains the query module, cleaning module, and summary module through the link tracking ID corresponding to the search service request I1082 Module information, the query module information includes: query module identifier S101, query interface identifier A001, link tracking ID I1082, the time point when the query module created the query interface June 4, 2019, 12:05 minutes and 02 seconds; cleaning module information Including: cleaning module identification S102, cleaning interface identification A002, link tracking ID I1082, the time point when the cleaning module created the cleaning interface June 4, 2019, 12:05 minutes and 03 seconds; summary module information includes: summary module identification S103, summary Interface identification A003, link tracking ID I1082, and the time point when the summary module created the summary interface is 12:05:05 on June 4, 2019.
S3、根据第一预设规则对所述多个软件模块标识及接口标识进行排序,将排序后的软件模块标识及接口标识进行拼接,生成一个数据编号,将所述数据编号与预先构造好的前缀树进行比对,以识别出异常的软件模块标识及接口标识。S3. Sort the multiple software module identifiers and interface identifiers according to the first preset rule, splicing the sorted software module identifiers and interface identifiers to generate a data number, and combine the data number with a pre-constructed data number The prefix tree is compared to identify abnormal software module identifiers and interface identifiers.
在本申请的一个实施例中,所述第一预设规则为按照数据产生的时间顺序进行排序。In an embodiment of the present application, the first preset rule is to sort according to the time sequence of data generation.
各个软件模块信息的数据产生的时间顺序即为各个软件模块及接口被第二服务器2调用的顺序。例如,根据查询模块信息、清洗模块信息、汇总模块信息的数据产生的时间顺序排序,可确认第二服务器2处理搜索服务请求时的调用顺序为:查询模块及查询接口、清洗模块及清洗接口、汇总模块及汇总接口。第一服务器对查询模块标识及查询接口标识、清洗模块标识及清洗接口标识、汇总模块标识及汇总接口标识进行拼接后,所生成的数据编号为S101A001S102A002S103A003。The time sequence in which the data of each software module information is generated is the sequence in which each software module and interface is called by the second server 2. For example, according to the chronological order of data generation of query module information, cleaning module information, and summary module information, it can be confirmed that the calling sequence of the second server 2 when processing the search service request is: query module and query interface, cleaning module and cleaning interface, Summary module and summary interface. After the first server splicing the query module identifier and query interface identifier, cleaning module identifier and cleaning interface identifier, summary module identifier and summary interface identifier, the generated data number is S101A001S102A002S103A003.
如图3所示,为本申请预先构造好的前缀树一实施例的示意图。As shown in FIG. 3, it is a schematic diagram of an embodiment of a prefix tree constructed in advance in this application.
前缀树又名字典树,是一种多路树形结构,主用利用字符串的公共前缀来提升查询速度和效率。The prefix tree, also known as the dictionary tree, is a multi-way tree structure. It mainly uses the common prefix of the string to improve the query speed and efficiency.
将数据编号S101A001S102A002S103A003与图3所示的前缀树进行对比,会发现所述数据编号与所述前缀树的左侧第一条分支对应,数据编号仅包含所述分支根节点后的前三个节点,缺少第四个和第五个节点,因前缀树是根据软件模块及接口被第二服务器2调用的顺序进行构造的,故可确定第二服务器2在调用第四个节点S104A004对应的软件模块及接口时出现了异常。Comparing the data number S101A001S102A002S103A003 with the prefix tree shown in Figure 3, you will find that the data number corresponds to the first branch on the left side of the prefix tree, and the data number only includes the first three nodes after the branch root node , The fourth and fifth nodes are missing. Because the prefix tree is constructed according to the order in which the software modules and interfaces are called by the second server 2, it can be determined that the second server 2 is calling the software module corresponding to the fourth node S104A004 An exception occurred during the interface.
在本申请的另一个实施例中,识别步骤被替换为:In another embodiment of the present application, the identification step is replaced with:
根据第一预设规则对所述多个软件模块标识及接口标识进行排序,将排序后的软件模块及接口标识进行拼接,生成一个数据编号,将所述数据编号与预先确定的正则表达式集进行比对,以识别出异常的软件模块标识及接口标识。Sort the multiple software module identifiers and interface identifiers according to the first preset rule, splice the sorted software modules and interface identifiers to generate a data number, and combine the data number with a predetermined regular expression set Make comparisons to identify abnormal software module IDs and interface IDs.
例如,根据查询模块信息、清洗模块信息、汇总模块信息的数据产生的时间顺序排序,可确认第二服务器2处理搜索服务请求时的调用顺序为:查询模块及查询接口、清洗模块及清洗接口、汇总模块及汇总接口。第一服务器1对查询模块标识及查询接口标识、清洗模块标识及清洗接口标识、汇总模块标识及汇总接口标识进行拼接后,所生成的数据编号为S101A001S102A002S103A003。For example, according to the chronological order of data generation of query module information, cleaning module information, and summary module information, it can be confirmed that the calling sequence of the second server 2 when processing the search service request is: query module and query interface, cleaning module and cleaning interface, Summary module and summary interface. After the first server 1 splices the query module identification and the query interface identification, the cleaning module identification and the cleaning interface identification, the summary module identification and the summary interface identification, the generated data number is S101A001S102A002S103A003.
正则表达式是对字符串操作的一种逻辑公式,就是用事先定义好的一些特定字符、及这些特定字符的组合,组成一个“规则字符串”,这个“规则字符串”用来表达对字符串的一种过滤逻辑。正则表达式是一种文本模式,该模式描述在搜索文本时要匹配的一个或多个字符串。Regular expression is a kind of logical formula for string manipulation. It uses some pre-defined specific characters and the combination of these specific characters to form a "rule string". This "rule string" is used to express the pair of characters. A kind of filtering logic for strings. A regular expression is a text pattern that describes one or more strings to be matched when searching for text.
以下为预先确定的正则表达式集的一部分:The following is part of a predetermined set of regular expressions:
^S101A001S102A002S103A003S104A004S104A004$^S101A001S102A002S103A003S104A004S104A004$
^S201A101S202A102S203A103$^S201A101S202A102S203A103$
^(S201A101){2}S202A102S201A101S202A102S203A103$^(S201A101){2}S202A102S201A101S202A102S203A103$
……...
将数据编号S101A001S102A002S103A003与正则表达式集进行比对,发现数据编号与正则表达式集中第一个正则表达式对应,缺少的字符串为“S104A004S105A005”,因为正则表达式是根据各个软件模块标识及接口标识的调用顺序来生成的,故可确定第二服务器2在调用S104A104对应的软件模块及接口时出现了异常。Comparing the data number S101A001S102A002S103A003 with the regular expression set, it is found that the data number corresponds to the first regular expression in the regular expression set. The missing string is "S104A004S105A005", because the regular expression is based on the identification and interface of each software module The identification is generated in the calling sequence, so it can be determined that the second server 2 is abnormal when calling the software module and interface corresponding to S104A104.
在本申请的一个实施例中,所述前缀树的构造过程包括:In an embodiment of the present application, the construction process of the prefix tree includes:
第三获取步骤:获取预先确定的数据库中的历史链路数据,所述历史链路数据包括第二服务器2处理用户请求时调用的所述一个或多个业务系统的多个软件模块信息,所述软件模块信息包括软件模块标识及接口标识、链路追踪ID及数据产生的时间。The third acquiring step: acquiring historical link data in a predetermined database, where the historical link data includes multiple software module information of the one or more business systems called when the second server 2 processes the user request, so The software module information includes software module identification and interface identification, link tracking ID and data generation time.
分组步骤:按照第二预设规则对所述多个软件模块标识及接口标识进行分组。Grouping step: grouping the plurality of software module identifiers and interface identifiers according to a second preset rule.
在本申请的一个实施例中,所述第二预设规则为根据链路追踪ID对各个软件模块标识及接口标识进行分组,将包含同一链路追踪ID的软件模块标识及接口标识归为同一个分组,将包含不同链路追踪ID的软件模块标识及接口标识归为不同的分组。In an embodiment of the present application, the second preset rule is to group each software module identifier and interface identifier according to the link tracking ID, and group the software module identifiers and interface identifiers that contain the same link tracking ID into the same A group, the software module identifiers and interface identifiers containing different link tracking IDs are grouped into different groups.
例如,历史链路数据中的库存模块信息(库存模块标识S201、库存接口标识A101、链路追踪ID I2291、库存模块创建库存接口的时间点2018年12月1日12:05分02秒)、订单模块信息(订单模块标识S202、订单接口标识A102、链路追踪ID I2291、订单模块创建订单接口的时间点2018年12月1日12:05分03秒)、支付模块信息(支付模块标识S203、支付接口标识A103、链路追踪ID I2291、库存模块创建库存接口的时间点2018年12月1日12:05分05秒)包含同一链路追踪ID I2291,故库存模块标识及接口标识、订单模块标识及接口标识、支付模块标识及接口标识被归为同一个分组。若清洗模块信息的链路追踪ID为I5043,则所述库存模块标识及接口标识与所述清洗模块标识及接口标识被归为不同的分组。For example, the inventory module information in the historical link data (inventory module identification S201, inventory interface identification A101, link tracking ID I2291, the time point when the inventory module created the inventory interface December 1, 2018 12:05 minutes and 02 seconds), Order module information (order module identification S202, order interface identification A102, link tracking ID I2291, the time point when the order module created the order interface December 1, 2018 12:05 minutes and 03 seconds), payment module information (payment module identification S203 , Payment interface identification A103, link tracking ID I2291, the time point when the inventory module created the inventory interface December 1, 2018 12:05:05) contains the same link tracking ID I2291, so the inventory module identification and interface identification, order Module identification and interface identification, payment module identification and interface identification are grouped into the same group. If the link tracking ID of the cleaning module information is 15043, the inventory module identification and interface identification and the cleaning module identification and interface identification are classified into different groups.
编号步骤:按照所述第一预设规则对同一组中的多个软件模块标识及接口标识进行排序,对每组已排序的软件模块标识及接口标识进行拼接,为每组软件模块标识及接口标识生成一个对应的数据编号。Numbering step: sort the multiple software module identifiers and interface identifiers in the same group according to the first preset rule, and splice each group of sorted software module identifiers and interface identifiers to provide each group of software module identifiers and interfaces The identification generates a corresponding data number.
例如,从库存模块信息、订单模块信息、支付模块信息的数据产生时间顺序,可确定链路追踪ID I2291对应的软件模块及接口的调用顺序为库存模块及库存接口、订单模块及订单接口、支付模块及支付接口。第一服务器1对已排序的软件模块标识及接口标识组进行拼接,生成的数据编号为S201A101S202A102S203A103。For example, from the data generation sequence of inventory module information, order module information, and payment module information, the calling sequence of the software modules and interfaces corresponding to the link tracking ID I2291 can be determined as inventory module and inventory interface, order module and order interface, payment Module and payment interface. The first server 1 splices the sorted software module identifiers and interface identifier groups, and the generated data numbers are S201A101S202A102S203A103.
在本申请的一个实施例中,若同一分组中同一软件模块及接口被第二服务器2多次调用,则需按照数据产生的时间顺序对所述软件模块的模块标识及接口标识进行多次拼接,以生成数据编号。In an embodiment of the present application, if the same software module and interface in the same group are called by the second server 2 multiple times, the module identification and interface identification of the software module need to be spliced multiple times according to the time sequence of data generation To generate the data number.
例如,第一服务器1根据数据产生的时间顺序,对链路追踪ID为I1084对应的软件模块信息进行排序的结果为:库存模块及库存接口、库存模块及库存接口、订单模块及订单接口、库存接口及库存接口、订单模块及订单接口、支付模块及支付接口,其中库存模块及库存接口被调用三次,订单模块被调用两次,支付模块及支付接口被调用一次,则其对应的数据编号为S201A101S201A101S202A102S201A101S202A102S203A103。For example, the first server 1 sorts the software module information corresponding to the link tracking ID of I1084 according to the time sequence of data generation: inventory module and inventory interface, inventory module and inventory interface, order module and order interface, inventory Interface and inventory interface, order module and order interface, payment module and payment interface. The inventory module and inventory interface are called three times, the order module is called twice, and the payment module and payment interface are called once. The corresponding data number is S201A101S201A101S202A102S201A101S202A102S203A103.
构造步骤:根据各个数据编号构造前缀树。Construction steps: Construct a prefix tree according to each data number.
在本申请的一个实施例中,所述根据各个数据编号构造前缀树包括:In an embodiment of the present application, the constructing a prefix tree according to each data number includes:
B1、将用户请求作为前缀树的根节点;B1. Take the user request as the root node of the prefix tree;
B2、读取一个数据编号,按照从左到右的顺序,将所述数据编号中第一个 模块标识及接口标识作为前缀树根节点后的第一层节点,将数据编号中第二个模块标识及接口标识作为前缀树根节后点的第二层节点,依此类推,直至将数据编号中的最后一个模块标识及接口标识作为前缀树的叶子节点;B2. Read a data number, and use the first module identifier and interface identifier in the data number as the first-level node after the root node of the prefix tree in the order from left to right, and the second module in the data number The identifier and interface identifier are used as the second-level nodes after the root node of the prefix tree, and so on, until the last module identifier and interface identifier in the data number are used as the leaf nodes of the prefix tree;
B3、重复执行步骤B2,直至所有的数据编号都添加至所述前缀树中。B3. Repeat step B2 until all data numbers are added to the prefix tree.
例如,链路追踪ID I2291对应的数据编号为S201A101S202A102S203A103,则用户请求为前缀树的根节点,S201A101为前缀树根节点后的第一层节点,S202A102为前缀树根节点后的第二层节点,S203A103为前缀树根节点后的第三层节点即叶子节点。For example, if the data number corresponding to the link tracking ID I2291 is S201A101S202A102S203A103, the user request is the root node of the prefix tree, S201A101 is the first layer node after the prefix tree root node, and S202A102 is the second layer node after the prefix tree root node. S203A103 is the third-level node after the root node of the prefix tree, that is, the leaf node.
在本申请的另一个实施例中,正则表达式集的生成过程包括第三获取步骤、分组步骤及生成步骤。In another embodiment of the present application, the process of generating the regular expression set includes a third obtaining step, a grouping step, and a generating step.
其中,正则表达式集的生成过程中的第三获取步骤、分组步骤与上述前缀树的构造过程中的第三获取步骤及分组步骤相同,此处不再赘述。Wherein, the third obtaining step and grouping step in the process of generating the regular expression set are the same as the third obtaining step and grouping step in the construction process of the prefix tree described above, and will not be repeated here.
生成步骤:按照数据产生的时间顺序对同一组中的多个软件模块标识及接口标识进行排序,对每组已排序的软件模块标识及接口标识进行拼接,按照正则表达式的编写规则为每组软件模块标识及接口标识生成一个对应的正则表达式。Generation steps: sort the multiple software module IDs and interface IDs in the same group according to the time sequence of data generation, splicing each group of sorted software module IDs and interface IDs, according to the regular expression writing rules for each group The software module identification and interface identification generate a corresponding regular expression.
正则表达式是一种文本模式,包括普通字符(例如,a到z之间的字母)和特殊字符(称为“元字符”)。“^”表示一个字符串的开始,“$”表示一个字符串的结束,“{}”表示一个或一串字符重复出现的次数。A regular expression is a text pattern that includes ordinary characters (for example, the letters between a and z) and special characters (called "metacharacters"). "^" means the beginning of a character string, "$" means the end of a character string, and "{}" means the number of times a character or a string of characters repeats.
例如,从库存模块信息、订单模块信息、支付模块信息的数据产生时间顺序,可确定链路追踪ID I2291对应的软件模块及接口的调用顺序为库存模块及库存接口、订单模块及订单接口、支付模块及支付接口。第一服务器1对已排序的软件模块标识及接口标识组进行拼接,生成的正则表达式为^S201A101S202A102S203A103$。For example, from the data generation sequence of inventory module information, order module information, and payment module information, the calling sequence of the software modules and interfaces corresponding to the link tracking ID I2291 can be determined as inventory module and inventory interface, order module and order interface, payment Module and payment interface. The first server 1 splices the sorted software module identifiers and interface identifier groups, and the generated regular expression is ^S201A101S202A102S203A103$.
在本申请的一个实施例中,若同一分组中同一软件模块及接口被第二服务器2多次调用,则需按照数据产生的时间顺序对所述软件模块的模块标识及接口标识进行多次拼接,以生成正则表达式。In an embodiment of the present application, if the same software module and interface in the same group are called by the second server 2 multiple times, the module identification and interface identification of the software module need to be spliced multiple times according to the time sequence of data generation To generate regular expressions.
例如,第一服务器1根据数据产生的时间顺序,对链路追踪ID为I1084对应的软件模块信息进行排序的结果为:库存模块及库存接口、库存模块及库存接口、订单模块及订单接口、库存接口及库存接口、订单模块及订单接口、支付模块及支付接口,其中库存模块及库存接口被调用三次,订单模块被调用两 次,支付模块及支付接口被调用一次,则对应的正则表达式为^(S201A101){2}S202A102S201A101S202A102S203A103$。For example, the first server 1 sorts the software module information corresponding to the link tracking ID of I1084 according to the time sequence of data generation: inventory module and inventory interface, inventory module and inventory interface, order module and order interface, inventory Interface and inventory interface, order module and order interface, payment module and payment interface, where inventory module and inventory interface are called three times, order module is called twice, payment module and payment interface are called once, the corresponding regular expression is ^(S201A101){2}S202A102S201A101S202A102S203A103$.
在本申请的一个实施例中,所述链路异常识别程序10被所述处理器12执行时还实现如下步骤:In an embodiment of the present application, when the link abnormality recognition program 10 is executed by the processor 12, the following steps are further implemented:
每隔预设时间(例如1个月),根据所述预先确定的数据库中更新的历史链路数据更新所述前缀树。Every preset time (for example, one month), the prefix tree is updated according to the historical link data updated in the predetermined database.
此外,本申请实施例还提出一种计算机可读存储介质,计算机可读存储介质可以是硬盘、多媒体卡、SD卡、闪存卡、SMC、只读存储器(ROM)、可擦除可编程只读存储器(EPROM)、便携式紧致盘只读存储器(CD-ROM)、USB存储器等中的任意一种或者几种的任意组合。计算机可读存储介质中包括链路异常识别程序10,本申请之计算机可读存储介质的具体实施方式与上述链路异常识别方法以及电子装置的具体实施方式大致相同,在此不再赘述。In addition, the embodiment of the present application also proposes a computer-readable storage medium. The computer-readable storage medium may be a hard disk, a multimedia card, an SD card, a flash memory card, an SMC, a read-only memory (ROM), an erasable programmable read-only Any one or any combination of memory (EPROM), portable compact disk read-only memory (CD-ROM), USB memory, etc. The computer-readable storage medium includes the link abnormality recognition program 10. The specific implementation of the computer-readable storage medium of this application is substantially the same as the specific implementation of the above-mentioned link abnormality recognition method and the electronic device, and will not be repeated here.
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the foregoing embodiments of the present application are only for description, and do not represent the advantages and disadvantages of the embodiments.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。Through the description of the above implementation manners, those skilled in the art can clearly understand that the above-mentioned embodiment method can be implemented by means of software plus the necessary general hardware platform, of course, it can also be implemented by hardware, but in many cases the former is better.的实施方式。 Based on this understanding, the technical solution of this application essentially or the part that contributes to the existing technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium (such as ROM/RAM, magnetic disk, The optical disc) includes several instructions to enable a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the method described in each embodiment of the present application.
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。The above are only the preferred embodiments of the application, and do not limit the scope of the patent for this application. Any equivalent structure or equivalent process transformation made using the content of the description and drawings of the application, or directly or indirectly applied to other related technical fields , The same reason is included in the scope of patent protection of this application.

Claims (20)

  1. 一种链路异常识别方法,应用于第一服务器,该第一服务器通信连接第二服务器,其特征在于,该方法包括:A method for identifying link abnormalities, applied to a first server, and the first server is communicatively connected to a second server, characterized in that the method includes:
    第一获取步骤:实时获取第二服务器超时未正常响应的异常请求信息,所述异常请求信息包括异常请求对应的链路追踪ID;The first obtaining step: obtaining, in real time, abnormal request information that the second server fails to respond normally over timeout, and the abnormal request information includes the link tracking ID corresponding to the abnormal request;
    第二获取步骤:根据所述异常请求对应的链路追踪ID获取第二服务器处理所述异常请求时调用的一个或多个业务系统的多个软件模块信息,所述软件模块信息包括软件模块标识及接口标识、数据产生的时间及链路追踪ID;The second obtaining step: obtaining multiple software module information of one or more business systems invoked by the second server when processing the abnormal request according to the link tracking ID corresponding to the abnormal request, where the software module information includes the software module identifier And interface identification, data generation time and link tracking ID;
    识别步骤:根据第一预设规则对所述多个软件模块标识及接口标识进行排序,将排序后的软件模块标识及接口标识进行拼接,生成一个数据编号,将所述数据编号与预先构造好的前缀树进行比对,以识别出异常的软件模块标识及接口标识。Recognition step: sort the multiple software module identifiers and interface identifiers according to the first preset rule, splice the sorted software module identifiers and interface identifiers to generate a data number, and combine the data number with the pre-built The prefix tree is compared to identify abnormal software module identifiers and interface identifiers.
  2. 如权利要求1所述的链路异常识别方法,其特征在于,所述识别步骤被替换为:The method for identifying link anomalies according to claim 1, wherein the identifying step is replaced with:
    根据第一预设规则对所述多个软件模块标识及接口标识进行排序,将排序后的软件模块及接口标识进行拼接,生成一个数据编号,将所述数据编号与预先确定的正则表达式集进行比对,以识别出异常的软件模块标识及接口标识。Sort the multiple software module identifiers and interface identifiers according to the first preset rule, splice the sorted software modules and interface identifiers to generate a data number, and combine the data number with a predetermined regular expression set Make comparisons to identify abnormal software module IDs and interface IDs.
  3. 如权利要求1所述的链路异常识别方法,其特征在于,所述前缀树的构造过程包括:The method for identifying link anomalies according to claim 1, wherein the process of constructing the prefix tree comprises:
    第三获取步骤:获取预先确定的数据库中的历史链路数据,所述历史链路数据包括第二服务器处理用户请求时调用的所述一个或多个业务系统的多个软件模块信息,所述软件模块信息包括软件模块标识及接口标识、链路追踪ID及数据产生的时间;The third obtaining step: obtaining historical link data in a predetermined database, where the historical link data includes multiple software module information of the one or more business systems invoked when the second server processes a user request, and The software module information includes the software module identification and interface identification, link tracking ID and the time of data generation;
    分组步骤:按照第二预设规则对所述多个软件模块标识及接口标识进行分组;Grouping step: grouping the plurality of software module identifiers and interface identifiers according to a second preset rule;
    编号步骤:按照所述第一预设规则对同一组中的多个软件模块标识及接口标识进行排序,对每组已排序的软件模块标识及接口标识进行拼接,为每组软件模块标识及接口标识生成一个对应的数据编号;Numbering step: sort the multiple software module identifiers and interface identifiers in the same group according to the first preset rule, and splice each group of sorted software module identifiers and interface identifiers to provide each group of software module identifiers and interfaces The identification generates a corresponding data number;
    构造步骤:根据各个数据编号构造前缀树。Construction steps: Construct a prefix tree according to each data number.
  4. 如权利要求3所述的链路异常识别方法,其特征在于,所述根据各个数 据编号构造前缀树包括:The method for link anomaly identification according to claim 3, wherein said constructing a prefix tree according to each data number comprises:
    B1、将用户请求作为前缀树的根节点;B1. Take the user request as the root node of the prefix tree;
    B2、读取一个数据编号,按照从左到右的顺序,将所述数据编号中第一个模块标识及接口标识作为前缀树根节点后的第一层节点,将数据编号中第二个模块标识及接口标识作为前缀树根节点后的第二层节点,依此类推,直至将数据编号中的最后一个模块标识及接口标识作为前缀树的叶子节点;B2. Read a data number, and use the first module identifier and interface identifier in the data number as the first-level node after the root node of the prefix tree in the order from left to right, and the second module in the data number The identifier and interface identifier are used as the second-level nodes after the root node of the prefix tree, and so on, until the last module identifier and interface identifier in the data number are used as the leaf nodes of the prefix tree;
    B3、重复执行步骤B2,直至所有的数据编号都添加至所述前缀树中。B3. Repeat step B2 until all data numbers are added to the prefix tree.
  5. 如权利要求1或2或3所述的链路异常识别方法,其特征在于,所述第一预设规则为按照数据产生的时间顺序进行排序。The method for identifying link abnormalities according to claim 1 or 2 or 3, wherein the first preset rule is to sort according to the time sequence of data generation.
  6. 如权利要求3所述的链路异常识别方法,其特征在于,所述第二预设规则为根据链路追踪ID对各个软件模块标识及接口标识进行分组,将包括同一链路追踪ID的软件模块标识及接口标识归为同一个分组,将包含不同链路追踪ID的软件模块标识及接口标识归为不同的分组。The method for identifying link abnormalities according to claim 3, wherein the second preset rule is to group software module identifiers and interface identifiers according to the link tracking ID, and group software that includes the same link tracking ID. The module identifiers and interface identifiers are grouped into the same group, and the software module identifiers and interface identifiers containing different link tracking IDs are grouped into different groups.
  7. 如权利要求3所述的链路异常识别方法,其特征在于,该方法还包括:The method for identifying link anomalies according to claim 3, wherein the method further comprises:
    每隔预设时间,根据所述预先确定的数据库中更新的历史链路数据更新所述前缀树。Every preset time, the prefix tree is updated according to the historical link data updated in the predetermined database.
  8. 一种第一服务器,该第一服务器通信连接第二服务器,其特征在于,该第一服务器包括:存储器、处理器,所述存储器上存储有可在所述处理器上运行的链路异常识别程序,所述链路异常识别程序被所述处理器执行时实现如下步骤:A first server that is communicatively connected to a second server, wherein the first server includes: a memory and a processor, and the memory stores a link abnormality identification that can run on the processor A program, when the link abnormality recognition program is executed by the processor, the following steps are implemented:
    第一获取步骤:实时获取第二服务器超时未正常响应的异常请求信息,所述异常请求信息包括异常请求对应的链路追踪ID;The first obtaining step: obtaining, in real time, abnormal request information that the second server fails to respond normally over timeout, and the abnormal request information includes the link tracking ID corresponding to the abnormal request;
    第二获取步骤:根据所述异常请求对应的链路追踪ID获取第二服务器处理所述异常请求时调用的一个或多个业务系统的多个软件模块信息,所述软件模块信息包括软件模块标识及接口标识、数据产生的时间及链路追踪ID;The second obtaining step: obtaining multiple software module information of one or more business systems invoked by the second server when processing the abnormal request according to the link tracking ID corresponding to the abnormal request, where the software module information includes the software module identifier And interface identification, data generation time and link tracking ID;
    识别步骤:根据第一预设规则对所述多个软件模块标识及接口标识进行排序,将排序后的软件模块标识及接口标识进行拼接,生成一个数据编号,将所述数据编号与预先构造好的前缀树进行比对,以识别出异常的软件模块标识及接口标识。Recognition step: sort the multiple software module identifiers and interface identifiers according to the first preset rule, splice the sorted software module identifiers and interface identifiers to generate a data number, and combine the data number with the pre-built The prefix tree is compared to identify abnormal software module identifiers and interface identifiers.
  9. 如权利要求8所述的第一服务器,其特征在于,所述识别步骤被替换为:The first server according to claim 8, wherein the identifying step is replaced with:
    根据第一预设规则对所述多个软件模块标识及接口标识进行排序,将排序 后的软件模块及接口标识进行拼接,生成一个数据编号,将所述数据编号与预先确定的正则表达式集进行比对,以识别出异常的软件模块标识及接口标识。Sort the multiple software module identifiers and interface identifiers according to the first preset rule, splice the sorted software modules and interface identifiers to generate a data number, and combine the data number with a predetermined regular expression set Make comparisons to identify abnormal software module IDs and interface IDs.
  10. 如权利要求8所述的第一服务器,其特征在于,所述前缀树的构造过程包括:The first server according to claim 8, wherein the construction process of the prefix tree comprises:
    第三获取步骤:获取预先确定的数据库中的历史链路数据,所述历史链路数据包括第二服务器处理用户请求时调用的所述一个或多个业务系统的多个软件模块信息,所述软件模块信息包括软件模块标识及接口标识、链路追踪ID及数据产生的时间;The third obtaining step: obtaining historical link data in a predetermined database, where the historical link data includes multiple software module information of the one or more business systems invoked when the second server processes a user request, and The software module information includes the software module identification and interface identification, link tracking ID and the time of data generation;
    分组步骤:按照第二预设规则对所述多个软件模块标识及接口标识进行分组;Grouping step: grouping the plurality of software module identifiers and interface identifiers according to a second preset rule;
    编号步骤:按照所述第一预设规则对同一组中的多个软件模块标识及接口标识进行排序,对每组已排序的软件模块标识及接口标识进行拼接,为每组软件模块标识及接口标识生成一个对应的数据编号;Numbering step: sort the multiple software module identifiers and interface identifiers in the same group according to the first preset rule, and splice each group of sorted software module identifiers and interface identifiers to provide each group of software module identifiers and interfaces The identification generates a corresponding data number;
    构造步骤:根据各个数据编号构造前缀树。Construction steps: Construct a prefix tree according to each data number.
  11. 如权利要求10所述的第一服务器,其特征在于,所述根据各个数据编号构造前缀树包括:The first server according to claim 10, wherein said constructing a prefix tree according to each data number comprises:
    B1、将用户请求作为前缀树的根节点;B1. Take the user request as the root node of the prefix tree;
    B2、读取一个数据编号,按照从左到右的顺序,将所述数据编号中第一个模块标识及接口标识作为前缀树根节点后的第一层节点,将数据编号中第二个模块标识及接口标识作为前缀树根节点后的第二层节点,依此类推,直至将数据编号中的最后一个模块标识及接口标识作为前缀树的叶子节点;B2. Read a data number, and use the first module identifier and interface identifier in the data number as the first-level node after the root node of the prefix tree in the order from left to right, and the second module in the data number The identifier and interface identifier are used as the second-level nodes after the root node of the prefix tree, and so on, until the last module identifier and interface identifier in the data number are used as the leaf nodes of the prefix tree;
    B3、重复执行步骤B2,直至所有的数据编号都添加至所述前缀树中。B3. Repeat step B2 until all data numbers are added to the prefix tree.
  12. 如权利要求8或9或10所述的第一服务器,其特征在于,所述第一预设规则为按照数据产生的时间顺序进行排序。The first server according to claim 8 or 9 or 10, wherein the first preset rule is to sort according to the time sequence of data generation.
  13. 如权利要求10所述的第一服务器,其特征在于,所述第二预设规则为根据链路追踪ID对各个软件模块标识及接口标识进行分组,将包括同一链路追踪ID的软件模块标识及接口标识归为同一个分组,将包含不同链路追踪ID的软件模块标识及接口标识归为不同的分组。The first server according to claim 10, wherein the second preset rule is to group each software module ID and interface ID according to the link tracking ID, and group the software module IDs that include the same link tracking ID And interface identifiers are grouped into the same group, and software module identifiers and interface identifiers containing different link tracking IDs are grouped into different groups.
  14. 如权利要求10所述的第一服务器,其特征在于,所述链路异常识别程序被所述处理器执行时还实现如下步骤:11. The first server according to claim 10, wherein the following steps are further implemented when the link abnormality recognition program is executed by the processor:
    每隔预设时间,根据所述预先确定的数据库中更新的历史链路数据更新所 述前缀树。Every preset time, the prefix tree is updated according to the updated historical link data in the predetermined database.
  15. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有链路异常识别程序,所述链路异常识别程序可被一个或者多个处理器执行,以实现如下步骤:A computer-readable storage medium, characterized in that a link abnormality recognition program is stored on the computer-readable storage medium, and the link abnormality recognition program can be executed by one or more processors to implement the following steps:
    第一获取步骤:实时获取第二服务器超时未正常响应的异常请求信息,所述异常请求信息包括异常请求对应的链路追踪ID;The first obtaining step: obtaining, in real time, abnormal request information that the second server fails to respond normally over timeout, and the abnormal request information includes the link tracking ID corresponding to the abnormal request;
    第二获取步骤:根据所述异常请求对应的链路追踪ID获取第二服务器处理所述异常请求时调用的一个或多个业务系统的多个软件模块信息,所述软件模块信息包括软件模块标识及接口标识、数据产生的时间及链路追踪ID;The second obtaining step: obtaining multiple software module information of one or more business systems invoked by the second server when processing the abnormal request according to the link tracking ID corresponding to the abnormal request, where the software module information includes the software module identifier And interface identification, data generation time and link tracking ID;
    识别步骤:根据第一预设规则对所述多个软件模块标识及接口标识进行排序,将排序后的软件模块标识及接口标识进行拼接,生成一个数据编号,将所述数据编号与预先构造好的前缀树进行比对,以识别出异常的软件模块标识及接口标识。Recognition step: sort the multiple software module identifiers and interface identifiers according to the first preset rule, splice the sorted software module identifiers and interface identifiers to generate a data number, and combine the data number with the pre-built The prefix tree is compared to identify abnormal software module identifiers and interface identifiers.
  16. 如权利要求15所述的计算机可读存储介质,其特征在于,所述识别步骤被替换为:15. The computer-readable storage medium of claim 15, wherein the identifying step is replaced with:
    根据第一预设规则对所述多个软件模块标识及接口标识进行排序,将排序后的软件模块及接口标识进行拼接,生成一个数据编号,将所述数据编号与预先确定的正则表达式集进行比对,以识别出异常的软件模块标识及接口标识。Sort the multiple software module identifiers and interface identifiers according to the first preset rule, splice the sorted software modules and interface identifiers to generate a data number, and combine the data number with a predetermined regular expression set Make comparisons to identify abnormal software module IDs and interface IDs.
  17. 如权利要求15所述的计算机可读存储介质,其特征在于,所述前缀树的构造过程包括:15. The computer-readable storage medium of claim 15, wherein the construction process of the prefix tree comprises:
    第三获取步骤:获取预先确定的数据库中的历史链路数据,所述历史链路数据包括第二服务器处理用户请求时调用的所述一个或多个业务系统的多个软件模块信息,所述软件模块信息包括软件模块标识及接口标识、链路追踪ID及数据产生的时间;The third obtaining step: obtaining historical link data in a predetermined database, where the historical link data includes multiple software module information of the one or more business systems invoked when the second server processes a user request, and The software module information includes the software module identification and interface identification, link tracking ID and the time of data generation;
    分组步骤:按照第二预设规则对所述多个软件模块标识及接口标识进行分组;Grouping step: grouping the plurality of software module identifiers and interface identifiers according to a second preset rule;
    编号步骤:按照所述第一预设规则对同一组中的多个软件模块标识及接口标识进行排序,对每组已排序的软件模块标识及接口标识进行拼接,为每组软件模块标识及接口标识生成一个对应的数据编号;Numbering step: sort the multiple software module identifiers and interface identifiers in the same group according to the first preset rule, and splice each group of sorted software module identifiers and interface identifiers to provide each group of software module identifiers and interfaces The identification generates a corresponding data number;
    构造步骤:根据各个数据编号构造前缀树。Construction steps: Construct a prefix tree according to each data number.
  18. 如权利要求17所述的计算机可读存储介质,其特征在于,所述根据各 个数据编号构造前缀树包括:The computer-readable storage medium of claim 17, wherein the constructing a prefix tree according to each data number comprises:
    B1、将用户请求作为前缀树的根节点;B1. Take the user request as the root node of the prefix tree;
    B2、读取一个数据编号,按照从左到右的顺序,将所述数据编号中第一个模块标识及接口标识作为前缀树根节点后的第一层节点,将数据编号中第二个模块标识及接口标识作为前缀树根节点后的第二层节点,依此类推,直至将数据编号中的最后一个模块标识及接口标识作为前缀树的叶子节点;B2. Read a data number, and use the first module identifier and interface identifier in the data number as the first-level node after the root node of the prefix tree in the order from left to right, and the second module in the data number The identifier and interface identifier are used as the second-level nodes after the root node of the prefix tree, and so on, until the last module identifier and interface identifier in the data number are used as the leaf nodes of the prefix tree;
    B3、重复执行步骤B2,直至所有的数据编号都添加至所述前缀树中。B3. Repeat step B2 until all data numbers are added to the prefix tree.
  19. 如权利要求15或16或17所述的计算机可读存储介质,其特征在于,所述第一预设规则为按照数据产生的时间顺序进行排序。The computer-readable storage medium according to claim 15 or 16 or 17, wherein the first preset rule is to sort according to the time sequence of data generation.
  20. 如权利要求17所述的计算机可读存储介质,其特征在于,所述第二预设规则为根据链路追踪ID对各个软件模块标识及接口标识进行分组,将包括同一链路追踪ID的软件模块标识及接口标识归为同一个分组,将包含不同链路追踪ID的软件模块标识及接口标识归为不同的分组。The computer-readable storage medium according to claim 17, wherein the second preset rule is to group software module identifiers and interface identifiers according to the link tracking ID, and group software that includes the same link tracking ID. The module identifiers and interface identifiers are grouped into the same group, and the software module identifiers and interface identifiers containing different link tracking IDs are grouped into different groups.
PCT/CN2019/117338 2019-09-16 2019-11-12 Link abnormality recognition method, server and computer-readable storage medium WO2021051546A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910878476.8A CN110737592B (en) 2019-09-16 2019-09-16 Link abnormality identification method, server and computer readable storage medium
CN201910878476.8 2019-09-16

Publications (1)

Publication Number Publication Date
WO2021051546A1 true WO2021051546A1 (en) 2021-03-25

Family

ID=69268019

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/117338 WO2021051546A1 (en) 2019-09-16 2019-11-12 Link abnormality recognition method, server and computer-readable storage medium

Country Status (2)

Country Link
CN (1) CN110737592B (en)
WO (1) WO2021051546A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113760647A (en) * 2021-04-15 2021-12-07 北京京东乾石科技有限公司 SQL tracking method, device, equipment, system and storage medium
CN113806225A (en) * 2021-09-24 2021-12-17 上海淇玥信息技术有限公司 Method and device for identifying service abnormal node and electronic equipment
CN114221874A (en) * 2021-12-14 2022-03-22 平安壹钱包电子商务有限公司 Traffic analysis and scheduling method and device, computer equipment and readable storage medium

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111625424A (en) * 2020-05-28 2020-09-04 广东浪潮大数据研究有限公司 Positioning method, device, equipment and readable storage medium
CN112702191B (en) * 2020-12-11 2023-07-21 福建天晴在线互动科技有限公司 Link tracking method and terminal
CN112506872B (en) * 2020-12-18 2024-02-13 北京百度网讯科技有限公司 Abnormality information generation method and device and electronic equipment
CN113067747A (en) * 2021-03-15 2021-07-02 中国工商银行股份有限公司 Link abnormity tracing method, cluster, node and system
CN114389970A (en) * 2021-12-03 2022-04-22 浙江时空道宇科技有限公司 Link monitoring method and device
CN115604040B (en) * 2022-12-16 2023-03-10 国网江苏省电力有限公司信息通信分公司 Abnormal access behavior identification method based on IP access sequence

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6317596B1 (en) * 1998-10-20 2001-11-13 Denso Corporation Error detecting and reporting system in a wireless communication network
US20040081082A1 (en) * 2002-07-12 2004-04-29 Crossroads Systems, Inc. Mechanism for enabling enhanced fibre channel error recovery across redundant paths using SCSI level commands
CN108369582A (en) * 2018-03-02 2018-08-03 福建联迪商用设备有限公司 A kind of address error correction method and terminal
CN108665297A (en) * 2017-03-31 2018-10-16 北京京东尚科信息技术有限公司 Detection method, device, electronic equipment and the storage medium of abnormal access behavior
CN109509021A (en) * 2018-10-22 2019-03-22 武汉极意网络科技有限公司 Abnormality recognition method, device, server and the storage medium of Behavior-based control track

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106547644B (en) * 2015-09-21 2020-11-20 伊姆西Ip控股有限责任公司 Incremental backup method and equipment
CN106790718A (en) * 2017-03-16 2017-05-31 北京搜狐新媒体信息技术有限公司 Service call link analysis method and system
CN108183927A (en) * 2017-11-22 2018-06-19 链家网(北京)科技有限公司 The monitoring method and system that a kind of distributed system link calls
CN108228165B (en) * 2018-01-05 2021-02-02 武汉斗鱼网络科技有限公司 Method for recording calling information between program interfaces and electronic equipment
CN109672741B (en) * 2018-12-25 2020-01-14 南方电网数字电网研究院有限公司 Micro-service monitoring method and device, computer equipment and storage medium
CN109873717A (en) * 2019-01-18 2019-06-11 深圳壹账通智能科技有限公司 Monitoring method, device, computer equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6317596B1 (en) * 1998-10-20 2001-11-13 Denso Corporation Error detecting and reporting system in a wireless communication network
US20040081082A1 (en) * 2002-07-12 2004-04-29 Crossroads Systems, Inc. Mechanism for enabling enhanced fibre channel error recovery across redundant paths using SCSI level commands
CN108665297A (en) * 2017-03-31 2018-10-16 北京京东尚科信息技术有限公司 Detection method, device, electronic equipment and the storage medium of abnormal access behavior
CN108369582A (en) * 2018-03-02 2018-08-03 福建联迪商用设备有限公司 A kind of address error correction method and terminal
CN109509021A (en) * 2018-10-22 2019-03-22 武汉极意网络科技有限公司 Abnormality recognition method, device, server and the storage medium of Behavior-based control track

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113760647A (en) * 2021-04-15 2021-12-07 北京京东乾石科技有限公司 SQL tracking method, device, equipment, system and storage medium
CN113806225A (en) * 2021-09-24 2021-12-17 上海淇玥信息技术有限公司 Method and device for identifying service abnormal node and electronic equipment
CN114221874A (en) * 2021-12-14 2022-03-22 平安壹钱包电子商务有限公司 Traffic analysis and scheduling method and device, computer equipment and readable storage medium
CN114221874B (en) * 2021-12-14 2023-11-14 平安壹钱包电子商务有限公司 Traffic analysis and scheduling method and device, computer equipment and readable storage medium

Also Published As

Publication number Publication date
CN110737592B (en) 2024-01-30
CN110737592A (en) 2020-01-31

Similar Documents

Publication Publication Date Title
WO2021051546A1 (en) Link abnormality recognition method, server and computer-readable storage medium
US10901961B2 (en) Systems and methods for generating schemas that represent multiple data sources
US9569238B2 (en) Methods and systems for generating a dynamic workflow in a multi-tenant database environment
US20140215495A1 (en) Task-specific application monitoring and analysis
CA2957674C (en) Testing insecure computing environments using random data sets generated from characterizations of real data sets
JP2022118108A (en) Log auditing method, device, electronic apparatus, medium and computer program
WO2019085463A1 (en) Department demand recommendation method, application server, and computer-readable storage medium
US20140379723A1 (en) Automatic method for profile database aggregation, deduplication, and analysis
CN113946690A (en) Potential customer mining method and device, electronic equipment and storage medium
US10248668B2 (en) Mapping database structure to software
CN110309496B (en) Data summarizing method, electronic device and computer readable storage medium
CN113434542B (en) Data relationship identification method and device, electronic equipment and storage medium
US9984108B2 (en) Database joins using uncertain criteria
US9619458B2 (en) System and method for phrase matching with arbitrary text
CN110874365B (en) Information query method and related equipment thereof
US10460242B1 (en) System and method for clustering interest patterns based on a plurality of priority values
US10885157B2 (en) Determining a database signature
Pintas et al. SciLightning: a cloud provenance-based event notification for parallel workflows
US9607029B1 (en) Optimized mapping of documents to candidate duplicate documents in a document corpus
US9659059B2 (en) Matching large sets of words
CN114528443A (en) Knowledge graph-based information mining method and related equipment thereof
CN107357632A (en) A kind of order line analysis method and device
CN110719260B (en) Intelligent network security analysis method and device and computer readable storage medium
Rosberg An interactive web tool for importing data to a graph database
CN114138761A (en) Data query method, device, equipment and storage medium based on python

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: 19946163

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: 19946163

Country of ref document: EP

Kind code of ref document: A1