CN112148508A - Information processing method and related device - Google Patents

Information processing method and related device Download PDF

Info

Publication number
CN112148508A
CN112148508A CN202011063115.7A CN202011063115A CN112148508A CN 112148508 A CN112148508 A CN 112148508A CN 202011063115 A CN202011063115 A CN 202011063115A CN 112148508 A CN112148508 A CN 112148508A
Authority
CN
China
Prior art keywords
request
information
module
response
data
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
CN202011063115.7A
Other languages
Chinese (zh)
Other versions
CN112148508B (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.)
Etekcity Corp
Original Assignee
Etekcity Corp
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 Etekcity Corp filed Critical Etekcity Corp
Priority to CN202011063115.7A priority Critical patent/CN112148508B/en
Publication of CN112148508A publication Critical patent/CN112148508A/en
Application granted granted Critical
Publication of CN112148508B publication Critical patent/CN112148508B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/541Client-server
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/544Remote

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)
  • Computer And Data Communications (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the application discloses an information processing method and a related device, the method determines whether a request is a slow request or an error request by judging whether second related data of a request response meets a preset condition, so that the related information of the requests is pertinently transmitted to an information collection module for storage, and the related information does not need to be transmitted by other requests which do not meet the preset condition, thereby saving the transmitted data volume and the system overhead and reducing the data transmission volume and the storage volume in a distributed link tracking system.

Description

Information processing method and related device
Technical Field
The embodiment of the application relates to the technical field of information processing, in particular to an information processing method and a related device.
Background
With the increasing complexity of network services, especially with the rise of micro-service architecture and container technology, it seems as a simple application, and the background may have tens or even hundreds of services supported. For example, a request may require multiple service calls, go through a complex link procedure, and be completed. When a request is delayed or unavailable, the system needs to quickly locate the point of failure of the service, locate the location of the service where the failure or response is slow for subsequent processing. In the current technology, the zipkin distributed tracking system technology can find the background service which has a fault or has slow response. The scheme of the zipkin distributed tracking system is that a tracking identity number (ID), a span identity number (span ID) and other identifications are added in a request to mark a request and related sub-requests, then related data of the requests are transmitted to a collector (collector), then the data are stored in a database of a storage (storage), and the data are inquired and stored by an Application Programming Interface (API), and finally the data can be displayed on a User Interface (User Interface).
However, when the request amount is large, the Zipkin distributed tracking system has a large overhead for collecting and storing data, but occupies a large amount of memory and data transmission, and affects the performance of the system. In the case of large requests, the solution of Zipkin is to collect only part of the data by data sampling. However, the sampling method may cause part of the critical request data to be lost, thereby affecting fault location, and the sampling pertinence is also insufficient.
Disclosure of Invention
The embodiment of the application provides an information processing method and a related device, which can acquire data according with a qualified request and reduce the data transmission quantity and the storage quantity in a distributed link tracking system.
In a first aspect, the present application provides an information processing method, including: receiving a request and recording first related data of the request; sending the request to a service module so that the service module generates first relevant information of the request and returns a response corresponding to the request; receiving the response and determining second relevant data of the response; generating the requested second related information according to the first related data and the second related data; and when the second related data meet a preset condition, sending the second related information to an information collection module, and sending indication information to the service module, wherein the indication information is used for indicating the service module to send the first related information to the information collection module.
With reference to the first aspect, in an implementation manner of this embodiment of the present application, before sending the request to the service module, the method further includes: adding a link trace identification to the request.
With reference to the first aspect, in an implementation manner of an embodiment of the present application, the indication information includes a link tracking identifier; the indication information is used for indicating the service module to send the first related information matched with the link tracking identifier to the information collection module.
With reference to the first aspect, in an implementation manner of an embodiment of the present application, when the second related data meets the preset condition, the sending the second related information to the information collecting module includes: the second correlation data comprises a response duration; and if the response time length exceeds a preset time threshold, the request is a slow request, and the response meets the preset condition.
With reference to the first aspect, in an implementation manner of an embodiment of the present application, when the second related data meets the preset condition, the sending the second related information to the information collecting module includes: the second associated data comprises an error status code; and if the error state code is a preset value, the request is an error request, and the response meets the preset condition.
With reference to the first aspect, in an implementation manner of the embodiment of the present application, the method further includes: if the response is not received, the request is a slow request, the second related information is sent to an information collection module, and indication information is sent to the service module, wherein the indication information is used for indicating the service module to send the first related information to the information collection module.
With reference to the first aspect, in an implementation manner of an embodiment of the present application, after the sending the second relevant information to an information collection module, the method further includes: and deleting the stored second related information.
In a second aspect, an embodiment of the present application provides an information processing apparatus, including: the receiving module is used for receiving a request and recording first related data of the request; the sending module is used for sending the request to a service module so that the service module generates first related information of the request and returns a response corresponding to the request; the receiving module is further configured to receive the response and determine second related data of the response; the processing module is used for generating the second relevant information of the request according to the first relevant data and the second relevant data; when the second related data meets a preset condition, the sending module sends the second related information to an information collecting module, and sends indication information to the service module, wherein the indication information is used for indicating the service module to send the first related information to the information collecting module.
With reference to the second aspect, in an implementation manner of the embodiment of the present application, the processing module is further configured to add a link tracking identifier to the request.
With reference to the second aspect, in an implementation manner of the embodiment of the present application, the indication information includes a link tracking identifier; the indication information is used for indicating the service module to send the first related information matched with the link tracking identifier to the information collection module.
With reference to the second aspect, in an implementation manner of the embodiment of the present application, the second related data includes a response time length; and if the response time length exceeds a preset time threshold, the request is a slow request, and the response meets the preset condition.
With reference to the second aspect, in an implementation manner of the embodiment of the present application, the second related data includes an error status code; and if the error state code is a preset value, the request is an error request, and the response meets the preset condition.
With reference to the second aspect, in an implementation manner of the embodiment of the present application, if the response is not received, the request is a slow request, and the sending module sends the second related information to an information collecting module, and sends indication information to the service module, where the indication information is used to indicate the service module to send the first related information to the information collecting module.
With reference to the second aspect, in an implementation manner of the embodiment of the present application, the processing module is further configured to delete the stored second related information.
In a third aspect, an embodiment of the present application provides a network device, where the network device includes one or more processors, a memory, and a communication interface; the memory has program code stored therein; the processor, when executing the program code in the memory, implements the method of the first aspect.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium, which when executed on a computer device, causes the computer device to perform the method according to the first aspect.
According to the technical scheme, the embodiment of the application has the following advantages:
in a traditional Zipkin system, a service node sends each piece of request information (sampled) to an information collection module, which results in large data transmission amount, frequent jamming when the service is busy, frequent loss of part of data, and very possible loss of critical data. According to the information processing method provided by the embodiment of the application, the gateway module can inform the service module (namely each service node) to confirm which requests meet the preset conditions, and then the service module can only send the request related information meeting the preset conditions, so that the data transmission quantity is reduced, the pertinence is strong, and the key data cannot be lost.
Drawings
Fig. 1 is a schematic view of an application scenario provided in an embodiment of the present application;
fig. 2 is a flowchart of an information processing method according to an embodiment of the present application;
fig. 3 is a schematic diagram of another embodiment of an information processing method provided in an embodiment of the present application;
fig. 4 is a schematic structural diagram of a network device according to an embodiment of the present application;
fig. 5 is a schematic diagram of an information processing apparatus according to an embodiment of the present application.
Detailed Description
The embodiment of the application provides an information processing method and a related device, which can acquire data according with a qualified request and reduce the data transmission quantity and the storage quantity in a distributed link tracking system.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims of the present application and in the drawings described above, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "corresponding" and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In the embodiments of the present application, words such as "exemplary" or "for example" are used to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "exemplary" or "e.g.," is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the word "exemplary" or "such as" is intended to present concepts related in a concrete fashion.
Fig. 1 is a schematic view of an application scenario provided in an embodiment of the present application.
The request end sends out a request, and the request reaches the service module through the gateway module.
In one embodiment of the application, a request is sent by a requesting end to invoke a service in a business module. The request is sent from the request end, firstly reaches the gateway module, and then is sent from the gateway module to the service module.
The request end may be a user terminal (a protocol of the user terminal is not limited to an Application (APP) protocol, a web page protocol, a user script protocol, and the like) or a third-party cloud platform, which is not limited in this embodiment of the present application. The user terminal may include, but is not limited to, a mobile phone, a smart terminal (e.g., a smoke alarm, a smart door lock), and the like.
The gateway module may be an application gateway, a protocol gateway, or the like implemented by a server. The embodiment of the present application does not limit the gateway type of the gateway module. When a request passes through the gateway module, the gateway module records relevant data of the request, such as the time when the request reaches the gateway, a path identifier, a next service node call, departure time and the like.
In an embodiment of the present application, when a request reaches a service module through a gateway module, the request usually passes through a plurality of service nodes in the service module, and multiple calls are performed between the service nodes, respectively, to form a complex path.
The service module may include a plurality of service nodes implemented on one server, or may include a plurality of service nodes implemented on a plurality of servers. The request end sends a request, the request reaches each required node in the service module through the gateway module, and after receiving the request, the service module records the relevant information of the request and returns the corresponding response to the gateway module. The relevant information of the request recorded by the service module includes, but is not limited to, the arrival time, departure time, path identification, etc. of the request. The response returned by the service module generally includes an error status code of the request processing result and the service content of the request processing result, and the content of the response is generally related to the request type, which is not limited in this embodiment of the present application.
In an embodiment of the application, in the process that the request is received by the service module and a response is returned, the gateway module and the service module respectively send data related to the request, which are stored by the gateway module and the service module, to the information collection module, and the collection module sends the data to the database of the storage module for storage.
The information collection module is a device with a computing function for collecting the requested related data, and verifies, stores, and creates an index required by the query on the data, and the like, which is not limited in this embodiment of the present application. The storage module is used for storing the relevant data of the request collected by the information collector.
Fig. 2 is a flowchart of an information processing method according to an embodiment of the present application. The process may be executed by the gateway module, and the process includes:
201. a request is received and first relevant data of the request is recorded.
In this embodiment, the gateway module may specifically obtain a request sent by a request end.
In this embodiment of the present application, the request may be a service request, and may also be referred to as a data request or other requests in practical application, which is not limited in this embodiment of the present application.
The gateway module may record first relevant data of the request. The meaning of the related data is the same as the above, that is, the time when the request reaches the gateway, the path identifier, the next service node is called, the leaving time, and the like. The embodiment of the present application is not limited thereto. These requested first relevant data and the second relevant data of the response from the service node received by the subsequent gateway module together form the second relevant information stored by the gateway module.
In this embodiment of the present application, the first related data may be cached in a memory of the gateway module. The gateway module may delete the first related data in the memory according to the expiration policy, so as to save memory resource overhead. The expiration policy is to set an expiration duration, start timing when the first related data is generated, and delete the first related data when the timing reaches the set expiration duration. In practical applications, the gateway module may also start timing after executing step 203 or step 204, which is not limited in this embodiment of the application.
202. Sending the request to a service module;
in this embodiment, the gateway module may send the request to the service module, so that the service module generates the first relevant information of the request and returns a response corresponding to the request.
In some embodiments, before the gateway module sends the request to the service module, the gateway module may add a link trace identifier to the request for trace identification of the request.
After the link tracking identifier is combined with the request, the gateway module sends a request for adding the link tracking identifier to the service module, and the request of the specific identifier can be determined to pass through different node paths in the service module according to the link tracking identifier, so that the tracking identification of the request path is realized.
In this embodiment of the present application, after receiving the request, the service module may generate first related information of the request. The first related information may include, but is not limited to, a request arrival time, a departure time, a path identifier, and the like, which is not limited in this embodiment.
The business module can also generate and return a response corresponding to the request. After receiving the request, the service module may process the request according to a normal flow and return a response corresponding to the request. The response includes an error status code of the request processing result, time information, and a service content of the request processing result, where the content of the response is generally related to the request type, and the embodiment of the present application is not limited thereto.
203. Receiving the response and determining second related data of the response;
in this embodiment, after receiving the response, the gateway module may determine second related data of the response, where the second related data generally includes an error status code indicating a request processing result and content of the request processing result, and the content of the response is generally related to the request type, which is not limited in this embodiment of the present application. The second related data further includes a time duration for the response itself to reach the gateway module, which is not limited in the embodiment of the present application. Specifically, the response time length is recorded by the gateway module, and the time difference between the time when the gateway module receives the request and the time when the gateway module returns the response to the request end may be the response time length. The request error status code indicates whether the service module successfully processed the request. The service module may carry the request error status code in a response and send the response to the gateway module.
In an embodiment of the present application, if the gateway module does not receive the response, it is not necessary to determine second related data of the response, and in step 204, second related information is directly generated according to the first related data, and in step 205, processing is performed according to a subsequent process in which the second related data meets a preset condition.
204. Generating second related information of the request according to the first related data and the second related data;
the gateway module itself stores relevant data when the request first reaches the gateway module, such as the time when the request reaches, the time when other modules are called, the request of other modules, and the like. Then, when the service module returns a response, the gateway module knows information about whether the request is executed and the response time length from the response. Therefore, the gateway module integrates the requested related data and the response, and can obtain the requested second related information. The second relevant information includes the time of the arrival of the request, the time of calling other modules, the address of calling the next module, and the response content such as an error status code and the response duration. In other embodiments, the second related information may also include other information related to the request.
In one embodiment of the application, the second correlation information is generated from the first correlation data if the gateway module does not receive a response.
The second related information not only can provide reference information for the gateway module to judge whether the service corresponding to the request fails, but also can facilitate the information collection module to screen after being sent to the information collection module.
In an embodiment of the application, the gateway module starts timing from a generation time of the second related information, and deletes the second related information if the timing reaches a second preset time.
The second preset time is a preset time for periodically cleaning the memory of the gateway module, which is set in the embodiment of the present application. Because the gateway module does not always store the requested second related information but sets a preset time after generating the second related information, in the embodiment of the present application, the second related information is set as the second preset time, and if the second related information still exists in the memory of the service module when the second preset time is reached by the timing. This avoids storing an excessive amount of data and periodically clears unnecessary data.
205. And when the second related data meet the preset conditions, sending second related information to the information collection module, and sending indication information to the service module.
In an embodiment of the present application, the preset condition may be that the error status code of the response is a preset value, and the preset value indicates that the request fails to be executed, and then the request is an error request. For example, an error code in the http protocol is used to indicate whether the private protocol under the http protocol has an error in response. When the error status code is 0, the gateway module may determine that the request is currently executed correctly. When the error status code is other numbers, the gateway module may determine that the associated request is an error, i.e., the request is an error request.
In another embodiment of the present application, the preset condition may be that the response time of the response reaching the gateway module exceeds a preset time threshold, and the request is a slow request.
In one embodiment of the present application, if the gateway module does not receive the response, the request is directly determined as a slow request without determining the second relevant data of the response. And processing according to the subsequent process that the second related data meets the preset conditions, namely sending the second related information to the information collection module and sending the indication information to the service module.
The slow request or the error request judged by the gateway module is a request meeting the preset condition, and the related information of the slow request or the error request needs to be recorded for subsequent analysis. In other embodiments, other conditions or criteria may also be used as the preset conditions to obtain the relevant information of the request meeting other preset conditions for subsequent analysis, and the preset conditions are not limited in the embodiments of the present application.
In an embodiment of the application, when the response meets a preset condition, the gateway module sends the second related information in the memory to the information collection module, and instructs the service module to send the first related information to the information collection module.
At this time, the gateway module recognizes the slow request and the error request, and sends the second related information of the request stored in the gateway module to the information collection module, and at this time, each node requested to access in the service module also needs to send the information related to the request to the information collection module, so that the requested information in the system can be completely collected. Therefore, the gateway module instructs the service module to send the first related information stored by the service module to the information collection module.
In an embodiment of the present application, after the gateway module sends the second related information, the second related information may be deleted from the memory. So as to achieve the technical effect of saving the storage space.
Similarly, in another embodiment of the present application, after the service module sends the first related information, the first related information may be deleted from the memory. The technical effects of saving storage space and avoiding overlarge data volume are achieved.
In some embodiments, the gateway module may add the same link tracking identifier as in step 202 above to the indication information when generating the indication information. Then after the service module receives the indication information, the service module sends first relevant information matched with the link tracking identification to the information collection module.
And the gateway module sends the requested link tracking identifier to the service module. After receiving the link tracking identifier, the service module can find out which nodes the request has passed through, how the transmission path is, which processing is performed at different nodes, and information such as arrival and departure time and residence time of each node, which is the first relevant information matched with the link tracking identifier of the request, according to the link tracking identifier. The first related information is held by each of the nodes in the service module through which the request passes. The service module receives the link tracking identification and sends the relevant information matched with the identification to the information collection module from each service node through which the request passes.
It can be understood that, the gateway module may send the link tracking identifier to all nodes in the service module in the system, and once the service node in the service module finds that the first related information corresponding to the link tracking identifier is stored, the first related information is sent to the information collection module.
In some embodiments, after the service module sends the first related information to the information collection module, the first related information may be deleted in the cache or deleted in an expiration policy manner, so as to reduce the data storage amount of the cache.
In this embodiment of the application, after receiving the first related information and the second related information, the information collection module (collector) may store the first related information and the second related information in a database of a storage module (storage).
The information collection module may further filter the received first related information and second related information, and then send the first related information and the second related information to the storage module, which is not limited in this application. The storage module is a memory with a storage function, and the database can be various types of databases.
According to the embodiment of the application, whether the second related data of the response from the service module meets the preset condition is judged by the gateway module, whether the request belongs to the slow request and the error request is determined, so that the related information of the problematic requests is pertinently transmitted to the information collection module for storage, and the other requests which do not meet the preset condition, such as the normally executed requests, do not need to transmit the related information, so that the transmitted data volume and the system overhead are saved, and the data transmission volume and the storage volume in the distributed link tracking system are reduced. And meanwhile, an expiration strategy is set, and after a certain preset time, the gateway module and the service module delete the respective stored information, so that the memory occupation is reduced. Hereinafter, more detailed examples will be provided to illustrate the technical solutions of the present application.
Fig. 3 is a schematic diagram of another embodiment of an information processing method according to an embodiment of the present application. The schematic diagram includes the following flow:
301. the request end sends a request to the gateway module.
In this embodiment of the application, the request end may send a request to the gateway module, which is similar to the description in step 201 and is not described here again.
302. The gateway module receives the request and records the first relevant data of the request.
The gateway module receives a request from a request end, and records first related data of the request, where the first related data includes, but is not limited to, a request time, a time for calling other modules, a next node for calling, and the like.
It can be understood that the gateway module may set a reasonable expiration policy to delete the first related data whose timing exceeds the preset threshold, so as to prevent the memory from being occupied too much.
303. The gateway module adds a link tracking identifier in the request and sends the request to the service module.
The link tracking identifier may be a traceID, a parentId, a spanId, and the like, which is not limited in this embodiment of the present application. After the link tracking identifier is combined with the request, the request is sent to a service module, and then a request path can be determined according to the link tracking identifier, so that the request is tracked.
304. And the service module receives the request, generates first relevant information of the request and returns a response corresponding to the request.
In the embodiment of the application, after receiving the request, the service module records the relevant information of the request. It will be appreciated that the type of information associated with the request held at the gateway module and the type of information associated with the request held by the service module may be similar, but differ in content, as the time at which the request is transmitted between the gateway module and the service module, the network nodes that pass through, and the circumstances under which it is processed differ. Therefore, in this embodiment of the present application, the relevant information of the request stored by the service module is referred to as first relevant information, and the relevant information of the request stored at the gateway module is referred to as second relevant information.
In this embodiment, the service module returns a response corresponding to the request.
And after processing the request, the service module generates and returns a response corresponding to the request to the gateway. The response includes an error status code of the request processing result, time information, and a service content of the request processing result, where the content of the response is generally related to the request type, and the embodiment of the present application is not limited thereto.
305. The gateway module receives the response and determines second associated data for the response.
In this embodiment, after receiving the response, the gateway module may obtain the second relevant data of the response. The second correlation data includes a response time length, an error status code, and the like.
The response duration may be a duration between the gateway module sending the request and receiving the request response.
Wherein the error status code indicates whether the service module successfully processed the request. For example, an error status code (error code) in the http protocol is 0, which indicates that the request is executed correctly. If the error status code is another number, it indicates a request error.
In one embodiment of the present application, if the gateway module does not receive the response, the request is directly determined as a slow request without determining the second relevant data of the response. And processing according to the subsequent process that the second related data meets the preset conditions.
306. And the gateway module generates the requested second relevant information according to the first relevant data and the second relevant data.
In an embodiment of the application, the first related data is information about a request stored by a gateway module when the request first reaches a gateway; the second relevant data is information about the request carried when the response of the request is returned to the gateway module.
In one embodiment of the application, the second relevant information is all information saved at the gateway module about the request.
In an embodiment of the present application, if the gateway module does not receive the response, it is not necessary to determine the second related data of the response, and directly determines the request as a slow request, where the first related data is the second related information.
In one embodiment of the application, the second correlation information is generated in accordance with the first correlation data if the gateway module does not receive a response.
307. And when the second related data meet the preset conditions, the gateway module sends the second related information to the information collection module and sends indication information comprising the link tracking identifier to the service module.
In one embodiment of the present application, the preset condition is: the response time exceeds a preset time threshold, or the error state code is a preset value. The preset time threshold is a timeout threshold of the response, and the preset value of the error status code indicates that the request is not executed correctly.
When the response time length contained in the second related data exceeds a preset time threshold, the second related data meets a preset condition, and the request is a slow request;
when the response error status code included in the second related data is a preset value, the second related data meets a preset condition, and the request is an error request.
In one embodiment of the present application, the gateway module directly determines the request as a slow request if no response is received.
The slow request or the error request is a request which needs to be focused, and the second related data meets one of the requests, namely the second related data meets the preset condition. In practical application, a manager can also set other preset conditions to acquire relevant information meeting the requests of other preset conditions for subsequent analysis, and the preset conditions are not limited in the embodiment of the application.
In an embodiment of the application, when the second related data meets a preset condition, the gateway module sends the second related information to the information collection module, and sends the indication information to the service module.
The meeting of the preset condition represents that the request is a slow request or an error request, namely a request needing attention, and therefore the second relevant information of the request is sent to the information collection module for collection.
In the embodiment of the present application, after the gateway module sends the second related information to the information collection module, the second related information may be deleted from the memory, so as to avoid the memory from being occupied too much.
In another embodiment of the present application, an expiration policy is set to delete the second related information. For example, the gateway module stores the second related information, and the request is correctly executed, that is, the second related data does not satisfy the preset condition, at this time, the second related information does not need to be sent to the information collection module, so a time limit is set, and when the time limit is reached, the second information is expired, and the gateway module automatically deletes the second related information, so as to reduce the cached data storage amount.
In one embodiment of the present application, when the second related data satisfies a preset condition, the gateway module sends indication information including a link tracking identifier to the service module.
The indication information comprises a link tracking identifier to indicate the service module to send the first related information matched with the link tracking identifier to the information collection module. The link trace identification is sent to all nodes of the traffic module to find the node that matches the requested link trace identification, thereby enabling link tracing.
308. And the service module receives the indication information and sends first related information to the information collection module according to the indication information.
In the embodiment of the application, the service module receives the indication information with the link tracking identifier sent by the gateway, finds the node matched with the link tracking identifier and the first related information about the request stored at each node according to the link tracking identifier.
The first related information may be all information about the request saved at the service module, such as the time of the request, the time of calling other modules, the address of the next node, and the like.
In an embodiment of the application, the service module finds the requested first relevant information and sends the first relevant information to the information collection module.
In the embodiment of the present application, after the service module sends the first related information to the information collection module, the first related information may be deleted from the memory, so as to avoid the memory from being occupied too much.
In another embodiment of the present application, an expiration policy is set to delete the first related information. For example, the service module stores the first related information, and the request is executed correctly, and at this time, the first related information does not need to be sent to the information collection module, so a time limit is set, and when the time limit is reached, the first information is expired and is automatically deleted, so as to reduce the storage amount of the cached data.
It can be understood that, after the gateway module determines the slow request or the error request and sends the indication information to the service module, the gateway module sends the second related information to the information collection module and the service module sends the first related information to the information collection module according to the time sequence, which is not limited.
In the embodiment of the present application, after the information collection module receives the request related information, the information collection module may check and store the request related information in the database of the storage module. And the information collection module can use the first relevant information and the second relevant information to count and grade the slow requests and the error requests of each module in the system to form monitoring information. In the embodiment of the application, a monitoring and alarming module can be further arranged and used for collecting monitoring information from the information collecting module. When certain statistics in the monitoring information reach a threshold, an alarm is triggered.
According to the embodiment of the application, whether the second related data of the response from the service module meets the preset condition is judged by the gateway module, whether the request belongs to the slow request and the error request is determined, so that the related information of the problematic requests is pertinently transmitted to the information collection module for storage, and the other requests which do not meet the preset condition, such as the normally executed requests, do not need to transmit the related information, so that the transmitted data volume and the system overhead are saved, and the data transmission volume and the storage volume in the distributed link tracking system are reduced. And meanwhile, an expiration strategy is set, and after a certain preset time, the gateway module and the service module delete the respective stored information, so that the memory occupation is reduced, the pertinence is strong, and the key data cannot be lost.
Further, the information processing method provided by the embodiment of the present application caches the requested relevant information in the cache of each server (periodically refreshes), and sends the requested relevant information after receiving the notification, instead of directly sending the requested relevant information to the information collection module in real time, so that the data transmission amount and the storage amount inside the distributed link tracking system are reduced.
Fig. 4 is a schematic diagram of a network device according to an embodiment of the present application. The network device 400 includes: one or more processors 401, a memory 403, and a communication interface 404, the processors 401, memory 403, and communication interface 404 may be connected by a communication bus 402. The memory 403 is used for storing one or more programs; the one or more processors 401 are configured to execute the one or more programs, so that the network device 400 performs the methods corresponding to the above-described method embodiments. That is, the network device 400 may be a gateway module and a service module in the embodiment of the method shown in fig. 2 or fig. 3.
The processor 401 may be a general-purpose Central Processing Unit (CPU), a Network Processor (NP), a microprocessor, or one or more integrated circuits such as an application-specific integrated circuit (ASIC), a Programmable Logic Device (PLD), or a combination thereof for implementing the claimed subject matter. The PLD may be a Complex Programmable Logic Device (CPLD), a field-programmable gate array (FPGA), a General Array Logic (GAL), or any combination thereof.
A communication bus 402 is used to transfer information between the above components. The communication bus 402 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in FIG. 4, but this does not indicate only one bus or one type of bus.
The Memory 403 may be a read-only Memory (ROM) or other type of static storage device that can store static information and instructions, a Random Access Memory (RAM) or other type of dynamic storage device that can store information and instructions, an electrically erasable programmable read-only Memory (EEPROM), a compact disc read-only Memory (CD-ROM) or other optical disk storage, optical disk storage (including compact disc, laser disc, optical disc, digital versatile disc, blu-ray disc, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited thereto. The memory 403 may be separate and coupled to the processor 401 through a communication bus 402. The memory 403 may also be integrated with the processor 401.
The communication interface 404 may use any transceiver or the like for communicating with other devices or communication networks. The communication interface 404 includes a wired communication interface and may also include a wireless communication interface. The wired communication interface may be an ethernet interface, for example. The ethernet interface may be an optical interface, an electrical interface, or a combination thereof. The wireless communication interface may be a Wireless Local Area Network (WLAN) interface, a cellular network communication interface, or a combination thereof.
In particular implementations, processor 401 may include one or more CPUs such as CPU0 and CPU1 shown in fig. 4 as an example.
In particular implementations, network device 400 may include multiple processors, such as processor 401 and processor 405 shown in FIG. 4, for example, as an example. Each of these processors may be a single-Core Processor (CPU) or a multi-Core Processor (CPU). A processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (e.g., computer program instructions).
In particular implementations, network device 400 may also include an output device and an input device, as one embodiment. The output device, which is in communication with the processor 401, may display information in a variety of ways. For example, the output device may be a Liquid Crystal Display (LCD), a Light Emitting Diode (LED) display device, a Cathode Ray Tube (CRT) display device, a projector (projector), or the like. The input device is in communication with the processor 401 and may receive user input in a variety of ways. For example, the input device may be a mouse, a keyboard, a touch screen device, or a sensing device, among others.
In some embodiments, memory 403 is used to store program code 410 for performing aspects of the present application, and processor 401 may execute program code 410 stored in memory 403. That is, the network device 400 may implement the message processing method provided in the method embodiment through the processor 401 and the program code 410 in the memory 403.
The network device 400 of the embodiment of the present application may correspond to the gateway device in the above-described various method embodiments, and the processor 401, the communication interface 404, and the like in the network device 400 may implement the functions of the gateway device and/or various steps and methods implemented in the above-described various method embodiments. For brevity, no further description is provided herein.
An embodiment of the present application further provides a computer-readable storage medium, which when executed on a computer device, causes the computer device to perform all the steps in the embodiment corresponding to fig. 2.
Fig. 5 is a schematic diagram of an information processing apparatus according to an embodiment of the present application. The information processing apparatus 500 includes:
a receiving module 501, configured to execute step 201 and step 203 in each embodiment corresponding to fig. 2, or execute step 302 and step 305 in each embodiment corresponding to fig. 3.
A sending module 502, configured to execute step 202 and step 205 in each embodiment corresponding to fig. 2, or execute step 303 and step 307 in each embodiment corresponding to fig. 3.
A processing module 503, configured to execute step 204 in each embodiment corresponding to fig. 2 described above, or execute step 306 in each embodiment corresponding to fig. 3 described above.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In another aspect, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware or a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and the like.

Claims (10)

1. A method of information processing, comprising:
receiving a request and recording first related data of the request;
sending the request to a service module so that the service module generates first relevant information of the request and returns a response corresponding to the request;
receiving the response and determining second relevant data of the response;
generating the requested second related information according to the first related data and the second related data;
and when the second related data meet a preset condition, sending the second related information to an information collection module, and sending indication information to the service module, wherein the indication information is used for indicating the service module to send the first related information to the information collection module.
2. The method of claim 1, wherein prior to sending the request to the traffic module, further comprising:
adding a link trace identification to the request.
3. The method of claim 2, wherein the indication information comprises a link tracking identifier; the indication information is used for indicating the service module to send the first related information matched with the link tracking identifier to the information collection module.
4. The method according to any one of claims 1 to 3, wherein the sending the second relevant information to the information collection module when the second relevant data meets the preset condition comprises:
the second correlation data comprises a response duration;
and if the response time length exceeds a preset time threshold, the request is a slow request, and the response meets the preset condition.
5. The method according to any one of claims 1 to 3, wherein the sending the second relevant information to the information collection module when the second relevant data meets the preset condition comprises:
the second associated data comprises an error status code;
and if the error state code is a preset value, the request is an error request, and the response meets the preset condition.
6. The method of claim 1, further comprising:
if the response is not received, the request is a slow request, the second related information is sent to an information collection module, and indication information is sent to the service module, wherein the indication information is used for indicating the service module to send the first related information to the information collection module.
7. The method of claim 1, wherein after sending the second related information to an information collection module, the method further comprises:
and deleting the stored second related information.
8. An information processing apparatus, comprising:
the receiving module is used for receiving a request and recording first related data of the request;
the sending module is used for sending the request to a service module so that the service module generates first related information of the request and returns a response corresponding to the request;
the receiving module is further configured to receive the response and determine second related data of the response;
the processing module is used for generating the requested second related information according to the first related data and the second related data;
and when the second related data meet a preset condition, the sending module sends the second related information to an information collection module and sends indication information to the service module, wherein the indication information is used for indicating the service module to send the first related information to the information collection module.
9. A network device, comprising one or more processors, memory, and a communication interface;
the memory has program code stored therein;
the processor, when executing the program code in the memory, implements the method of any of claims 1 to 7.
10. A computer-readable storage medium, which when executed on a computer device, causes the computer device to perform the method of any one of claims 1 to 7.
CN202011063115.7A 2020-09-30 2020-09-30 Information processing method and related device Active CN112148508B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011063115.7A CN112148508B (en) 2020-09-30 2020-09-30 Information processing method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011063115.7A CN112148508B (en) 2020-09-30 2020-09-30 Information processing method and related device

Publications (2)

Publication Number Publication Date
CN112148508A true CN112148508A (en) 2020-12-29
CN112148508B CN112148508B (en) 2024-08-16

Family

ID=73951663

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011063115.7A Active CN112148508B (en) 2020-09-30 2020-09-30 Information processing method and related device

Country Status (1)

Country Link
CN (1) CN112148508B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112835655A (en) * 2021-02-26 2021-05-25 深圳市晨北科技有限公司 Transparent data transmission method, system, transmission terminal and storage medium
CN114153712A (en) * 2021-11-22 2022-03-08 深圳市晨北科技有限公司 Exception handling method, device, equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7478403B1 (en) * 2000-04-21 2009-01-13 Sun Microsystems, Inc. Secure access to managed network objects using a configurable platform-independent gateway providing individual object-level access control
CN104579788A (en) * 2015-01-21 2015-04-29 上海交通大学 Error positioning method for distributed dynamic routing network
US20150269326A1 (en) * 2013-10-14 2015-09-24 Medidata Solutions, Inc. System and method for preserving causality of audits
CN108429800A (en) * 2010-11-22 2018-08-21 杭州硕文软件有限公司 A kind of mobile device
CN110995658A (en) * 2019-11-12 2020-04-10 威富通科技有限公司 Gateway protection method, device, computer equipment and storage medium
CN111092778A (en) * 2019-12-31 2020-05-01 谷云科技(广州)有限责任公司 System and method for realizing API real-time early warning based on limited time sequence data queue
CN111404759A (en) * 2020-04-17 2020-07-10 腾讯科技(深圳)有限公司 Service detection method, rule configuration method, related device and medium
CN111711639A (en) * 2020-06-29 2020-09-25 深圳前海微众银行股份有限公司 Terminal, data transmission method, system, and computer-readable storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7478403B1 (en) * 2000-04-21 2009-01-13 Sun Microsystems, Inc. Secure access to managed network objects using a configurable platform-independent gateway providing individual object-level access control
CN108429800A (en) * 2010-11-22 2018-08-21 杭州硕文软件有限公司 A kind of mobile device
US20150269326A1 (en) * 2013-10-14 2015-09-24 Medidata Solutions, Inc. System and method for preserving causality of audits
CN104579788A (en) * 2015-01-21 2015-04-29 上海交通大学 Error positioning method for distributed dynamic routing network
CN110995658A (en) * 2019-11-12 2020-04-10 威富通科技有限公司 Gateway protection method, device, computer equipment and storage medium
CN111092778A (en) * 2019-12-31 2020-05-01 谷云科技(广州)有限责任公司 System and method for realizing API real-time early warning based on limited time sequence data queue
CN111404759A (en) * 2020-04-17 2020-07-10 腾讯科技(深圳)有限公司 Service detection method, rule configuration method, related device and medium
CN111711639A (en) * 2020-06-29 2020-09-25 深圳前海微众银行股份有限公司 Terminal, data transmission method, system, and computer-readable storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
BO YUAN, LU LIU, NICK ANTONOPOULOS: "A Self-organized Architecture for Efficient Service Discovery in Future Peer-to-Peer Online Social Networks", IEEE, 2 April 2016 (2016-04-02) *
陆龙龙: "分布式链路跟踪系统", 中国优秀硕士学位论文全文数据库, 15 August 2018 (2018-08-15) *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112835655A (en) * 2021-02-26 2021-05-25 深圳市晨北科技有限公司 Transparent data transmission method, system, transmission terminal and storage medium
CN112835655B (en) * 2021-02-26 2024-05-10 深圳市晨北科技有限公司 Transparent data transmission method, system, transmission terminal and storage medium
CN114153712A (en) * 2021-11-22 2022-03-08 深圳市晨北科技有限公司 Exception handling method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN112148508B (en) 2024-08-16

Similar Documents

Publication Publication Date Title
EP2563062B1 (en) Long connection management apparatus and link resource management method for long connection communication
CN109600258B (en) Industrial protocol message recording device and method
KR102167613B1 (en) Message push method and device
US20150170070A1 (en) Method, apparatus, and system for monitoring website
CN110362455B (en) Data processing method and data processing device
CN107172171B (en) Service request processing method and device and computer readable storage medium
CN111124819A (en) Method and device for monitoring full link
CN111522711B (en) Data monitoring processing system, method, execution end, monitoring end and electronic equipment
CN110932933B (en) Network condition monitoring method, computing device and computer storage medium
CN107181821A (en) A kind of information push method and device based on SSE specifications
CN112148508B (en) Information processing method and related device
CN114760233B (en) Service processing method, device, electronic equipment and storage medium
US20230087446A1 (en) Network monitoring method, electronic device and storage medium
CN110430070A (en) A kind of service state analysis method, device, server, data analysis equipment and medium
CN105893150B (en) Interface calling frequency control method and device and interface calling request processing method and device
CN114090293A (en) Service providing method and electronic equipment
CN110659247A (en) Method, device, equipment and medium for detecting continuity of call ticket file
CN117135580A (en) 5G message universal access system and method
CN112131198B (en) Log analysis method and device and electronic equipment
CN115333917A (en) CDN anomaly detection method and device
CN109951811B (en) Service number short message monitoring method, device and system
CN113760398A (en) Interface calling method, server, system and storage medium
CN112597354A (en) Method, device, system and storage medium for providing configuration parameters
CN111708689B (en) Method and device for modifying AB experiment and electronic equipment
WO2017166438A1 (en) Method and apparatus for managing application state

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