Full-link information processing method, system, electronic device and storage medium

By building independent cluster and gateway routing strategies in the microservice architecture, combining load balancing and Java Agent technology, the automatic transmission of full-link information is achieved, and the problems of log dispersion and cross-thread delivery in the microservice architecture are solved, and the service response efficiency is improved and availability, reducing user costs.

CN115022389BActive Publication Date: 2024-12-20CTRIP TRAVEL NETWORK TECH SHANGHAI0
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210589006.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-26
Publication Date
2024-12-20
Estimated Expiration
2042-05-26

AI Technical Summary

Technical Problem

In the microservice architecture, each microservice is scattered on different servers, resulting in dispersion of log files, causing difficulties in full-link cascade and tracing. Too many log files affect service response time and throughput, and pass identifiers across threads There is an intrusion problem, affecting the call relationship.

Method used

By building an independent and isolated setting cluster, obtain the request association information of the gateway request, determine the gateway routing policy, jump the request to the target cluster, and use load balancing and Java Agent bytecode dynamic modification technology to achieve automatic full-link information Pass to avoid intrusion into business by cross-process delivery.

Benefits of technology

Solve the problems of long response time and low throughput caused by excessive information in full-link scenarios, ensure high availability of online services, reduce the cost of user access and using the system, and avoid the interference of cross-process delivery to services. .

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115022389B_ABST
    Figure CN115022389B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, system, electronic device and storage medium for processing full-link information, wherein the processing method includes: constructing a number of setting clusters that are independently and isolatedly deployed, and different setting clusters correspond to different services; obtaining request association information corresponding to a gateway request; determining a gateway routing strategy corresponding to the request association information, and different gateway routing strategies correspond to redirecting the gateway request to different setting clusters; and processing the full-link information corresponding to the gateway request according to the gateway routing strategy. The present invention effectively solves the performance problems of long online service response time and low throughput caused by excessive information in full-link scenarios, ensures the high availability of online services, solves the problem of intrusion of cross-process transmission of identifiers into the business, and reduces the cost of user access and use of the system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, system, electronic device and storage medium for processing full-link information. Background Art

[0002] Monolithic services concentrate the service functions of all applications in one system. This will cause the projects in the architecture to be too bloated and unable to achieve resource isolation and resource expansion. As a result, microservice technology has emerged. Microservice technology uses a single application as a set of small service development methods. In a microservice system, an application request is split into different application functions, and then these microservices with different application functions are distributed to different servers. The microservice architecture has the advantages of independent deployment, flexible expansion, and effective resource isolation.

[0003] However, when the monolithic service is split into microservices, since each microservice is scattered on different servers, each microservice will generate a large number of log files in the process of being responded. These log files are also scattered on different servers. The difficulty of log concatenation and tracking of the entire full-link cascade system has become a pain point for technicians to troubleshoot and track business problems. Although there are some technologies that can collect and aggregate the logs of multiple microservices through a unified identifier, there are still shortcomings in the automatic cross-thread transmission when using thread pool technology in a single JVM (a Java virtual machine) and the non-invasiveness of the cross-process transmission of identifiers between multiple microservices. At the same time, too many log files will cause performance problems such as long online service response time and low throughput, and there will be intrusion problems on the business when transmitting across threads, affecting the calling relationship of the entire link and increasing the cost of user access and use of the system. Summary of the invention

[0004] The technical problem to be solved by the present invention is to overcome the defect in the prior art that too much information in the full-link scenario of microservice technology interferes with different services and intrudes into different businesses, and to provide a full-link information processing method, system, electronic device and storage medium.

[0005] The present invention solves the above technical problems through the following technical solutions:

[0006] As a first aspect of the present invention, a method for processing full-link information is provided, the processing method being applied in a distributed system using microservices, the processing method comprising:

[0007] Constructing several setting clusters that are independently deployed and isolated from each other, where different setting clusters correspond to different services;

[0008] Get the request association information corresponding to the gateway request;

[0009] Determine a gateway routing strategy corresponding to the request association information, where different gateway routing strategies correspondingly redirect the gateway request to different set clusters;

[0010] The full-link information corresponding to the gateway request is processed according to the gateway routing strategy.

[0011] Preferably, the plurality of setting clusters include: a production cluster and a log cluster;

[0012] The log cluster is used to provide production log services, and the production cluster is used to provide online services other than production log services.

[0013] Preferably, the step of obtaining request association information corresponding to the gateway request includes:

[0014] Obtaining the gateway request;

[0015] Determine whether the gateway request is a full-link request;

[0016] If it does, obtain the request association information of the gateway request, and the request association information includes: full-link identification information and metadata.

[0017] Preferably, the step of determining the gateway routing strategy corresponding to the request association information includes:

[0018] Obtaining cluster identification information corresponding to different set clusters;

[0019] The control gateway compares the request association information with the cluster identification information, and matches and obtains a target service cluster corresponding to the request association information.

[0020] Preferably, the step of processing the full-link information corresponding to the gateway request according to the gateway routing strategy includes:

[0021] Redirecting the gateway request to the target service cluster according to the gateway routing policy;

[0022] According to the set load balancing algorithm and the request association information, determine to select the target server in the target service cluster, and use the target server to process the full-link information corresponding to the gateway request.

[0023] Preferably, both the client and the server in the whole link are equipped with an interceptor plug-in;

[0024] The step of obtaining request association information corresponding to the gateway request includes:

[0025] The client's interceptor plug-in is used to identify the gateway request, encapsulate the request-related information into the same set format and transmit it to the server;

[0026] The interceptor plug-in of the server is used to receive and parse the encapsulated request association information sent by the client to obtain the parsed request association information.

[0027] Preferably, the interceptor plug-in supports user configuration for switch control; and / or,

[0028] The request association information supports bytecode replacement based on Java Agent (a basic technical framework for implementing bytecode modification functions) bytecode dynamic modification technology.

[0029] As a second aspect of the present invention, a system for processing full-link information is provided, the processing system belonging to a distributed system of microservices, and the processing system includes:

[0030] A construction module is used to construct a number of setting clusters that are independently deployed and isolated from each other, and different setting clusters correspond to different services;

[0031] An acquisition module, used to obtain request association information corresponding to a gateway request;

[0032] A routing strategy module, used to determine a gateway routing strategy corresponding to the request association information, where different gateway routing strategies correspond to redirecting the gateway request to different set clusters;

[0033] A processing module is used to process the full-link information corresponding to the gateway request according to the gateway routing strategy.

[0034] As a third aspect of the present invention, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any of the above-described methods for processing the full-link information when executing the computer program.

[0035] As a fourth aspect of the present invention, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method for processing the full-link information described in any one of the above items is implemented.

[0036] The positive and progressive effects of the present invention are:

[0037] The full-link information processing method, system, electronic device and storage medium provided by the present invention establish a full-link information transmission method based on an isolated cluster, a gateway routing strategy and a load balancing mechanism, thereby solving the performance problems of long online service response time and low throughput caused by too much information in a full-link scenario, ensuring the high availability of online services, setting up mutual isolation between production clusters and log clusters so that they do not interfere with each other, solving the problem of intrusion of cross-process transmission identifiers into the business, and users do not need to manually implement cross-thread transmission of context information, which is convenient for users to access and use, and reduces the cost of users accessing and using the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 This is a first flow chart of a method for processing full-link information according to Embodiment 1 of the present invention;

[0039] Figure 2 This is a second flow chart of the method for processing full-link information according to Embodiment 1 of the present invention;

[0040] Figure 3 A schematic diagram of an interceptor of the method for processing full-link information according to Embodiment 1 of the present invention;

[0041] Figure 4 This is a module diagram of a system for processing full-link information according to Embodiment 2 of the present invention;

[0042] Figure 5 This is a schematic diagram of the structure of an electronic device according to Embodiment 3 of the present invention. DETAILED DESCRIPTION

[0043] The present invention is further described below by way of examples, but the present invention is not limited to the scope of the examples.

[0044] Example 1

[0045] like Figure 1 As shown, the method for processing the full-link information of this embodiment includes the following steps:

[0046] Step 101: Build several set clusters that are independently deployed and isolated from each other.

[0047] Different setting clusters correspond to different services. Some setting clusters include: production cluster and log cluster. The log cluster is used to provide production log services, and the production cluster is used to provide online services other than production log services to ensure that log production does not interfere with the services of the production cluster.

[0048] Use independent cluster services to implement functional services such as traffic playback and log recording. In the full-link scenario, clusters are independent of each other without affecting the calling relationship of the entire link.

[0049] Step 102: Obtain request association information corresponding to the gateway request.

[0050] Step 103: Determine the gateway routing strategy corresponding to the request association information. Different gateway routing strategies will redirect the gateway request to different set clusters. The gateway routing strategy will preferentially redirect the gateway request to the log cluster. If the log cluster does not exist, the gateway request will be redirected to the production cluster.

[0051] Step 104: Process the full-link information corresponding to the gateway request according to the gateway routing strategy.

[0052] The above steps build several isolated clusters. The clusters do not interfere with each other during full-link information transmission. Multiple threads running simultaneously can effectively shorten the response time of online services, increase the throughput of full-link information, and ensure the high availability of online services.

[0053] Specifically, Figure 2 As shown, in one possible implementation scheme, step 102 specifically includes:

[0054] Step 1021: Get a gateway request, where the gateway request comes from the client.

[0055] Step 1022: Determine whether the gateway request is a full-link request.

[0056] If it does not belong, jump to step 104, process the full-link information corresponding to the gateway request according to the gateway routing policy, directly use the corresponding gateway routing policy to jump to the target service cluster, and select the server in the target service cluster for processing. In this step, directly jumping the non-full-link request to the target server for processing according to the gateway routing policy saves system resources and makes the processing efficiency of the full-link information higher.

[0057] If it does, obtain the request association information of the gateway request, etc. The request association information includes: full-link identification information and metadata, etc.

[0058] Among them, request association information supports dynamic modification technology based on Java Agent bytecode. The process run by the user is taken as the target process, and the defined agent program is executed. The agent program will replace the bytecode of files such as ThreadPoolExecutor, Callable, and Runnable (all program files corresponding to the target process) in the target process. When switching threads, the files after bytecode replacement will automatically transfer and restore the previous and next thread context ThreadLocal (a thread local variable).

[0059] This step can modify the content of the thread pool ThreadPoolExecutor file (a thread pool implementation class) at runtime, thereby realizing the automatic context transmission of full-link information across threads or thread pools, simplifying the cumbersome traditional information transmission method and reducing the cost of user access and use of the system.

[0060] In one embodiment, the full-link identification information is represented by TraceId, which is generated by the SnowFlake algorithm. A different TraceId is generated for each gateway request.

[0061] The client and the server in the whole link are equipped with interceptor plug-ins;

[0062] Among them, users can configure and control the opening and closing of the interceptor plug-in to achieve opening and closing control of the full-link information processing function.

[0063] The step of obtaining request association information corresponding to the gateway request includes:

[0064] The client's interceptor plug-in is used to identify the gateway request before the client communicates with the server, and encapsulate the request-related information of the gateway request into the same set format and transmit it to the server;

[0065] In one embodiment, the client interceptor encapsulates the request-related information (such as TraceId) according to the Http protocol (Hypertext Transfer Protocol) and uses a fixed prefix as the protocol header (Http Header). The encapsulated information will not be lost when jumping according to the gateway routing policy, nor will it invade the information transmission of other processes. The fixed prefix facilitates the server-side interceptor to quickly parse the request-related information and shorten the response time.

[0066] The interceptor plug-in on the server side receives the encapsulated request association information sent by the client, and parses it to obtain the parsed request association information.

[0067] In this step, a set of universal and standardized protocols and processing methods for the cross-process transmission of request-related information are established, so that the full-link information can be transmitted throughout the entire microservice system, avoiding the risk of business program intrusion.

[0068] In one possible implementation scheme, step 103 specifically includes:

[0069] Step 1031, obtaining cluster identification information corresponding to different set clusters;

[0070] Step 1032: The control gateway compares the request association information with the cluster identification information, and matches and obtains a target service cluster corresponding to the request association information.

[0071] In one possible implementation, step 104 specifically includes:

[0072] Step 1041: redirecting the gateway request to the target service cluster according to the gateway routing policy;

[0073] Step 1042: Determine and select a target server in the target service cluster according to the set load balancing algorithm and request association information, and use the target server to process the full-link information corresponding to the gateway request.

[0074] This step selects the target server through load balancing, so that the workload of each server is more balanced, shortening the response time of online services, making the whole link information processing faster, and improving the user experience.

[0075] If the target server still needs to call the next sub-target server to provide services, the process jumps to step 102 to obtain corresponding request association information and execute the following steps in sequence. If the target server does not need to call the next sub-target server, the process ends.

[0076] The implementation principle of the method for processing the full-link information of this embodiment is specifically described below with reference to examples:

[0077] The specific steps are as follows:

[0078] S11. Get gateway request.

[0079] S12: Determine whether it is a full-link request.

[0080] S13. If yes, the full-link request is forwarded to the gateway, and the gateway extracts the associated information of the identification request.

[0081] S14. The gateway obtains cluster identification information of the target service cluster according to the request association information.

[0082] S15. The gateway selects the target service cluster according to the routing selection strategy, and determines the target server according to the load balancing algorithm. When the target service cluster has a log cluster deployed, the gateway request is redirected to the log cluster. When the target service cluster has no log cluster deployed, the gateway route is redirected to the production cluster.

[0083] S16: If the target server needs to call the next server, jump to S11, otherwise end the process.

[0084] The client and server are set up in the whole link, and both the client and the server are equipped with interceptors. The following is a detailed description of the execution steps of the interceptor with examples, such as Figure 3 The client and server interceptors are shown:

[0085] S21. Before the client communicates with the server, the client interceptor is executed.

[0086] S22. The client interceptor identifies the full-link identifier in the gateway request and confirms that the gateway request is a full-link request.

[0087] S23. The client interceptor encapsulates the request association information of the gateway request according to the protocol, wherein the protocol header is a fixed prefix.

[0088] S24. The client interceptor puts the encapsulated request association information into the Http Header and passes it to the server interceptor.

[0089] S25. The server-side interceptor receives and reads the Http Header, and parses it to obtain request-related information.

[0090] The request association information includes full-link identification information and metadata. The following uses metadata as an example to explain the processing method in detail:

[0091] First, a unique ID generated after a service receives a network management request is recorded as TraceId.

[0092] S31. Get the gateway request and generate TraceId1 using the SnowFlake algorithm (a kind of ID generation algorithm).

[0093] S32. After being processed by the client interceptor and the server interceptor, TraceId1 is passed to the target server.

[0094] S33. The target server generates TraceId2 using the SnowFlake algorithm, associates and binds TraceId1 and TraceId2 as TraceContext, and stores it in the thread's ThreadLocal.

[0095] S34: If the target server needs to call the next server, jump to step S32 and execute subsequent steps, otherwise end the process.

[0096] In order to realize the automatic cross-thread transmission of full-link information, the server uses the dynamic bytecode modification technology of Java Agent. The following is a specific example to illustrate the implementation steps of Java Agent technology:

[0097] S41. Use Java Agent technology to take the process run by the user as the target process and execute the defined agent program.

[0098] S42. The agent program replaces the bytecodes of files such as ThreadPoolExecutor, Callable, and Runnable in the target process.

[0099] The file after bytecode replacement has the function of automatically transmitting and restoring the thread context ThreadLocal when switching threads, which simplifies the cumbersome traditional information transmission method and reduces the cost of user access and use of the system.

[0100] Based on the mutually isolated cluster and gateway routing strategy mechanism, a full-link information processing method is set to select the server for response in load balancing, and the full-link information cross-thread automatic transmission is designed based on Java Agent technology, which solves the problem of long response time and low throughput of online services due to too many production logs in the full-link scenario, ensures the high availability of online services, solves the problem of intrusion into the business when transmitting identifiers across processes, avoids the business interference of cross-process information transmission on other businesses, and users can control the opening and closing of business functions through configuration, and also solves the problem that users need to manually implement automatic cross-thread transmission of context information, which improves the user experience and reduces the user's usage cost.

[0101] Example 2

[0102] like Figure 4 As shown, the full-link information processing system of this embodiment is a distributed system of microservices, specifically including:

[0103] The construction module 201 is used to construct a plurality of set clusters that are deployed independently and isolated from each other.

[0104] Different setting clusters correspond to different services. Some setting clusters include: production cluster and log cluster. The log cluster is used to provide production log services, and the production cluster is used to provide online services other than production log services to ensure that log production does not interfere with the services of the production cluster.

[0105] Use independent cluster services to implement functional services such as traffic playback and log recording. In the full-link scenario, clusters are independent of each other without affecting the calling relationship of the entire link.

[0106] The acquisition module 202 is used to acquire request association information corresponding to the gateway request.

[0107] The routing strategy module 203 is used to determine the gateway routing strategy corresponding to the request association information. Different gateway routing strategies will redirect the gateway request to different set clusters. The gateway routing strategy will preferentially redirect the gateway request to the log cluster. If the log cluster does not exist, the gateway request will be redirected to the production cluster.

[0108] The processing module 204 is used to process the full-link information corresponding to the gateway request according to the gateway routing policy.

[0109] The full-link information processing system provided by the present invention constructs a number of isolated clusters. The clusters do not interfere with each other during full-link information transmission. The simultaneous execution of multiple threads can effectively shorten the response time of online services, increase the throughput of full-link information, and ensure the high availability of online services.

[0110] The acquisition module 202 specifically includes:

[0111] The request obtaining unit 2021 is used to obtain a gateway request, where the gateway request comes from the client.

[0112] The judging unit 2022 judges whether the gateway request is a full-link request.

[0113] If it does not belong, the processing module 204 is called to process the full-link information corresponding to the gateway request according to the gateway routing policy. Directly use the corresponding gateway routing policy to jump to the target service cluster, select the server in the target service cluster for processing, and directly jump the non-full-link request to the target server for processing according to the gateway routing policy, which saves system resources and makes the processing efficiency of the full-link information higher.

[0114] If it does, obtain the request association information of the gateway request, and the request association information includes: full-link identification information and metadata.

[0115] Among them, request association information supports dynamic modification technology based on Java Agent bytecode. The process run by the user is used as the target process to execute the defined agent program. The agent program will replace the bytecode of files such as ThreadPoolExecutor, Callable, and Runnable in the target process. When switching threads, the files after bytecode replacement will automatically transfer and restore the ThreadLocal context of the previous and next threads.

[0116] Java Agent can modify the content of the thread pool ThreadPoolExecutor file at runtime, thereby realizing the automatic context transmission of full-link information across threads or thread pools, simplifying the cumbersome traditional information transmission method and reducing the cost of user access and use of the system.

[0117] In one embodiment, the full-link identification information is represented by TraceId, which is generated by the SnowFlake algorithm. A different TraceId is generated for each gateway request.

[0118] The client and the server in the whole link are equipped with interceptor plug-ins;

[0119] Among them, users can configure and control the opening and closing of the interceptor plug-in to achieve opening and closing control of the full-link information processing function.

[0120] The step of obtaining request association information corresponding to the gateway request includes:

[0121] The client's interceptor plug-in is used to identify the gateway request before the client communicates with the server, and encapsulate the request association information of the network management request into the same set format and transmit it to the server;

[0122] In one embodiment, the client interceptor encapsulates the request-related information (such as TraceId) according to the Http protocol and uses a fixed prefix as the protocol header (Http Header). The encapsulated information will not be lost when jumping according to the gateway routing policy, nor will it invade the information transmission of other processes. The fixed prefix facilitates the server-side interceptor to quickly parse the request-related information and shorten the response time.

[0123] The interceptor plug-in on the server side receives the encapsulated request association information sent by the client, and parses it to obtain the parsed request association information.

[0124] In this step, a set of universal and standardized protocols and processing methods for the cross-process transmission of request-related information are established, so that the full-link information can be transmitted throughout the entire microservice system, avoiding the risk of business program intrusion.

[0125] The routing strategy module 203 specifically includes:

[0126] An identification obtaining unit 2031 is used to obtain cluster identification information corresponding to different set clusters;

[0127] The matching unit 2032 is used to control the gateway to compare the request association information with the cluster identification information, and match and obtain a target service cluster corresponding to the request association information.

[0128] The processing module 204 specifically includes:

[0129] The jump unit 2041 is used to jump the gateway request to the target service cluster according to the gateway routing policy;

[0130] The selection unit 2042 is used to determine and select a target server in the target service cluster according to the set load balancing algorithm and request association information, and use the target server to process the full-link information corresponding to the gateway request.

[0131] By selecting the target server through load balancing, the workload of each server is more balanced, which shortens the response time of online services, makes the whole link information processing faster, and improves the user experience.

[0132] If the target server continues to call the next sub-target server to provide services, the acquisition module 202 is called to obtain the corresponding request association information, and the subsequent modules are called in sequence. If the target server does not need to continue to call the next target server, the process ends.

[0133] Based on the mutually isolated cluster and gateway routing strategy mechanism, a full-link information processing method is set to select the server for response in load balancing, and the full-link information cross-thread automatic transmission is designed based on Java Agent technology, which solves the problem of long response time and low throughput of online services due to too many production logs in the full-link scenario, ensures the high availability of online services, solves the problem of intrusion into the business when transmitting identifiers across processes, avoids the business interference of cross-process information transmission on other businesses, and users can control the opening and closing of business functions through configuration, and also solves the problem that users need to manually implement automatic cross-thread transmission of context information, which improves the user experience and reduces the user's usage cost.

[0134] It should be noted that the working principle of the full-link information processing system of this embodiment is the same as the working principle of the full-link information processing method in Example 1, so it will not be repeated here.

[0135] Example 3

[0136] Figure 5 A structural schematic diagram of an electronic device provided in an embodiment of the present invention, the electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the above-mentioned full-link information processing method when executing the program. Figure 5 The electronic device 30 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0137] The electronic device 30 may be in the form of a general-purpose computing device, for example, it may be a server device. The components of the electronic device 30 may include, but are not limited to: at least one processor 31, at least one memory 32, and a bus 33 connecting different system components (including the memory 32 and the processor 31).

[0138] The bus 33 includes a data bus, an address bus, and a control bus.

[0139] The memory 32 may include a volatile memory, such as a random access memory (RAM) 321 and / or a cache memory 322 , and may further include a read-only memory (ROM) 323 .

[0140] The memory 32 may also include a program / utility 325 having a set (at least one) of program modules 324, such program modules 324 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0141] The processor 31 executes various functional applications and data processing, such as the above-mentioned full-link information processing method, by running computer programs stored in the memory 32.

[0142] The electronic device 30 may also communicate with one or more external devices 34 (e.g., keyboards, pointing devices, etc.). Such communication may be performed via an input / output (I / O) interface 35. Furthermore, the model-generated device 30 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 36. As shown, the network adapter 26 communicates with other modules of the model-generated device 30 via a bus 33. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the model-generated device 30, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (RAID) systems, tape drives, and data backup storage systems.

[0143] It should be noted that although several units / modules or sub-units / modules of the electronic device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to an embodiment of the present invention, the features and functions of two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided into multiple units / modules to be embodied.

[0144] Example 4

[0145] This embodiment provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the method for processing full-link information in the above embodiment is implemented.

[0146] The readable storage medium may include but is not limited to: a portable disk, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory, an optical storage device, a magnetic storage device or any suitable combination of the above.

[0147] In a possible implementation manner, the present invention can also be implemented in the form of a program product, which includes a program code. When the program product runs on a terminal device, the program code is used to enable the terminal device to execute the full-link information processing method in the above embodiment.

[0148] The program code for executing the present invention may be written in any combination of one or more programming languages, and may be executed entirely on a user device, partially on a user device, as an independent software package, partially on a user device and partially on a remote device, or entirely on a remote device.

[0149] Although the specific embodiments of the present invention are described above, it should be understood by those skilled in the art that this is only for illustration and the protection scope of the present invention is defined by the appended claims. Those skilled in the art may make various changes or modifications to these embodiments without departing from the principles and essence of the present invention, but these changes and modifications all fall within the protection scope of the present invention.

Claims

1. A method for processing full-link information, characterized in that: The processing method is applied in a distributed system using microservices, and the processing method includes: Constructing a number of independently deployed and isolated set clusters, where different set clusters correspond to different services; the number of set clusters include: a production cluster and a log cluster; Obtaining request association information corresponding to a gateway request, where the gateway request comes from a client; Determine a gateway routing strategy corresponding to the request association information, where different gateway routing strategies correspondingly redirect the gateway request to different set clusters; Processing the full-link information corresponding to the gateway request according to the gateway routing strategy; The step of obtaining request association information corresponding to the gateway request includes: Obtaining the gateway request; Determine whether the gateway request is a full-link request; If yes, obtain the request association information of the gateway request, the request association information including: full link identification information and metadata; If not, processing the full-link information corresponding to the gateway request according to the gateway routing strategy; The request association information supports bytecode replacement based on Java Agent bytecode dynamic modification technology. When switching threads, the file after bytecode replacement automatically transfers and automatically restores the previous and next thread context ThreadLocal; The step of determining the gateway routing strategy corresponding to the request association information comprises: Obtaining cluster identification information corresponding to different set clusters; The control gateway compares the request association information with the cluster identification information, and matches and obtains a target service cluster corresponding to the request association information; The step of processing the full-link information corresponding to the gateway request according to the gateway routing strategy includes: Redirecting the gateway request to the target service cluster according to the gateway routing policy; According to the set load balancing algorithm and the request association information, determine to select the target server in the target service cluster, and use the target server to process the full-link information corresponding to the gateway request.

2. The method for processing full-link information according to claim 1, characterized in that: The log cluster is used to provide production log services, and the production cluster is used to provide online services other than production log services.

3. The method for processing full-link information according to claim 1, characterized in that: The client and the server in the whole link are equipped with interceptor plug-ins; The step of obtaining request association information corresponding to the gateway request includes: The client's interceptor plug-in is used to identify the gateway request, encapsulate the request-related information into the same set format and transmit it to the server; The interceptor plug-in of the server is used to receive and parse the encapsulated request association information sent by the client to obtain the parsed request association information.

4. The method for processing full-link information according to claim 3, characterized in that: The interceptor plug-in supports user configuration for switch control.

5. A full-link information processing system, characterized in that: The processing system belongs to a distributed system of microservices, and the processing system includes: A construction module is used to construct a number of setting clusters that are independently deployed and isolated from each other, and different setting clusters correspond to different services; the number of setting clusters include: a production cluster and a log cluster; An acquisition module, used to acquire request association information corresponding to a gateway request, wherein the gateway request comes from a client; A routing strategy module, used to determine a gateway routing strategy corresponding to the request association information, where different gateway routing strategies correspond to redirecting the gateway request to different set clusters; A processing module, used to process the full-link information corresponding to the gateway request according to the gateway routing strategy; The acquisition module specifically includes: A request acquisition unit is used to acquire a gateway request, where the gateway request comes from a client; A judgment unit, for judging whether the gateway request is a full-link request; If it does, then obtain the request association information of the gateway request, the request association information including: full-link identification information and metadata; if it does not, call the processing module to process the full-link information corresponding to the gateway request according to the gateway routing strategy; The request association information supports bytecode replacement based on Java Agent bytecode dynamic modification technology. When switching threads, the file after bytecode replacement automatically transfers and automatically restores the previous and next thread context ThreadLocal; The routing strategy module specifically includes: An identification acquisition unit, used to acquire cluster identification information corresponding to different set clusters; A matching unit, configured to control the gateway to compare the request association information with the cluster identification information, and match and obtain a target service cluster corresponding to the request association information; The processing modules specifically include: A jump unit, used to jump the gateway request to a target service cluster according to the gateway routing policy; The selection unit is used to determine and select a target server in the target service cluster according to a set load balancing algorithm and request association information, and use the target server to process the full-link information corresponding to the gateway request.

6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method for processing the full-link information described in any one of claims 1 to 4 is implemented.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for processing full-link information described in any one of claims 1 to 4 is implemented.