Request processing method and device

By parsing and processing access requests in computing devices, it ensures that requests that rely on the target replica are always processed by the target replica, which solves the problem of missing context information in multi-copy deployment and improves the reliability of request processing.

CN114827274BActive Publication Date: 2024-10-15ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210395983.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-15
Publication Date
2024-10-15
Estimated Expiration
2042-04-15

AI Technical Summary

Technical Problem

In computing devices deployed with multiple copies, multiple requests for the same Session may have dependencies. Any forwarding can easily lead to the loss of context information and cause request processing errors. It is difficult for the existing technology to provide a reliable solution to ensure that the context information that requests depend on is always Processed by the target replica.

Method used

By receiving the access request, parse the project ID in the request. If the copy ID is not carried, call the target copy to respond to the request, add the copy ID to the response message, and feed it back to the request sender. Extract the copy ID and add it to the corresponding project ID. Access requests to ensure that requests that rely on processing by the target replica are always processed by the target replica.

Benefits of technology

It improves the reliability of request processing in Session scenarios, avoids request processing errors caused by missing context information, and ensures that context information that requests depend on is always processed by the target replica.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114827274B_ABST
    Figure CN114827274B_ABST
Patent Text Reader

Abstract

This specification provides a request processing method and device, wherein the request processing method is applied to a request receiving end, and includes: receiving an access request sent by a request sending end, parsing the access request, and obtaining a project identifier carried by the access request; if the access request does not carry a replica identifier, then according to the project identifier, calling a target replica to respond to the access request and obtaining a response message; adding the replica identifier of the target replica to the response message to obtain a target response message; and feeding back the target response message to the request sending end, wherein the target response message is used by the request sending end to extract the replica identifier in the target response message and add it to the access request corresponding to the project identifier. This solution can improve the reliability of request processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and more particularly to a request processing method. The present invention also relates to a request processing device, a computing device, and a computer-readable storage medium. Background Art

[0002] With the widespread application of computer technology, the number of projects processed by computing devices has exploded. To cope with this situation, multiple copies of the instances used to implement the projects can be deployed to obtain multiple instances with the same functions, also known as multiple copies. In this way, projects can be provided separately through multiple copies, thereby reducing the problems caused by the surge in projects.

[0003] In the related art, the process of providing a certain project can be regarded as a session. In a session, it is likely that multiple interactions with the instance are required, and accordingly, there are multiple requests in the session. The computing device that receives each request can forward the request to one of the multiple copies used to implement the project. And, generally, the forwarding can be arbitrary.

[0004] However, multiple requests belonging to the same session are likely to have dependencies: the replica processing the current request of a session will generate context information, and the processing of the next request of the session depends on the context information. In this regard, if arbitrary forwarding is performed, it is easy to forward the next request to the replica that does not have the above context information, causing request processing errors due to the lack of context information. Therefore, a more reliable solution is needed. Summary of the invention

[0005] In view of this, the embodiment of this specification provides a request processing method. This specification also relates to a request processing device, a computing device, and a computer-readable storage medium to solve the technical defects existing in the prior art.

[0006] According to a first aspect of an embodiment of this specification, a request processing method is provided, which is applied to a request receiving end, and includes:

[0007] Receiving an access request sent by a request sending end, parsing the access request, and obtaining a project identifier carried in the access request;

[0008] If the access request does not carry a replica identifier, calling the target replica to respond to the access request according to the project identifier to obtain a response message;

[0009] Add the replica identifier of the target replica to the response message to obtain a target response message;

[0010] The target response message is fed back to the request sending end, and the target response message is used by the request sending end to extract the copy identifier in the target response message and add it to the access request corresponding to the project identifier.

[0011] Optionally, calling the target replica to respond to the access request according to the project identifier to obtain a response message includes:

[0012] Selecting a target copy that meets a preset distribution condition from a plurality of copies having the project identifier;

[0013] The target copy is called to respond to the access request and obtain a response message.

[0014] Optionally, after parsing the access request, the method further includes:

[0015] If the access request carries a replica identifier, calling a target replica with the replica identifier to respond to the access request and obtaining a response message;

[0016] Feedback the response message to the request sending end.

[0017] Optionally, before calling the target replica with the replica identifier to respond to the access request, the method further includes:

[0018] Determine whether the target copy with the copy identifier exists, and if not, return prompt information to the request sender.

[0019] Optionally, before calling the target copy to respond to the access request according to the project identifier, the method further includes:

[0020] Determine whether the target copy exists, and if not, return prompt information to the request sender.

[0021] According to a second aspect of an embodiment of this specification, a request processing method is provided, which is applied to a request sending end, including:

[0022] Receive a response message fed back by the request receiving end, where the response message is obtained by the request receiving end calling the target replica to respond to the access request sent by the request sending end;

[0023] Extracting the copy identifier and the project identifier carried in the response message;

[0024] Adding the copy identifier to the access request having the project identifier to obtain a target access request;

[0025] The target access request is sent to a request receiving end corresponding to the project identifier.

[0026] Optionally, the number of request receiving ends corresponding to the project identifier is multiple;

[0027] The sending the target access request to the request receiving end corresponding to the project identifier includes:

[0028] Determining a target request receiving end from a plurality of request receiving ends according to the project identifier;

[0029] The target access request is sent to the target request receiving end.

[0030] Optionally, it also includes:

[0031] Acquire attribute information of a project corresponding to the project identifier, and determine whether there is an association relationship among access requests having the project identifier according to the attribute information;

[0032] If so, adding the replica identifier to the access request having the project identifier is performed;

[0033] If not present, an access request with the project identifier is sent to a request receiving end corresponding to the project identifier.

[0034] Optionally, after sending the target access request to the request receiving end corresponding to the project identifier, the method further includes:

[0035] Receive prompt information returned by the request receiving end corresponding to the project identifier;

[0036] The request identifier carried in the prompt information is extracted, and the access request with the request identifier is resent to the request receiving end corresponding to the project identifier.

[0037] Optionally, after receiving the response message fed back by the request receiving end, the method further includes:

[0038] Storing the response message in a storage area corresponding to the project identifier;

[0039] When the end notification carrying the project identifier is received, the project result corresponding to the project identifier is output based on each response message in the storage area corresponding to the project identifier.

[0040] According to a third aspect of an embodiment of this specification, a request processing device is provided, which is applied to a request receiving end, including:

[0041] A parsing module is configured to receive an access request sent by a request sending end, parse the access request, and obtain a project identifier carried in the access request;

[0042] A response module is configured to call a target replica to respond to the access request according to the project identifier if the access request does not carry a replica identifier, and obtain a response message;

[0043] An adding module is configured to add a replica identifier of the target replica in the response message to obtain a target response message;

[0044] The sending module is configured to feed back the target response message to the request sending end, and the target response message is used by the request sending end to extract the copy identifier in the target response message and add it to the access request corresponding to the project identifier.

[0045] According to a fourth aspect of the embodiments of this specification, a request processing device is provided, which is applied to a request sending end, including:

[0046] A receiving module is configured to receive a response message fed back by a request receiving end, wherein the response message is obtained by the request receiving end calling a target replica to respond to an access request sent by the request sending end;

[0047] A request generation module is configured to extract the replica identifier and the project identifier carried in the response message; add the replica identifier to the access request with the project identifier to obtain a target access request;

[0048] The sending module is configured to send the target access request to a request receiving end corresponding to the project identifier.

[0049] According to a fifth aspect of an embodiment of this specification, a request processing system is provided, including:

[0050] A request sender, configured to send an access request;

[0051] The request receiving end is configured to receive the access request, parse the access request, and obtain the project identifier carried by the access request; if the access request does not carry the replica identifier, call the target replica to respond to the access request according to the project identifier to obtain a response message; add the replica identifier of the target replica to the response message to obtain a target response message; and feed back the target response message to the request sending end;

[0052] The request sending end is also configured to receive a response message fed back by the request receiving end; extract the copy identifier and project identifier carried in the response message; add the copy identifier to the access request with the project identifier to obtain a target access request; and send the target access request to the request receiving end corresponding to the project identifier.

[0053] According to a sixth aspect of an embodiment of this specification, a computing device is provided, including:

[0054] Memory and processor;

[0055] The memory is used to store computer-executable instructions, and the processor is used to implement any step of the request processing method when executing the computer-executable instructions.

[0056] According to a seventh aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores computer-executable instructions, and when the instructions are executed by a processor, the steps of any one of the request processing methods are implemented.

[0057] According to an eighth aspect of the embodiments of this specification, a computer program is provided, wherein when the computer program is executed in a computer, the computer is caused to execute the steps of the above-mentioned request processing method.

[0058] The solution provided in this specification receives an access request, parses the access request, and obtains the project identifier carried by the access request; if the access request does not carry a copy identifier, then according to the project identifier, the target copy is called to respond to the access request and a response message is obtained; the copy identifier of the target copy is added to the response message to obtain a target response message; the target response message is fed back to the request sender, and the target response message is used to request the sender to extract the copy identifier in the target response message and add it to the access request corresponding to the project identifier. Among them, if the access request does not carry a copy identifier, it indicates that the access request is equivalent to the first access request in the project represented by the project identifier. Moreover, the first access request does not have the previous access request and does not need to rely on the context information of the previous access request. Therefore, the target copy can be called to respond to the access request according to the project identifier to obtain a response message. On this basis, the copy identifier of the target copy is added to the response message to obtain the target response message, and the target response message is fed back to the request sender, and the target response message is used to request the sender to extract the copy identifier in the target response message and add it to the access request corresponding to the project identifier. In this way, it can be ensured that each access request in the project represented by the project identifier that relies on the context generated by the target copy is always processed by the target copy, thereby avoiding request processing errors caused by the lack of context information. Therefore, this solution can improve the reliability of request processing in the Session scenario. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] Figure 1 is a flowchart of a request processing method applied to a request receiving end provided in an implementation of this specification;

[0060] Figure 2 is a flowchart of a request processing method applied to a request sending end provided in an implementation of this specification;

[0061] Figure 3It is a structural block diagram of a request processing system provided by an implementation of this specification;

[0062] Figure 4 is a flowchart of a request processing method applied to a request processing system provided by an embodiment of this specification;

[0063] Figure 5 This is a scenario example diagram of a request processing method applied to a request processing system provided in an implementation of this specification;

[0064] Figure 6 It is a structural diagram of a request processing device applied to a request receiving end provided in an embodiment of this specification;

[0065] Figure 7 It is a structural diagram of a request processing device applied to a request sending end provided in an embodiment of this specification;

[0066] Figure 8 It is a structural block diagram of an electronic device provided in an implementation of this specification. DETAILED DESCRIPTION

[0067] Many specific details are described in the following description to facilitate a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of this specification, so this specification is not limited to the specific implementation disclosed below.

[0068] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "a", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.

[0069] It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of this specification, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0070] First, the terms involved in one or more implementations of this specification are explained.

[0071] Stateful service: The server needs to record the client information of each session to identify the client and process the request based on the user identity.

[0072] Gateway: Also known as network connector or protocol converter. Gateway realizes network interconnection above the network layer. It is a complex network interconnection device and is only used for interconnection between two networks with different high-level protocols. Gateway can be used for both wide area network interconnection and local area network interconnection.

[0073] Secure Multi-Party Computation (MPC): Multiple participants holding private data jointly execute a computing logic and obtain the computing result. In the machine learning scenario, the computing result of MPC is an executable model. Each participant obtains a part of the model, and the models of all participants are combined to form a logically complete model.

[0074] SCQL (Secure Collaborative Query Language): A secure data query language for multi-party security analysis. An extension of the Structured Query Language (SQL), it inherits the popularity, learnability, and high maturity of SQL as a commonly used data analysis language; in addition, SCQL extends the semantics of standard SQL, allowing SCQL to describe secure computations based on multiple data sources.

[0075] Replica: Also known as instance. To achieve high availability, some applications (APP, Application) or services (Service) deploy the same application multiple times, which is called multi-replica deployment. The services provided by each replica are the same.

[0076] Session: If the same user's request needs to be implemented through multiple interactions with the APP, and the APP will retain context information during the request processing, then the above multiple interactions must be completed and executed by the same copy to avoid request processing exceptions caused by missing context information.

[0077] Hyper Text Transfer Protocol (HTTP): A simple request-response protocol that usually runs on top of TCP. HTTP specifies what messages a client may send to a server and what responses it may receive.

[0078] Hyper Text Transfer Protocol over Secure Socket Layer (HTTPS): A security-oriented HTTP channel that ensures the security of the transmission process through transmission encryption and identity authentication based on HTTP. It is widely used in security-sensitive communications on the World Wide Web, such as transaction payments.

[0079] In specific applications, Session is a very common requirement. Take the medical consultation scenario in life as an example: when a patient goes to the hospital for medical treatment, there are multiple outpatient doctors in the registered department, and a doctor A is randomly assigned to the registered patient. After doctor A asks the patient about his physical condition and issues a checkup form for the patient, the patient goes for the checkup. After the checkup results come out, other doctors except doctor A do not know the context of this visit. If a doctor is changed, the patient has to re-state his physical condition, which is very troublesome. Therefore, after getting the checkup results, the patient cannot find a doctor at random, but must return to doctor A for further diagnosis. Similarly, in the computer field, all information related to an access request can be called a session, and all the information contains context. In the example of a patient's visit, the patient's medical records, the doctor's impression of the patient's physical condition, and other information constitute a session, which is all the information of this visit.

[0080] Exemplarily, a user initiates an SCQL query to computing institution Bob through computing institution Alice. During the processing of the SCQL query, computing institutions Alice and computing institutions Bob need to interact multiple times. In the first interaction, that is, when the query begins, neither computing institution Alice nor computing institution Bob has the context information of the query. Computing institution Bob can call any replica to process the traffic, that is, the access request. After the first interaction, the context information generated by processing the access request is maintained inside the replica. Therefore, in the second interaction, the replica cannot be called at will to process the access request, but the last call, that is, the copy called in the first interaction, must be called to process the access request. This is equivalent to implementing the session function, that is, the function of sticky sessions. If the Sticky Session function is not implemented, the context information cannot be maintained inside the computing institution, and all businesses and applications with session requirements cannot be deployed on the computing institution, otherwise operation abnormalities will occur. Among them, any computing institution can specifically include one or more computing devices.

[0081] For example, the following steps may be used to process a request to implement the Sticky Session function:

[0082] Step 1: The gateway at the request receiving end maintains a record table internally to record the correspondence between the session identifier session id and the copy number, wherein the session identifier refers to the identifier of each access request corresponding to the session.

[0083] Step 2: When the sender initiates a query, it carries the session id in the access request.

[0084] Step 3: When the gateway at the request receiving end receives the access request, it queries the session id in the above record table. If the session id does not exist, it inserts a new record in the table and executes step 4.

[0085] Step 4: When the gateway at the request receiving end receives the access request, it queries the session id in the above record table. If the session id exists, it calls the replica with the replica number corresponding to the session id in the above record table to process the access request.

[0086] Step 5: Before a query ends, if there are multiple access requests, the above step 4 can be repeated.

[0087] Step 6: After a period of time, such as one day, request the receiving gateway to delete the sessionid in the record table to prevent the record table from being too large.

[0088] However, the above scheme has the following disadvantages: Disadvantage 1: Restarting the gateway at the request receiving end will cause the record table to be lost, resulting in the failure of the access request that is currently being executed and depends on the session. Disadvantage 2: The gateway at the request receiving end cannot be deployed in multiple instances. If there are multiple gateways at the request receiving end, the record tables in the multiple gateways are inconsistent, and the sticky session function cannot be implemented. Disadvantage 2: When to delete the records in the record table increases the complexity of the scheme: If the records in the table are deleted too early, the sticky session function will not work. If they are deleted too late, the table will be very large, wasting resources. The example of deleting the records one day later in step 6 above is a relatively conservative time. Although it can ensure that the query has been executed as much as possible, it will also cause the session ID that is no longer used to be stored in the record table, wasting resources.

[0089] In order to provide a more reliable solution, a request processing method is provided in this specification. This specification also involves a request processing device, a computing device, and a computer-readable storage medium, which are described in detail one by one in the following embodiments.

[0090] Figure 1A flowchart of a request processing method applied to a request receiving end provided in an embodiment of the present specification is shown, comprising the following steps:

[0091] S102, receiving an access request sent by a request sending end, parsing the access request, and obtaining a project identifier carried in the access request.

[0092] In a specific application, both the request receiving end and the request sending end can be one or more computing devices. Specifically, each step of this embodiment can be performed by a gateway in the above computing device. In addition, different projects have different functions. For example, a certain project is used for image recognition, another project is used for video playback, and so on. Therefore, in order to ensure the normal execution of the request processing, the access request at least carries a project identifier. In this way, by parsing the access request, at least the project identifier carried by the access request can be obtained.

[0093] In addition, there can be multiple ways to parse access requests. Exemplarily, the content at the first position in the access request can be extracted to obtain a project identifier; if there is a second position in the access request, the content at the second position is extracted to obtain a copy identifier; if there is no second position in the access request, no copy identifier is obtained. Or, exemplarily, the access request can be input into a preset regular expression to obtain a project identifier. Among them, a regular expression is a logical formula for string operations, that is, using some pre-defined specific characters and combinations of these specific characters to form a "regular string", and this "regular string" is used to express a filtering logic for the string. This is all reasonable.

[0094] Any method that can parse the access request and obtain the project identifier carried in the access request can be used in this specification, and this embodiment does not limit this.

[0095] S104: If the access request does not carry a replica identifier, the target replica is called to respond to the access request according to the project identifier to obtain a response message.

[0096] By parsing the access request in the above step S102, if the replica identifier is not obtained, it can be determined that the access request does not carry the replica identifier; if the replica identifier is obtained, it can be determined that the access request carries the replica identifier. The access request does not carry the replica identifier, indicating that the access request is equivalent to the first access request in the project represented by the project identifier. Moreover, the first access request does not have the previous access request and does not need to rely on the context information of the previous access request. Therefore, according to the project identifier, the target replica can be called to respond to the access request and obtain a response message. Among them, according to the project identifier, the target replica can be called to respond to the access request and obtain a response message in a variety of specific ways. For ease of understanding and reasonable layout, it will be described in detail in the form of optional embodiments later.

[0097] In an optional implementation, after parsing the access request, the request processing method provided in this specification may further include the following steps:

[0098] If the access request carries a replica identifier, the target replica with the replica identifier is called to respond to the access request and obtain a response message;

[0099] Feedback response message to the request sender.

[0100] For example, if the access request carries a replica identifier, for example, the access request is replica-y.model-x.alice.svc, and carries the replica identifier replica-y, the replica with the replica identifier replica-y in the replica corresponding to the project identifier model-x can be directly called. In addition, for the case where the replica with the replica identifier replica-y does not exist, it will be specifically described in the form of an optional embodiment later.

[0101] S106, adding the replica identifier of the target replica to the response message to obtain a target response message.

[0102] In a specific application, the method of adding the replica identifier of the target replica in the response message depends on the communication protocol used between the request sender and the request receiver. For example, if the communication protocol is HTTP or HTTPS, the replica identifier can be inserted in the header of the response message (Response), such as Host: replica-1.model-a.bob.svc, or gateway: replica-1.model-a.bob.svc. Among them, the header is a string before the HTML file, and the header and the HTML file must be separated by a blank line. In addition, HTTP or HTTPS stipulates that the Header must be in the form of a KV pair, so the Key can be named arbitrarily as long as it contains the replica identifier.

[0103] Any method of adding the replica identifier of the target replica in the response message to obtain the target response message can be used in this specification, and this embodiment does not limit this.

[0104] S108, feeding back a target response message to the request sending end, where the target response message is used by the request sending end to extract the copy identifier in the target response message and add it to the access request corresponding to the project identifier.

[0105] In this step, a replica identifier is added to the target response message fed back by the request sender. In this way, the subsequent request sender can extract the replica identifier in the target response message and add it to the access request corresponding to the project identifier to implement the above-mentioned sticky session function. In addition, for the sake of ease of understanding and reasonable layout, the request sender uses the replica identifier to send an access request. Figure 2 The details are described in the examples.

[0106] In the solution provided in this specification, if the access request does not carry a copy identifier, it indicates that the access request is equivalent to the first access request in the project represented by the project identifier. Moreover, the first access request does not have the previous access request and does not need to rely on the context information of the previous access request. Therefore, according to the project identifier, the target copy can be called to respond to the access request and obtain a response message. On this basis, the copy identifier of the target copy is added to the response message to obtain the target response message, and the target response message is fed back to the request sender. The target response message is used to request the sender to extract the copy identifier in the target response message and add it to the access request corresponding to the project identifier. In this way, it can be ensured that each access request in the project represented by the project identifier that needs to rely on the context generated by the target copy is always processed by the target copy, thereby avoiding request processing errors caused by the lack of context information. Therefore, the reliability of request processing in the Session scenario can be improved.

[0107] In an optional implementation manner, the above-mentioned calling the target replica to respond to the access request according to the project identifier and obtaining the response message may specifically include the following steps:

[0108] Selecting a target copy that meets a preset distribution condition from multiple copies with project identifications;

[0109] Call the target replica to respond to the access request and obtain a response message.

[0110] In a specific application, there may be multiple ways to select a target replica that meets the preset distribution condition from multiple replicas with a project identifier. Exemplarily, any replica with a project identifier may be selected. Alternatively, exemplary, a target replica that meets the preset load balancing condition may be selected from multiple replicas with a project identifier. For example, if the preset load balancing condition is a round-robin scheduling condition, then for multiple access requests carrying a certain project identifier, the replica r1 with the project identifier may be selected to respond to the first access request, the replica r2 may be selected to respond to the second access request, and the replica r3 may be selected to respond to the third access request. By analogy, when all replicas have been called once, a new round of calls may be started from the replica r1. Alternatively, if the preset load balancing condition is a Pick Fast condition, then the target replica with the fastest response speed may be selected from multiple replicas with a project identifier. Alternatively, if the preset load balancing condition is a weighted random condition, then the weight of each replica may be pre-set, and the score of the replica may be determined by using the weight, and the target replica with a score reaching the score threshold may be selected from multiple replicas with a project identifier. Among them, the size of the weight is proportional to the probability of the copy being selected. The higher the weight, the higher the probability of the copy being selected.

[0111] The sticky session mechanism proposed in this solution is compatible with the load balancing strategy and there is no contradiction.

[0112] In an optional implementation, before calling the target replica with the replica identifier to respond to the access request, the request processing method provided in the embodiment of this specification may further include the following steps:

[0113] Determine whether the target replica with the replica identifier exists. If not, return a prompt message to the request sender.

[0114] In specific applications, the target copy may be deleted due to objective factors. In this regard, the solution provided in this embodiment can be adopted to deal with this situation. Among them, the prompt information is used to inform the request sending end that the target copy with the copy identifier does not exist. For example, the prompt information can be "error response". In addition, the prompt information can also include information such as the copy identifier of the target copy, so that the user who initiated the request can know the reason for the abnormal request processing. Furthermore, the user can resend the access request through the request sending end to improve the success rate of the request processing.

[0115] In an optional implementation, before calling the target replica to respond to the access request according to the project identifier, the request processing method provided in the embodiment of this specification may further include the following steps:

[0116] Determine whether the target copy exists. If not, return a prompt message to the request sender.

[0117] This embodiment is similar to the case where the access request carries the copy identifier, except that the access request in this embodiment does not carry the copy identifier. The copy deletion may also exist in this embodiment. Therefore, a prompt message may be returned to the request sender.

[0118] In this way, the above-mentioned embodiments of returning prompt information can achieve a friendly effect on adding and deleting copies. Exemplarily, if the request receiving end adds a copy, the access request being processed, that is, in the process of execution, will not be affected at all. Moreover, new access requests will successively fall on the newly added copy with a certain probability. If the request receiving end deletes a copy, the access request being processed, that is, being executed, by the copy that has not been deleted will not be affected, and only the access request processed by the deleted copy will fail. In the case of failure, by returning the prompt information to the request sending end, the user can be prompted to try again, thereby minimizing the impact of deleting the copy.

[0119] like Figure 2 As shown, a flowchart of a request processing method applied to a request sending end provided in an implementation of this specification includes the following steps:

[0120] S202, receiving a response message fed back by the request receiving end, where the response message is obtained by the request receiving end calling the target replica to respond to the access request sent by the request sending end.

[0121] In the case where the request receiving end feeds back a response message, the request sending end can receive the response message. Figure 1 The response messages in the embodiments are the same and will not be described here again. Figure 1 In addition, in order to further improve the accuracy of request processing, in an optional implementation, after receiving the response message fed back by the request receiving end, the request processing method provided in the embodiment of this specification may further include the following steps:

[0122] The response message is stored in the storage area corresponding to the project identifier;

[0123] When an end notification carrying a project identifier is received, the project result corresponding to the project identifier is output based on each response message in the storage area corresponding to the project identifier.

[0124] In specific applications, for projects that require multiple interactions to be implemented, in order to ensure the accuracy of the project results, the response message can be stored through this embodiment, and then when the end notification carrying the project identifier is received, the project result corresponding to the project identifier is output based on each response message in the storage area corresponding to the project identifier. In this way, it can be ensured that the project result is obtained based on the response messages of the multiple interactions required for the project, reducing the request processing exception caused by returning incomplete response results.

[0125] Among them, based on each response message in the storage area corresponding to the project identifier, the project result corresponding to the project identifier is output, which can be multiple. Exemplarily, the response result can be extracted from each response message in the storage area corresponding to the project identifier, and the extracted response result is directly output as the project result corresponding to the project identifier. Or, exemplarily, the response result can be extracted from each response message in the storage area corresponding to the project identifier, the extracted response results are spliced, and the project result corresponding to the project identifier is obtained and output. Or, exemplarily, each response message in the storage area corresponding to the project identifier can be read and output as the project result corresponding to the project identifier. This is all reasonable.

[0126] S204, extracting the copy identifier and project identifier carried in the response message.

[0127] In a specific application, there may be multiple ways to extract the copy identifier and the project identifier carried in the response message. For example, the content at the third position in the response message may be extracted to obtain the project identifier; the content at the fourth position in the response message may be extracted to obtain the copy identifier. Alternatively, for example, the access request may be input into a preset regular expression to obtain the project identifier and the copy identifier.

[0128] Any method that can extract the copy identifier and project identifier carried in the response message can be used in this specification, and this embodiment does not limit this.

[0129] S206, adding the copy identifier to the access request having the project identifier to obtain a target access request.

[0130] In a specific application, the method of adding a replica identifier to an access request with a project identifier is similar to the method of adding a replica identifier of a target replica in a response message, and also depends on the communication protocol used between the request sender and the request receiver. For example, if the communication protocol is HTTP or HTTPS, the replica identifier can be inserted in the header of the access request, such as Host: replica-1.model-a.bob.svc, or gateway: replica-1.model-a.bob.svc. The difference is that in this embodiment, the request sender adds the replica identifier to the access request. The same parts will not be repeated here, see the above for details. Figure 1 In the embodiment, the copy identifier is added to the description of the response message. In addition, the request sending end can record the copy identifier, so that the copy identifier can be directly used later without multiple extractions.

[0131] Any method of adding a copy identifier to an access request to obtain a target access request can be used in this specification, and this embodiment does not limit this.

[0132] S208, sending a target access request to a request receiving end corresponding to the project identifier.

[0133] Among them, the request receiving end corresponding to the project identifier can be used to implement the project with the project identifier. Therefore, sending the target access request to the request receiving end corresponding to the project identifier can ensure the normal execution of the request processing. For example, it can be ensured that the target access request with the image recognition project identifier is sent to the request receiving end for implementing the image recognition project, and the target access request with the video playback project identifier is sent to the request receiving end for implementing the video playback project.

[0134] In the solution provided in this specification, if the access request does not carry a copy identifier, it indicates that the access request is equivalent to the first access request in the project represented by the project identifier. Moreover, the first access request does not have the previous access request and does not need to rely on the context information of the previous access request. Therefore, according to the project identifier, the target copy can be called to respond to the access request and obtain a response message. On this basis, the copy identifier of the target copy is added to the response message to obtain the target response message, and the target response message is fed back to the request sender. The target response message is used to request the sender to extract the copy identifier in the target response message and add it to the access request corresponding to the project identifier. In this way, it can be ensured that each access request in the project represented by the project identifier that needs to rely on the context generated by the target copy is always processed by the target copy, thereby avoiding request processing errors caused by the lack of context information. Therefore, the reliability of request processing in the Session scenario can be improved.

[0135] For ease of understanding, the following Figure 3 and Figure 4 , further illustrating a request processing method applied to a request processing system provided in an embodiment of this specification.

[0136] like Figure 3 As shown, a structural block diagram of a request processing system provided by an embodiment of this specification, the system includes:

[0137] The request sending end 302 is configured to send an access request;

[0138] The request receiving end 304 is configured to receive the access request, parse the access request, and obtain the project identifier carried by the access request; if the access request does not carry the replica identifier, call the target replica to respond to the access request according to the project identifier to obtain a response message; add the replica identifier of the target replica to the response message to obtain a target response message; and feed back the target response message to the request sending end 302;

[0139] The request sending end 302 is also configured to receive a response message fed back by the request receiving end; extract the copy identifier and project identifier carried in the response message; add the copy identifier to the access request with the project identifier to obtain a target access request; and send the target access request to the request receiving end 304 corresponding to the project identifier.

[0140] The above is a schematic scheme of a request processing system of this embodiment. It should be noted that the technical scheme of the request processing system and the technical scheme of the request processing method described above are of the same concept, and the details not described in detail in the technical scheme of the request processing system can be found in the description of the technical scheme of the request processing method described above.

[0141] For convenience, the request processing method provided in the embodiment of this specification is further described below by taking the interaction between the request sending end and the request receiving end as an example. Figure 4 As shown, a flowchart of a request processing method applied to a request processing system provided by an embodiment of this specification includes:

[0142] S402, the request sender sends an access request;

[0143] S404, the request receiving end parses the access request and obtains the project identifier carried in the access request; if the access request does not carry the replica identifier, the target replica is called to respond to the access request according to the project identifier to obtain a response message; the replica identifier of the target replica is added to the response message to obtain a target response message;

[0144] S406, the request receiving end feeds back a target response message to the request sending end;

[0145] S408, the request sending end extracts the copy identifier and the project identifier carried in the response message; adds the copy identifier to the access request with the project identifier to obtain the target access request;

[0146] S410, sending a target access request to a request receiving end corresponding to the project identifier.

[0147] The steps executed by the request sending end in this embodiment are the same as those in the above description. Figure 2 The steps in the embodiment are the same, and the steps performed by the request receiving end are the same as those in the above description. Figure 1 The steps in the embodiments are the same. The same contents will not be repeated here, please refer to the above description for details. Figure 1 and Figure 2 Description of embodiments.

[0148] In an optional implementation, the number of request receiving ends corresponding to the project identifier is multiple;

[0149] Accordingly, the above-mentioned sending of the target access request to the request receiving end corresponding to the project identifier may specifically include the following steps:

[0150] Determine a target request receiving end from a plurality of request receiving ends according to the project identifier;

[0151] Send a target access request to the target request receiver.

[0152] In the case of the session function implemented in the manner provided in the embodiments of this specification, the request receiving end, such as the gateway, is still a stateless application. That is to say, each step of the operation of the request receiving end is self-explanatory and does not need to rely on the execution context. Therefore, the request receiving end, that is, the gateway, can be deployed in multiple instances and can also be restarted. For example, in the organization Bob, assuming that the number of gateways is 3, the organization Alice can determine the target request receiving end from multiple request receiving ends based on the project identifier. Exemplarily, one of the multiple request receiving ends can be randomly selected as the target request receiving end; or, the one with the smallest load can be selected as the target request receiving end, and so on, which are all reasonable and will not affect the execution of this solution. In other words, the target request receiving end selected for each access request may not be the same.

[0153] Therefore, this embodiment is compatible with more efficient situations such as multi-copy deployment or distributed deployment of the request receiving end, thereby further improving the efficiency of request processing and expanding the scope of application of the request processing method provided in the embodiments of this specification.

[0154] In an optional implementation manner, the request processing method provided in the embodiments of this specification may further include the following steps:

[0155] Obtaining attribute information of a project corresponding to the project identifier, and determining whether there is an association relationship between access requests having the project identifier according to the attribute information;

[0156] If it exists, the execution adds the replica identifier to the access request with the project identifier;

[0157] If it does not exist, the access request with the project identifier is sent to the request receiving end corresponding to the project identifier.

[0158] In specific applications, for some apps that do not require a session mechanism, that is, apps that do not require a session execution context, any request can randomly call the other party's replica. Therefore, the replica ID in the response can be ignored, and the next request can still use the URL without the replica ID to request the other party's service. That is, the steps of this embodiment: sending the access request with the project ID to the request receiving end corresponding to the project ID. Therefore, the solution of this embodiment can be compatible with applications that do not require a session mechanism.

[0159] Among them, the attribute information of the project corresponding to the project identifier can be various, such as project name, project identifier, project type, project configuration file, etc. In addition, there can be various ways to determine whether there is an association relationship between the access requests with the project identifier based on the attribute information. Exemplarily, the association information corresponding to the attribute information of the above-mentioned project can be found from the correspondence between the attribute information and the association information established in advance; if the association information shows that there is an association relationship, it is determined that there is an association relationship between the access requests with the project identifier; if the association information shows that there is no association relationship, it is determined that there is no association relationship between the access requests with the project identifier. Alternatively, exemplarily, the attribute information of the above-mentioned project can be input into a classification model obtained by pre-training to obtain a classification result of whether there is an association relationship between the access requests with the project identifier. Among them, the classification model uses the attribute information of the sample project and the classification result label corresponding to the attribute information of the sample project. The classification result label is used to indicate whether there is an association relationship between the sample access requests with the project identifier of the sample project.

[0160] In an optional implementation, after sending the target access request to the request receiving end corresponding to the project identifier, the request processing method provided in the embodiment of this specification may further include the following steps:

[0161] Receive prompt information returned by the request receiving end corresponding to the project identifier;

[0162] The request identifier carried in the prompt information is extracted, and the access request with the request identifier is resent to the request receiving end corresponding to the project identifier.

[0163] In a specific application, if the request receiving end adds a copy, the access request being processed, that is, in the process of execution, will not be affected at all. Moreover, new access requests will fall on the newly added copy with a certain probability. If the request receiving end deletes a copy, the access request being processed, that is, in the process of execution, by the copy that has not been deleted will not be affected, and only the access request processed by the deleted copy will fail. In the case of failure, by returning a prompt message to the request sending end, the user can be prompted to retry, thereby minimizing the impact of deleting the copy. Therefore, this embodiment can extract the request identifier carried by the prompt message, and resend the access request with the request identifier to the request receiving end corresponding to the project identifier, thereby achieving the effect of retrying.

[0164] For ease of understanding, the following Figure 5 Taking the scenario example diagram of a request processing method applied to a request processing system provided in an implementation of this specification as an example, the request processing method of an embodiment of this specification is further described. Figure 5 As shown, a request processing method applied to a request processing system provided in an embodiment of this specification may include the following steps S1 to S6:

[0165] S1, the user initiates a request, and a new session begins. Assume that the user wants to access model A. Since the three instances of model A in the institution Alice are all isomorphic, you can select any one of the replicas to call. In this example, select replica 2 of model A. Model A is equivalent to a project. This application scenario is a scenario for secure training of models, so a model can be regarded as a training project.

[0166] S2, institution Alice accesses institution Bob through the gateway, that is, institution Alice sends an access request to institution Bob. For a new session, each copy of institution Bob is also equivalent: each copy has no session context. At this time, institution Alice does not need to specify the copy number to access institution Bob. Therefore, in this step, institution Alice accesses the model in institution Bob through the address model-a.bob.svc carried in the access request. The address can be obtained through the Uniform Resource Locator (URL), a representation method used to specify the location of information on the World Wide Web service program of the Internet. That is to say, the copy identifier and project identifier carried in the access request can be the copy address and project address, respectively.

[0167] S3, after receiving the access request, the gateway of organization Bob resolves the address to model-a.bob.svc, which only contains the model ID but no replica number. Therefore, the gateway randomly selects one of the replicas of model A. In this example, the gateway of organization Bob selects replica 1.

[0168] S4, after processing Model A replica 1 of Organization Bob, returns the result, i.e., response, to Organization Bob's Gateway. Organization Bob's Gateway adds the actual replica address in the response: replica-1.model-a.bob.svc, and returns the modified response to Organization Alice.

[0169] S5, after receiving the modified response, Model A copy 2 of institution Alice writes down the address attached to the modified response.

[0170] S6, during the model operation, the organization Bob needs to be accessed multiple times. The next time the model is accessed, the organization Alice directly uses the address replica-1.model-a.bob.svc to access the organization Bob. When the Gateway of the organization Bob sees the existence of replica-1 in the address, it will definitely forward the request to the model A replica 1, thereby realizing the sticky session function. In this way, during the model operation, the organization Bob is accessed multiple times. Correspondingly, after the processing of the access request is repeated multiple times, the task is executed, and the model A replica 2 in the organization Alice returns the result to the user, and this session ends.

[0171] In this solution, since the institutions Alice and Bob are symmetrical, users can also initiate requests on the side of institution Bob. If the request is initiated on the side of institution Bob, the roles of institutions Alice and Bob in the above process can be swapped. In this embodiment, institutions Alice and Bob have deployed 3 replicas. In specific applications, the number of replicas deployed by institutions Alice and Bob can be different. At the same time, they do not need to know each other's number of replicas. If institution Bob adjusts the number of deployed replicas, it does not need to notify institution Alice. For institution Alice, the replica in the address in the response is an id, which is not necessarily numbered 1, 2, 3, 4... In practice, the APP in institution Alice only needs to remember the address as a whole, and does not need to worry about how many replicas there are on the side of institution Bob.

[0172] Corresponding to the above method embodiment, this specification also provides a request processing device embodiment, Figure 6FIG. 1 shows a schematic diagram of a structure of a request processing device applied to a request receiving end provided by an embodiment of the present specification. Figure 6 As shown, the device comprises:

[0173] The parsing module 602 is configured to receive an access request sent by a request sending end, parse the access request, and obtain a project identifier carried in the access request;

[0174] The response module 604 is configured to call the target replica to respond to the access request according to the project identifier if the access request does not carry the replica identifier, and obtain a response message;

[0175] An adding module 606 is configured to add a replica identifier of the target replica to the response message to obtain a target response message;

[0176] The sending module 608 is configured to feed back the target response message to the request sending end, and the target response message is used by the request sending end to extract the copy identifier in the target response message and add it to the access request corresponding to the project identifier.

[0177] In the solution provided in this specification, if the access request does not carry a copy identifier, it indicates that the access request is equivalent to the first access request in the project represented by the project identifier. Moreover, the first access request does not have the previous access request and does not need to rely on the context information of the previous access request. Therefore, according to the project identifier, the target copy can be called to respond to the access request and obtain a response message. On this basis, the copy identifier of the target copy is added to the response message to obtain the target response message, and the target response message is fed back to the request sender. The target response message is used to request the sender to extract the copy identifier in the target response message and add it to the access request corresponding to the project identifier. In this way, it can be ensured that each access request in the project represented by the project identifier that needs to rely on the context generated by the target copy is always processed by the target copy, thereby avoiding request processing errors caused by the lack of context information. Therefore, the reliability of request processing in the Session scenario can be improved.

[0178] In an optional implementation, the response module 604 is further configured to:

[0179] Selecting a target copy that meets a preset distribution condition from a plurality of copies having the project identifier;

[0180] The target copy is called to respond to the access request and obtain a response message.

[0181] In an optional implementation, the response module 604 is further configured to:

[0182] If the access request carries a replica identifier, calling a target replica with the replica identifier to respond to the access request and obtaining a response message;

[0183] Feedback the response message to the request sending end.

[0184] In an optional implementation, the device further includes a prompt module configured to:

[0185] Determine whether the target copy with the copy identifier exists, and if not, return prompt information to the request sender.

[0186] In an optional implementation, the device further includes a prompt module configured to:

[0187] Determine whether the target copy exists, and if not, return prompt information to the request sender.

[0188] The above is a schematic scheme of a request processing device of this embodiment. It should be noted that the technical scheme of the request processing device and the technical scheme of the request processing method applied to the request receiving end belong to the same concept, and the details not described in detail in the technical scheme of the request processing device can be referred to the description of the technical scheme of the request processing method applied to the request receiving end.

[0189] Corresponding to the above method embodiment, this specification also provides a request processing device embodiment, Figure 7 FIG. 1 shows a schematic diagram of a structure of a request processing device applied to a request sending end provided in an embodiment of the present specification. Figure 7 As shown, the device comprises:

[0190] The receiving module 702 is configured to receive a response message fed back by the request receiving end, where the response message is obtained by the request receiving end calling the target replica to respond to the access request sent by the request sending end;

[0191] The request generation module 704 is configured to extract the replica identifier and the project identifier carried in the response message; add the replica identifier to the access request with the project identifier to obtain a target access request;

[0192] The sending module 706 is configured to send the target access request to the request receiving end corresponding to the project identifier.

[0193] In the solution provided in this specification, if the access request does not carry a copy identifier, it indicates that the access request is equivalent to the first access request in the project represented by the project identifier. Moreover, the first access request does not have the previous access request and does not need to rely on the context information of the previous access request. Therefore, according to the project identifier, the target copy can be called to respond to the access request and obtain a response message. On this basis, the copy identifier of the target copy is added to the response message to obtain the target response message, and the target response message is fed back to the request sender. The target response message is used to request the sender to extract the copy identifier in the target response message and add it to the access request corresponding to the project identifier. In this way, it can be ensured that each access request in the project represented by the project identifier that needs to rely on the context generated by the target copy is always processed by the target copy, thereby avoiding request processing errors caused by the lack of context information. Therefore, the reliability of request processing in the Session scenario can be improved.

[0194] In an optional implementation manner, the number of request receiving ends corresponding to the project identifier is multiple;

[0195] The sending module 706 is further configured to:

[0196] Determining a target request receiving end from a plurality of request receiving ends according to the project identifier;

[0197] The target access request is sent to the target request receiving end.

[0198] In an optional implementation, the request generation module 704 is further configured to:

[0199] Acquire attribute information of a project corresponding to the project identifier, and determine whether there is an association relationship among access requests having the project identifier according to the attribute information;

[0200] If so, adding the replica identifier to the access request having the project identifier is performed;

[0201] If not present, an access request with the project identifier is sent to a request receiving end corresponding to the project identifier.

[0202] In an optional implementation, the sending module 706 is further configured to:

[0203] Receive prompt information returned by the request receiving end corresponding to the project identifier;

[0204] The request identifier carried in the prompt information is extracted, and the access request with the request identifier is resent to the request receiving end corresponding to the project identifier.

[0205] In an optional implementation, the method further includes a result output module configured to:

[0206] Storing the response message in a storage area corresponding to the project identifier;

[0207] When the end notification carrying the project identifier is received, the project result corresponding to the project identifier is output based on each response message in the storage area corresponding to the project identifier.

[0208] The above is a schematic scheme of a request processing device of this embodiment. It should be noted that the technical scheme of the request processing device and the technical scheme of the request processing method applied to the request sending end belong to the same concept, and the details not described in detail in the technical scheme of the request processing device can be referred to the description of the technical scheme of the request processing method applied to the request sending end.

[0209] Figure 8 The structure block diagram of an electronic device 800 according to an embodiment of the present specification is shown. The components of the electronic device 800 include but are not limited to a memory 810 and a processor 820. The processor 820 is connected to the memory 810 via a bus 830, and the database 850 is used to store data.

[0210] The electronic device 800 also includes an access device 840, which enables the electronic device 800 to communicate via one or more networks 860. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 840 may include one or more of any type of network interface (e.g., a network interface card (NIC)) of wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a world-wide interoperability for microwave access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and the like.

[0211] In one embodiment of the present specification, the above and Figure 8 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Figure 8 The electronic device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.

[0212] The electronic device 800 may be any type of stationary or mobile electronic device, including a mobile computer or mobile electronic device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable electronic device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary electronic device such as a desktop computer or a PC. The electronic device 800 may also be a mobile or stationary server.

[0213] The processor 820 is used to implement any of the steps of the above-mentioned request processing method when executing computer executable instructions.

[0214] The above is a schematic scheme of an electronic device of this embodiment. It should be noted that the technical scheme of the electronic device and the technical scheme of the request processing method described above are of the same concept, and the details not described in detail in the technical scheme of the electronic device can be found in the description of the technical scheme of the request processing method described above.

[0215] An embodiment of the present specification also provides a computer-readable storage medium storing computer instructions, which, when executed by a processor, implement the steps of the request processing method as described above.

[0216] The computer instructions stored in the computer-readable storage medium are used to implement the steps of any of the above-mentioned request processing methods.

[0217] The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the request processing method described above are of the same concept, and the details not described in detail in the technical scheme of the storage medium can be found in the description of the technical scheme of the request processing method described above.

[0218] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0219] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc.

[0220] It should be noted that, for the convenience of description, the aforementioned method embodiments are all described as a series of action combinations, but those skilled in the art should be aware that this specification is not limited by the order of the actions described, because according to this specification, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this specification.

[0221] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0222] The preferred embodiments of this specification disclosed above are only used to help explain this specification. The optional embodiments do not describe all the details in detail, nor do they limit the invention to only the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of this specification, so that technicians in the relevant technical field can well understand and use this specification. This specification is limited only by the claims and their full scope and equivalents.

Claims

1. A request processing method, applied to a request receiving end, comprising: Receive an access request sent by a request sender, parse the access request, and obtain a project identifier carried in the access request, wherein the process of providing a project is a session, and one session requires multiple interactions with the replica; If the access request does not carry a replica identifier, then according to the project identifier, a target replica is called to respond to the access request to obtain a response message, wherein the target replica is one of multiple replicas having the project identifier, the multiple replicas have the same functions, and the target replica is used to process each access request in the project represented by the project identifier that depends on the context generated by the target replica; Add the replica identifier of the target replica to the response message to obtain a target response message; Feedback the target response message to the request sending end, wherein the target response message is used by the request sending end to extract the copy identifier in the target response message and add it to the target access request corresponding to the project identifier; Receive the target access request sent by the request sending end, and call the target replica with the replica identifier to respond to the target access request.

2. The method according to claim 1, wherein the step of calling the target replica to respond to the access request and obtaining a response message according to the project identifier comprises: Selecting a target copy that meets a preset distribution condition from a plurality of copies having the project identifier; The target copy is called to respond to the access request and obtain a response message.

3. The method according to claim 1, after parsing the access request, further comprising: If the access request carries a replica identifier, calling a target replica with the replica identifier to respond to the access request and obtaining a response message; Feedback the response message to the request sending end.

4. The method according to claim 3, before calling the target replica with the replica identifier to respond to the access request, further comprises: Determine whether the target copy with the copy identifier exists, and if not, return prompt information to the request sender.

5. The method according to any one of claims 1 to 4, before calling the target copy to respond to the access request according to the project identifier, further comprising: Determine whether the target copy exists, and if not, return prompt information to the request sender.

6. A request processing method, applied to a request sending end, comprising: Receive a response message fed back by the request receiving end, wherein the response message is obtained by the request receiving end calling the target replica to respond to the access request sent by the request sending end, wherein the target replica is one of multiple replicas with a project identifier, the multiple replicas have the same functions, and the target replica is used to process each access request in the project represented by the project identifier that depends on the context generated by the target replica; Extracting the replica identifier and the project identifier carried in the response message, wherein the process of providing a project is a session, and one session requires multiple interactions with the replica; Adding the copy identifier to the access request having the project identifier to obtain a target access request; The target access request is sent to a request receiving end corresponding to the project identifier.

7. The method according to claim 6, wherein the number of request receiving terminals corresponding to the project identifier is multiple; The sending the target access request to the request receiving end corresponding to the project identifier includes: Determining a target request receiving end from a plurality of request receiving ends according to the project identifier; The target access request is sent to the target request receiving end.

8. The method according to any one of claims 6 to 7, further comprising: Acquire attribute information of a project corresponding to the project identifier, and determine whether there is an association relationship among access requests having the project identifier according to the attribute information; If so, adding the replica identifier to the access request having the project identifier is performed; If not present, an access request with the project identifier is sent to a request receiving end corresponding to the project identifier.

9. The method according to any one of claims 6 to 7, after sending the target access request to the request receiving end corresponding to the project identifier, further comprising: Receive prompt information returned by the request receiving end corresponding to the project identifier; The request identifier carried in the prompt information is extracted, and the access request with the request identifier is resent to the request receiving end corresponding to the project identifier.

10. The method according to any one of claims 6 to 7, further comprising, after the receiving request receiving end feeds back a response message: Storing the response message in a storage area corresponding to the project identifier; When the end notification carrying the project identifier is received, the project result corresponding to the project identifier is output based on each response message in the storage area corresponding to the project identifier.

11. A request processing device, applied to a request receiving end, comprising: A parsing module is configured to receive an access request sent by a request sending end, parse the access request, and obtain a project identifier carried in the access request, wherein the process of providing a project is a session, and one session requires multiple interactions with the replica; a response module configured to, if the access request does not carry a replica identifier, call a target replica to respond to the access request according to the project identifier to obtain a response message, wherein the target replica is one of multiple replicas having the project identifier, the multiple replicas have the same functions, and the target replica is used to process each access request in the project represented by the project identifier that depends on the context generated by the target replica; An adding module is configured to add a replica identifier of the target replica in the response message to obtain a target response message; A sending module, configured to feed back the target response message to the request sending end, wherein the target response message is used by the request sending end to extract the copy identifier in the target response message and add it to the target access request corresponding to the project identifier; Receive the target access request sent by the request sending end, and call the target replica with the replica identifier to respond to the target access request.

12. A request processing device, applied to a request sending end, comprising: A receiving module, configured to receive a response message fed back by a request receiving end, wherein the response message is obtained by the request receiving end calling a target replica to respond to an access request sent by the request sending end, wherein the target replica is one of a plurality of replicas having a project identifier, the plurality of replicas have the same functions, and the target replica is used to process each access request in the project represented by the project identifier that depends on a context generated by the target replica; The request generation module is configured to extract the replica identifier and the project identifier carried in the response message, wherein the process of providing the project is a session, and one session requires multiple interactions with the replica; add the replica identifier to the access request with the project identifier to obtain a target access request; The sending module is configured to send the target access request to a request receiving end corresponding to the project identifier.

13. A request processing system, comprising: A request sender, configured to send an access request; A request receiving end is configured to receive the access request, parse the access request, and obtain the project identifier carried by the access request, wherein the process of providing a project is a session, and one session requires multiple interactions with the replica; if the access request does not carry the replica identifier, then according to the project identifier, call the target replica to respond to the access request and obtain a response message, wherein the target replica is one of multiple replicas with the project identifier, and the multiple replicas have the same functions, and the target replica is used to process each access request in the project represented by the project identifier that depends on the context generated by the target replica; add the replica identifier of the target replica in the response message to obtain a target response message; feed back the target response message to the request sending end; receive the target access request sent by the request sending end, and call the target replica with the replica identifier to respond to the target access request; The request sending end is also configured to receive a response message fed back by the request receiving end; extract the copy identifier and project identifier carried in the response message; add the copy identifier to the access request with the project identifier to obtain a target access request; and send the target access request to the request receiving end corresponding to the project identifier.

14. A computing device, characterized in that include: Memory and processor; The memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions; When the computer executable instructions are executed by a processor, the steps of the request processing method described in any one of claims 1 to 5 or 6-10 are implemented.

15. A computer-readable storage medium storing computer instructions, characterized in that: When the instruction is executed by the processor, the steps of the request processing method described in any one of claims 1 to 5 or 6-10 are implemented.

16. A computer program product comprising a computer program, wherein: When the computer program is executed in a computer, the computer is caused to execute the steps of the request processing method described in any one of claims 1 to 5 or 6 to 10.