HTTP message processing method and mimicry architecture system

By replacing random information in the client's HTTP messages with server-specific random information on the proxy side in the mimicry architecture system, the problem of HTTP message interaction failure was solved, and successful HTTP message interaction in heterogeneous environments was achieved.

CN120980067APending Publication Date: 2025-11-18PURPLE MOUNTAIN LAB
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511093023.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-05
Publication Date
2025-11-18

AI Technical Summary

Technical Problem

In a mimicry architecture system, the random information in the HTTP messages sent by the client is inconsistent with the random information generated by multiple servers for that client, leading to the failure of HTTP message interaction.

Method used

The proxy replaces the first random information in the HTTP message sent by the client with the second random information corresponding to each server, generates a target HTTP message corresponding to each server, and sends it to the server for processing, ensuring the consistency of random information across servers.

Benefits of technology

Successful interaction of HTTP messages in the mimicry architecture system was achieved, avoiding interaction failures caused by inconsistent random information and ensuring the stability and reliability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120980067A_ABST
    Figure CN120980067A_ABST
Patent Text Reader

Abstract

The invention relates to an HTTP (Hyper Text Transport Protocol) message processing method and a mimicry architecture system. The method comprises the following steps that: a proxy side obtains an HTTP message to be processed sent by a client side; under the condition that the to-be-processed HTTP message comprises first random information, the first random information in the to-be-processed HTTP message is replaced with second random information corresponding to the servers, target HTTP messages corresponding to the servers are obtained, and the second random information is random information distributed to the clients by the servers; and respectively sending each target HTTP message to each server side. By adopting the method, the successful interaction of the HTTP message applied to the mimicry architecture system can be ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of network security technology, and in particular to an HTTP message processing method and a mimicry architecture system. Background Technology

[0002] The Hypertext Transfer Protocol (HTTP) is an application-layer protocol used in distributed, collaborative, and hypermedia information systems. In related technologies, HTTP consists of two parts: a client and a server. The server allocates random information to the client, which then includes this random information in subsequent HTTP messages. The server uses this random information to access resources allocated to that client, or as a basis for client authentication, among other things.

[0003] However, when HTTP is applied to a mimicry architecture system that includes multiple heterogeneous executors as servers, the random information in the HTTP messages sent by the client may not be consistent with the random information generated by the multiple servers for that client, which may lead to HTTP message interaction failures. Summary of the Invention

[0004] Therefore, it is necessary to provide an HTTP message processing method and a mimicry architecture system that can guarantee successful HTTP message interaction when applied to a mimicry architecture system, addressing the aforementioned technical problems.

[0005] Firstly, this application provides an HTTP message processing method for a proxy in a mimicry architecture system, the method comprising:

[0006] Retrieve pending HTTP messages sent by the client;

[0007] If the HTTP message to be processed includes the first random information, the first random information in the HTTP message to be processed is replaced with the second random information corresponding to each server to obtain the target HTTP message corresponding to each server. The second random information is the random information assigned by the server to the client.

[0008] Each target HTTP message is sent to its respective server.

[0009] In one embodiment, the method further includes:

[0010] Receive initial response messages sent by each server;

[0011] Based on the initial response message corresponding to the target server, the target response message is determined, and the target server can be any one of the servers.

[0012] Send the target response message to the client.

[0013] In one embodiment, the initial response message includes second random information.

[0014] Based on the initial response message corresponding to the target server, determine the target response message, including:

[0015] The initial response message corresponding to the target server is identified as the target response message;

[0016] The method also includes:

[0017] Random information extraction processing is performed on each initial response message to obtain the second random information corresponding to each server.

[0018] The second random information corresponding to the target server is used as the query index. The query index, each second random information, and the correspondence between each server are stored. The second random information corresponding to the target server is the first random information in the next HTTP message to be processed generated by the client based on the target response message.

[0019] In one embodiment, the initial response message includes second random information; determining the target response message based on the initial response message of the target server includes:

[0020] Generate third random information;

[0021] Replace the second random information in the initial response message of the target server with the third random information to obtain the target response message;

[0022] The method also includes:

[0023] The third random information is used as a query index to store the correspondence between the query index, each second random information, and each server. The third random information is the first random information in the HTTP message to be processed generated by the client based on the target response message.

[0024] In one embodiment, before performing the process of replacing the first random information in the HTTP message to be processed with the second random information corresponding to each server, in the case that the HTTP message to be processed includes the first random information, to obtain the target HTTP message corresponding to each server, the method further includes:

[0025] The HTTP message to be processed is parsed to obtain parsed data to be processed, which includes the Uniform Resource Locator to be processed, the request header data to be processed, and the request body data to be processed.

[0026] If the HTTP message to be processed includes first random information, replace the first random information in the HTTP message to be processed with the second random information corresponding to each server, to obtain the target HTTP message corresponding to each server, including:

[0027] The HTTP message to be processed is parsed to obtain parsed data to be processed. The parsed data to be processed includes at least one of the following: Uniform Resource Locator to be processed, request header data to be processed, and request body data to be processed.

[0028] If the first random information exists in the parsed data to be processed, the first random information is replaced with each second random information corresponding to the parsed data to be processed, so as to obtain the target parsed data corresponding to each server.

[0029] The parsed data from each target is packaged to obtain the HTTP message for each target.

[0030] In one embodiment, the parsed data to be processed includes a Uniform Resource Locator (URL) to be processed, request header data to be processed, and request body data to be processed; the target parsed data includes a target URL, target request header data, and target request body data; the first random information includes at least one of first URL random information, first request header random information, or first request body random information; and the second random information includes at least one of second URL random information, second request header random information, and second request body random information.

[0031] If the first random information exists in the parsed data to be processed, the first random information is replaced with each second random information corresponding to the parsed data to be processed, resulting in the target parsed data corresponding to each server, including:

[0032] If the first locator random information exists in the unprocessed Uniform Resource Locator (URI), the first locator random information in the unprocessed URI is replaced with the second locator random information corresponding to each server, thus obtaining the target URI corresponding to each server; if the first locator random information does not exist in the unprocessed URI, the unprocessed URI is determined as the target URI corresponding to each server.

[0033] If the first request header random information exists in the request header data to be processed, the first request header random information in the request header data to be processed is replaced with the second request header random information corresponding to each server, so as to obtain the target request header data corresponding to each server; if the first request header random information does not exist in the request header data to be processed, the request header data to be processed is determined as the target request header data corresponding to each server.

[0034] If the first request body random information exists in the request body data to be processed, the first request body random information in the request body data to be processed is replaced with the second request body random information corresponding to each server, so as to obtain the target request body data corresponding to each server; if the first request body random information does not exist in the request body data to be processed, the request body data to be processed is determined as the target request body data corresponding to each server.

[0035] In one embodiment, before performing the process of replacing the first locator random information in the unprocessed Uniform Resource Locator (URL) with the second locator random information corresponding to each server, in the case that the unprocessed URL contains first locator random information, to obtain the target URL corresponding to each server, the method further includes:

[0036] According to the first regularization rule and the second regularization rule, random information is extracted from the Uniform Resource Locator (URL) to be processed to obtain the first extraction result. The first regularization rule is used to extract the random information of the identifier in the URL, and the second regularization rule is used to extract the random information of the fixed format in the URL.

[0037] If the first locator random information exists in the unprocessed Uniform Resource Locator (URL), the first locator random information in the unprocessed URL is replaced with the second locator random information corresponding to each server, resulting in the target URL corresponding to each server, including:

[0038] If the first extraction result indicates the existence of first locator random information, the first locator random information is determined. The first locator random information includes at least one of identifier random information and fixed-format random information.

[0039] Based on the first locator random information, determine the second locator random information corresponding to each server;

[0040] Replace the random information of the first locator in the Uniform Resource Locator to be processed with the random information of each second locator to obtain each target Uniform Resource Locator.

[0041] In one embodiment, before performing the process of replacing the first request header random information in the request header data to be processed with the second request header random information corresponding to each server, in the case that the request header data to be processed contains first request header random information, to obtain the target request header data corresponding to each server, the method further includes:

[0042] Random information is extracted from the header data of the request to be processed according to the preset key data to obtain the second extraction result;

[0043] If the first request header random information exists in the pending request header data, replace the first request header random information in the pending request header data with the second request header random information corresponding to each server, to obtain the target request header data corresponding to each server, including:

[0044] If the second extraction result indicates the presence of first request header random information, the first request header random information is determined. The first request header random information includes value data random information, and the value data random information and key data constitute a key-value pair.

[0045] Based on the random information in the first request header, determine the random information in the second request header corresponding to each server.

[0046] The random information of the first request header in the request header data to be processed is replaced with the random information of each second request header to obtain the target request header data.

[0047] In one embodiment, before performing the process of replacing the first random information in the request body data to be processed with the second random information corresponding to each server, in the case where the first random information in the request body data to be processed exists, to obtain the target request body data corresponding to each server, the method further includes:

[0048] Based on the third regularization rule, the fourth regularization rule, and the token extraction rule, random information is extracted from the request body data to be processed to obtain the third extraction result. The third regularization rule is used to extract the random information of the identifier in the request body data, the fourth regularization rule is used to extract the random information of the fixed format in the request body data, and the token extraction rule is used to extract the random information of the token in the request body data.

[0049] If the request body data to be processed contains first request body random information, the first request body random information in the request body data to be processed is replaced with second request body random information corresponding to each server, to obtain the target request body data corresponding to each server, including:

[0050] If the third extraction result indicates the existence of random information in the first request body, the random information in the first request body is determined. The random information in the first request body includes at least one of random information in the identifier, random information in a fixed format, and random information in the token.

[0051] Based on the random information of the first request body, determine the random information of the second request body corresponding to each server.

[0052] Replace the first request body random information in the request body data to be processed with the random information of each second request body to obtain the target request body data.

[0053] Secondly, this application also provides a mimicry architecture system, including: a client, a proxy, and multiple servers;

[0054] The client is used to send pending HTTP messages to the proxy.

[0055] The proxy is used to replace the first random information in the HTTP message to be processed with the second random information corresponding to each server, when the HTTP message to be processed includes the first random information, to obtain the target HTTP message corresponding to each server, and to send each target HTTP message to each server respectively; the second random information is the random information assigned by the server to the client.

[0056] The aforementioned HTTP message processing method and mimicry architecture system involve a proxy receiving an HTTP message to be processed from a client, replacing the first random information in the HTTP message with the second random information corresponding to each server, obtaining target HTTP messages corresponding to each server, and then sending each target HTTP message to the respective server. However, different servers typically generate different random information for the same request from the same client. When directly applying HTTP technology to the mimicry architecture system, the proxy forwards the HTTP message to be processed from the client to each server. When the server processes this HTTP message, the random information may be inconsistent with the random information it generated for the client, leading to HTTP message interaction failure. Using the HTTP message processing method provided in this application, the proxy replaces the first random information in the HTTP message to be processed from the client with the second random information assigned to the client by each server, obtaining target HTTP messages corresponding to each server, and then forwards the target HTTP messages to each server for processing. This ensures that the server will not experience inconsistent random information during the processing of the target HTTP messages, guaranteeing successful HTTP message interaction in the mimicry architecture system. Attached Figure Description

[0057] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0058] Figure 1 This is an application environment diagram of an HTTP message processing method in one embodiment;

[0059] Figure 2 This is a flowchart illustrating an HTTP message processing method in one embodiment;

[0060] Figure 3 This is a flowchart illustrating an HTTP message processing method in another embodiment;

[0061] Figure 4 This is a flowchart illustrating the steps for obtaining each target HTTP message in one embodiment;

[0062] Figure 5 This is a flowchart illustrating the steps for obtaining target parsed data in one embodiment;

[0063] Figure 6 This is a flowchart illustrating the steps for obtaining target parsed data in another embodiment;

[0064] Figure 7 This is a flowchart illustrating the steps for obtaining target parsed data in yet another embodiment;

[0065] Figure 8 This is a flowchart illustrating an HTTP message processing method in yet another embodiment;

[0066] Figure 9 A structural block diagram of an HTTP message processing apparatus provided in one embodiment;

[0067] Figure 10 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0068] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0069] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.

[0070] The HTTP message processing method provided in this application embodiment can be applied to, for example, Figure 1 The mimicry architecture system shown includes a client, a proxy, and multiple servers. Figure 1The mimicry architecture system, comprising three servers, is used as an example for illustration. Each server can achieve the same or equivalent processing functions, but their hardware architecture or software settings can differ, achieving dynamic heterogeneous redundancy. The client communicates with the proxy server via a network, and the proxy server communicates with multiple heterogeneous servers. In some embodiments of this application, the server is also referred to as a heterogeneous execution entity.

[0071] The terminal client is generally a user terminal, which can be, but is not limited to, various personal computers, laptops, smartphones, tablets, drones, low-altitude aircraft, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, and projection equipment. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted displays. Head-mounted displays can be virtual reality (VR) devices, augmented reality (AR) devices, and smart glasses.

[0072] The server is a backend server that provides resources to users. The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. For example, the server hardware may include at least one processor platform selected from Shenwei processors, Intel x86 processors, AMD x64 processors, HiSilicon processors, and Kunpeng processors; the server software system may include at least one operating system selected from CentOS, Ubuntu, and Red Hat.

[0073] The proxy end can be a proxy server, for example, a standalone physical server; for example, the proxy end includes a data storage system for storing data that the proxy end needs to process or that needs to be called when executing HTTP message processing methods. The data storage system can be integrated into the proxy server or placed in the cloud or other network servers.

[0074] The proxy obtains the HTTP message to be processed sent by the client; it replaces the first random information in the HTTP message to be processed with the second random information corresponding to each server, and obtains the target HTTP message corresponding to each server. The second random information is the random information assigned by the server to the client; and sends each target HTTP message to the respective server.

[0075] In one exemplary embodiment, such as Figure 2 As shown, an HTTP message processing method is provided, which can be applied to... Figure 1 Taking the proxy side in the example, the explanation includes the following steps 202 to 206. Wherein:

[0076] Step 202: Obtain the HTTP message to be processed sent by the client.

[0077] The client is used to convert user-issued operations into HTTP messages, establish a connection with the proxy, and then send the HTTP message to the proxy. The proxy distributes the HTTP message to each server so that each server can respond to the HTTP message. The proxy is also used to collect the response messages from each server, perform adjudication based on the response messages from each server, and determine whether the heterogeneous servers are secure. If the adjudication result indicates that the adjudication is successful, it sends a response message back to the client to complete the HTTP message interaction.

[0078] In this embodiment, the HTTP message to be processed refers to the HTTP message sent by the client after establishing a connection with the proxy; for example, the HTTP message to be processed is used to request resources such as web pages, images, audio or video on the server.

[0079] In this embodiment, the proxy end is configured with a server-side proxy listening service to wait for client connection requests; after receiving the client's connection request, it establishes a TCP (Transmission Control Protocol) link with the client; the proxy end stores the connection handle corresponding to the client and interacts with the client to obtain HTTP messages to be processed.

[0080] Step 204: If the HTTP message to be processed includes the first random information, replace the first random information in the HTTP message to be processed with the second random information corresponding to each server to obtain the target HTTP message corresponding to each server. The second random information is the random information assigned by the server to the client.

[0081] The first random information is based on the random information carried in the response message previously returned by the proxy.

[0082] Not all HTTP messages sent by the client carry the first random information. In one possible implementation, the provided HTTP message processing method further includes: when the HTTP messages to be processed do not contain the first random information, the proxy sends the HTTP messages to be processed to each server separately.

[0083] In technologies related to HTTP message interaction between a single client and a single server, the server allocates resources or encryption keys to the client based on the client's request, generates random information as the resource ID or key identifier, and sends it back to the client in the response message. In subsequent HTTP messages, if the client wants to request the allocated resource or access the encryption key, it needs to include this random information in the request message so that the server can verify the random information to determine the client's identity or the security of the interaction process.

[0084] In this embodiment, the client actually establishes a TCP connection with the proxy. The first random information in the HTTP message to be processed sent by the client is the random information carried in the response message previously returned by the proxy. The second random information refers to the random information allocated to the client by the server based on the client's request. The second random information allocated to the client by each server is generally different.

[0085] In one possible implementation, the proxy generates third random information based on the random information in the response messages from each server, and uses this information together with the response messages from each server to generate the target response message for the client; for example, the proxy generates the third random information according to the type of random information in the response messages from the servers.

[0086] In one possible implementation, the proxy takes one of the response messages from each server as the target response message to be sent back to the client. Thus, the first random information is also one of the second random information corresponding to each server.

[0087] It can be seen that the first random information in the HTTP message to be processed is different from the second random information corresponding to each server, or at most one of them is the same. If the proxy directly forwards the HTTP message to be processed to each server, there will be a failure to verify the random information, resulting in at least two servers being unable to send back response messages, which in turn will cause the message interaction task to fail.

[0088] In this embodiment, when the HTTP message to be processed includes the first random information, the proxy replaces the first random information in the HTTP message to be processed with the second random information allocated by the server to the client to obtain each target HTTP message, so that the server will not encounter the problem of message interaction failure due to inconsistent random information when processing the target HTTP message.

[0089] In this embodiment, "first" and "second" in the first and second random information are used to distinguish whether the random information is random information in the HTTP message to be processed sent by the client to the proxy or random information allocated by the server to the client, and are not used to limit the generation time or content of the random information; in this embodiment, the first random information in the HTTP message to be processed can be different or the same in different message interaction processes; for the same server, the second random information allocated by the server to the client can be different or the same based on different message requests.

[0090] Step 206: Send each target HTTP message to its respective server.

[0091] In the above HTTP message processing method, the proxy obtains the HTTP message to be processed sent by the client. If the HTTP message to be processed includes first random information, the proxy replaces the first random information in the HTTP message to be processed with the second random information corresponding to each server to obtain the target HTTP message corresponding to each server. Then, the target HTTP message is sent to each server. In this case, the random information generated by different servers for the same request from the same client is generally different. When HTTP technology is directly applied to the mimicry architecture system, the proxy forwards the HTTP message to be processed sent by the client to each server. When the server processes the HTTP message, the random information may be inconsistent with the random information it generated for the client, resulting in the failure of HTTP message interaction. Using the HTTP message processing method provided in this application, the proxy replaces the first random information in the message to be processed sent by the client with the second random information allocated by each server for the client. After obtaining the target HTTP message corresponding to each server, the proxy forwards the target HTTP message to each server for processing. The server will not have inconsistent random information during the processing of the target HTTP message, ensuring successful HTTP message interaction in the mimicry architecture system.

[0092] In one exemplary embodiment, such as Figure 3 As shown, the provided HTTP message processing method further includes steps 302 to 306, wherein:

[0093] Step 302: Receive the initial response messages sent by each server.

[0094] In one possible implementation, the initial response message is generated by the server in response to the target HTTP message. Specifically, the server processes the received target HTTP message to obtain the initial response message, which is then sent to the proxy.

[0095] For example, if the server needs to include random information when replying to the target HTTP message, the initial response message includes second random information so that the client can include this random information when sending subsequent HTTP messages; if the server does not need to include random information when replying to the target HTTP message, the initial response message does not include the second random information.

[0096] In one possible implementation, the initial response message is generated by the server in response to the client's connection establishment request. Correspondingly, steps 302-306 are... Figure 2 The illustrated embodiment is executed prior to this. The server processes the received connection request and obtains an initial response message. The connection request generally does not include random information; upon receiving a connection request from a client, the proxy directly forwards the connection request to each server. However, the initial response message generated by the server based on the connection request response may contain a second random information.

[0097] In one possible implementation, the initial response message is generated by the server in response to other pending HTTP messages from the client that do not include the first random information. In this case, if the pending HTTP message sent by the client does not include the first random information, the proxy directly forwards the pending HTTP message to each server. The initial response message generated by the server based on the pending HTTP message that does not include the first random information may contain second random information.

[0098] Step 304: Determine the target response message based on the initial response message from the target server. The target server can be any one of the servers.

[0099] In this embodiment, each server acts as a heterogeneous execution entity, processing the same customer request and generating an initial response message.

[0100] In one possible implementation, the agent processes each initial response message to obtain a response decision result. If the response decision result indicates that the decision is passed, step 304 is executed.

[0101] In one possible implementation of this approach, the adjudication service and the agent in the mimicry architecture system are independent of each other, improving the reliability and security of the adjudication service. After receiving each initial response message, the agent calls the adjudication service to perform adjudication processing. In this embodiment, the process of adjudicating each initial response message and obtaining the response adjudication result includes: the agent sending each initial response message to the adjudication service and receiving the response adjudication result obtained by the adjudication service based on each initial response message.

[0102] In one possible implementation of this approach, the agent in the mimicry architecture system integrates an adjudication service.

[0103] In one possible implementation, any one of the servers is fixed as the target server. For example, [the server is set to...]. Figure 1 Server 1 is designated as the target server; if the response result indicates that the decision is passed, the target response message is obtained based on the initial response message fed back by server 1.

[0104] In one possible implementation, during each message exchange, a server is randomly selected from among the various servers as the target server to improve the security of message processing.

[0105] In one possible implementation, one server is selected from among the servers in turn as the target server; for example, please refer to Figure 1 During the first message exchange, when sending the target response message to the client, the target response message is obtained based on the initial response message of server 1. During the second message exchange, when sending the target response message to the client, the target response message is obtained based on the initial response message of server 2. During the third message exchange, when sending the target response message to the client, the target response message is obtained based on the initial response message of server 3.

[0106] Step 306: Send the target response message to the client.

[0107] Optionally, the agent can call the client connection handle to send the target response message to the client, thus completing the current message interaction process.

[0108] In this embodiment, the terms "initial" and "target" in the initial response message and the target response message are used to distinguish whether, in a single message interaction process, the response message is generated by the server in response to a received message, or whether it is a message sent to the client by the proxy after adjudicating multiple messages generated by the server. It can be understood that, for a single message interaction process, the target response message is determined based on the corresponding initial response message. "Initial" and "target" are not used to limit the session stage in which the response message is located.

[0109] In the HTTP message processing method provided in the above embodiments, the proxy receives the initial response messages sent by each server, performs adjudication processing on each initial response message, obtains the response adjudication result, and if the response adjudication result indicates that the adjudication is successful, obtains the target response message based on the initial response message corresponding to the target server, and sends the target response message to the client. In this way, the proxy collects the initial response messages of each server to the target HTTP message, performs adjudication processing on each initial response message, and if the adjudication is successful, obtains the target response message fed back to the client based on the initial response message corresponding to one of the servers, and sends the target response message to the client, ensuring that each server completes the HTTP message interaction with the client while implementing the heterogeneous mimicry function.

[0110] based on Figure 3 In one exemplary embodiment, the initial response message includes second random information. In this embodiment, the process of determining the target response message based on the target server's initial response message includes: identifying the initial message corresponding to the target server as the target response message. Correspondingly, the proxy needs to store the second random information carried in the initial response messages of each server for use when replacing random information during subsequent message interactions.

[0111] In this embodiment, the provided HTTP message processing method further includes: using the second random information corresponding to the target server as a query index, and storing the query index, each piece of second random information, and the correspondence between each server.

[0112] The agent extracts random information from each initial response message to obtain the second random information corresponding to each server.

[0113] In this embodiment, the target response message is the initial response message corresponding to the target server. That is, the random information newly sent to the client by the proxy during this message exchange is the second random information corresponding to the target server. The first random information included in the next HTTP message to be processed generated by the client based on the target response message is the second random information corresponding to the target server. Correspondingly, when the proxy sends the target response message to the client, it uses the second random information corresponding to the target server as a query index and stores the correspondence between the query index, each second random information, and each server. When the proxy receives the aforementioned next HTTP message to be processed, it extracts the first random information (that is, the second random information in the target response message) from the next HTTP message to be processed. Based on the first random information, it performs a query to obtain the second random information corresponding to each server corresponding to the first random information.

[0114] Optionally, after obtaining the second random information corresponding to each server, the proxy binds each second random information with the corresponding server identifier to obtain the binding data, and uses the second random information of the target server as a query index, storing the query index and the binding data.

[0115] In one possible implementation, storing the query index, each piece of second random information, and the correspondence between each server includes: the proxy storing the query index, each piece of second random information, and the correspondence between each server in a cache database. In this implementation, storing the above-mentioned correspondence in a memory-based cache database can improve the speed of looking up the correspondence.

[0116] In one possible implementation, storing the query index, each piece of second random information, and the correspondence between each server includes: the proxy storing the query index, each piece of second random information, and the correspondence between each server into a persistent database. The persistent database is implemented based on disk.

[0117] In one exemplary implementation, based on Figure 3 The embodiment shown includes the following steps for determining the target response message based on the initial response message corresponding to the target server: generating third random information, replacing the second random information in the initial response message corresponding to the target server with the third random information, and obtaining the target response message.

[0118] In one possible implementation, the process of the proxy generating third random information includes: the proxy generating third random information based on a preset random information generation strategy. Third random information is generated each time a target response message including random information needs to be sent back to the client.

[0119] In one possible implementation, the process of generating the third random information by the proxy includes: the proxy performs fusion processing based on the second random information in each initial response message to obtain the third random information. Each time the proxy needs to send a target response message containing random information to the client, it performs fusion processing based on the second random information included in each initial response message to obtain the third random information.

[0120] In this embodiment, the provided HTTP message processing method further includes: using the third random information as a query index, storing the correspondence between the query index, each second random information and each server, wherein the third random information is the first random information in the next HTTP message to be processed generated by the client based on the target response message.

[0121] Optionally, after obtaining the second random information corresponding to each server, the agent binds each second random information with the corresponding server identifier to obtain the binding data, and uses the generated third random information as a query index to store the query index and the binding data.

[0122] In this embodiment, the target response message is obtained by replacing the second random information in the initial response message corresponding to the target server with the third random information. That is, during this message exchange, the random information newly sent to the client by the proxy is the third random information generated by the proxy. The first random information included in the next HTTP message to be processed generated by the client based on the target response message is the third random information generated by the proxy. Correspondingly, when the proxy sends the target response message to the client, it uses the third random information as a query index and stores the correspondence between the query index, each second random information, and each server. When the proxy receives the next HTTP message to be processed, it extracts the first random information (that is, the third random information) in the next HTTP message to be processed and performs a query based on the first random information to obtain the second random information corresponding to each server corresponding to the first random information.

[0123] In one exemplary embodiment, based on Figure 2 The embodiment shown in this embodiment, before performing the process of replacing the first random information in the HTTP message to be processed with the second random information corresponding to each server to obtain the target HTTP message corresponding to each server, when the HTTP message to be processed includes the first random information, further includes: parsing the HTTP message to be processed to obtain parsed data to be processed, the parsed data to be processed including the Uniform Resource Locator to be processed, the request header data to be processed, and the request body data to be processed.

[0124] An HTTP message consists of three parts: a Uniform Resource Locator (URL), request headers, and a request body. Each part carries different types and contents of random information.

[0125] Please refer to Figure 4 In this embodiment, when the HTTP message to be processed includes first random information, the process of replacing the first random information in the HTTP message to be processed with the second random information corresponding to each server to obtain the target HTTP message corresponding to each server includes steps 402 to 404, wherein:

[0126] Step 402: If the first random information exists in the parsed data to be processed, replace the first random information with each second random information corresponding to the parsed data to be processed, and obtain the target parsed data corresponding to each server.

[0127] In different types of sessions, the portion of the HTTP message carrying random information may vary. For example, in a session scenario with URL rewriting and no cookie support, random information may only be carried in the URL; or it may be carried in only one or two parts of the URL, header, and body. For example, in a session scenario with cookies or custom authentication headers, random information may only be carried in the header. For example, in a session scenario with form submissions or API requests, random information may only be carried in the body. For example, in some session scenarios, random information may be carried in all three parts: URL, header, and body. However, in different message interaction stages, different parts may carry random information; for example, in the first message interaction stage, only the URL carries random information, in the second stage, the header carries random information, and in the third stage, both the URL and body carry random information.

[0128] In the case where the parsed data to be processed contains first random information, the random information is carried in at least one of the following: the Uniform Resource Locator to be processed, the request header data to be processed, and the request body data to be processed.

[0129] In this embodiment, if the first random information exists in the data to be parsed, the first random information is replaced to obtain the target parsing data corresponding to each server.

[0130] Step 404: Pack the parsed data of each target into HTTP messages for each target.

[0131] Specifically, the proxy repackages the target parsed data corresponding to each server into an HTTP message for that server, thus obtaining the target HTTP message for that server, and sends it to that server.

[0132] In one possible implementation, the parsed data to be processed includes a Uniform Resource Locator (URI), request header data, and request body data; the target parsed data includes a target URI, target request header data, and target request body data; correspondingly, the first random information includes at least one of first URI random information, first request header random information, or first request body random information, and the second random information includes at least one of second URI random information, second request header random information, and second request body random information. Step 402 further includes steps A1 to A6, wherein:

[0133] Step A1: If the first locator random information exists in the Uniform Resource Locator to be processed, replace the first locator random information in the Uniform Resource Locator to be processed with the second locator random information corresponding to each server, so as to obtain the target Uniform Resource Locator corresponding to each server.

[0134] Step A2: If there is no first locator random information in the unprocessed Uniform Resource Locator, determine the unprocessed Uniform Resource Locator as the target Uniform Resource Locator corresponding to each server.

[0135] Step A3: If the first request header random information exists in the request header data to be processed, replace the first request header random information in the request header data to be processed with the second request header random information corresponding to each server, so as to obtain the target request header data corresponding to each server.

[0136] Step A4: If the first request header random information is not present in the request header data to be processed, the request header data to be processed is determined to be the target request header data corresponding to each server.

[0137] Step A5: If the first request body random information exists in the request body data to be processed, replace the first request body random information in the request body data to be processed with the second request body random information corresponding to each server, so as to obtain the target request body data corresponding to each server.

[0138] Step A6: If the first request body random information is not present in the request body data to be processed, the request body data to be processed is determined as the target request body data corresponding to each server.

[0139] In this embodiment, step 406 includes: packaging the target Uniform Resource Locator, target request header data and target request body data corresponding to each server to obtain each target HTTP message.

[0140] In one possible implementation, before performing the process of replacing the first locator random information in the unprocessed Uniform Resource Locator with the second locator random information corresponding to each server to obtain the target Uniform Resource Locator corresponding to each server, if the unprocessed Uniform Resource Locator contains first locator random information, the provided HTTP message processing method further includes: performing random information extraction processing from the unprocessed Uniform Resource Locator according to a first regularization rule and a second regularization rule to obtain a first extraction result.

[0141] The first regularization rule is used to extract random information from the identifier in the Uniform Resource Locator (URL), and the second regularization rule is used to extract random information in a fixed format from the URL.

[0142] In HTTP messages, the URL portion carries random information including random identifier information and / or fixed-format random information. The random identifier information is a server-generated resource ID or UUID (Universally Unique Identifier), which is a string of letters, numbers, and hyphens with a length of 30 or more, and can be extracted using regular expressions. In this embodiment, a first regularization rule is used to extract the random identifier information from the Uniform Resource Locator (URL) to be processed.

[0143] Fixed-format random information mainly consists of random information with a fixed format but random content. The format can be IP address or IP:port, and it can be filtered using regular expressions. In this embodiment, a second regularization rule is used to filter the fixed-format random information in the Uniform Resource Locator (URL) to be processed.

[0144] Wherein, when the first extraction result is empty, it means that there is no first locator random information in the Uniform Resource Locator to be processed; when the first extraction result includes at least one of identifier random information and fixed format random information, it means that there is first locator random information in the Uniform Resource Locator to be processed, and the first locator random information is the first extraction result.

[0145] In this embodiment, when the Uniform Resource Locator (URL) to be processed contains first locator random information, the process of replacing the first locator random information in the URL to be processed with the second locator random information corresponding to each server to obtain the target URL corresponding to each server includes steps 502-506, including:

[0146] Step 502: If the first extraction result indicates the existence of first locator random information, determine the first locator random information, which includes at least one of identifier random information and fixed-format random information.

[0147] Specifically, if, after extraction processing according to the first and second regularization rules, at least one of random identifier information and fixed-format random information is obtained, then the Uniform Resource Locator (URL) to be processed is considered to contain first URL random information, and this first URL random information is obtained. If, after filtering according to the first and second regularization rules, no data is obtained, then the URL to be processed is considered not to carry random information.

[0148] Step 504: Based on the first locator random information, determine the second locator random information corresponding to each server.

[0149] Optionally, the first locator random information can be used as a query index to retrieve the second locator random information corresponding to each server in the database. In this optional approach, the proxy also uses the random information corresponding to the URL, header, and body as query indexes when storing the query index and the second random information assigned by each server, and stores the second random information corresponding to each part separately.

[0150] Step 506: Replace the random information of the first locator in the Uniform Resource Locator to be processed with the random information of each second locator to obtain each target Uniform Resource Locator.

[0151] In one possible implementation, before performing the process of replacing the first request header random information in the request header data to be processed with the second request header random information corresponding to each server, in the case that the request header data to be processed contains first request header random information, to obtain the target request header data corresponding to each server, the provided HTTP message processing method further includes: performing random information extraction processing from the request header data to be processed according to preset key data to obtain a second extraction result.

[0152] In HTTP messages, the random information carried in the header is typically in key-value pair format. In this embodiment, all keys in the header data of the request to be processed are traversed to obtain the value portion corresponding to the preset key data.

[0153] When the second extraction result is empty, it means that the first request header random information does not exist in the request header data to be processed. When the second extraction result is value data random information, it means that the first request header random information exists in the request header data to be processed, and the first request header random information is the second extraction result.

[0154] In this embodiment, please refer to Figure 6In the case where the first request header random information exists in the request header data to be processed, the process of replacing the first request header random information in the request header data to be processed with the second request header random information corresponding to each server to obtain the target request header data corresponding to each server includes steps 602 to 606, wherein:

[0155] Step 602: If the second extraction result indicates the existence of first request header random information, determine the first request header random information. The first request header random information includes value data random information, and the value data random information and key data constitute a key-value pair.

[0156] For example, if the request header data to be processed contains a KEY corresponding to the preset key data, then the request header data to be processed is considered to carry random information; otherwise, the request header data to be processed is considered not to carry random information.

[0157] Step 604: Based on the random information in the first request header, determine the random information in the second request header corresponding to each server.

[0158] Optionally, the random information in the first request header can be used as a query index to search the database for the random information in the second request header corresponding to each server.

[0159] Step 606: Replace the random information of the first request header in the request header data to be processed with the random information of each second request header to obtain the target request header data.

[0160] In one possible implementation, before performing the process of replacing the first request body random information in the request body data to be processed with the second request body random information corresponding to each server, in the case that the first request body random information exists in the request body data to be processed, to obtain the target request body data corresponding to each server, the provided HTTP message processing method further includes: performing random information extraction processing on the request body data to be processed according to a third regularization rule, a fourth regularization rule, and a token extraction rule to obtain a third extraction result. The third regularization rule is used to extract the identifier random information in the request body data, the fourth regularization rule is used to extract the fixed-format random information in the request body data, and the token extraction rule is used to extract the token random information in the request body data.

[0161] The HTTP message body may contain one or more of the following, depending on the request: random identifier information, fixed-format random information, and random token information. The random token information refers to a string with a fixed start and length generated by the server during authentication. Optionally, the random token information can be extracted using string comparison or regular expressions.

[0162] Optionally, the third regularization rule is the same as the first regularization rule.

[0163] Optionally, the fourth regularization rule is the same as the second regularization rule.

[0164] When the third extraction result is empty, it means that there is no random information of the first request body in the request body data to be processed. When the third extraction result includes at least one of the identifier random information, fixed format random information and token random information, it means that there is random information of the first request body in the request body data to be processed, and the first request body data is the third extraction result.

[0165] In this embodiment, please refer to Figure 7 In the case where the request body data to be processed contains first request body random information, the process of replacing the first request body random information in the request body data to be processed with the second request body random information corresponding to each server to obtain the target request body data corresponding to each server includes steps 702 to 706, wherein:

[0166] Step 702: If the third extraction result indicates the existence of random information in the first request body, determine the random information in the first request body. The random information in the first request body includes at least one of random information in the identifier, random information in the fixed format, and random information in the token.

[0167] Step 704: Based on the random information of the first request body, determine the random information of the second request body corresponding to each server.

[0168] Optionally, the random information of the first request body can be used as a query index to search the database for the random information of the second request body corresponding to each server.

[0169] Step 706: Replace the first request body random information in the request body data to be processed with the random information of each second request body to obtain the target request body data.

[0170] Figure 5 , Figure 6 and Figure 7 In the implementation shown, the proxy performs random information extraction and replacement on the URL, header, and body parts of the HTTP message to be processed, thereby improving the accuracy of random information replacement.

[0171] In one exemplary embodiment, an HTTP message processing method is provided, which is applied to... Figure 1 Taking the proxy end as an example, the explanation includes the following steps B01 to B30. Wherein:

[0172] Step B01: Obtain the HTTP message to be processed sent by the client.

[0173] Step B02: Parse and process the HTTP message to be processed to obtain the Uniform Resource Locator (URI), request header data, and request body data.

[0174] Step B04: If the first locator random information exists in the Uniform Resource Locator to be processed, replace the first locator random information in the Uniform Resource Locator to be processed with the second locator random information corresponding to each server, so as to obtain the target Uniform Resource Locator corresponding to each server.

[0175] Optionally, random information is extracted from the Uniform Resource Locator (URL) to be processed according to the first and second regularization rules to obtain a first extraction result. The first regularization rule is used to extract the identifier random information in the URL, and the second regularization rule is used to extract the fixed-format random information in the URL. If the first extraction result indicates the existence of first locator random information, the first locator random information is determined. The first locator random information includes at least one of identifier random information and fixed-format random information. Based on the first locator random information, the second locator random information corresponding to each server is determined. The first locator random information in the URL to be processed is replaced with the second locator random information to obtain each target URL.

[0176] Step B06: If there is no first locator random information in the unprocessed Uniform Resource Locator, determine the unprocessed Uniform Resource Locator as the target Uniform Resource Locator corresponding to each server.

[0177] Step B08: If the first request header random information exists in the request header data to be processed, replace the first request header random information in the request header data to be processed with the second request header random information corresponding to each server, so as to obtain the target request header data corresponding to each server.

[0178] Optionally, random information is extracted from the request header data to be processed according to the preset key data to obtain a second extraction result; if the second extraction result indicates the existence of first request header random information, the first request header random information is determined, the first request header random information includes value data random information, and the value data random information and key data constitute a key-value pair; based on the first request header random information, the second request header random information corresponding to each server is determined; the first request header random information in the request header data to be processed is replaced with each of the second request header random information to obtain each target request header data.

[0179] Step B10: If the first request header random information is not present in the request header data to be processed, the request header data to be processed is determined to be the target request header data corresponding to each server.

[0180] Step B12: If the first request body random information exists in the request body data to be processed, replace the first request body random information in the request body data to be processed with the second request body random information corresponding to each server, so as to obtain the target request body data corresponding to each server.

[0181] Optionally, random information extraction processing is performed on the request body data to be processed according to the third regularization rule, the fourth regularization rule, and the token extraction rule to obtain a third extraction result. The third regularization rule is used to extract the identifier random information in the request body data, the fourth regularization rule is used to extract the fixed-format random information in the request body data, and the token extraction rule is used to extract the token random information in the request body data. If the third extraction result indicates the existence of the first request body random information, the first request body random information is determined. The first request body random information includes at least one of the identifier random information, the fixed-format random information, and the token random information. Based on the first request body random information, the second request body random information corresponding to each server is determined. The first request body random information in the request body data to be processed is replaced with each of the second request body random information to obtain each target request body data.

[0182] Step B14: If the first request body random information is not present in the request body data to be processed, the request body data to be processed is determined to be the target request body data corresponding to each server.

[0183] Step B16: Package the target Uniform Resource Locator, target request header data, and target request body data corresponding to each server to obtain the target HTTP message.

[0184] Step B18: Send each target HTTP message to its respective server.

[0185] In one exemplary embodiment, an HTTP message processing method is provided, which is applied to... Figure 1 This explanation uses a mimicry architecture system as an example. Please refer to [link / reference]. Figure 8 The method includes steps S801 to S830. Wherein:

[0186] S801, the client sends a connection establishment request to the agent.

[0187] S802, the agent sends the chain establishment request to each server.

[0188] S803, the server responds to the connection establishment request by generating an initial response message, which includes second random information.

[0189] S804, the server sends the initial response message to the agent.

[0190] For ease of description, Figure 8 The second random information in the initial response message generated by server 1 in response to the connection request is marked as random information 211, the second random information in the initial response message generated by server 2 in response to the connection request is marked as random information 212, and the second random information in the initial response message generated by server 3 in response to the connection request is marked as random information 212.

[0191] S805, the agent determines the target response message based on the initial response message of the target server.

[0192] For ease of description, Figure 8 In the illustrated embodiment, server 1 is fixed as the target server. In other embodiments, other strategies may be used to determine the target server.

[0193] In one optional implementation, the initial response message from the target server is determined as the target response message, such as... Figure 8 As shown, the random information included in the target response message is the random information 211 corresponding to server 1.

[0194] In one optional implementation, third random information is generated, and the second random information in the initial response message of the target server is replaced with the third random information to obtain the target response message. For ease of description, in Figure 8 The third random message sent by the agent in response to the chain establishment request is marked as random message 310.

[0195] S806, the agent stores the query index, each second random information, and the correspondence between each server in the cache database. In S806, the query index is the second random information (random information 211) or the third random information (random information 310) corresponding to the target server.

[0196] S807, the agent sends the target response message to the client.

[0197] S808, the client sends a pending HTTP message containing first random information to the agent.

[0198] like Figure 8 As shown, the first random information is random information 211 or random information 300.

[0199] S809, the agent obtains the second random information corresponding to each server from the cache database based on the first random information in the HTTP message to be processed.

[0200] S810, the agent replaces the first random information in the HTTP message to be processed with the second random information corresponding to each server, and obtains the target HTTP message corresponding to each server.

[0201] S811, the proxy sends each target HTTP message to each server.

[0202] S812, the server responds to the target HTTP message by generating an initial response message, which includes second random information.

[0203] For ease of description, Figure 8 The second random information in the initial response message generated by server 1 in response to the target HTTP message is marked as random information 221, the second random information in the initial response message generated by server 2 in response to the target HTTP message is marked as random information 222, and the second random information in the initial response message generated by server 3 in response to the target HTTP message is marked as random information 223.

[0204] S813, the server sends the initial response message to the agent.

[0205] S814, the proxy determines the target response message based on the initial response message of the target server.

[0206] In one optional implementation, the initial response message from the target server is determined as the target response message, such as... Figure 8 As shown, the random information included in the target response message in S813 is the random information 221 corresponding to server 1.

[0207] In one optional implementation, third random information is generated, and the second random information in the initial response message of the target server is replaced with the third random information to obtain the target response message. For example... Figure 8 As shown, the third random information corresponding to S813 is marked as random information 320.

[0208] In S815, the agent stores the query index, each second random information, and the correspondence between each server in the cache database. Specifically, in S814, the query index is either random information 221 or random information 320.

[0209] S816, the agent sends the target response message to the client.

[0210] The subsequent execution process is similar to S808 to S816, and will not be described in detail here.

[0211] The above S801 to S816 describe the process in the mimicry architecture system where the client sends a connection request to the proxy to establish a message interaction task, and during the message interaction process in this message interaction task, the client sends an HTTP message to be processed that includes first random information and the server's initial and corresponding response messages include second random information. If the client's HTTP message to be processed does not contain the first random information, the proxy can directly send the HTTP message to be processed to each client. If the initial response message from the server does not contain the second random information, the proxy can directly send any server's initial response message to the client without involving the random information storage process.

[0212] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.

[0213] It is understood that the term "based on" as used in this application is used to describe one or more factors that influence the determination, but does not exclude other factors that may influence the determination. For example, the phrase "determine A based on B" means that the determination of A can be based entirely or at least partially on factor B. That is, B is a factor that influences the determination of A, but does not exclude the fact that the determination of A is also based on C.

[0214] Based on the same inventive concept, this application also provides an HTTP message processing apparatus for implementing the HTTP message processing method described above. The solution provided by this apparatus is similar to the implementation described in the above method; therefore, the specific limitations in one or more HTTP message processing apparatus embodiments provided below can be found in the limitations of the HTTP message processing method described above, and will not be repeated here.

[0215] In one exemplary embodiment, an HTTP message processing apparatus is provided for a proxy in a mimicry architecture system. For example... Figure 9As shown, it includes: a message sending and receiving module 902, an information replacement module 904, and a service proxy module 906, wherein:

[0216] The message transceiver module 902 is used to acquire pending HTTP messages sent by the client;

[0217] The information replacement module 904 is used to replace the first random information in the HTTP message to be processed with the second random information corresponding to each server when the HTTP message to be processed includes the first random information, so as to obtain the target HTTP message corresponding to each server respectively. The second random information is the random information allocated by the server to the client.

[0218] Service proxy module 906 is used to send each target HTTP message to the respective server.

[0219] In one exemplary embodiment, the HTTP message processing apparatus further includes a response adjudication module. The service proxy module 906 is further configured to receive initial response messages sent by each server; the message sending / receiving module 904 is further configured to obtain a target response message based on the initial response message corresponding to the target server, where the target server is any one of the servers. The message sending / receiving module is configured to send the target response message to the client.

[0220] In an exemplary embodiment, the initial response message includes second random information, and the HTTP message processing apparatus further includes an information storage module. The message sending and receiving module 904 is used to determine the initial response message corresponding to the target server as the target response message. The information storage module is used to use the second random information corresponding to the target server as a query index, and to store the query index, each piece of second random information, and the correspondence between each server. The second random information corresponding to the target server is the first random information in the HTTP message to be processed generated by the client based on the target response message.

[0221] In an exemplary embodiment, the initial response message includes second random information, and the message sending and receiving module 904 is used to generate third random information; the second random information in the initial response message of the target server is replaced with the third random information to obtain the target response message, and the information storage module is used to use the third random information as a query index to store the query index, each second random information and the correspondence between each server, wherein the third random information is the first random information in the HTTP message to be processed generated by the client based on the target response message.

[0222] In an exemplary embodiment, the information replacement module 904 is used to parse the HTTP message to be processed to obtain parsed data to be processed. The parsed data to be processed includes at least one of a Uniform Resource Locator (URL), a request header, and a request body. If the parsed data to be processed contains first random information, the first random information is replaced with each second random information corresponding to the parsed data to be processed to obtain target parsed data corresponding to each server. The target parsed data is then packaged to obtain each target HTTP message.

[0223] In an exemplary embodiment, the parsed data to be processed includes a Uniform Resource Locator (URL) to be processed, request header data to be processed, and request body data to be processed; the target parsed data includes a target URL, target request header data, and target request body data; the first random information includes at least one of first URL random information, first request header random information, or first request body random information; the second random information includes at least one of second URL random information, second request header random information, and second request body random information; the information replacement module is used to replace the first URL random information in the URL to be processed with the second URL random information corresponding to each server, when the first URL random information exists in the URL to be processed, to obtain the target URL corresponding to each server; when the first URL random information does not exist in the URL to be processed, the information replacement module replaces the first URL random information in the URL to be processed with the second URL random information corresponding to each server, to obtain the target URL corresponding to each server; when the first URL random information does not exist in the URL to be processed, the information replacement module replaces the first URL random information in the URL to be processed with the second URL random information corresponding to each server, to obtain the target URL corresponding to each server; The locator is determined as the target Uniform Resource Locator corresponding to each server. If the first request header random information exists in the pending request header data, it is replaced with the second request header random information corresponding to each server to obtain the target request header data corresponding to each server. If the first request header random information does not exist in the pending request header data, the pending request header data is determined as the target request header data corresponding to each server. If the first request body random information exists in the pending request body data, it is replaced with the second request body random information corresponding to each server to obtain the target request body data corresponding to each server. If the first request body random information does not exist in the pending request body data, the pending request body data is determined as the target request body data corresponding to each server.

[0224] In an exemplary embodiment, the information replacement module is used to perform random information extraction processing from the Uniform Resource Locator (URL) to be processed according to a first regularization rule and a second regularization rule to obtain a first extraction result. The first regularization rule is used to extract identifier random information from the URL, and the second regularization rule is used to extract fixed-format random information from the URL. If the first extraction result indicates the existence of first locator random information, the first locator random information is determined, which includes at least one of identifier random information and fixed-format random information. Based on the first locator random information, second locator random information corresponding to each server is determined. The first locator random information in the URL to be processed is replaced with the second locator random information to obtain each target URL.

[0225] In an exemplary embodiment, the information replacement module is used to extract random information from the request header data to be processed according to preset key data to obtain a second extraction result; if the second extraction result indicates the existence of first request header random information, the first request header random information is determined, the first request header random information includes value data random information, the value data random information and key data constitute a key-value pair; based on the first request header random information, the second request header random information corresponding to each server is determined; the first request header random information in the request header data to be processed is replaced with each second request header random information to obtain each target request header data.

[0226] In an exemplary embodiment, the information replacement module is used to perform random information extraction processing on the request body data to be processed according to a third regularization rule, a fourth regularization rule, and a token matching rule to obtain a third extraction result. The third regularization rule is used to extract identifier random information from the request body data, the fourth regularization rule is used to extract fixed-format random information from the request body data, and the token matching rule is used to extract token random information from the request body data. If the third extraction result indicates the existence of first request body random information, the first request body random information is determined. The first request body random information includes at least one of identifier random information, fixed-format random information, and token random information. Based on the first request body random information, the second request body random information corresponding to each server is determined. The first request body random information in the request body data to be processed is replaced with each of the second request body random information to obtain each target request body data.

[0227] Each module in the aforementioned HTTP message processing device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can invoke and execute the operations corresponding to each module.

[0228] In one exemplary embodiment, a mimicry architecture system is provided. For example... Figure 1 As shown, the system includes a client, a proxy, and multiple servers; among them,

[0229] The client is used to send pending HTTP messages to the proxy.

[0230] The proxy is used to replace the first random information in the HTTP message to be processed with the second random information corresponding to each server, when the HTTP message to be processed includes the first random information, to obtain the target HTTP message corresponding to each server, and to send each target HTTP message to each server respectively; the second random information is the random information assigned by the server to the client.

[0231] In an exemplary embodiment, the server generates an initial response message; the proxy receives the initial response messages sent by each server, obtains the target response message based on the initial response message corresponding to the target server, and sends the target response message to the client. The target server can be any one of the servers.

[0232] In an exemplary embodiment, the initial response message includes second random information; the proxy is used to determine the initial response message corresponding to the target server as the target response message, and to use the second random information corresponding to the target server as a query index, and to store the query index, each second random information and the correspondence between each server, wherein the second random information corresponding to the target server is the first random information in the pending HTTP message generated by the client based on the target response message.

[0233] In an exemplary embodiment, the initial response message includes second random information; the proxy is used to generate third random information; the second random information in the initial response message of the target server is replaced with the third random information to obtain the target response message; and the third random information is used as a query index to store the correspondence between the query index, each second random information and each server, wherein the third random information is the first random information in the HTTP message to be processed generated by the client based on the target response message.

[0234] In an exemplary embodiment, the proxy is used to parse the HTTP message to be processed to obtain parsed data to be processed. The parsed data to be processed includes a Uniform Resource Locator (URL), request header data, and request body data. If the parsed data to be processed contains first random information, the first random information is replaced with each second random information corresponding to the parsed data to be processed to obtain target parsed data corresponding to each server. The target parsed data is then packaged to obtain each target HTTP message.

[0235] In an exemplary embodiment, the parsed data to be processed includes a Uniform Resource Locator (URL) to be processed, request header data to be processed, and request body data to be processed; the target parsed data includes a target URL, target request header data, and target request body data; the first random information includes at least one of first URL random information, first request header random information, or first request body random information; the second random information includes at least one of second URL random information, second request header random information, and second request body random information; the proxy is used to replace the first URL random information in the URL to be processed with the second URL random information corresponding to each server, when the first URL random information exists in the URL to be processed, to obtain the target URL corresponding to each server; when the first URL random information does not exist in the URL to be processed, the proxy is used to replace the first URL random information in the URL to be processed with the second URL random information corresponding to each server, to obtain the target URL corresponding to each server; when the first URL random information does not exist in the URL to be processed, the proxy is used to replace the first URL random information in the URL to be processed with the second URL random information corresponding to each server, to obtain the target URL corresponding to each server. The locator is determined as the target Uniform Resource Locator (URL) corresponding to each server. If the first request header random information exists in the pending request header data, it is replaced with the second request header random information corresponding to each server to obtain the target request header data corresponding to each server. If the first request header random information does not exist in the pending request header data, the pending request header data is determined as the target request header data corresponding to each server. If the first request body random information exists in the pending request body data, it is replaced with the second request body random information corresponding to each server to obtain the target request body data corresponding to each server. If the first request body random information does not exist in the pending request body data, the pending request body data is determined as the target request body data corresponding to each server.

[0236] In an exemplary embodiment, the proxy is configured to extract random information from the Uniform Resource Locator (URL) to be processed according to a first regularization rule and a second regularization rule to obtain a first extraction result. The first regularization rule is used to extract identifier random information from the URL, and the second regularization rule is used to extract fixed-format random information from the URL. If the first extraction result indicates the existence of first URL random information, the first URL random information is determined, which includes at least one of identifier random information and fixed-format random information. Based on the first URL random information, second URL random information corresponding to each server is determined. The first URL random information in the URL to be processed is replaced with the second URL random information to obtain each target URL.

[0237] In an exemplary embodiment, the proxy is used to extract random information from the request header data to be processed according to preset key data to obtain a second extraction result; if the second extraction result indicates the existence of first request header random information, the first request header random information is determined, the first request header random information includes value data random information, the value data random information and key data constitute a key-value pair; based on the first request header random information, the second request header random information corresponding to each server is determined; the first request header random information in the request header data to be processed is replaced with each second request header random information to obtain each target request header data.

[0238] In an exemplary embodiment, the proxy is used to perform random information extraction processing on the request body data to be processed according to a third regularization rule, a fourth regularization rule, and a token extraction rule to obtain a third extraction result. The third regularization rule is used to extract identifier random information from the request body data, the fourth regularization rule is used to extract fixed-format random information from the request body data, and the token extraction rule is used to extract token random information from the request body data. If the third extraction result indicates the existence of first request body random information, the first request body random information is determined. The first request body random information includes at least one of identifier random information, fixed-format random information, and token random information. Based on the first request body random information, the second request body random information corresponding to each server is determined. The first request body random information in the request body data to be processed is replaced with each of the second request body random information to obtain each target request body data.

[0239] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 10As shown, this computer device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores data required for executing HTTP message processing methods. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements an HTTP message processing method.

[0240] Those skilled in the art will understand that Figure 10 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0241] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.

[0242] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.

[0243] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0244] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.

[0245] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0246] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0247] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. An HTTP message processing method, characterized in that, For a proxy in a mimicry architecture system, the method includes: Retrieve pending HTTP messages sent by the client; If the HTTP message to be processed includes first random information, the first random information in the HTTP message to be processed is replaced with second random information corresponding to each server to obtain target HTTP messages corresponding to each server. The second random information is random information allocated by the server to the client. Each of the target HTTP messages is sent to its respective server.

2. The method according to claim 1, characterized in that, The method further includes: Receive the initial response messages sent by each of the aforementioned servers; Based on the initial response message of the target server, the target response message is determined, wherein the target server is any one of the servers; The target response message is sent to the client.

3. The method according to claim 2, characterized in that, The initial response message includes the second random information; The determination of the target response message based on the initial response message of the target server includes: The initial response message of the target server is identified as the target response message; The method further includes: The second random information corresponding to the target server is used as a query index, and the correspondence between the query index, each piece of the second random information, and each server is stored. The second random information corresponding to the target server is the first random information in the HTTP message to be processed generated by the client based on the target response message.

4. The method according to claim 2, characterized in that, The initial response message includes the second random information; determining the target response message based on the initial response message of the target server includes: Generate third random information; The second random information in the initial response message of the target server is replaced with the third random information to obtain the target response message; The method further includes: The third random information is used as a query index to store the correspondence between the query index, each of the second random information and each of the servers, wherein the third random information is the first random information in the HTTP message to be processed generated by the client based on the target response message.

5. The method according to claim 1, characterized in that, Before the process of replacing the first random information in the HTTP message to be processed with the second random information corresponding to each server to obtain the target HTTP message corresponding to each server, when the HTTP message to be processed includes the first random information, the method further includes: The HTTP message to be processed is parsed to obtain parsed data to be processed, which includes a Uniform Resource Locator to be processed, request header data to be processed, and request body data to be processed. When the HTTP message to be processed includes first random information, the first random information in the HTTP message to be processed is replaced with second random information corresponding to each server, to obtain target HTTP messages corresponding to each server, including: If the first random information exists in the parsed data to be processed, the first random information is replaced with each of the second random information corresponding to the parsed data to be processed, so as to obtain the target parsed data corresponding to each server. Based on the parsed data of each target, the target HTTP messages are packaged and processed to obtain the target HTTP messages.

6. The method according to claim 5, characterized in that, The parsed data to be processed includes a Uniform Resource Locator (URI), a request header, and a request body; the target parsed data includes a target URI, a target request header, and a target request body; the first random information includes at least one of a first URI random information, a first request header random information, or a first request body random information; the second random information includes at least one of a second URI random information, a second request header random information, and a second request body random information. When the first random information exists in the parsed data to be processed, the first random information is replaced with each piece of second random information corresponding to the parsed data to be processed, to obtain the target parsed data corresponding to each server, including: If the first locator random information exists in the unprocessed Uniform Resource Locator (URL), the first locator random information in the unprocessed URL is replaced with the second locator random information corresponding to each of the servers, to obtain the target URL corresponding to each server; if the first locator random information does not exist in the unprocessed URL, the unprocessed URL is determined as the target URL corresponding to each server. If the first request header random information exists in the request header data to be processed, the first request header random information in the request header data to be processed is replaced with the second request header random information corresponding to each of the servers, so as to obtain the target request header data corresponding to each of the servers; if the first request header random information does not exist in the request header data to be processed, the request header data to be processed is determined as the target request header data corresponding to each server. If the first request body random information exists in the request body data to be processed, the first request body random information in the request body data to be processed is replaced with the second request body random information corresponding to each of the servers, so as to obtain the target request body data corresponding to each of the servers; if the first request body random information does not exist in the request body data to be processed, the request body data to be processed is determined as the target request body data corresponding to each of the servers.

7. The method according to claim 6, characterized in that, Before the process of replacing the first locator random information in the unprocessed Uniform Resource Locator (URL) with the second locator random information corresponding to each of the servers, in the case where the first locator random information exists in the URL to be processed, to obtain the target URL corresponding to each server, the method further includes: According to the first regularization rule and the second regularization rule, random information is extracted from the Uniform Resource Locator (URL) to be processed to obtain the first extraction result. The first regularization rule is used to extract the random information of the identifier in the URL, and the second regularization rule is used to extract the random information of the fixed format in the URL. When the first locator random information exists in the unprocessed Uniform Resource Locator (URL), the first locator random information in the unprocessed URL is replaced with the second locator random information corresponding to each of the servers, to obtain the target URL corresponding to each server, including: If the first extraction result indicates the existence of the first locator random information, the first locator random information is determined, and the first locator random information includes at least one of identifier random information and fixed-format random information. Based on the first locator random information, determine the second locator random information corresponding to each of the servers; The random information of the first locator in the Uniform Resource Locator to be processed is replaced with the random information of the second locator to obtain each target Uniform Resource Locator.

8. The method according to claim 6, characterized in that, Before replacing the first request header random information in the request header data to be processed with the second request header random information corresponding to each of the servers, in the case that the first request header random information exists in the request header data to be processed, to obtain the target request header data corresponding to each of the servers, the method further includes: Random information is extracted from the request header data to be processed according to the preset key data to obtain a second extraction result; When the first request header random information exists in the request header data to be processed, the first request header random information in the request header data to be processed is replaced with the second request header random information corresponding to each of the servers, to obtain the target request header data corresponding to each of the servers, including: If the second extraction result indicates the presence of first request header random information, the first request header random information is determined. The first request header random information includes value data random information, and the value data random information and the key data constitute a key-value pair. Based on the first request header random information, determine the second request header random information corresponding to each of the servers; The first request header random information in the request header data to be processed is replaced with the second request header random information to obtain the target request header data.

9. The method according to claim 6, characterized in that, Before the process of replacing the first request body random information in the request body data to be processed with the second request body random information corresponding to each of the servers, in the case that the first request body random information exists in the request body data to be processed, to obtain the target request body data corresponding to each of the servers, the method includes: According to the third regularization rule, the fourth regularization rule, and the token extraction rule, random information extraction processing is performed on the request body data to be processed to obtain the third extraction result. The third regularization rule is used to extract the random information of the identifier in the request body data, the fourth regularization rule is used to extract the random information of the fixed format in the request body data, and the token extraction rule is used to extract the random information of the token in the request body data. When the first request body random information exists in the request body data to be processed, the first request body random information in the request body data to be processed is replaced with the second request body random information corresponding to each of the servers, to obtain the target request body data corresponding to each of the servers, including: If the third extraction result indicates the existence of the first request body random information, the first request body random information is determined, and the first request body random information includes at least one of the identifier random information, the fixed format random information, and the token random information; Based on the first request body random information, determine the second request body random information corresponding to each of the servers; The first request body random information in the request body data to be processed is replaced with the second request body random information to obtain the target request body data.

10. A mimicry architecture system, characterized in that, The mimicry architecture system includes a client, an agent, and multiple servers; The client is used to send HTTP messages to be processed to the proxy. The proxy is used to replace the first random information in the HTTP message to be processed with the second random information corresponding to each server when the HTTP message to be processed includes the first random information, thereby obtaining the target HTTP message corresponding to each server, and sending each target HTTP message to each server respectively; wherein, the second random information is random information allocated by the server to the client.