Link tracking method, device, system, apparatus, storage medium and program product
By employing blockchain principles and using hash values for correlation within the link tracing system, the problem of failing to promptly identify tampered call information was solved, thus ensuring the reliability and accuracy of link tracing results.
Patent Information
- Application Number
- CN202411276569.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-12
- Publication Date
- 2025-12-19
- Estimated Expiration
- 2044-09-12
AI Technical Summary
Existing link tracing systems cannot detect in a timely manner when the call information of a call block is tampered with, resulting in low reliability of link tracing results.
By employing blockchain principles and using hash values for correlation, each sub-call block stores the hash value of the upper-level call block. By calculating the hash value of the sub-call block, the system queries the database to detect whether the call information has been tampered with.
It improves the reliability of link tracing results, can promptly identify whether call information has been tampered with, and ensures the integrity and accuracy of the call link tree.
Smart Images

Figure CN119135509B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of big data processing, and particularly relates to a link tracking method, device, system, equipment, storage medium and program product. BACKGROUND
[0002] In a business processing process, a plurality of components or modules may be involved in calling. When an exception occurs in the business processing process, it is necessary to determine which call has a problem as soon as possible to handle the problem as soon as possible and ensure the efficiency of business processing. Therefore, it is crucial to establish a link tracking process.
[0003] In the prior art, the zipkin link tracking system is used to obtain each calling block in the database, and each calling block is drawn into a link diagram according to the time sequence, so as to realize link tracking.
[0004] However, when the calling information of a calling block in the link is tampered with, the system cannot perceive it, resulting in low reliability of the result of link tracking. SUMMARY
[0005] The application provides a link tracking method, device, system, equipment, storage medium and program product, which can improve the reliability of the result of link tracking.
[0006] In one aspect of the application, a link tracking method is provided, which comprises:
[0007] displaying each candidate root calling block on a target interface;
[0008] in response to an input of selecting a first root calling block from the candidate root calling blocks, calculating a hash value of the first root calling block;
[0009] querying a first layer of child calling blocks matching the hash value from the database according to the hash value of the first root calling block, wherein the child calling blocks include the hash value of the upper calling block corresponding to the child calling block;
[0010] cyclically performing the following steps until a preset query end condition is met to obtain a plurality of layers of child calling blocks of the first root calling block: querying an i+1 layer of child calling blocks matching the hash value from the database according to the hash value of the i layer of child calling blocks, and updating i to i+1, wherein the initial value of i is 1;
[0011] constructing and generating a calling link tree corresponding to the first root calling block according to the calling block matching relationship corresponding to each hash value.
[0012] In one aspect of the application, a link tracking device is provided, which comprises:
[0013] The calling block display module is configured to display each candidate root calling block on a target interface.
[0014] The hash value calculation module is configured to calculate a hash value of the first root calling block in response to an input of selecting the first root calling block from the candidate root calling blocks.
[0015] The sub-calling block query module is configured to query, from a database, a first layer of sub-calling blocks matching the hash value of the first root calling block according to the hash value of the first root calling block, the sub-calling blocks including hash values of upper calling blocks corresponding to the sub-calling blocks.
[0016] The loop execution module is configured to loop the following steps until a preset query end condition is met to obtain a plurality of layers of sub-calling blocks of the first root calling block: querying, from the database, an i+1th layer of sub-calling blocks matching the hash value of the ith layer of sub-calling blocks according to the hash value of the ith layer of sub-calling blocks, and updating i to i+1, the initial value of i being 1.
[0017] The link tree construction module is configured to construct the first root calling block and the plurality of layers of sub-calling blocks to generate a calling link tree corresponding to the first root calling block according to a calling block matching relationship of each hash value.
[0018] In an aspect of the embodiments of the present application, a link tracking system is provided, which includes a service cluster system, a link analysis service system, and a controller. The service cluster system includes communication ends and communication end databases corresponding to the communication ends. The link analysis service system includes a link information collector, a storage module, a data query interface, and a target interface.
[0019] The communication end is configured to call other communication ends to generate corresponding root calling blocks and sub-calling blocks.
[0020] The communication end database is connected with the corresponding communication end and is configured to store the sub-calling blocks corresponding to the communication end.
[0021] The link information collector is connected with the communication ends and is configured to receive the root calling blocks generated by the communication ends.
[0022] The storage module is connected with the link information collector and is configured to store the root calling blocks received by the link information collector.
[0023] The data query interface is connected with the storage module and the communication ends and is configured to provide a query service of the root calling blocks and the sub-calling blocks.
[0024] The target interface is connected with the data query interface and is configured to display the candidate root calling blocks and display a search information input box.
[0025] The controller is connected with the service cluster system and the link analysis service system and is configured to execute the link tracking method provided in any one of the aspects of the embodiments of the present application.
[0026] In an aspect of the embodiments of the present application, an electronic device is provided, which comprises a memory and a program or instructions stored in the memory and executable on a processor, and the program or instructions are executed by the processor to implement the link tracking method provided in any one of the aspects of the embodiments of the present application.
[0027] In an aspect of the embodiments of the present application, a readable storage medium is provided, and the readable storage medium stores a program or instructions, and the program or instructions are executed by a processor to implement the link tracking method provided in any one of the aspects of the embodiments of the present application.
[0028] In an aspect of the embodiments of the present application, a computer program product is provided, and instructions in the computer program product are executed by a processor of an electronic device to enable the electronic device to perform the link tracking method provided in any one of the aspects of the embodiments of the present application.
[0029] In the link tracking method provided by the embodiments of the present application, the blockchain principle is used to associate the front and the back by using the hash value, and the hash value of the upper calling block corresponding to each sub-calling block is included in the sub-calling block. When tracking the link, the hash value of the sub-calling block is calculated, and then the hash value of the sub-calling block is used to query from the database, so that the next layer of sub-calling block corresponding to the sub-calling block can be obtained. In the case that the data in the sub-calling block is tampered, the sub-calling block corresponding to the hash value of the tampered data cannot be found in the database, so that whether the calling information in the sub-calling block is tampered can be perceived in time. In this way, by storing the hash value of the corresponding upper calling block in each sub-calling block, and then tracking the link according to the hash value, whether the calling information is tampered can be perceived in time, and the result reliability of the link tracking is improved. BRIEF DESCRIPTION OF DRAWINGS
[0030] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments of the present application will be briefly introduced below. Those skilled in the art can also obtain other drawings according to these drawings without creating any creative labor.
[0031] Figure 1 is a flowchart of a first link tracking method provided by an embodiment of the present application;
[0032] Figure 2 is a structural diagram of a calling link tree provided by an embodiment of the present application;
[0033] Figure 3 is a flowchart of a second link tracking method provided by an embodiment of the present application;
[0034] Figure 4is a sub-call block annotation information structure diagram provided by an embodiment of the present application;
[0035] Figure 5 is a flow diagram of a link tracking system provided by an embodiment of the present application;
[0036] Figure 6 is a structure diagram of a link tracking device provided by an embodiment of the present application;
[0037] Figure 7 is a structure diagram of a link tracking device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0038] The features and exemplary embodiments of each aspect of the present application will be described in detail below, in order to make the purposes, technical solutions and advantages of the present application more clear and apparent, the present application will be further described in detail below in combination with the drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, but not to limit the present application. The present application can be implemented without some of these specific details by those skilled in the art. The following description of the embodiments is only to provide a better understanding of the present application by showing examples of the present application.
[0039] It should be noted that, in this paper, relationship terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between the entities or operations. Moreover, the terms "include", "contain" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or includes elements inherent to such process, method, article or device. Without more limitations, the elements defined by the statement "include" do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0040] It should be noted that the acquisition, storage, use, processing, etc. of data in the technical solutions of the present application comply with the relevant provisions of national laws and regulations.
[0041] It should be noted that in the embodiments of the present application, some software, components, models, etc. may be mentioned, which should be considered as exemplary, and the purpose is only to illustrate the feasibility of the implementation of the technical solutions of the present application, but it does not mean that the applicant has or will necessarily use the scheme.
[0042] In the related art, each calling block in the database is acquired through a zipkin link tracking system, and each calling block is plotted in a link diagram according to a time sequence, so as to realize tracking of the link. However, when the calling information of a calling block in the link is tampered with, the system cannot perceive it, resulting in low reliability of the result of link tracking.
[0043] The purpose of the present application is to provide a link tracking method, device, system, equipment, storage medium and program product. In the link tracking method provided by the present application, the blockchain principle is used to associate the front and back by using the hash value, and each sub-call block includes the hash value of the upper calling block corresponding to the sub-call block. When tracking the link, the hash value of the sub-call block is calculated, and then the hash value of the sub-call block is queried from the database, so as to obtain the next layer sub-call block corresponding to the sub-call block. In the case that the data in the sub-call block is tampered with, the sub-call block corresponding to the hash value of the tampered data cannot be found in the database, so that whether the calling information in the sub-call block is tampered with can be perceived in time. In this way, by storing the hash value of the corresponding upper calling block in each sub-call block, and then tracking the link according to the hash value, whether the calling information is tampered with can be perceived in time, and the result reliability of the link tracking is improved.
[0044] The specific embodiments of the link tracking method, device, system, equipment, storage medium and program product provided by the present application will be introduced below.
[0045] First, the specific embodiments of the link tracking method provided by the present application will be introduced, as shown in Figure 1 A flowchart of a link tracking method is provided, which can be applied to a controller in a link tracking system. The link tracking method can include the following S101-S105.
[0046] S101, display each candidate root calling block on a target interface.
[0047] In this embodiment, the calling block includes a root calling block and a sub-call block.
[0048] The root calling block (RootSpan) is the first calling block in the complete calling process of the distributed service cluster.
[0049] As an example, in the case of calling between each server, the service cluster system uploads the root calling block corresponding to the first call as a candidate root calling block to the link analysis service system for storage, and the link analysis service system stores at least one candidate root calling block.
[0050] Then, when the link needs to be tracked, the controller sends an instruction to the link tracking system, so that the target interface displays each candidate root call block stored in the link analysis service system.
[0051] S102, in response to an input of selecting a first root call block from the candidate root call blocks, the controller calculates a hash value of the first root call block.
[0052] In this embodiment, the hash value is a value obtained by hashing the data stored in the call block. When the data in the call block changes, the corresponding hash value will also change.
[0053] As an example, when the user clicks to select the first root call block from the candidate root call blocks, it indicates that the link to which the first root call block belongs is tracked at this time. At this time, the controller calculates the hash value corresponding to the first root call block according to the data currently stored in the first call block.
[0054] S103, according to the hash value of the first root call block, the controller queries the database to obtain the first layer of sub-call blocks matching the hash value, and the sub-call blocks include the hash value of the upper call block corresponding to the sub-call block.
[0055] In this embodiment, the database stores a plurality of sub-call blocks (Spans). The sub-call block is a call block corresponding to a server call after the root call block.
[0056] Each sub-call block stores the hash value corresponding to the call of the upper call block corresponding to the sub-call block. The upper call block can be a sub-call block or a root call block.
[0057] As an example, after the controller calculates the hash value corresponding to the first root call block, the controller queries the database according to the hash value corresponding to the first root call block.
[0058] When the database has a sub-call block corresponding to the hash value, it indicates that the sub-call block is the first layer of sub-call blocks after the first root call block.
[0059] When the database does not have a sub-call block corresponding to the hash value, it indicates that the first root call block is tampered with or the first root call block has no next layer of sub-call blocks.
[0060] S104, the following steps are executed in a loop until a preset query end condition is met, and a plurality of layers of sub-call blocks of the first root call block are obtained: according to the hash value of the i-th layer of sub-call blocks, the controller queries the database to obtain the i+1-th layer of sub-call blocks matching the hash value, and updates i to i+1, the initial value of i is 1.
[0061] In the embodiment, the preset query end condition can be that the loop ends when the number of loops reaches a threshold condition, or the loop ends when there is no sub-call block of the next layer.
[0062] As an example, the controller queries in the database according to the hash value corresponding to the i-th layer sub-call block, and in the case where there is a sub-call block matching the hash value of the i-th layer sub-call block, the matching sub-call block is determined as the i+1-th layer sub-call block; in the case where there is no sub-call block matching the hash value of the i-th layer sub-call block, it indicates that the i-th layer sub-call block is tampered or the i-th layer sub-call block has no sub-call block of the next layer.
[0063] The controller performs the step on each layer of sub-call blocks until the preset query end condition is met, at which time the multi-layer sub-call block corresponding to the first root call block can be obtained.
[0064] S105, according to the call block matching relationship corresponding to each hash value, the first root call block and the multi-layer sub-call block are constructed to generate a call link tree corresponding to the first root call block.
[0065] In the embodiment, the call block matching relationship is used to represent the upper and lower layer relationship between two call blocks.
[0066] The call link tree is used to represent the call relationship between each server in the distributed service cluster.
[0067] As an example, as shown in Figure 2 , a structural diagram of a call link tree is provided. Among them, S1, S2, S3 and S4 are servers in the distributed service cluster. RootSpan is the root call block, Span1 is the first layer call block, and Span2 and Span3 are the second layer call blocks.
[0068] Specifically, after obtaining the first root call block and the multi-layer sub-call block, the controller obtains the client information and the server information corresponding to each call block from each call block, and then according to the client information and the server information corresponding to each call block and the call block matching relationship corresponding to each hash value, a call link tree corresponding to the first root call block is constructed.
[0069] By the embodiment, the blockchain principle is used to associate the front and back by using the hash value. The hash value of the upper calling block corresponding to each sub-calling block is included in the sub-calling block. When the link is tracked, the hash value of the sub-calling block is calculated, and then the hash value of the sub-calling block is queried from the database, so that the next layer of sub-calling block corresponding to the sub-calling block is obtained. In the case that the data in the sub-calling block is tampered, the sub-calling block corresponding to the hash value of the tampered data cannot be found in the database, so that whether the calling information in the sub-calling block is tampered can be perceived in time. In this way, the hash value of the corresponding upper calling block is stored in each sub-calling block, and then the link is tracked according to the hash value, so that whether the calling information is tampered can be perceived in time, and the result reliability of the link tracking is improved.
[0070] As an optional embodiment, the sub-calling block is stored in the corresponding communication end database.
[0071] As shown in Figure 3 After S102, the link tracking method can further include the following S301-S302:
[0072] S301, obtaining the communication end information in the first root calling block;
[0073] S302, determining the communication end database address of the first layer sub-calling block corresponding to the first root calling block according to the communication end information.
[0074] S103 can specifically include:
[0075] According to the hash value of the first root calling block and the communication end database address of the first layer sub-calling block, the first layer sub-calling block matched with the hash value is queried from the corresponding communication end database.
[0076] In the embodiment, each sub-calling block is stored in the corresponding communication end database. The communication end includes a client and a server. For example, the sub-calling block can be stored in the database corresponding to the client, or can be stored in the database corresponding to the server, or can be stored in the database corresponding to the client and the server.
[0077] As an example, in the case that the sub-calling block is stored in the database corresponding to the client. After the hash value of the first root calling block is calculated, the controller will also obtain the communication end information in the first root calling block. The server information of the first root calling block is the client information of the first layer sub-calling block.
[0078] Therefore, according to the communication end information in the first root calling block, the communication end database address of the first layer sub-calling block corresponding to the first root calling block can be determined. Then, the corresponding communication end database is found according to the communication end database address of the first layer sub-calling block, and the first layer sub-calling block matching the hash value is found from the communication end database.
[0079] According to the embodiment, the distributed storage technology is used to store each sub-calling block in the corresponding communication end database. In order to modify the data in the calling block and still ensure the validity of the calling link tree, each communication end database needs to be attacked. This greatly increases the difficulty of tampering with the calling link tree, and improves the reliability of the link tracking result.
[0080] As an example, the preset query end condition is that the corresponding communication end information does not exist in the i+1 layer sub-calling block.
[0081] In the embodiment, if the corresponding communication end information does not exist in the sub-calling block, it means that no server calling is performed after the sub-calling block, that is, the sub-calling block is a tail node, and the loop determination process of the sub-calling block can be ended.
[0082] According to the embodiment, the existence of the communication end information is used as the preset query end condition, which can quickly and accurately identify whether the sub-calling block is a tail node, thereby ensuring the integrity of the generated calling link tree.
[0083] As an optional embodiment, the data in the sub-calling block is encrypted by using the random value in the upper calling block corresponding to the sub-calling block.
[0084] S104 can specifically include:
[0085] The following steps are executed in a loop until the preset query end condition is met, and the multi-layer sub-calling block of the first root calling block is obtained:
[0086] The data of the i layer sub-calling block is decrypted by using the random value in the i-1 layer sub-calling block;
[0087] According to the decrypted data of the i layer sub-calling block, the hash value of the i layer sub-calling block is calculated;
[0088] According to the hash value of the i layer sub-calling block, the i+1 layer sub-calling block matching the hash value is queried from the database;
[0089] It is judged whether the preset query end condition is met;
[0090] In the case where the preset query end condition is not met, i is updated to i+1.
[0091] In the embodiment, the corresponding random value is stored in each calling block, and the random value in each calling block is used to encrypt the lower calling block.
[0092] As an example, the controller decrypts the i-th sub-calling block using the random value in the (i-1)-th sub-calling block after obtaining the i-th sub-calling block. If the decryption fails, it indicates that the data in the (i-1)-th sub-calling block is tampered or the i-th sub-calling block obtained by the query is incorrect.
[0093] If the decryption succeeds, it indicates that the i-th sub-calling block obtained by the query is correct. The hash value of the i-th sub-calling block is calculated using the data of the decrypted i-th sub-calling block. Then, the i-th sub-calling block is queried in the database according to the hash value corresponding to the i-th sub-calling block. If there is a sub-calling block matching the hash value of the i-th sub-calling block, the matching sub-calling block is determined as the (i+1)-th sub-calling block. If there is no sub-calling block matching the hash value of the i-th sub-calling block, it indicates that the i-th sub-calling block is tampered or the i-th sub-calling block has no next sub-calling block.
[0094] Then, it is determined whether the preset query end condition is met. If the preset query end condition is met, the query of the sub-calling block ends. If the preset query end condition is not met, i is updated to i+1, and the execution returns to continue querying the lower sub-calling block.
[0095] According to the embodiment, the random value in the upper calling block corresponding to the sub-calling block is used to encrypt the sub-calling block. In this way, the sub-calling block is encrypted using the random value in the upper calling block, which greatly increases the difficulty of tampering the calling link tree and improves the reliability of the link tracking result.
[0096] As an optional embodiment, the data of the sub-calling block includes calling request data, calling response data, and link metadata, and the calling data hash value is included in the link metadata.
[0097] The hash value of the i-th sub-calling block is calculated according to the data of the decrypted i-th sub-calling block, which can include the following steps.
[0098] The hash value of the i-th sub-calling block is calculated according to the link metadata in the decrypted i-th sub-calling block.
[0099] The calling data hash value in the link metadata of the i-th sub-calling block is determined by the following method.
[0100] The calling request data of the i-th sub-calling block and the calling response data of the i-th sub-calling block are respectively subjected to hash value calculation to obtain the corresponding calling request hash value and calling response hash value.
[0101] The hash value is calculated by merging the call request hash value and the call response hash value to obtain the call data hash value in the link metadata of the i-th layer sub-call block.
[0102] In this embodiment, the data of the sub-call block may specifically include two parts.
[0103] The first part contains the specific data of the call between the two servers, which may include the call request data (Request) and the call response data (Response).
[0104] The second part is the link metadata describing the link, which specifically includes: 64-bit call chain tree number data (TraceId), 64-bit identity identification data, hash value of the upper-level sub-call block (PrevHash), call data hash value of the current sub-call block (MerkleHash), data byte length (Bits), random value (Nounce), timestamp (Timestamp), communication end information, and annotation information (Annotation).
[0105] Among them, such as Figure 4 The diagram illustrates the annotation information structure of a sub-call block. Specifically, the annotation information of the sub-call block includes four types of events and their corresponding timestamps: the client sending call request data to the server, the server receiving call request data from the client, the server sending call response data to the server, and the client receiving call response data from the server.
[0106] When calculating the hash value of a sub-call block, first calculate the hash value of the call request data and the call response data separately to obtain the corresponding call request hash value and call response hash value; then merge the call request hash value and the call response hash value and perform hash value calculation to obtain the call data hash value of the current sub-call block.
[0107] Then, the hash value of the sub-call block can be obtained by using the SHA256 function to calculate the hash value of the link metadata in the sub-call block.
[0108] In this embodiment, hash values are first calculated on the call request data and call response data to obtain complete link metadata; then, hash values are calculated on the link metadata to obtain the hash value corresponding to the sub-call block. Thus, by calculating the hash value corresponding to the sub-call block, this embodiment facilitates subsequent association of each sub-call block using the hash value, enabling link tracing based on the hash value, timely detection of whether call information has been tampered with, and improving the reliability of link tracing results.
[0109] As an optional embodiment, after S101, the link tracking method can further include:
[0110] displaying a search information input box on the target interface;
[0111] in response to an operation of inputting target search information in the search information input box, screening the second root call block matching the target search information from the candidate root call blocks.
[0112] In the embodiment, in addition to displaying the candidate root call blocks, the target interface can also display the search information input box.
[0113] The user can input search information in the search information input box, so as to automatically query the second root call block matching the search information from the candidate root call blocks.
[0114] Through the embodiment, the search information input box is used for the user to input search information, so that the user can conveniently query the root call block matching the search information, thereby improving the determination speed of the root call block.
[0115] Based on the link tracking method, the application also provides a specific embodiment of a link tracking system.
[0116] As shown in Figure 5 , a structural schematic diagram of a link tracking system is provided.
[0117] Specifically, the link tracking system includes a service cluster system 510, a link analysis service system 520, and a controller 530, the service cluster system 510 includes communication ends 511 and communication end databases 512 corresponding to the communication ends 511, the link analysis service system 520 includes a link information collector 521, a storage module 522, a data query interface 523, and a target interface 524;
[0118] The communication end 511 is configured to call other communication ends 511 to generate corresponding root call blocks and sub-call blocks.
[0119] The communication end database 512 is connected with the corresponding communication end 511 and is configured to store the sub-call blocks corresponding to the communication end 511.
[0120] The link information collector 521 is connected with the communication end 511 and is configured to receive the root call blocks generated by the communication end 511.
[0121] The storage module 522 is connected with the link information collector 521 and is configured to store the root call blocks received by the link information collector 521.
[0122] The data query interface 523 is connected with the storage module 522 and each communication terminal 511, and is configured to provide a query service for each root calling block and each sub-calling block.
[0123] The target interface 524 is connected with the data query interface 523, and is configured to display each candidate root calling block and display a search information input box.
[0124] The controller 530 is connected with the service cluster system 510 and the link analysis service system 520, and is configured to execute the link tracking method provided in any one of the above embodiments.
[0125] Based on the link tracking method, the application further provides a specific embodiment of a link tracking device.
[0126] As shown in Figure 6 The link tracking device provided in the embodiment of the application includes a calling block display module 610, a hash value calculation module 620, a sub-calling block query module 630, a loop execution module 640, and a link tree construction module 650.
[0127] The calling block display module 610 is configured to display each candidate root calling block on a target interface.
[0128] The hash value calculation module 620 is configured to calculate a hash value of a first root calling block in response to an input of selecting the first root calling block from each candidate root calling block.
[0129] The sub-calling block query module 630 is configured to query a first layer sub-calling block matched with the hash value from a database according to the hash value of the first root calling block, and the sub-calling block includes a hash value of an upper calling block corresponding to the sub-calling block.
[0130] The loop execution module 640 is configured to cyclically execute the following steps until a preset query end condition is met, and obtain a plurality of layers of sub-calling blocks of the first root calling block: query an i+1 layer sub-calling block matched with a hash value from a database according to a hash value of an i layer sub-calling block, and update i to i+1, and the initial value of i is 1.
[0131] The link tree construction module 650 is configured to construct and generate a calling link tree corresponding to the first root calling block according to a calling block matching relationship corresponding to each hash value, and generate the first root calling block and the plurality of layers of sub-calling blocks.
[0132] As an optional real-time example, the sub-calling blocks are stored in a corresponding communication terminal database.
[0133] In response to the input of selecting the first root calling block from each candidate root calling block, and after calculating the hash value of the first root calling block, the link tracking device further includes:
[0134] The information acquisition module is used to acquire communication terminal information in the first call block;
[0135] The address determination module is used to determine the communication terminal database address of the first-level sub-call block corresponding to the first call block based on the communication terminal information.
[0136] Sub-call block query module 630, specifically used for:
[0137] Based on the hash value of the first call block and the communication end database address of the first-level sub-call block, the first-level sub-call block that matches the hash value is retrieved from the corresponding communication end database.
[0138] As an optional embodiment, the data in the sub-call block is encrypted using a random value from the corresponding upper-level call block;
[0139] The loop execution module 640 may specifically include:
[0140] The loop execution unit is used to repeatedly execute the following units until the preset query termination condition is met, resulting in a multi-level sub-call block of the first call block:
[0141] The data decryption unit is used to decrypt the data of the i-th sub-call block using the random value in the (i-1)-th sub-call block;
[0142] The hash value calculation unit is used to calculate the hash value of the i-th sub-call block based on the data of the decrypted i-th sub-call block;
[0143] The sub-call block matching unit is used to query the database to obtain the (i+1)th level sub-call block that matches the hash value of the i-th level sub-call block.
[0144] The condition judgment unit is used to determine whether the preset query termination condition is met.
[0145] The data update unit is used to update i to i+1 if the preset query termination condition is not met.
[0146] As an optional embodiment, the data of the sub-call block includes call request data, call response data, and link metadata, wherein the link metadata includes the call data hash value;
[0147] Hash value calculation unit, specifically used for:
[0148] The hash value of the i-th level sub-call block is obtained by calculating the hash value of the link metadata in the decrypted i-th level sub-call block;
[0149] The call data hash value in the link metadata of the i-th layer sub-call block is determined by the following sub-units:
[0150] a hash value calculation subunit, configured to calculate hash values of the calling request data of the i-th layer sub-call block and the calling response data of the i-th layer sub-call block respectively, to obtain corresponding calling request hash values and calling response hash values;
[0151] The hash value calculation subunit is further configured to calculate hash values after the calling request hash values and the calling response hash values are combined, to obtain the calling data hash values in the link metadata of the i-th layer sub-call block.
[0152] As an optional embodiment, after the candidate root call blocks are displayed on the target interface, the link tracking device further includes the following modules:
[0153] An input box display module is configured to display a search information input box on the target interface.
[0154] A sub-call block screening module is configured to, in response to an operation of inputting target search information in the search information input box, screen the second root call block matching the target search information from the candidate root call blocks.
[0155] Figure 7 A hardware structure schematic diagram of a link tracking device provided by an embodiment of the present application is shown.
[0156] The link tracking device can include a processor 701 and a memory 702 storing computer program instructions.
[0157] Specifically, the processor 701 can include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or can be configured to implement one or more integrated circuits of the embodiments of the present application.
[0158] The memory 702 can include a mass storage for data or instructions. By way of example and not limitation, the memory 702 can include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. Where appropriate, the memory 702 can include removable or non-removable (or fixed) media. Where appropriate, the memory 702 can be internal or external to the integrated gateway disaster recovery device. In a particular embodiment, the memory 702 is a non-volatile solid-state memory.
[0159] The processor 701 reads and executes the computer program instructions stored in the memory 702 to implement any of the link tracking methods in the above embodiments.
[0160] In one example, the link tracking device can further include a communication interface 703 and a bus 710. As shown, the processor 701, the memory 702, the communication interface 703 are connected and accomplish communication with each other through the bus 710. Figure 7
[0161] The communication interface 703 is mainly used to realize the communication between each module, device, unit and / or equipment in the embodiments of the present application.
[0162] The bus 710 includes hardware, software or both to couple components of the link tracking device to each other. By way of example, and not limitation, the bus can include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand (IB) interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association local (VLB) bus, or another suitable bus or a combination of two or more of these. Where suitable, the bus 710 can include one or more buses. Although specific buses are described and shown in the embodiments of the present application, the present application contemplates any suitable bus or interconnect.
[0163] In addition, in combination with the link tracking method in the above embodiments, the embodiments of the present application can provide a computer storage medium to implement. The computer storage medium has computer program instructions stored thereon; the computer program instructions are executed by a processor to implement any one of the link tracking methods in the above embodiments.
[0164] In addition, in combination with the link tracking method in the above embodiments, the embodiments of the present application can provide a computer program product to implement, the instructions in the computer program product are executed by the processor of the electronic device, so that the electronic device executes the link tracking method provided by any one of the above embodiments of the present application.
[0165] It should be clear that the present application is not limited to the specific configurations and processes described above and shown in the drawings. For the sake of brevity, detailed descriptions of well-known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make every change, modification and addition, or change the order between steps, after understanding the spirit of the present application.
[0166] The functional blocks shown in the above-described structural diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. Programs or code segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried on a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.
[0167] It should also be noted that the exemplary embodiments mentioned in this application describe methods or systems based on a series of steps or apparatus. However, this application is not limited to the order of the above steps; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.
[0168] Each aspect of this disclosure has been described above with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block in the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that these instructions, executable via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions / actions specified in one or more blocks of the flowchart illustrations and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It is also understood that each block in the block diagrams and / or flowchart illustrations, and combinations of blocks in the block diagrams and / or flowchart illustrations, can also be implemented by special-purpose hardware performing the specified functions or actions, or can be implemented by a combination of special-purpose hardware and computer instructions.
[0169] The above merely describes a specific implementation of the present application. Those skilled in the art can clearly understand the specific working processes of the system, modules and units described above for the convenience and brevity of description, and can refer to the corresponding processes in the foregoing method embodiments, which will not be described herein again. It should be understood that the protection scope of the present application is not limited to this. Any person skilled in the art can easily think of each equivalent modification or replacement within the technical range disclosed in the present application, and these modifications or replacements shall be covered within the protection scope of the present application.
Claims
1. A link trace method characterized by, The method comprises: displaying each candidate root call block on a target interface; in response to an input of selecting a first root call block from each of the candidate root call blocks, calculating a hash value of the first root call block; according to the hash value of the first root call block, querying a first layer sub-call block matching the hash value from a database, wherein the sub-call block comprises a hash value of an upper layer call block corresponding to the sub-call block; recursively performing the following steps until a preset query end condition is met to obtain a plurality of layers of sub-call blocks of the first root call block: according to a hash value of an i-th layer sub-call block, querying an (i+1)-th layer sub-call block matching the hash value from the database, and updating i to i+1, wherein the initial value of i is 1; according to a call block matching relationship corresponding to each of the hash values, constructing and generating a call link tree corresponding to the first root call block from the first root call block and the plurality of layers of sub-call blocks.
2. The method of claim 1, wherein, The sub-call block is stored in a corresponding communication terminal database; after the step of calculating the hash value of the first root call block in response to the input of selecting the first root call block from each of the candidate root call blocks, the method further comprises: obtaining communication terminal information in the first root call block; determining a communication terminal database address of a first layer sub-call block corresponding to the first root call block according to the communication terminal information; the step of querying a first layer sub-call block matching the hash value from a database according to the hash value of the first root call block comprises: querying the first layer sub-call block matching the hash value from the corresponding communication terminal database according to the hash value of the first root call block and the communication terminal database address of the first layer sub-call block.
3. The method of claim 2, wherein, The preset query end condition is that there is no corresponding communication terminal information in the (i+1)-th layer sub-call block.
4. The method of claim 1, wherein, Data in the sub-call block is encrypted by using a random value in an upper layer call block corresponding to the sub-call block; the step of recursively performing the following steps until a preset query end condition is met to obtain a plurality of layers of sub-call blocks of the first root call block: according to a hash value of an i-th layer sub-call block, querying an (i+1)-th layer sub-call block matching the hash value from the database, and updating i to i+1, comprises: recursively performing the following steps until a preset query end condition is met to obtain a plurality of layers of sub-call blocks of the first root call block: decrypting data of the i-th layer sub-call block by using a random value in an (i-1)-th layer sub-call block; calculating a hash value of the i-th layer sub-call block according to the decrypted data of the i-th layer sub-call block; according to the hash value of the i-th layer sub-call block, querying an (i+1)-th layer sub-call block matching the hash value from a database; determining whether a preset query end condition is met; in the case where the preset query end condition is not met, updating i to i+1.
5. The method of claim 4, wherein, Data of the sub-call block comprises call request data, call response data and link metadata, and the link metadata comprises a call data hash value; the step of calculating a hash value of the i-th layer sub-call block according to the decrypted data of the i-th layer sub-call block comprises: Hash value calculation is performed on the link metadata in the decrypted i-th layer sub-call block, to obtain a hash value of the i-th layer sub-call block; The call data hash value in the link metadata of the i-th layer sub-call block is determined in the following manner: Hash value calculation is performed on the call request data of the i-th layer sub-call block and the call response data of the i-th layer sub-call block, to obtain a corresponding call request hash value and a call response hash value; Hash value calculation is performed on the call request hash value and the call response hash value after they are combined, to obtain the call data hash value in the link metadata of the i-th layer sub-call block.
6. The method according to any one of claims 1 to 5, characterized in that, After the target interface displays each candidate root call block, the method further includes: Displaying a search information input box on the target interface; In response to an operation of inputting target search information in the search information input box, a second root call block that matches the target search information is filtered from each candidate root call block.
7. A link tracking apparatus characterized by comprising: The device includes: A call block display module configured to display each candidate root call block on a target interface; A hash value calculation module configured to calculate a hash value of a first root call block in response to an input of selecting the first root call block from each candidate root call block; A sub-call block query module configured to query a first layer sub-call block that matches the hash value of the first root call block from a database, wherein the sub-call block includes a hash value of an upper call block corresponding to the sub-call block; A loop execution module configured to loop the following steps until a preset query end condition is met, to obtain a plurality of layers of sub-call blocks of the first root call block: querying an i+1-th layer sub-call block that matches the hash value of an i-th layer sub-call block from the database, and updating i to i+1, wherein the initial value of i is 1; A link tree construction module configured to construct a call link tree corresponding to the first root call block from the first root call block and the plurality of layers of sub-call blocks according to a matching relationship between each hash value and a call block.
8. A link tracking system, characterized by The system includes a service cluster system, a link analysis service system, and a controller. The service cluster system includes each communication end and a communication end database corresponding to each communication end. The link analysis service system includes a link information collector, a storage module, a data query interface, and a target interface. The communication end is configured to call between other communication ends, to generate a corresponding root call block and a sub-call block. The communication end database is connected to the corresponding communication end, and is configured to store a sub-call block corresponding to the communication end. The link information collector is connected to each communication end, and is configured to receive a root call block generated by each communication end. The storage module is connected to the link information collector, and is configured to store each root call block received by the link information collector. The data query interface is connected to the storage module and each communication end, and is configured to provide a query service for each root call block and each sub-call block. The target interface is connected with the data query interface, and is used for displaying each candidate root calling block and displaying a search information input box; The controller is connected with the service cluster system and the link analysis service system, and is used for executing the link tracking method according to any one of claims 1-6.
9. An electronic device, comprising: The device comprises a processor and a memory storing computer program instructions; The processor executes the computer program instructions to implement the link tracking method according to any one of claims 1-6.
10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer program instructions, and the computer program instructions are executed by the processor to implement the link tracking method according to any one of claims 1-6.
11. A computer program product, characterised in that, The instructions in the computer program product are executed by the processor of the electronic device, so that the electronic device executes the link tracking method according to any one of claims 1-6.
Citation Information
Patent Citations
Full-link monitoring method, device and system based on block chain
CN110457190A
Distributed service full-link monitoring method and device, electronic equipment and storage medium
CN113987074A