Method, apparatus, electronic device, and storage medium for processing request
Patent Information
- Authority / Receiving Office
- HK · HK
- Patent Type
- Patents
- Current Assignee / Owner
- TENCENT TECHNOLOGY (SHENZHEN) CO LTD
- Filing Date
- 2023-04-27
- Publication Date
- 2026-07-17
AI Technical Summary
In existing technologies, how to effectively handle requests while ensuring the isolated storage of business data is an urgent problem to be solved.
A hierarchical processing system is adopted, with each hierarchical processing system deployed according to region. A routing layer is deployed in each hierarchical processing system to accurately route requests and ensure that requests are accurately forwarded to the target business layer for processing.
It achieves isolated storage of business data, while ensuring timely and accurate processing of requests, avoiding request timeouts caused by cross-regional access, and meeting GDPR requirements.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and more specifically, to a method, apparatus, electronic device, and storage medium for processing requests. Background Technology
[0002] The General Data Protection Regulation (GDPR) stipulates that businesses and entities should take measures to protect the data of EU citizens. Therefore, in order to meet the requirements of the GDPR in various business scenarios, it is necessary to store business data in an isolated manner. How to effectively process requests while ensuring the isolated storage of business data is a technical problem that urgently needs to be solved in the existing technology. Summary of the Invention
[0003] In view of the above problems, embodiments of this application propose a request processing method, apparatus, electronic device, and storage medium to improve the above problems.
[0004] According to one aspect of the embodiments of this application, a request processing method is provided, applied to a first layered processing system in a request processing system. The request processing system includes at least two layered processing systems, and the first layered processing system is one of the at least two layered processing systems. Each layered processing system corresponds to a region. The layered processing system includes an access layer, a routing layer, a service layer, and a data layer. The data layer is used to store service data of the region corresponding to its respective layered processing system. The access layer is used to receive requests initiated by clients in the region corresponding to its respective layered processing system. The method includes: after the access layer in the first layered processing system receives a request initiated by a client in the first region, the routing layer in the first layered processing system determines, among the at least two layered processing systems, a target layered processing system where a target service layer for processing the request is located. The first region refers to the region corresponding to the first layered processing system. The routing layer in the first layered processing system routes the request to the target service layer in the target layered processing system, so that the target service layer obtains corresponding service data from the target data layer in the target layered processing system and processes the request.
[0005] According to one aspect of the embodiments of this application, a request processing apparatus is provided, applied to a first layered processing system in a request processing system. The request processing system includes at least two layered processing systems, and the first layered processing system is one of the at least two layered processing systems. Each layered processing system corresponds to a region. The layered processing system includes an access layer, a routing layer, a service layer, and a data layer. The data layer is used to store service data of the region corresponding to its own layered processing system. The access layer is used to receive requests initiated by clients in the region corresponding to its own layered processing system. The apparatus includes: a target layered processing system determination module, used to, after the access layer in the first layered processing system receives a request initiated by a client in the first region, determine, among the at least two layered processing systems, the target layered processing system containing the target service layer for processing the request, where the first region refers to the region corresponding to the first layered processing system; and a routing module, used to, the routing layer in the first layered processing system routes the request to the target service layer in the target layered processing system, so that the target service layer obtains corresponding service data from the target data layer in the target layered processing system and processes the request.
[0006] In some embodiments of this application, based on the foregoing scheme, the target hierarchical processing system determination module includes: a target routing strategy determination unit, used by the routing layer in the first hierarchical processing system to determine the target routing strategy corresponding to the attribute information based on the attribute information of the request; and a target hierarchical processing system determination unit, used by the routing layer in the first hierarchical processing system to determine the target hierarchical processing system where the target service layer processing the request is located in the at least two hierarchical processing systems based on the target routing strategy.
[0007] In some embodiments of this application, based on the foregoing scheme, the target routing strategy includes routing according to the parameter tag carried in the request; the target hierarchical processing system determination unit includes: a parameter tag acquisition unit, used for the routing layer in the first hierarchical processing system to acquire the parameter tag carried in the request according to the target routing strategy; and a first determination unit, used for determining the hierarchical processing system corresponding to the region indicated by the parameter tag as the target hierarchical processing system.
[0008] In other embodiments of this application, based on the foregoing scheme, the target routing policy instructs routing according to the domain name requested for access; the target hierarchical processing system determination unit includes: a target domain name acquisition unit, used for the routing layer in the first hierarchical processing system to acquire the target domain name requested for access by the request according to the target routing policy; and a second determination unit, used for determining the hierarchical processing system corresponding to the region to which the target domain name belongs as the target hierarchical processing system.
[0009] In other embodiments of this application, based on the foregoing scheme, the target routing policy indicates routing based on the registration location; the target hierarchical processing system determination unit includes: a registration location information acquisition unit, used by the routing layer in the first hierarchical processing system to acquire the registration location information of the client according to the target routing policy; and a third determination unit, used to determine the hierarchical processing system corresponding to the region to which the registration location indicated by the registration location information belongs as the target hierarchical processing system.
[0010] In other embodiments of this application, based on the foregoing scheme, the target routing policy instructs routing according to the index information carried in the request; the target hierarchical processing system determination unit includes: a target index information acquisition unit, used for the routing layer in the first hierarchical processing system to acquire the target index information carried in the request according to the target routing policy; a region query unit, used for performing a region query based on the target index information to determine the target region; and a fourth determination unit, used for determining the hierarchical processing system corresponding to the target region as the target hierarchical processing system.
[0011] In some embodiments of this application, based on the foregoing scheme, the request processing apparatus further includes: a request classification and determination module, used by the routing layer in the first hierarchical processing system to query and obtain the attribute information of the request from the cached non-sensitive information.
[0012] In some embodiments of this application, based on the foregoing scheme, the request processing apparatus further includes: a request acquisition module, used to acquire a request to be processed from the business layer of the first layered processing system, wherein the request to be processed originates from the routing layer of the first layered processing system or from the routing layer of another layered processing system besides the first layered processing system; a target service determination module, used to determine a target service in the business layer of the first layered processing system according to the request to be processed, wherein the target service is used to process the request to be processed; and a processing module, used to have the target service process the request to be processed according to business data obtained from the data layer of the first layered processing system.
[0013] In some embodiments of this application, based on the foregoing scheme, the target service includes at least two levels of nested sub-target services; the at least two levels of sub-target services include a higher-level sub-target service and a lower-level sub-target service, the lower-level sub-target service is further deployed in the business layer of a second layered processing system, the second layered processing system being at least one other layered processing system besides the first layered processing system; in this embodiment, the processing module includes: a first data query unit, used by the higher-level sub-target service to call the lower-level sub-target service in the first layered processing system and the lower-level sub-target service in the second layered processing system to perform data queries in the corresponding data layers to obtain corresponding query results; a first processing unit, used by the higher-level sub-target service to process the request to be processed based on the query results returned by the lower-level sub-target service in the first layered processing system and the lower-level sub-target service in the second layered processing system.
[0014] In some embodiments of this application, based on the foregoing scheme, the target service is further deployed in the business layer of a third layered processing system. The third layered processing system is at least one other layered processing system besides the first layered processing system among the at least two layered processing systems. In this embodiment, the processing module includes: a second data query unit, used for the target service in the first layered processing system to perform data query in the data layer of the first layered processing system; a third data query unit, used for, if the target service in the first layered processing system does not find the corresponding business data in the data layer of the first layered processing system, to call the target service in the third layered processing system through the target service in the business layer of the first layered processing system to perform data query and obtain the corresponding query result; and a second processing unit, used for the target service in the target business layer to process the request according to the query result.
[0015] In some embodiments of this application, based on the foregoing scheme, the layered processing system further includes a protocol conversion layer; in this embodiment, the request processing device further includes a protocol conversion module, used by the protocol conversion layer in the first layered processing system to perform protocol conversion on the request.
[0016] According to one aspect of the embodiments of this application, an electronic device is provided, including: a processor; and a memory storing computer-readable instructions, which, when executed by the processor, implement the processing method requested above.
[0017] According to one aspect of the embodiments of this application, a computer-readable storage medium is provided, on which computer-readable instructions are stored, which, when executed by a processor, implement the processing method requested above.
[0018] In this application's solution, by deploying the various layered processing systems in the request processing system according to regions, with one layered processing system corresponding to one region, and storing the business data corresponding to each region in the data layer of the layered processing system corresponding to that region, effective isolation of business data is achieved. Furthermore, the access layer in each layered processing system receives requests initiated by clients from the region corresponding to that layered processing system, facilitating cluster management. In addition, a routing layer is deployed above the business layer in each layered processing system. This routing layer ensures accurate request routing. On one hand, it establishes the connection between the various layered processing systems, effectively guaranteeing efficient request processing in cases requiring cross-regional access. On the other hand, since accurate request routing is performed by the routing layer above the business layer, the accuracy of request forwarding is guaranteed, avoiding timeouts due to cross-regional access requests and effectively ensuring timely request processing. Attached Figure Description
[0019] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.
[0020] Figure 1 A schematic diagram illustrates an implementation environment in which the technical solutions of the embodiments of this application can be applied.
[0021] Figure 2 This is an architecture diagram of a request processing system illustrated according to some embodiments of this application.
[0022] Figure 3 An architecture diagram of a request processing system in related technologies is shown.
[0023] Figure 4 This is a flowchart illustrating a request processing method according to some embodiments of this application.
[0024] Figure 5 This is a flowchart illustrating step 410 according to some embodiments of this application.
[0025] Figure 6 This is a schematic diagram illustrating the deployment of a routing strategy according to a specific embodiment of this application.
[0026] Figure 7This is a flowchart illustrating a request processing method according to another embodiment of this application.
[0027] Figure 8 This is a flowchart illustrating step 730 according to some embodiments of this application.
[0028] Figure 9 This is a schematic diagram illustrating a service double lookup between the service layers of two hierarchical processing systems, according to some embodiments of this application.
[0029] Figure 10 This is a flowchart illustrating step 730 according to other embodiments of this application.
[0030] Figure 11 This is a schematic diagram illustrating cross-regional service queries between the business layers of two hierarchical processing systems, according to a specific embodiment of this application.
[0031] Figure 12 This is a block diagram of a request processing apparatus according to an embodiment of this application.
[0032] Figure 13 A schematic diagram of the structure of a computer system suitable for implementing the electronic device of the present application is shown. Detailed Implementation
[0033] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided to make this application more comprehensive and complete, and to fully convey the concept of the exemplary embodiments to those skilled in the art.
[0034] Furthermore, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. Numerous specific details are provided in the following description to give a thorough understanding of embodiments of this application. However, those skilled in the art will recognize that the technical solutions of this application can be practiced without one or more of the specific details, or other methods, components, apparatuses, steps, etc., can be employed. In other instances, well-known methods, apparatuses, implementations, or operations are not shown or described in detail to avoid obscuring various aspects of this application.
[0035] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0036] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily need to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.
[0037] It should be noted that "multiple" in this article refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.
[0038] Before proceeding with further explanation, the terms used in this article are explained as follows.
[0039] GDPR (General Data Protection Regulation): This regulation stipulates what measures businesses and entities should take to protect the data of EU citizens. Any organization that collects, transmits, retains, or processes personal information within all EU member states is subject to this regulation.
[0040] Figure 1 A schematic diagram illustrates an implementation environment in which the technical solutions of the embodiments of this application can be applied. For example... Figure 1 As shown, the implementation environment includes a terminal 110 and a server 120, which establish a communication connection through a wired or wireless network.
[0041] Server 120 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.
[0042] Terminal 110 can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, in-vehicle terminal, etc., but is not limited to these. Terminal 110 and server 120 can be directly or indirectly connected via wired or wireless communication, which is not limited herein. Terminal 110 can run a client application, thereby enabling the client in terminal 110 to interact with server 120. The client application can be an instant messaging application, payment application, shopping application, game application, cloud conferencing, etc., and is not specifically limited herein.
[0043] Server 120 provides services to clients in terminal 110. In the scheme of this application, requests initiated by clients in terminal 110, such as voice communication requests and information query requests, are processed by server 120 according to the method of this application, and the request processing results are returned to terminal 110.
[0044] Figure 2 This is an architecture diagram of a request processing system illustrated according to some embodiments of this application. This request processing system can be deployed on... Figure 1 Server 120 in the middle. Figure 2 The example illustrates two hierarchical processing systems (hierarchical processing system I and hierarchical processing system II) in the request processing system. Of course, in other implementations, the number of hierarchical processing systems included in the request processing system is not limited to two, but can also be three, four, or other numbers, which can be set according to actual needs, such as depending on the number of regions to be divided.
[0045] Each layered processing system corresponds to a region. In specific embodiments, the principle for dividing regions can be selected according to actual needs. For example, regions can be divided by country, with each country's area forming a region. Similarly, within the same country, such as China, regions can be divided by province, with one or more provinces forming a region. Furthermore, for applications provided by enterprises in a specific country, the global region can be divided into the region within that country (referred to as the domestic region) and regions outside that country (referred to as the overseas region). Of course, these are merely illustrative examples and should not be considered as limiting the scope of this application. It is understood that the number of regions is the same as the number of layered processing systems in the request processing system, ensuring that one layered processing system is deployed in one region, guaranteeing that one region uniquely corresponds to one layered processing system.
[0046] like Figure 2 As shown, each layered processing system (layered processing system I, layered processing system II) includes an access layer 210, a protocol conversion layer 220, a routing layer 230, a service layer 240, a data layer 250, a service component layer 260, and a platform tool 270.
[0047] Access layer 210 is responsible for handling client requests from the region corresponding to its layered processing system and validating the validity of the requests, without performing business logic processing. Access layer 210 then forwards the client's request to the lower-level protocol conversion layer 220. The client can be based on various operating systems, such as macOS, Windows, iOS, and Android, without specific limitations. Figure 2In the diagram, region A corresponds to tiered processing system I, and region B corresponds to tiered processing system II. Therefore, the access layer of tiered processing system I receives requests initiated by clients in region A (i.e., requests from region A in the diagram), and the access layer of tiered processing system II receives requests initiated by clients in region B (i.e., requests from region B in the diagram).
[0048] In this architecture, since the access layer in each layered processing system only receives requests from clients in the region corresponding to that layered processing system, the domain names that initiate the requests are isolated, and the requests initiated by clients in different regions are not coupled together, which facilitates cluster management.
[0049] Protocol conversion layer 220 is used to convert the request into a protocol. If the received request is not a protocol supported by the layered processing system, the protocol conversion layer 220 converts the request into a protocol supported by the layered processing system. In some large-scale service architecture systems, internal services are generally called using the RPC (Remote Procedure Call) protocol, while non-RPC protocols (such as HTTP) are provided externally. In this case, the protocol conversion layer 220 converts the non-RPC protocol request into the corresponding RPC protocol request. Of course, in other embodiments, it can also be a conversion between other protocols, depending on the protocol used. After completing the protocol conversion, the protocol-converted request is forwarded to the routing layer 230 in the layered processing system. It can be understood that for information sent out by the system, such as the processing result of a request, the protocol conversion layer 220 is also used to convert the processing result of the request into a protocol that the system provides externally, according to the protocol used externally.
[0050] Understandably, in some application scenarios, if the protocol used internally by the system is consistent with the protocol used externally, then there is no need to deploy a protocol conversion layer for protocol conversion.
[0051] Routing layer 230 is responsible for routing requests to the business layers that can handle them. In other words, this routing layer can route requests to the business layers within its own layered processing system, or it can route the request to the business layers of other layered processing systems. Understandably, since the business layers are deployed across multiple layered processing systems, routing layer 230 first determines the layered processing system where the business layer capable of handling the request resides (i.e., the target layered processing system in the following text), and then routes the request accordingly to the business layers within the target layered processing system.
[0052] In some embodiments of this application, the services of the routing layer and the protocol conversion layer can be integrated together to call the link and improve code reusability.
[0053] The business layer 240 is used for business processing, responsible for providing corresponding services to incoming requests, and implementing business through interaction with the data layer. It can be understood that a request forwarded to a business layer 240 can originate from the routing layer within the layered processing system to which that business layer 240 resides, or it can originate from the routing layer of another layered processing system.
[0054] Data layer 250 is used to store business data to meet business needs. In the scheme of this application, the business data of each region is stored in the data layer of the corresponding hierarchical processing system, thereby achieving isolated storage of business data by region to meet GDPR requirements. In some embodiments of this application, the business data may be sensitive data as defined by GDPR, such as user personal information, unpublished works created by individuals, etc. It is understood that the data layer of a hierarchical processing system is only accessible to the business layer of that hierarchical processing system, and the business layers of other hierarchical processing systems cannot directly access the data layer of that hierarchical processing system.
[0055] In the data layer, a database can be used to store business data for a specific region. A database can be viewed as an electronic filing cabinet—a place to store electronic files, where users can perform operations such as adding, querying, updating, and deleting data. A "database" is a collection of data stored together in a certain way, capable of being shared by multiple users, with minimal redundancy, and independent of application programs.
[0056] The business component layer 260 and platform tools 270 are mainly responsible for providing support to the business layer, such as logging and configuration distribution, and providing services such as troubleshooting and configuration changes for development and operation. Platform tools 270 can be visualization platform tools, operation and maintenance tools, etc., without specific limitations here.
[0057] exist Figure 2 In the architecture shown, because a routing layer is deployed in each layered processing system, the connection between different layered processing systems is established through the routing layer. This ensures both data isolation and cross-regional access (i.e., a client in one region can access business data from other regions). Moreover, the interaction between the business layer and the data layer is not affected by data isolation, ensuring timely request processing and effectively avoiding the problem of delayed request processing caused by data isolation.
[0058] Figure 2The system architecture shown can be obtained by modifying the existing architecture of request processing systems in related technologies. Figure 3 An architecture diagram of a request processing system in related technologies is shown. For example... Figure 3 As shown, the system architecture diagram includes an access layer 210, a protocol conversion layer 220, a service layer 240, a data layer 250, a service component layer 260, and platform tools 270.
[0059] based on Figure 3 The system architecture shown, according to GDPR regulations, allows for the initial isolation of business data across different regions, i.e., storage by region; then... Figure 3 The system architecture shown is deployed geographically, that is, deployed in each region as follows: Figure 3 The system shown migrates business data from various regions to the data layer of the system deployed for that region; finally, a routing layer is deployed in the corresponding geographically dispersed system. It is understandable that the systems deployed in different regions... Figure 3 The system shown, and the system after the addition of a routing layer, constitute the hierarchical processing system in this application. The hierarchical processing system for all regions forms the request processing system in this application.
[0060] Based on Figure 3 The request processing system shown is constructed as follows Figure 2 After the request processing system shown, Figure 2 The access layer of the tiered processing system shown only receives requests from clients in the region corresponding to that tiered processing system. Therefore, this tiered processing system is used to process requests from at least its corresponding region, avoiding cross-regional access of requests. Furthermore, since a routing layer is deployed in each tiered processing system, after data isolation, it can be ensured that client requests are accurately routed to the corresponding region's business layer for processing. On the one hand, it ensures that the client user is unaware of the data isolation process before and after isolation, guaranteeing normal service provision. On the other hand, since a routing layer is deployed above each business layer in each tiered processing system of the request processing system, whether a client in one region needs to access business data in another region, or the backend accesses business data from one region and pushes it to clients in other regions, there is no cross-regional access to the data layer (i.e., the business layer in one tiered processing system accesses the data layer in another tiered processing system), ensuring compliance with GDPR regulations.
[0061] Furthermore, by deploying a routing layer in the layered processing system, a large amount of compatibility logic can be avoided in the business layer. For example, if the request processing system provides cloud-based conferencing services, the data generated during the meeting may exist in databases in multiple regions. In such a scenario, when querying meeting data, if the data is not found in the first query, a query needs to be initiated in another region, and all subsequent queries would require the same. Therefore, to implement this functionality, business code needs to be added to the business layer to implement this function (i.e., redirecting the query to business data in other regions if the required data is not found in the business data of one region). This would require deploying a large amount of redundant code in the business layer. However, in the layered processing systems of the request processing system provided in this application, because a routing layer is deployed above the business layer to determine the target business layer to which the request is forwarded, the lower-level business layer does not need to perform region checks to complete the query. Consequently, a large amount of compatibility logic does not need to be deployed in the business layer.
[0062] For example, if a request needs to query a user's meeting list, and that user is from region B, the upper routing layer will determine the region of the request, that is, determine the region of the business processing layer that handles the request (i.e., the region of the layered processing system where the business processing layer is located). Therefore, after routing the request to the corresponding business layer, the specific service in the business layer responsible for the query does not need to determine again which region's database the data is being queried from.
[0063] In the proposed solution, the tiered processing system is deployed separately by region, and routing is handled by the routing layer above the business layer. For both the business and data layers, the logs generated are considered sensitive information. Examples include logs generated when services in the business layer access business data in the data layer, and logs generated during service processing within the business layer. Therefore, under this deployment, for a tiered processing system (let's call it tiered processing system X1), even if a request received by the business layer of tiered processing system X1 originates from the routing layer of tiered processing system X2, the logs generated during request processing by the business layer of tiered processing system X1 will still be stored in the data layer of tiered processing system X1, and not in tiered processing system X2. Thus, deploying the request processing system according to this solution effectively ensures data isolation and meets GDPR requirements.
[0064] This solution uses the routing layer in the layered processing system to accurately route requests, which can effectively avoid the situation where requests are forwarded to the business layer in different regions without region determination, resulting in long cross-regional interaction time. Therefore, the solution of this application can significantly reduce the cross-regional interaction time and effectively reduce the occurrence of request processing timeouts.
[0065] As can be seen from the above, the request processing system provided in this application can be obtained by simple modification based on the existing request processing system. It does not require the deployment of a large amount of compatibility logic in the business layer, does not involve any changes to the business layer at the code level, and the modification workload is small. It ensures that the obtained request processing system complies with GDPR regulations, meets the requirements of data isolation, and can guarantee the timely processing of requests.
[0066] Figure 4 This is a flowchart illustrating a request processing method according to an embodiment of this application. The method can be executed by a computer device with processing capabilities, such as a server, and is not specifically limited thereto. The method is applied to a first layered processing system within a request processing system. The request processing system includes at least two layered processing systems, with the first layered processing system being one of them. Each layered processing system corresponds to a region. Each layered processing system includes an access layer, a routing layer, a service layer, and a data layer. The data layer stores service data for the region corresponding to its respective layered processing system. The access layer receives requests initiated by clients in the region corresponding to its respective layered processing system. Figure 4 As shown, the method includes at least:
[0067] Step 410: After the access layer in the first layered processing system receives a request initiated by a client in the first region, the routing layer in the first layered processing system determines the target layered processing system where the target service layer for processing the request is located in at least two layered processing systems; the first region refers to the region corresponding to the first layered processing system.
[0068] A client belonging to the first region refers to a client that is associated with the first region. The region a client belongs to can be determined based on the user's registered region; that is, if a user's registered region is region A, then the client belongs to region A. A client's region can also be determined based on the region version of the application. For example, if an application provides multiple region versions of the client application for different regions, in this scenario, the region corresponding to the region version of the client is determined as the client's region.
[0069] The requests initiated by the client may vary depending on the services that the client provides to the user. For example, if the client is a client for a cloud conferencing application, the requests initiated by the client may be meeting application requests, meeting join requests, meeting record query requests, etc. If the client is a client for an instant messaging application, the requests initiated by the client may be friend query requests, friend add requests, instant conversation requests, conversation record query requests, etc. There are no specific limitations here.
[0070] In some embodiments of this application, the layered processing system further includes a protocol conversion layer; for example... Figure 2 In the illustrated layered processing system, prior to step 410, the method further includes: a protocol conversion layer in the first layered processing system performing protocol conversion on the request. After protocol conversion, the protocol conversion layer in the first layered processing system forwards the protocol-converted request to the routing layer in the first layered processing system. It is understood that if the communication protocol used internally by the layered processing system is consistent with the external communication protocol, then a protocol conversion layer may not be necessary in the layered processing system.
[0071] In some embodiments of this application, the protocol conversion function can also be integrated into the routing layer. Thus, after receiving a request, the access layer forwards the request to the routing layer, which then performs protocol conversion on the request before routing it to the corresponding target service layer.
[0072] The target layered processing system determined for a request can be the first layered processing system, or any other layered processing system in the request processing system besides the first layered processing system. The target business layer refers to the business layer in the determined target layered processing system.
[0073] In some embodiments of this application, a region marker field can be added to the service, which indicates the region corresponding to the business layer where the service is located. When a request indicates the service to be invoked, the target hierarchical processing system for handling the request is determined based on the region marker field corresponding to the service indicated by the request; that is, the hierarchical processing system corresponding to the region indicated by the region marker field is determined as the target hierarchical processing system.
[0074] In some embodiments of this application, routing policies can be pre-set in the routing layer. Thus, the routing layer in each layered processing system determines the target layered processing system where the target service layer for processing a request resides based on the pre-set routing policies. The routing policies set in the routing layer can be one or more, and are not specifically limited here.
[0075] In some embodiments of this application, if multiple routing policies are set in the routing layer, the routing policy to be used can be further determined based on the request. For example... Figure 5 As shown, step 410 further includes: step 510, the routing layer in the first layered processing system determines the target routing strategy corresponding to the attribute information based on the attribute information of the request; step 520, the routing layer in the first layered processing system determines the target layered processing system where the target business layer for processing the request is located in at least two layered processing systems based on the target routing strategy.
[0076] In this embodiment, based on setting multiple routing strategies in the routing layer, and correspondingly setting the mapping relationship between attribute information and routing strategies, after the routing layer obtains a request, after determining the attribute information of the request, the routing layer uses the routing strategy mapped to the attribute information of the request as the target routing strategy, and determines the target layered processing system where the target business layer that processes the request is located according to the target routing strategy.
[0077] Routing strategies can include one or more of the following: routing based on the parameters carried in the request, routing based on the address accessed by the request, routing based on the registered region of the client, and routing based on the index information carried in the request. Of course, routing strategies are not limited to these. In other application scenarios, more or fewer routing strategies can be included. The specific settings can be configured according to actual needs and the services provided by the request processing system.
[0078] The attribute information of a request may include the region from which the request originates, the user registration location information of the client from which the request originates, and regional information related to the business data to be accessed (such as the region where the meeting was initiated). The attribute information of a request may differ in different application scenarios.
[0079] In some embodiments of this application, prior to step 510, the method further includes: the routing layer in the first hierarchical processing system queries the cached non-sensitive information to obtain the attribute information of the request.
[0080] In some embodiments of this application, a distributed cache can be deployed to cache non-sensitive information locally at the routing layer. This non-sensitive information can include the meeting ID, the region of the user initiating the meeting, the region of the client's user, etc. For example, the non-sensitive information stored in the cache can be stored in a format where the meeting ID or the user's ID is used as the key, and the region of the client's user is used as the value. Based on this, since the request may carry the user ID or the meeting ID, the user's region (i.e., the request's attribute information) can be retrieved based on the meeting ID or the user ID.
[0081] In some embodiments of this application, the target routing strategy includes routing based on the parameter marker carried in the request; step 520 includes: the routing layer in the first hierarchical processing system obtains the parameter marker carried in the request according to the target routing strategy; and determines the hierarchical processing system corresponding to the region indicated by the parameter marker as the target hierarchical processing system.
[0082] The parameter flags carried in the request are used to indicate the region. The indicated region can be the region where the client from which the request originates is located, or the region corresponding to the layered processing system where the target business layer that processes the request is located.
[0083] In a specific embodiment, common parameters can be added to the requests of each client, and these added parameters serve as parameter passing markers. Parameter passing markers can include parameter fields and their values, with the values indicating the region. After the routing layer receives a request, it retrieves the values of the parameter fields in the parameter passing markers carried in the request and determines the region indicated by the parameter passing marker based on these values. For example, the parameter passing marker can be district=0 or district=1, where "district" is the parameter field and the number after the equals sign is its value. If the value of the parameter field is set to 0, it indicates region A; if the value of the parameter field is 1, it indicates region B. Therefore, if the parameter passing marker in a request is district=0, it can be determined that the request will be processed by the hierarchical processing system corresponding to region A; if the parameter passing marker is district=1, it can be determined that the request will be processed by the hierarchical processing system corresponding to region B.
[0084] In this embodiment, by attaching parameter tags to the request, the routing layer can quickly determine the target hierarchical processing system where the target segmentation processing system for processing the request is located.
[0085] In other embodiments of this application, the target routing policy instructs routing based on the domain name requested for access; step 520 further includes: the routing layer in the first hierarchical processing system obtains the target domain name requested for access according to the target routing policy; and determines the hierarchical processing system corresponding to the region to which the target domain name belongs as the target hierarchical processing system.
[0086] When a request specifies the domain name to be accessed (i.e., the target domain name), since domain names are region-specific (i.e., a domain name belongs to a region), and based on data isolation storage, the business data corresponding to a region is stored in the data layer of the corresponding hierarchical processing system. When requesting access to a domain name, the data used to process that request is generally stored in the data layer of the corresponding region. Therefore, in this solution, the hierarchical processing system corresponding to the region to which the requested target domain name belongs is determined as the target hierarchical processing system.
[0087] In some other embodiments of this application, the target routing policy indicates routing based on the registration location; in this embodiment, step 520 includes: the routing layer in the first hierarchical processing system obtains the registration location information of the client according to the target routing policy; and determines the hierarchical processing system corresponding to the region to which the registration location indicated by the registration location information belongs as the target hierarchical processing system.
[0088] The client's registration location information refers to the registration location information of the user who uses the client. This information can be determined based on the client's application version (specifically, the region corresponding to that version). Alternatively, it can be the user's address entered during registration.
[0089] In some application scenarios, business data is stored based on the user's registration location. Therefore, if data isolation is required, it should also be based on the user's registration location for the corresponding business data isolation. In this case, it is necessary to determine the region corresponding to the data layer storing the user's relevant business data based on the registration location.
[0090] In some other embodiments of this application, the target routing policy indicates routing based on the index information carried in the request; step 520 includes: the routing layer in the first hierarchical processing system obtains the target index information carried in the request according to the target routing policy; performs a regional query based on the target index information to determine the target region; and determines the hierarchical processing system corresponding to the target region as the target hierarchical processing system.
[0091] In some embodiments of this application, the index information carried by the request may be information that can index the region corresponding to the requested business data. For example, the index information may be the region identifier of the meeting.
[0092] In some embodiments of this application, the target region can be determined by querying the cached non-sensitive information based on the index information. For example, if the client is a client of a cloud conferencing application, assuming a request is to join a meeting, the meeting ID carried in the request can be used as the target index information. Based on the meeting ID, the region of the user applying for the meeting ID can be determined by querying the cached information. The region of the user applying for the meeting ID is then determined as the target region, and the hierarchical processing system corresponding to the target region is determined as the hierarchical processing system.
[0093] In some embodiments of this application, the target region can be determined by interacting with the data layer based on index information to perform a regional query. In other words, the data layer is requested to query the region corresponding to the business data requested by the request, i.e., the target region, by using the index information carried in the request, and then the hierarchical processing system corresponding to the target region is determined as the target hierarchical processing system.
[0094] Figure 6 This is a schematic diagram illustrating the deployment of a routing strategy according to a specific embodiment of this application. Figure 6 Two hierarchical processing systems (hierarchical processing system X1 and hierarchical processing system X2) are illustrated in the example. Figure 6 In this context, the routing module in the routing layer of each layered processing system determines the target layered processing system to which the request should be routed. For example... Figure 6 As shown, the routing module configures four routing strategies: Interface I – routing based on the parameters passed by the client; Interface II – routing based on the requested domain name; Interface III – routing based on the client's registered location; and Interface IV – routing based on the index information carried in the request. Figure 6 The examples shown illustrate the services deployed at the business layer of various layered processing systems, namely service T1 and service T2, and should not be construed as limiting the scope of this application. Figure 6 Based on the various routing strategies deployed in the system, the target routing strategy can be determined according to the attribute information of the request, as described in the above embodiments, and then the request can be routed according to the target routing strategy.
[0095] Please continue reading. Figure 4 In step 420, the routing layer in the first layered processing system routes the request to the target business layer in the target layered processing system, so that the target business layer can obtain the corresponding business data from the target data layer in the target layered processing system and process the request.
[0096] As described above, the target layered processing system and the first layered processing system can be the same layered processing system or different layered processing systems. If the target layered processing system and the first layered processing system are different layered processing systems, the target business layer in the target layered processing system processes the request and obtains the corresponding processing result, and then returns the processing result to the routing layer in the first layered processing system, which then returns the processing result of the request to the client that initiated the request.
[0097] In this application's solution, by deploying the various layered processing systems in the request processing system according to regions, with one layered processing system corresponding to one region, and storing the business data corresponding to each region in the data layer of the layered processing system corresponding to that region, effective isolation of business data is achieved. Furthermore, the access layer in each layered processing system receives requests initiated by clients from the region corresponding to that layered processing system, facilitating cluster management. In addition, a routing layer is deployed above the business layer in each layered processing system. This routing layer ensures accurate request routing. On one hand, it establishes the connection between the various layered processing systems, effectively guaranteeing efficient request processing in cases requiring cross-regional access. On the other hand, since accurate request routing is performed by the routing layer above the business layer, the accuracy of request forwarding is guaranteed, avoiding timeouts due to cross-regional access requests and effectively ensuring timely request processing.
[0098] Furthermore, the request processing system provided in this application can be easily modified from existing request processing systems. This involves geographically deploying existing request processing systems, migrating the data requiring isolation to the corresponding regional data layer, and deploying a routing layer within the system. In this process, because a routing layer is added to each layered processing system for accurate request routing, instead of routing requests at the business layer, complex compatibility logic is not required at the business layer. The changes to the business layer are minimal and do not involve modifications to other layers. Therefore, the request processing system provided in this solution can be quickly deployed and independently maintained on top of existing request processing systems, ensuring that the redeployed system meets data isolation requirements, such as GDPR regulations. Since the request processing system is geographically deployed, subsequent iterative and independent maintenance of the regional layered processing systems is possible.
[0099] In the solution of this application, since a routing layer is deployed above the business layer in each layered processing system, and the deployed routing layer establishes the association between different layered processing layers, the problem of the business layers (and data layers) in different layered processing systems being unaware of each other due to the regional deployment of the layered processing systems can be avoided. Therefore, even in the scenario where the backend of the request processing system needs to push information, the service in the business layer of each layered processing system can be called to obtain data in the corresponding data layer for push. In other words, the request processing system provided by this application can ensure that the backend performs data query and remote push in the data layer.
[0100] In other words, the request processing system provided in this application can realize multiple business scenarios: a. A client user in one region accesses business data in the data layer of the hierarchical processing system in their region; b. A client user in one region accesses business data in the data layer of the hierarchical processing system in another region through the hierarchical processing system in their region; c. The background accesses business data in the data layer of the hierarchical processing system in one region and pushes it to clients in that region; d. The background accesses business data in the data layer of the hierarchical processing system in one region and pushes it to clients in other regions.
[0101] In some embodiments of this application, such as Figure 7 As shown, the method also includes:
[0102] Step 710: The service layer in the first layered processing system receives the request to be processed. The request to be processed comes from the routing layer in the first layered processing system or from the routing layer in other layered processing systems besides the first layered processing system.
[0103] In some embodiments of this application, the requests to be processed received by the business layer of the first layered processing system may be requests initiated by various clients that are forwarded to the routing layer and then forwarded to the business layer of the first layered processing system by the routing layer; the requests to be processed may also be requests initiated by the background of the request processing system that are routed to the business layer by the routing layer in each layered processing system.
[0104] Step 720: Determine the target service in the business layer of the first hierarchical processing system based on the request to be processed. The target service is used to process the request to be processed.
[0105] One or more services are deployed in each business layer to process requests. These services could include, for example, an account service for handling login requests, a meeting control service for handling meeting joins, or a query service for querying meetings; no specific limitations are provided here.
[0106] In some embodiments of this application, the request may carry service identifier information requesting the service to be invoked. Therefore, the target service for processing the request is determined based on the service identifier information carried in the request.
[0107] In some embodiments of this application, request allocation logic is deployed in the business layer, and therefore, the target service for processing the pending request is determined based on the request allocation logic.
[0108] Step 730: The target service processes the request to be processed based on the business data obtained from the data layer of the first layered processing system.
[0109] Within the same hierarchical processing system, the business layer can access business data in the data layer. Therefore, after identifying the target service, this target service can query the data layer based on the input parameters carried in the request (such as the meeting ID) to obtain the corresponding business data. Thus, based on the identified target service, the target service processes the request to be processed according to the obtained business data, obtaining the corresponding processing result. It is understandable that after obtaining the corresponding processing result, the result is returned to the initiator of the request to be processed.
[0110] Through the above process, the business layer of each layered processing system can handle requests (i.e., requests to be processed) from the routing layer of the same layered processing system, as well as requests from the routing layer of other layered processing systems.
[0111] In some embodiments of this application, the target service includes at least two levels of nested sub-target services; the at least two levels of sub-target services include a higher-level sub-target service and a lower-level sub-target service, the lower-level sub-target service being further deployed in the business layer of a second layered processing system, the second layered processing system being at least one other layered processing system besides the first layered processing system. In this embodiment, as... Figure 8 As shown, step 730 includes:
[0112] Step 810: The higher-level sub-target service calls the lower-level sub-target service in the first-level processing system and the lower-level sub-target service in the second-level processing system to perform data queries in the corresponding data layer and obtain the corresponding query results.
[0113] Step 820: The higher-level sub-target service processes the request to be processed based on the query results returned by the lower-level sub-target service in the first hierarchical processing system and the query results returned by the lower-level sub-target service in the second hierarchical processing system.
[0114] In some scenarios, the requested data may be stored across multiple data layers. For example, to query a user's complete friend information, the user's friends may include users from multiple regions. In this case, the solution provided in this embodiment can be implemented by the higher-level sub-target service calling the lower-level sub-target services in at least two layered processing systems to perform data queries in the corresponding data layers. Then, the higher-level sub-target service processes the request based on the query results returned by the at least two layered processing systems.
[0115] It is understandable that the target service includes at least two levels of sub-target services, or more than two levels of sub-target services. If the number of sub-target services exceeds two levels, then for two sub-target services with nested call relationships, the called sub-target service can be regarded as the next level sub-target service, and the sub-target service that initiates the call can be regarded as the previous level sub-target service, and the request to be processed can be processed according to the above process.
[0116] In this embodiment, a service double-lookup is implemented within the business layer of a tiered processing system, spanning the business layers of multiple tiered processing systems. In this scenario, for situations requiring queries across the data layers of multiple tiered processing systems, services within the business layer of one tiered processing system can be modified to deploy service call logic to the business layers of other tiered processing systems. It is understood that even with the addition of service call logic to other tiered processing systems, the data layer of one tiered processing system is still accessed by services within its own business layer; there is no situation where services within the business layer of one tiered processing system access the data layer of another tiered processing system, i.e., there is no cross-regional access to business data.
[0117] Figure 9 This is a schematic diagram illustrating service double-lookup between the service layers of two hierarchical processing systems, according to some embodiments of this application. For example... Figure 9 As shown, both layered processing systems (layered processing system X1 and layered processing system X2) have nested two-level sub-target services in their business layers. Specifically, in Figure 9 In this two-level sub-target service, the higher-level sub-target service is service T1, and the lower-level sub-target service is service T2.
[0118] like Figure 9 As shown, if service T1 in the hierarchical processing system X1 needs the full data of service T2 (for example, querying the details of the full friend list of a certain user), service T1 in the hierarchical processing system X1 calls service T2 in the hierarchical processing system X1 to perform data query in the data layer of the hierarchical processing system X1, and calls service T2 in the hierarchical processing system X2 to perform data query in the data layer of the hierarchical processing system X2, respectively, and obtains the corresponding query results; then service T1 in the hierarchical processing system X1 processes the request to be processed based on the query results returned by service T2 in the hierarchical processing system X1 and service T2 in the hierarchical processing system X2.
[0119] Similarly, if service T1 in the layered processing system X2 needs the full data of service T2 (when querying the details of the full friend list of a certain user), service T1 in the layered processing system X2 calls service T2 in the layered processing system X2 to perform data query in the data layer of the layered processing system X2 and calls service T2 in the layered processing system X1 to perform data query in the data layer of the layered processing system X1, respectively, to obtain the corresponding query results; then service T1 in the layered processing system X2 processes the request to be processed based on the query results returned by service T2 in the layered processing system X2 and service T2 in the layered processing system X1.
[0120] In other embodiments of this application, the target service is further deployed in the business layer of a third layered processing system, which is at least one other layered processing system besides the first layered processing system; in this embodiment, such as Figure 10 As shown, step 730 includes:
[0121] Step 1010: The target service in the first hierarchical processing system performs data query in the data layer of the first hierarchical processing system.
[0122] Step 1020: If the target service in the first layered processing system does not find the corresponding business data in the data layer of the first layered processing system, then the target service in the third layered processing system is called through the target service in the business layer of the first layered processing system to perform data query and obtain the corresponding query result.
[0123] Step 1030: The target service in the target business layer processes the request based on the query results.
[0124] The third-level processing system can be related to... Figure 8 The second layered processing system in the corresponding embodiment can be the same layered processing system or a different layered processing system, depending on actual needs. The third layered processing system can be one or more.
[0125] In some scenarios, user geographic location may not be a concern; only data querying is required. In such cases, cross-service access may occur. To address this, the same service can be deployed in the business layer of another layered processing system (the third layer), and calls from the first layer to the third layer can be made to the same service. This approach reduces code coupling, allows for rapid modification of different business services, and improves efficiency.
[0126] Based on this, the target service first performs a data query in the data layer of its own layered processing system. If the corresponding business data is not found, the target service calls the target service in the business layer of another layered processing system (the third layered processing system) so that the target service in the business layer of the third layered processing system performs a business data query in the data layer of the third layered processing system to obtain the corresponding query result. Then, the query result is returned to the target service in the first layered processing system, and the target service in the first layered processing system processes the request to be processed based on the query result.
[0127] Figure 11 This is a schematic diagram illustrating cross-regional service queries between the business layers of two hierarchical processing systems, according to a specific embodiment of this application. Figure 11 As shown, both layered processing systems (layered processing system X3 and layered processing system X4) have a service T3 in their business layers.
[0128] If the business layer of the layered processing system X3 receives a request to be processed, the target service for processing the request is determined to be service T3. Then, service T3 in the layered processing system X3 performs a data query in the data layer of the layered processing system X3 based on the parameters carried in the request. If no corresponding business data is found in the data layer of the layered processing system X3, service T3 in the business layer of the layered processing system X3 calls service T3 in the business layer of the layered processing system X4. This allows service T3 in the business layer of the layered processing system X4 to perform a data query in the data layer of the layered processing system X4 based on the parameters carried in the request, and returns the query result to service T3 in the layered processing system X3. Service T3 in the layered processing system X3 then processes the request based on the query result.
[0129] Similarly, if the layered processing system X4 receives a request to be processed, the service designated to handle the request is service T3. Service T3 in the layered processing system X4 then performs a data query in the data layer of the layered processing system X4 based on the parameters carried in the request. If no corresponding business data is found in the data layer of the layered processing system X4, service T3 in the business layer of the layered processing system X4 calls service T3 in the business layer of the layered processing system X3. This allows service T3 in the business layer of the layered processing system X3 to perform a data query in the data layer of the layered processing system X3 based on the parameters carried in the request, and returns the query result to service T3 in the layered processing system X4. Service T3 in the layered processing system X4 then processes the request based on the query result.
[0130] The following describes an apparatus embodiment of this application, which can be used to perform the methods described in the above embodiments of this application. For details not disclosed in the apparatus embodiments of this application, please refer to the method embodiments described in the above embodiments of this application.
[0131] Figure 12 This is a block diagram of a request processing apparatus according to an embodiment. The request processing apparatus is applied to a first layered processing system within a request processing system. The request processing system includes at least two layered processing systems, with the first layered processing system being one of the at least two layered processing systems. Each layered processing system corresponds to a region. Each layered processing system includes an access layer, a routing layer, a service layer, and a data layer. The data layer stores service data for the region corresponding to its respective layered processing system. The access layer receives requests initiated by clients in the region corresponding to its respective layered processing system. Figure 12 As shown, the processing apparatus for this request includes: a target layered processing system determination module 1210, used to determine, after the access layer in the first layered processing system receives a request initiated by a client in the first region, the routing layer in the first layered processing system determines, among at least two layered processing systems, the target layered processing system where the target service layer for processing the request is located; the first region refers to the region corresponding to the first layered processing system; and a routing module 1220, used to route the request from the routing layer in the first layered processing system to the target service layer in the target layered processing system, so that the target service layer can obtain the corresponding service data from the target data layer in the target layered processing system and process the request.
[0132] In some embodiments of this application, the target hierarchical processing system determination module 1210 includes: a target routing strategy determination unit, used by the routing layer in the first hierarchical processing system to determine the target routing strategy corresponding to the attribute information based on the attribute information of the request; and a target hierarchical processing system determination unit, used by the routing layer in the first hierarchical processing system to determine the target hierarchical processing system where the target service layer for processing the request is located in at least two hierarchical processing systems based on the target routing strategy.
[0133] In some embodiments of this application, the target routing strategy includes routing based on the parameter marker carried in the request; the target hierarchical processing system determination unit includes: a parameter marker acquisition unit, used to acquire the parameter marker carried in the request according to the target routing strategy by the routing layer in the first hierarchical processing system; and a first determination unit, used to determine the hierarchical processing system corresponding to the region indicated by the parameter marker as the target hierarchical processing system.
[0134] In other embodiments of this application, the target routing policy instructs routing based on the requested domain name; the target hierarchical processing system determination unit includes: a target domain name acquisition unit, used by the routing layer in the first hierarchical processing system to acquire the target domain name requested by the request according to the target routing policy; and a second determination unit, used to determine the hierarchical processing system corresponding to the region to which the target domain name belongs as the target hierarchical processing system.
[0135] In other embodiments of this application, the target routing policy indicates routing based on the registration location; the target hierarchical processing system determination unit includes: a registration location information acquisition unit, used by the routing layer in the first hierarchical processing system to acquire the registration location information of the client according to the target routing policy; and a third determination unit, used to determine the hierarchical processing system corresponding to the region to which the registration location indicated by the registration location information belongs as the target hierarchical processing system.
[0136] In other embodiments of this application, the target routing policy instructs routing based on the index information carried in the request; the target hierarchical processing system determination unit includes: a target index information acquisition unit, used by the routing layer in the first hierarchical processing system to acquire the target index information carried in the request according to the target routing policy; a region query unit, used to perform a region query based on the target index information to determine the target region; and a fourth determination unit, used to determine the hierarchical processing system corresponding to the target region as the target hierarchical processing system.
[0137] In some embodiments of this application, the request processing apparatus further includes: a request classification and determination module, used by the routing layer in the first hierarchical processing system to query and obtain the attribute information of the request from the cached non-sensitive information.
[0138] In some embodiments of this application, the request processing apparatus further includes: a request acquisition module for acquiring a request to be processed from the business layer of the first layered processing system, wherein the request to be processed originates from the routing layer of the first layered processing system or from the routing layer of another layered processing system besides the first layered processing system; a target service determination module for determining a target service in the business layer of the first layered processing system based on the request to be processed, wherein the target service is used to process the request to be processed; and a processing module for processing the request to be processed by the target service based on business data acquired from the data layer of the first layered processing system.
[0139] In some embodiments of this application, the target service includes at least two levels of nested sub-target services; the at least two levels of sub-target services include a higher-level sub-target service and a lower-level sub-target service, the lower-level sub-target service is further deployed in the business layer of a second layered processing system, the second layered processing system is at least one other layered processing system besides the first layered processing system; in this embodiment, the processing module includes: a first data query unit, used by the higher-level sub-target service to call the lower-level sub-target service in the first layered processing system and the lower-level sub-target service in the second layered processing system to perform data query in the corresponding data layer to obtain the corresponding query results; a first processing unit, used by the higher-level sub-target service to process the request to be processed based on the query results returned by the lower-level sub-target service in the first layered processing system and the query results returned by the lower-level sub-target service in the second layered processing system.
[0140] In some embodiments of this application, the target service is further deployed in the business layer of a third layered processing system. The third layered processing system is at least one other layered processing system besides the first layered processing system. In this embodiment, the processing module includes: a second data query unit, used for the target service in the first layered processing system to perform data query in the data layer of the first layered processing system; a third data query unit, used for, if the target service in the first layered processing system does not find the corresponding business data in the data layer of the first layered processing system, to call the target service in the third layered processing system through the target service in the business layer of the first layered processing system to perform data query and obtain the corresponding query result; and a second processing unit, used for the target service in the target business layer to process the request based on the query result.
[0141] In some embodiments of this application, the layered processing system further includes a protocol conversion layer; in this embodiment, the request processing device further includes a protocol conversion module, used by the protocol conversion layer in the first layered processing system to perform protocol conversion on the request.
[0142] Figure 13 A schematic diagram of the structure of a computer system suitable for implementing the electronic device of the present application is shown.
[0143] It should be noted that, Figure 13 The computer system 1300 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0144] like Figure 13As shown, the computer system 1300 includes a Central Processing Unit (CPU) 1301, which can perform various appropriate actions and processes, such as executing the methods described in the above embodiments, based on programs stored in Read-Only Memory (ROM) 1302 or programs loaded from storage portion 1308 into Random Access Memory (RAM) 1303. The RAM 1303 also stores various programs and data required for system operation. The CPU 1301, ROM 1302, and RAM 1303 are interconnected via a bus 1304. An Input / Output (I / O) interface 1305 is also connected to the bus 1304.
[0145] The following components are connected to I / O interface 1305: an input section 1306 including a keyboard, mouse, etc.; an output section 1307 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 1308 including a hard disk, etc.; and a communication section 1309 including a network interface card such as a LAN (Local Area Network) card, modem, etc. The communication section 1309 performs communication processing via a network such as the Internet. A drive 1310 is also connected to I / O interface 1305 as needed. Removable media 1311, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 1310 as needed so that computer programs read from them can be installed into storage section 1308 as needed.
[0146] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 1309, and / or installed from removable medium 1311. When the computer program is executed by central processing unit (CPU) 1301, it performs various functions defined in the system of this application.
[0147] It should be noted that the computer-readable medium shown in the embodiments of this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such transmitted data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.
[0148] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. Each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0149] The units described in the embodiments of this application can be implemented in software or hardware, and the described units can also be located in a processor. The names of these units do not necessarily limit the specific unit itself.
[0150] In another aspect, this application also provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiments; or it may exist independently and not assembled into the electronic device. The aforementioned computer-readable storage medium carries computer-readable instructions that, when executed by a processor, implement the methods in any of the above embodiments.
[0151] According to one aspect of this application, an electronic device is also provided, comprising: a processor; and a memory storing computer-readable instructions that, when executed by the processor, implement the methods of any of the above embodiments.
[0152] According to one aspect of the embodiments of this application, a computer program product or computer program is provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, causing the computer device to perform the methods of any of the above embodiments.
[0153] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of this application, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0154] Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, touch terminal, or network device, etc.) to execute the methods according to the embodiments of this application.
[0155] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the embodiments disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein.
[0156] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A method for processing requests, characterized in that, A first hierarchical processing system applied to a request processing system, the request processing system comprising at least two hierarchical processing systems, wherein the first hierarchical processing system is one of the at least two hierarchical processing systems; Each tiered processing system corresponds to a region; the tiered processing system includes an access layer, a routing layer, a service layer, and a data layer; the data layer is used to store the service data of the region corresponding to the tiered processing system. The access layer is used to receive requests initiated by clients in the region corresponding to the hierarchical processing system; the method includes: After the access layer in the first layered processing system receives a request initiated by a client in the first region, the routing layer in the first layered processing system determines, among the at least two layered processing systems, the target layered processing system where the target service layer for processing the request is located; the first region refers to the region corresponding to the first layered processing system. The routing layer in the first hierarchical processing system routes the request to the target business layer in the target hierarchical processing system, so that the target business layer can obtain the corresponding business data from the target data layer in the target hierarchical processing system and process the request. The service layer in the first layered processing system obtains a request to be processed, which originates from the routing layer in the first layered processing system or from the routing layer in another layered processing system other than the first layered processing system. Based on the pending request, a target service is determined in the business layer of the first hierarchical processing system, and the target service is used to process the pending request. If the target service includes at least two levels of nested sub-target services; the at least two levels of sub-target services include a higher-level sub-target service and a lower-level sub-target service, the lower-level sub-target service is also deployed in the business layer of the second layered processing system, the higher-level sub-target service calls the lower-level sub-target service in the first layered processing system and the lower-level sub-target service in the second layered processing system to perform data queries in the corresponding data layer to obtain the corresponding query results; the second layered processing system is at least one other layered processing system besides the first layered processing system among the at least two layered processing systems; The request to be processed is processed by the higher-level sub-target service based on the query results returned by the lower-level sub-target service in the first hierarchical processing system and the query results returned by the lower-level sub-target service in the second hierarchical processing system.
2. The method according to claim 1, characterized in that, The routing layer in the first layered processing system determines the target layered processing system where the target service layer for processing the request resides, based on the at least two layered processing systems, including: The routing layer in the first layered processing system determines the target routing strategy corresponding to the attribute information based on the attribute information of the request. The routing layer in the first hierarchical processing system determines the target hierarchical processing system in which the target service layer that processes the request is located based on the target routing policy in the at least two hierarchical processing systems.
3. The method according to claim 2, characterized in that, The target routing strategy includes routing based on the parameters carried in the request; The routing layer in the first hierarchical processing system determines, based on the target routing policy, the target hierarchical processing system in which the target service layer processing the request resides, including: The routing layer in the first layered processing system obtains the parameter marker carried in the request according to the target routing strategy; The hierarchical processing system corresponding to the region indicated by the parameter passing mark is determined as the target hierarchical processing system.
4. The method according to claim 2, characterized in that, The target routing policy instructs routing based on the domain name requested for access; The routing layer in the first hierarchical processing system determines, based on the target routing policy, the target hierarchical processing system in which the target service layer processing the request resides, including: The routing layer in the first hierarchical processing system obtains the target domain name requested by the request according to the target routing strategy; The hierarchical processing system corresponding to the region to which the target domain name belongs is determined as the target hierarchical processing system.
5. The method according to claim 2, characterized in that, The target routing policy indicates routing based on the registration location; The routing layer in the first hierarchical processing system determines, based on the target routing policy, the target hierarchical processing system in which the target service layer processing the request resides, including: The routing layer in the first hierarchical processing system obtains the client's registration location information according to the target routing policy; The hierarchical processing system corresponding to the region to which the registration location indicated by the registration location information belongs is determined as the target hierarchical processing system.
6. The method according to claim 2, characterized in that, The target routing policy indicates that routing should be performed based on the index information carried in the request; The routing layer in the first hierarchical processing system determines, based on the target routing policy, the target hierarchical processing system in which the target service layer processing the request resides, including: The routing layer in the first hierarchical processing system obtains the target index information carried by the request according to the target routing strategy; Perform a region query based on the target index information to determine the target region; The hierarchical processing system corresponding to the target region is determined as the target hierarchical processing system.
7. The method according to claim 2, characterized in that, Before the routing layer in the first hierarchical processing system determines the target routing strategy corresponding to the attribute information based on the attribute information of the request, the method further includes: The routing layer in the first layered processing system retrieves the attribute information of the request from the cached non-sensitive information.
8. The method according to claim 1, characterized in that, If the target service is also deployed in the business layer of the third layered processing system, the third layered processing system is at least one other layered processing system besides the first layered processing system in the at least two layered processing systems; After determining the target service in the business layer of the first hierarchical processing system based on the request to be processed, the method further includes: The target service in the first hierarchical processing system performs data queries in the data layer of the first hierarchical processing system. If the target service in the first layered processing system does not find the corresponding business data in the data layer of the first layered processing system, then the target service in the third layered processing system is called through the target service in the business layer of the first layered processing system to perform data query and obtain the corresponding query result. The target service in the target business layer processes the request based on the query results.
9. The method according to claim 1, characterized in that, The layered processing system further includes a protocol conversion layer; before the routing layer in the first layered processing system determines the target layered processing system where the target service layer for processing the request resides in the at least two layered processing systems, the method further includes: The protocol conversion layer in the first layered processing system performs protocol conversion on the request.
10. A request processing apparatus, characterized in that, A first hierarchical processing system applied to a request processing system, the request processing system comprising at least two hierarchical processing systems, wherein the first hierarchical processing system is one of the at least two hierarchical processing systems; Each tiered processing system corresponds to a region; the tiered processing system includes an access layer, a routing layer, a service layer, and a data layer; the data layer is used to store service data for the region corresponding to its tiered processing system; the access layer is used to receive requests initiated by clients in the region corresponding to its tiered processing system. The device includes: The target layered processing system determination module is used to, after the access layer in the first layered processing system receives a request initiated by a client in the first region, determine, among at least two layered processing systems, the target layered processing system in the first layered processing system where the target service layer for processing the request is located; the first region refers to the region corresponding to the first layered processing system. A routing module is used by the routing layer in the first layered processing system to route the request to the target business layer in the target layered processing system, so that the target business layer can obtain the corresponding business data from the target data layer in the target layered processing system and process the request. The pending request acquisition module is used by the business layer of the first layered processing system to acquire pending requests, wherein the pending requests originate from the routing layer of the first layered processing system or from the routing layer of other layered processing systems besides the first layered processing system. The target service determination module is used to determine the target service in the business layer of the first hierarchical processing system based on the request to be processed, and the target service is used to process the request to be processed. A processing module is configured to, if the target service includes at least two levels of nested sub-target services; the at least two levels of sub-target services include a higher-level sub-target service and a lower-level sub-target service, the lower-level sub-target service being deployed in the business layer of a second-layered processing system; the higher-level sub-target service calling the lower-level sub-target service in the first-layered processing system and the lower-level sub-target service in the second-layered processing system to perform data queries in the corresponding data layers to obtain corresponding query results; the second-layered processing system is at least one other layered processing system besides the first-layered processing system; the higher-level sub-target service processes the request to be processed based on the query results returned by the lower-level sub-target service in the first-layered processing system and the lower-level sub-target service in the second-layered processing system.
11. The apparatus according to claim 10, characterized in that, The target hierarchical processing system determination module includes: The target routing strategy determination unit is used to determine the target routing strategy corresponding to the attribute information based on the attribute information of the request in the routing layer of the first hierarchical processing system. A target hierarchical processing system determination unit is used for the routing layer in the first hierarchical processing system to determine, based on the target routing policy, the target hierarchical processing system in at least two hierarchical processing systems where the target service layer that processes the request is located.
12. The apparatus according to claim 11, characterized in that, The target routing strategy includes routing based on the parameters carried in the request; The target hierarchical processing system determination unit includes: The parameter passing tag acquisition unit is used by the routing layer in the first layered processing system to acquire the parameter passing tag carried in the request according to the target routing strategy. The first determining unit is used to determine the hierarchical processing system corresponding to the region indicated by the parameter passing mark as the target hierarchical processing system.
13. The apparatus according to claim 11, characterized in that, The target routing policy instructs routing based on the domain name requested for access; The target hierarchical processing system determination unit includes: The target domain name acquisition unit is used by the routing layer in the first layered processing system to acquire the target domain name requested by the request according to the target routing strategy. The second determining unit is used to determine the hierarchical processing system corresponding to the region to which the target domain name belongs as the target hierarchical processing system.
14. The apparatus according to claim 11, characterized in that, The target routing policy indicates routing based on the registration location; the target hierarchical processing system determination unit includes: The registration location information acquisition unit is used by the routing layer in the first hierarchical processing system to acquire the registration location information of the client according to the target routing policy. The third determining unit is used to determine the hierarchical processing system corresponding to the region to which the registration location indicated by the registration location information belongs as the target hierarchical processing system.
15. The apparatus according to claim 11, characterized in that, The target routing strategy indicates routing based on the index information carried in the request, and the target hierarchical processing system determination unit includes: The target index information acquisition unit is used by the routing layer in the first layered processing system to acquire the target index information carried by the request according to the target routing strategy. The region query unit is used to perform a region query based on the target index information to determine the target region; The fourth determining unit is used to determine the hierarchical processing system corresponding to the target region as the target hierarchical processing system.
16. The apparatus according to claim 11, characterized in that, The request processing apparatus further includes a request classification and determination module, used by the routing layer in the first hierarchical processing system to query and obtain the attribute information of the request from the cached non-sensitive information.
17. The apparatus according to claim 10, characterized in that, If the target service is also deployed in the business layer of the third layered processing system, the third layered processing system is at least one other layered processing system besides the first layered processing system in the at least two layered processing systems; the processing module is further configured to: perform data query in the data layer of the first layered processing system for the target service in the first layered processing system; If the target service in the first layered processing system does not find the corresponding business data in the data layer of the first layered processing system, then the target service in the third layered processing system is called through the target service in the business layer of the first layered processing system to perform data query and obtain the corresponding query result. The target service in the target business layer processes the request based on the query results.
18. The apparatus according to claim 10, characterized in that, The layered processing system further includes a protocol conversion layer; the request processing device further includes: The protocol conversion module is used by the protocol conversion layer in the first layered processing system to perform protocol conversion on the request.
19. An electronic device, characterized in that, include: processor; A memory storing computer-readable instructions that, when executed by the processor, implement the method as described in any one of claims 1-9.
20. A computer-readable storage medium having stored thereon computer-readable instructions that, when executed by a processor, implement the method as described in any one of claims 1-9.
21. A computer program product, characterized in that, The computer program product includes computer instructions that, when executed by a processor, implement the method as described in any one of claims 1 to 9.