CN110708212A - Method and device for tracking call link in distributed system - Google Patents

Method and device for tracking call link in distributed system Download PDF

Info

Publication number
CN110708212A
CN110708212A CN201910853956.9A CN201910853956A CN110708212A CN 110708212 A CN110708212 A CN 110708212A CN 201910853956 A CN201910853956 A CN 201910853956A CN 110708212 A CN110708212 A CN 110708212A
Authority
CN
China
Prior art keywords
information
link
tracking information
service node
new
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910853956.9A
Other languages
Chinese (zh)
Other versions
CN110708212B (en
Inventor
林勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Property and Casualty Insurance Company of China Ltd
Original Assignee
Ping An Property and Casualty Insurance Company of China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Property and Casualty Insurance Company of China Ltd filed Critical Ping An Property and Casualty Insurance Company of China Ltd
Priority to CN201910853956.9A priority Critical patent/CN110708212B/en
Publication of CN110708212A publication Critical patent/CN110708212A/en
Application granted granted Critical
Publication of CN110708212B publication Critical patent/CN110708212B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Debugging And Monitoring (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention provides a method and a device for tracking a call link in a distributed system. The method for tracking the call link in the distributed system comprises the following steps: acquiring a calling request sent by a requester, and extracting link tracking information contained in the calling request; detecting whether the link tracking information exceeds a preset capacity threshold; and generating new link tracking information based on the detection result of the capacity threshold. The technical scheme of the embodiment of the invention can ensure the robustness of the system on the premise of ensuring the correctness of the calling tracking information among the calling subsystems in the distributed system.

Description

Method and device for tracking call link in distributed system
Technical Field
The invention relates to the technical field of data processing, in particular to a method and a device for tracking a call link in a distributed system.
Background
In the field of internet technology, a distributed system comprises a plurality of subsystems, each subsystem has different functions, and for a service request message of a user, the subsystems with different functions need to be called in sequence to process the service request message of the user, so that the purpose of providing satisfactory service for the user is achieved.
A typical distributed system is typically comprised of components, subsystems, or modules of different functionality, with each component, subsystem, or module having different responsibilities and different data processing capabilities. With the increasingly complex structure and the increasingly dispersed topology of the distributed system, the call link needs to be tracked and analyzed in order to effectively monitor or manage the distributed system and avoid the 'system avalanche effect' caused by the fact that the traffic exceeds the standard and the service cannot be carried, and meanwhile, the call link or the call can be optimized according to the analysis result.
In order to implement tracking of a call link in a distributed system, in the prior art, a code for implementing a call link tracking function is usually added into a source code for implementing each component, subsystem or module, that is, source code level transformation (also referred to as intrusion to an original distributed system) is performed on each component, subsystem or module, whereas in the existing distributed system, a better service is provided for a user, and a call link is basically long every time, so that the capacity of a link message corresponding to the formed call link is too large, and further the operation of the whole system is affected; meanwhile, because the formed link messages are stored in one message processing server, when the message processing server stores and calls the link tracking information, a plurality of link messages are called, the processing pressure of the message processing server is caused invisibly, and the robustness of the whole system is further influenced.
It is to be noted that the information disclosed in the above background section is only for enhancement of understanding of the background of the present invention and therefore may include information that does not constitute prior art known to a person of ordinary skill in the art.
Disclosure of Invention
The embodiment of the invention aims to provide a method and a device for tracking a call link in a distributed system, so that the problem that the operation of the system is influenced due to overlarge link information corresponding to the formed call link in the prior art can be solved at least to a certain extent.
Other features and advantages of the present application will be apparent from the following detailed description, or may be learned by practice of the application.
According to an aspect of the embodiments of the present invention, there is provided a method for tracking a call link in a distributed system, including: acquiring a calling request sent by a requester, and extracting link tracking information contained in the calling request; detecting whether the link tracking information exceeds a preset capacity threshold; and generating new link tracking information based on the detection result of the capacity threshold.
In an embodiment of the present invention, the link tracking information at least includes a globally unique invocation link identifier and service node information, where the service node information includes at least one service node identifier, and when the service node identifier included in the service node information is greater than one, the service node identifiers are arranged according to a sequence in the invocation.
In an embodiment of the present invention, the generating new link tracking information based on the detection result of the capacity threshold includes: if the chain tracking information exceeds the capacity threshold, extracting service node information contained in the chain tracking information; updating the service node information to service node information corresponding to the receiver to obtain new service node information; and updating the service node information contained in the chain tracking information into the new service node information to generate the new link tracking information.
In an embodiment of the present invention, after the updating the serving node information included in the chain trace information to the new serving node information to generate the new link trace information, the method further includes: and if the next receiver does not exist, correspondingly storing the generated new chain type tracking information and the original chain type tracking information to a message processor which is closest to the receiver.
In an embodiment of the present invention, the message processor storing the generated new chain trace information and the original chain trace information to a position closest to the receiver includes: calculating the distance between each message processor and the receiver; and selecting the message processor closest to the receiver based on the calculation result.
In an embodiment of the present invention, after generating new link tracking information based on the detection result of the capacity threshold, the method further includes: and if the next receiver exists, storing the new link tracking information as the current calling link tracking information back to the calling request to generate a new calling request, sending the new calling request to the next receiver, acquiring the new link request by the next receiver, detecting whether the new link tracking information exceeds a preset capacity threshold, and acquiring target link tracking information generated based on the new link tracking information based on a detection result of the capacity threshold.
According to an aspect of the embodiments of the present invention, there is provided a tracking apparatus for call links in a distributed system, including: the system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a calling request sent by a requester and extracting link tracking information contained in the calling request; the detection unit is used for detecting whether the link tracking information exceeds a preset capacity threshold value; and the generating unit is used for generating new link tracking information based on the detection result of the capacity threshold.
According to an aspect of an embodiment of the present invention, there is provided a computer readable medium, on which a computer program is stored, which when executed by a processor, implements a tracing method of a call link in a distributed system as described in the above embodiments.
According to an aspect of an embodiment of the present invention, there is provided an electronic apparatus including: one or more processors; a storage device for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement a method of tracing call links in a distributed system as described in the above embodiments.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
in the technical solutions provided in some embodiments of the present invention, by detecting the capacity of the link tracking information in the call link, if it is detected that the capacity of the link tracking information included in the call request is greater than a preset capacity threshold, new link tracking information is generated to replace the original link tracking information, thereby avoiding a problem that the system operation is affected by an excessively large capacity of the link tracking information in the call link. Therefore, the technical scheme of the embodiment of the invention can adjust the link tracking information capacity in the distributed system when the link tracking information capacity exceeds the preset capacity threshold on the premise of ensuring the accuracy of the link tracking result in the distributed system, thereby ensuring the robustness of the system.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention. It is obvious that the drawings in the following description are only some embodiments of the invention, and that for a person skilled in the art, other drawings can be derived from them without inventive effort. In the drawings:
fig. 1 is a schematic diagram illustrating an exemplary system architecture of a tracking method for a call link in a distributed system or a tracking apparatus for a call link in a distributed system to which an embodiment of the present invention can be applied;
FIG. 2 illustrates a schematic structural diagram of a computer system suitable for use with the electronic device to implement an embodiment of the invention;
FIG. 3 schematically illustrates a flow diagram of a method for tracing call links in a distributed system according to one embodiment of the invention;
FIG. 4 schematically shows a flow chart of one implementation of step S320 shown in FIG. 3;
fig. 5 schematically shows a flowchart following step S320 shown in fig. 3;
FIG. 6 schematically shows a flow chart of one implementation of step S330 shown in FIG. 5;
fig. 7 schematically shows a block diagram of an apparatus for a tracing method of a call link according to an embodiment of the present invention.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to provide a thorough understanding of embodiments of the invention. One skilled in the relevant art will recognize, however, that the invention may be practiced without one or more of the specific details, or with other methods, components, devices, steps, and so forth. In other instances, well-known methods, devices, implementations or operations have not been shown or described in detail to avoid obscuring aspects of the invention.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
Fig. 1 shows a schematic diagram of an exemplary system architecture 100 of a tracking method for call links in a distributed system or a tracking apparatus for call links in a distributed system to which an embodiment of the present invention may be applied.
As shown in fig. 1, the system architecture 100 may include one or more of terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired communication links, wireless communication links, and so forth.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation. For example, server 105 may be a server cluster comprised of multiple servers, or the like.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may be various electronic devices having a display screen, including but not limited to smart phones, tablet computers, portable computers, desktop computers, and the like.
The server 105 may be a server that provides various services. For example, after the server 105 receives a service request sent by the terminal device 103 (or the terminal device 101 or 102) of the user, the server 105 provides a service for the user by invoking the functions of the subsystems in the system, the server 105 acquires the link trace information included in the invocation request sent by the previous subsystem to the next subsystem, detects whether the capacity of the link trace information included in the invocation request exceeds a preset capacity threshold, and generates new link trace information if the capacity of the link trace information included in the invocation request exceeds the preset capacity threshold, so that the new invocation link trace information can be generated on the premise that the invocation link trace information is accurate, and it is ensured that the system does not affect the robustness of the system due to the fact that the capacity of the invocation link trace information is too large.
It should be noted that the tracking method for the call link in the distributed system provided by the embodiment of the present invention is generally executed by the server 105, and accordingly, the tracking device for the call link in the distributed system is generally disposed in the server 105. However, in other embodiments of the present invention, the terminal may also have a similar function as the server, so as to execute the tracking scheme of the call link in the distributed system provided by the embodiment of the present invention.
FIG. 2 illustrates a schematic structural diagram of a computer system suitable for use with the electronic device to implement an embodiment of the invention.
It should be noted that the computer system 200 of the electronic device shown in fig. 2 is only an example, and should not bring any limitation to the functions and the scope of the application of the embodiment of the present invention.
As shown in fig. 2, the computer system 200 includes a Central Processing Unit (CPU)201 that can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)202 or a program loaded from a storage section 208 into a Random Access Memory (RAM) 203. In the RAM 203, various programs and data necessary for system operation are also stored. The CPU201, ROM 202, and RAM 203 are connected to each other via a bus 204. An input/output (I/O) interface 205 is also connected to bus 204.
The following components are connected to the I/O interface 205: an input portion 206 including a keyboard, a mouse, and the like; an output section 207 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 208 including a hard disk and the like; and a communication section 209 including a network interface card such as a LAN card, a modem, or the like. The communication section 209 performs communication processing via a network such as the internet. A drive 210 is also connected to the I/O interface 205 as needed. A removable medium 211 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 210 as necessary, so that a computer program read out therefrom is mounted into the storage section 208 as necessary.
In particular, according to an embodiment of the present invention, the processes described below with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the invention include a computer program product comprising a computer program embodied on a computer-readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 209 and/or installed from the removable medium 211. The computer program executes various functions defined in the system of the present application when executed by a Central Processing Unit (CPU) 201.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present invention may be implemented by software, or may be implemented by hardware, and the described units may also be disposed in a processor. Wherein the names of the elements do not in some way constitute a limitation on the elements themselves.
As another aspect, the present application also provides a computer-readable medium, which may be contained in the electronic device described in the above embodiments; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by an electronic device, cause the electronic device to implement the method as described in the embodiments below. For example, the electronic device may implement the steps shown in fig. 3 to 6.
The implementation details of the technical scheme of the embodiment of the invention are explained in detail as follows:
fig. 3 schematically shows a flowchart of a tracing method of call links in a distributed system according to an embodiment of the present invention, which is applicable to the electronic device described in the foregoing embodiments. Referring to fig. 3, the method for tracking a call link in a distributed system at least includes steps S300 to S320, which are described in detail as follows:
in step S300, a call request sent by a requester is obtained, and link trace information included in the call request is extracted.
In an embodiment of the present invention, the link tracing information at least includes a globally unique invocation link identifier and service node information, where the service node information includes at least one service node identifier, and when the service node identifier included in the service node information is greater than one, the service node identifiers are arranged according to a sequence in the invocation, and the link tracing information may further include other information, such as a processing duration of each service node, a processing start time of each service node, a processing end time of each service node, a processing sequence of each service node, and the like.
In step S310, it is detected whether the link tracking information exceeds a preset capacity threshold.
In an embodiment of the present invention, the capacity threshold refers to the number of bytes corresponding to the entire link tracking information, and the setting of the capacity threshold may be determined according to the minimum running memory size required for stable running of different systems, the reserved running memory size, the running memory occupied by the average data to be processed within the preset time period, and the available running memory actually possessed by the system, and may also be determined according to the condition of ensuring the maximum running efficiency of the system, where in a system, the running memory required for stable running of the system is 1GB (Gigabyte), the running memory required for stable running of the system is 0.5GB within the preset time period, the available running memory of the system is 1.65GB, the reserved running memory is 0.14GB, and the preset capacity threshold is 0.01 GB.
In step S320, new link trace information is generated based on the detection result of the capacity threshold.
In one embodiment of the present invention, as shown in fig. 4, step S320 may include:
step S3201: if the chain tracking information exceeds the capacity threshold, extracting service node information contained in the chain tracking information;
step S3202: updating the service node information to service node information corresponding to the receiver to obtain new service node information;
step S3203: and updating the service node information contained in the chain tracking information into the new service node information to generate the new link tracking information.
In another embodiment of the present invention, if the chain tracking information does not exceed the capacity threshold, the service node information in the chain tracking information is extracted, the service node information corresponding to the receiver is added to the service node information, new service node information is generated, and the service node information included in the chain tracking information is updated to the new service node information to generate the new link tracking information.
In an embodiment of the present invention, if the capacity corresponding to the link tracking information included in the invocation request sent by the requester is greater than a preset capacity threshold, the service node information included in the received invocation request is replaced with the service node information corresponding to the receiver to generate new link tracking information, so as to ensure the robustness of the system.
In an embodiment of the present invention, as shown in fig. 5, after step S320, the method may further include: step S330 and step S330'.
Step S330: if no next receiver exists, storing the original chain type tracking information to a message processor which is closest to the receiver;
step S330': and if the next receiver exists, storing the new link tracking information as the current calling link tracking information back to the calling request to generate a new calling request, sending the new calling request to the next receiver, acquiring the new link request by the next receiver, detecting whether the new link tracking information exceeds a preset capacity threshold, and acquiring target link tracking information generated based on the new link tracking information based on a detection result of the capacity threshold.
Wherein, in step S330: and correspondingly storing the generated new chain type tracking information and the original chain type tracking information to a message processor which is closest to the receiver.
In one embodiment of the present invention, as shown in fig. 6, step S330 may include:
step S3301: calculating the distance between each message processor and the receiver;
step S3301: and selecting the message processor closest to the receiver based on the calculation result.
In an embodiment of the present invention, the link tracking information exceeding the preset capacity threshold is stored in the message processor closest to the message processor, so that the link tracking information can be quickly stored in the database, the influence of other data in the system is avoided, the system operation memory occupied by the link tracking information can also be released in time, and the system operation efficiency is further improved.
In an embodiment of the present invention, the distance between each message processor and the receiver is calculated, a preset distance table between the receiver and the message processor may be adopted, or the message processing server may be regarded as a node, a public parent node with a closest distance between the service node corresponding to the receiver and the node corresponding to the message processing server is determined, and then the traversing calculation is repeated, and the distance between the service node corresponding to the receiver and the node corresponding to the message processing server to the public parent node is obtained, so that the sum of the distance between the service node corresponding to the receiver and the public parent node and the distance between the node corresponding to the message processing server and the public parent node is the distance between the service node corresponding to the receiver and the node corresponding to the message processing server.
Wherein, in step S330': and if the next receiver exists, storing the new link tracking information as the current calling link tracking information back to the calling request to generate a new calling request, sending the new calling request to the next receiver, acquiring the new link request by the next receiver, detecting whether the new link tracking information exceeds a preset capacity threshold, and acquiring target link tracking information generated based on the new link tracking information based on a detection result of the capacity threshold.
In an embodiment of the present invention, after receiving the invocation request, the service node corresponding to each subsystem in the system detects whether the invocation link information included in the invocation request exceeds a preset capacity threshold, if so, step S320 is executed to generate new link tracking information, step S330 is executed again, and after generating the new link tracking information, the original invocation link tracking information included in the invocation request is stored in the message processor closest to the service node corresponding to the current receiver.
In an embodiment of the present invention, if it is detected that the called link tracking information sent by the requester exceeds the preset capacity threshold, new link tracking information is generated, and the original link tracking information is stored in the message processing server closest to the requester, so that the robustness of the system is further improved on the premise of ensuring the accuracy of the result of the link tracking information.
The following describes the technical solution of the embodiment of the present invention in detail by taking an example that a plurality of call requests called in sequence exist in the distributed system.
In an embodiment of the present invention, the invocation request includes link tracking information, where the link tracking information at least includes a globally unique invocation link identifier and service node information, where the service node information includes at least one service node identifier, it should be noted that the service node information may include, in addition to at least one service node identifier, other information such as processing time corresponding to the service node identifier, processing order corresponding to the service identifier, and the like, for example, when the link tracking information is 20180503078-a 04508-b 02307-c 078010-d 095016, where 20180503078 is a globally unique invocation link identifier, in which 20180503 represents time 2018 year 05 and 03 month, where 078 represents 78 th test corresponding or service request, and a045, b02307, c078010, and d095016 are service node identifiers, 08, 07, 010, and 016 of the processing time corresponding to the service node, a04508 is service node information corresponding to the service node identifier a045, b02307 is service node information corresponding to the service node identifier b023, c078010 is service node information corresponding to the service node identifier c078, and d095016 is service node information corresponding to the service node identifier d 095.
Assuming that a user is provided with a service, the user needs to call functions corresponding to 1500 times of different subsystems in a system to complete the service, when the 1000 th subsystem is reached, and the 1000 th subsystem receives a call request sent by the 999 th subsystem, the server will extract call link information in the call request sent by the 999 th subsystem received by the 1000 th subsystem, where the call link information is: 20180503078-a 04508-b 02307 … … c 078010-d 095016, when the server detects that the capacity corresponding to the call link information is 9.99MB (MByte megabytes), and the preset capacity threshold is 10MB, the capacity corresponding to the call link information is smaller than the preset capacity threshold, the node identifier corresponding to the 1000 th subsystem is d0100, and the processing time is 078, the service node information corresponding to the 1000 th subsystem is added to the service node information of the call link received by the 1000 th corresponding subsystem, and the call link information formed by the 1000 th corresponding subsystem is 20180503078-a 04508-b 02307 … … c 078010-d 095016-d 0100078.
When the 1000 th corresponding subsystem sends a call request to the 1001 st corresponding subsystem, the server detects call link information contained in the call request as when the 1000 th corresponding subsystem receives the call request sent by the 999 th corresponding subsystem, the capacity corresponding to the call link information of the call request obtained by the current detection is 10.01MB, the preset capacity threshold is 10MB, namely the call link information capacity contained in the call request received by the 1001 st corresponding subsystem is larger than the preset capacity threshold, the system identifier corresponding to the 1001 st subsystem is a0102, the processing time is 012, a new call link request is generated as 20180503078-a 0102012, a message processor closest to the 1001 st corresponding subsystem is determined, and the message processor f obtained by calculation is closest to the 1001 st corresponding subsystem, the call link information contained in the call request received by the 1001 st corresponding subsystem and the generated new call link information pair are combined Should be stored in the message handler f, i.e. 20180503078-a 04508-b 02307 … … c 078010-d 095016-d 0100078, 20180503078-a 0102012.
When the 1500 th subsystem receives the call request sent by the 1499 th subsystem, the server detects the call information contained in the call request sent by the 1499 th subsystem, as when the 1000 th subsystem receives the call request sent by the 999 th subsystem, the call request sent by the 999 th subsystem is the same as when the 1001 st subsystem receives the call request sent by the 999 th subsystem, the service node identifier corresponding to the 1500 th subsystem is g012, the processing time is 013, if the capacity corresponding to the call link information of the current time is detected to be smaller than the preset capacity threshold, the step executed by the 1000 th subsystem is executed to generate new call link information, the call link information generated by the 1500 th subsystem is 20180503078-a 0102012 … … -k 013015-012g 013, and the message processing server closest to the 1500 th subsystem is determined because the 1500 th subsystem is the last called subsystem, and if the e message processing server is determined to be closest to the 1500 th subsystem through calculation, storing the calling link information generated by the 1500 th corresponding subsystem into the e message processing server, wherein the calling link information is 20180503078-a 0102012 … … -k 013015-g 012013.
If the capacity corresponding to the calling link information corresponding to the current time is detected to be larger than the preset capacity threshold value, the 1001 st corresponding subsystem is executed to generate new link tracking information, the generated new link tracking information is 20180503078-g 012013, and the calculation determines that the e message processing server is closest to the 1500 th corresponding subsystem, the original calling link tracking information 20180503078-a 0102012 … … -k 013015 corresponding to the current time and the new calling link information 20180503078-g 012013 generated at the current time are correspondingly stored in the e message processing server, and the 1500 th corresponding subsystem is the last calling subsystem, so that the calling to the 1500 th corresponding subsystem is ended.
When a subsystem with a problem in the service or test is to be searched by calling the complete calling link tracking information, so as to facilitate optimization or repair processing, the complete calling link tracking information can be obtained in the following manner.
Based on the globally unique calling link identifier of the calling link tracking, searching for calling link tracking information containing the globally unique calling link identifier from each message processing server, in the above-mentioned example, through the globally unique calling link identifier 20180503078, searching for link tracking information containing the link identifier in each message processing server, and after the searching and determining, finding out that calling link tracking information containing the globally unique calling link identifier 20180503078 exists in the message processing servers e and f, the calling link tracking information is 20180503078-a 04508-b 023 02307 … … c 078010-d 095016-d 0100078, 20180503078-a 0102012, 20180503078-a 010 0102012 … … -k 013015-g 012013.
Based on the calling link information, 20180503078-a 0102012, determining calling link tracking information after 20180503078-a 0102012 … … -k 013015-g 012013 20180503078-a 04508-b 02307 … … c 078010-d 095016-d 0100078, and then merging the service node information in 20180503078-a 0102012 … … -k 013015-g 012013 into the service node information in 20180503078-a 04508-b 02307 … … c 078010-d 095016-d 0100078 to obtain complete calling link tracking information: 20180503078-a 04508-b 02307 … … c 078010-d 095016-d 0100078-a 0102012, 20180503078-a 0102012 … … -k 013015-g 012013.
In an embodiment of the present invention, the information included in the service node information may be determined according to the content to be searched and optimized, and if the content to be optimized this time is processing time, and the processing speed of the entire system is increased, the service node information may be set to include processing time information corresponding to each service node.
The following describes an embodiment of the apparatus of the present invention, which may be used to perform the tracing method for the call link in the distributed system in the above embodiment of the present invention. For details that are not disclosed in the embodiments of the apparatus of the present invention, refer to the embodiments of the tracking method for invoking links in the distributed system of the present invention.
FIG. 7 schematically illustrates a block diagram of a tracking device invoking links in a distributed system according to one embodiment of the present invention.
Referring to fig. 7, a tracing apparatus 400 for a distributed system call link according to an embodiment of the present invention includes: an acquisition unit 410, a detection unit 420 and a generation unit 430.
The obtaining unit 410 is configured to obtain a call request sent by a requester, and extract link tracking information included in the call request; the detecting unit 420 is configured to detect whether the link tracking information exceeds a preset capacity threshold; the generating unit 430 is configured to generate new link tracking information based on the detection result of the capacity threshold.
In an embodiment of the present invention, the generating unit 430 is further configured to extract service node information included in the chain tracking information if the chain tracking information exceeds the capacity threshold; updating the service node information to service node information corresponding to the receiver to obtain new service node information; and updating the service node information contained in the chain tracking information into the new service node information to generate the new link tracking information.
In an embodiment of the present invention, the tracking apparatus for a distributed system call link further includes a storage unit, configured to, if there is no next receiver, correspondingly store the generated new chain trace information and the original chain trace information to a message processor closest to the receiver.
In an embodiment of the present invention, the storage unit is further configured to calculate a distance between each message processor and the receiver; and selecting the message processor closest to the receiver based on the calculation result.
In another embodiment of the present invention, if there is a next receiver, the generating unit 430 is further configured to store the new link tracking information as the current call link tracking information back to the call request to generate a new call request, and send the new call request to the next receiver, where the new link request is also acquired by the next receiver, detect whether the new link tracking information exceeds a preset capacity threshold, and obtain target link tracking information generated based on the new link tracking information based on a detection result of the capacity threshold.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the invention. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiment of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the embodiment of the present invention.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It will be understood that the invention is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.

Claims (9)

1. A method for tracking call links in a distributed system, comprising:
acquiring a calling request sent by a requester, and extracting link tracking information contained in the calling request;
detecting whether the link tracking information exceeds a preset capacity threshold;
and generating new link tracking information based on the detection result of the capacity threshold.
2. The method according to claim 1, wherein the link trace information at least includes globally unique invocation link identifier and service node information, wherein the service node information includes at least one service node identifier, and when the service node identifier included in the service node information is greater than one, the service node identifiers are arranged according to a precedence order in the invocation.
3. The method of claim 1, wherein generating new link tracking information based on the detection of the capacity threshold comprises:
if the chain tracking information exceeds the capacity threshold, extracting service node information contained in the chain tracking information;
updating the service node information to service node information corresponding to the receiver to obtain new service node information;
and updating the service node information contained in the chain tracking information into the new service node information to generate the new link tracking information.
4. The method according to claim 1, further comprising, after generating the new link trace information by updating the serving node information included in the chain trace information to the new serving node information:
and if the next receiver does not exist, correspondingly storing the generated new chain type tracking information and the original chain type tracking information to a message processor which is closest to the receiver.
5. The method according to claim 4, wherein the storing the generated new chain trace information and the original chain trace information to a message processor closest to the receiver comprises:
calculating the distance between each message processor and the receiver;
and selecting the message processor closest to the receiver based on the calculation result.
6. The method of claim 1, further comprising, after the generating new link trace information based on the detection of the capacity threshold:
and if the next receiver exists, storing the new link tracking information as the current calling link tracking information back to the calling request to generate a new calling request, sending the new calling request to the next receiver, acquiring the new link request by the next receiver, detecting whether the new link tracking information exceeds a preset capacity threshold, and acquiring target link tracking information generated based on the new link tracking information based on a detection result of the capacity threshold.
7. A trace processing apparatus for call links in a distributed system, comprising:
the system comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a calling request sent by a requester and extracting link tracking information contained in the calling request;
the detection unit is used for detecting whether the link tracking information exceeds a preset capacity threshold value;
and the generating unit is used for generating new link tracking information based on the detection result of the capacity threshold.
8. A computer-readable medium, on which a computer program is stored which, when being executed by a processor, carries out a method for tracing call links in a distributed system according to any one of claims 1 to 6.
9. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement a method of tracing call links in a distributed system as claimed in any one of claims 1 to 6.
CN201910853956.9A 2019-09-10 2019-09-10 Method and device for tracking call link in distributed system Active CN110708212B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910853956.9A CN110708212B (en) 2019-09-10 2019-09-10 Method and device for tracking call link in distributed system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910853956.9A CN110708212B (en) 2019-09-10 2019-09-10 Method and device for tracking call link in distributed system

Publications (2)

Publication Number Publication Date
CN110708212A true CN110708212A (en) 2020-01-17
CN110708212B CN110708212B (en) 2022-04-29

Family

ID=69195175

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910853956.9A Active CN110708212B (en) 2019-09-10 2019-09-10 Method and device for tracking call link in distributed system

Country Status (1)

Country Link
CN (1) CN110708212B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112346930A (en) * 2020-10-30 2021-02-09 银盛支付服务股份有限公司 Method and system for monitoring full link based on CAT
CN112363697A (en) * 2020-11-12 2021-02-12 北京云宽志业网络技术有限公司 Data verification method, device, equipment and storage medium
CN112702191A (en) * 2020-12-11 2021-04-23 福建天晴在线互动科技有限公司 Link tracking method and terminal
CN114301988A (en) * 2021-12-22 2022-04-08 中国电信股份有限公司 Distributed calling method and device, storage medium and electronic equipment
CN114679487A (en) * 2022-03-25 2022-06-28 度小满科技(北京)有限公司 Link processing method, device, storage medium and processor
CN116955090A (en) * 2023-09-19 2023-10-27 四川集鲜数智供应链科技有限公司 Calling chain monitoring system and method for chain service

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140222994A1 (en) * 2013-02-07 2014-08-07 International Business Machines Corporation Transparently tracking provenance information in distributed data systems
CN104219316A (en) * 2014-09-12 2014-12-17 微梦创科网络科技(中国)有限公司 Method and device for processing call request in distributed system
CN106656536A (en) * 2015-11-03 2017-05-10 阿里巴巴集团控股有限公司 Method and device for processing service invocation information

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140222994A1 (en) * 2013-02-07 2014-08-07 International Business Machines Corporation Transparently tracking provenance information in distributed data systems
CN104219316A (en) * 2014-09-12 2014-12-17 微梦创科网络科技(中国)有限公司 Method and device for processing call request in distributed system
CN106656536A (en) * 2015-11-03 2017-05-10 阿里巴巴集团控股有限公司 Method and device for processing service invocation information

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112346930A (en) * 2020-10-30 2021-02-09 银盛支付服务股份有限公司 Method and system for monitoring full link based on CAT
CN112363697A (en) * 2020-11-12 2021-02-12 北京云宽志业网络技术有限公司 Data verification method, device, equipment and storage medium
CN112363697B (en) * 2020-11-12 2021-10-12 北京云宽志业网络技术有限公司 Data verification method, device, equipment and storage medium
CN112702191A (en) * 2020-12-11 2021-04-23 福建天晴在线互动科技有限公司 Link tracking method and terminal
CN114301988A (en) * 2021-12-22 2022-04-08 中国电信股份有限公司 Distributed calling method and device, storage medium and electronic equipment
CN114679487A (en) * 2022-03-25 2022-06-28 度小满科技(北京)有限公司 Link processing method, device, storage medium and processor
CN114679487B (en) * 2022-03-25 2023-12-22 度小满科技(北京)有限公司 Link processing method, device, storage medium and processor
CN116955090A (en) * 2023-09-19 2023-10-27 四川集鲜数智供应链科技有限公司 Calling chain monitoring system and method for chain service
CN116955090B (en) * 2023-09-19 2023-11-28 四川集鲜数智供应链科技有限公司 Calling chain monitoring system and method for chain service

Also Published As

Publication number Publication date
CN110708212B (en) 2022-04-29

Similar Documents

Publication Publication Date Title
CN110708212B (en) Method and device for tracking call link in distributed system
CN108052615B (en) Access request processing method, device, medium and electronic equipment
JP2020173778A (en) Method, apparatus, electronic facility, computer readable medium, and computer program for allocating resource
CN112527649A (en) Test case generation method and device
CN110633296A (en) Data query method, device, medium and electronic equipment
CN109213604B (en) Data source management method and device
CN109815405B (en) Gray level shunting method and system
CN108667660B (en) Method and device for route management and service routing and routing system
CN111327466B (en) Alarm analysis method, system, equipment and medium
CN109871408B (en) Multi-type database adaptation method, device, electronic equipment and storage medium
CN112631879A (en) Data acquisition method and device, computer readable medium and electronic equipment
CN110928594A (en) Service development method and platform
CN114153703A (en) Micro-service exception positioning method and device, electronic equipment and program product
US20210279109A1 (en) Method and apparatus for acquiring information
CN112887355B (en) Service processing method and device for abnormal server
CN113760982A (en) Data processing method and device
CN110322350B (en) Method, device, equipment and storage medium for cutting hollow block in consensus network
CN110347546B (en) Dynamic adjustment method, device, medium and electronic equipment for monitoring task
CN111241048A (en) Web terminal log management method, device, medium and electronic equipment
CN116204428A (en) Test case generation method and device
CN108390770B (en) Information generation method and device and server
CN110674426A (en) Webpage behavior reporting method and device
CN112491943A (en) Data request method, device, storage medium and electronic equipment
CN111741046B (en) Data reporting method, data acquisition method, device, equipment and medium
CN111199003B (en) Multi-webpage window management method, management device and terminal equipment

Legal Events

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