Monitoring request processing method and apparatus, medium, and area unit deployment system
By enabling multiple data centers to work collaboratively in a regionally modular deployment system, the problem of limited resources in a single data center is solved, flexible scheduling and response to monitoring requests are achieved, and the resilience and availability of the video surveillance platform are improved.
Patent Information
- Application Number
- CN202211521657.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-30
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2042-11-30
AI Technical Summary
In existing technologies, the resources of a single data center are limited, making it difficult to handle the rapidly growing business volume. Furthermore, if the data center experiences a power outage or an accident, the video surveillance platform will be completely paralyzed.
The system adopts a regional unit deployment approach, which involves multiple data centers working together to obtain user information and target data centers from monitoring requests. It verifies user information, determines whether the client and target data center belong to the same region, selects appropriate strategies to process requests, and achieves flexible scheduling and sending of response results.
It improves the resilience and availability of data centers, prevents system failures, achieves load balancing, and enhances the disaster recovery capabilities of video surveillance platforms.
Smart Images

Figure CN116055560B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of Internet, and particularly relates to a monitoring request processing method and device, medium and regional unit deployment system. BACKGROUND
[0002] Nowadays, the video monitoring industry has formed a huge market size. With the rapid development of various related technologies in the industry, the video monitoring technology is moving towards deeper and broader fields by subdividing the industry and producing corresponding products for different professional scenarios.
[0003] For a video monitoring platform in the early development stage, the deployment mode is still in a single-point deployment mode. When the number of applications, servers and databases increases, the limited resources in a single IDC (Internet Data Center) cannot support the rapid growth of business volume. Moreover, once the power supply of the machine room is interrupted or other accidents occur, the entire video monitoring platform service will be completely paralyzed. SUMMARY
[0004] The present application aims to at least solve one of the above technical defects, particularly the technical defect that the limited resources in a single data center cannot support the rapid growth of business volume, and once the power supply of the machine room is interrupted or other accidents occur, the entire video monitoring platform service will be completely paralyzed.
[0005] In a first aspect, the present application provides a monitoring request processing method applied to any data center in a regional unit deployment system, wherein the regional unit deployment system comprises a plurality of data centers, and the method comprises:
[0006] When receiving a monitoring request initiated by a client, obtaining user information and a target data center contained in the monitoring request; wherein the target data center is a data center corresponding to a request address of the monitoring request;
[0007] Verifying whether the user information is correct, and if the user information passes the verification, obtaining shard information contained in the user information;
[0008] According to the shard information and the target data center, determining whether the monitoring request and the client belong to the same region;
[0009] Based on the determination result, selecting a strategy corresponding to the determination result to process the monitoring request, and obtaining a response result corresponding to the monitoring request;
[0010] Sending the response result to the client.
[0011] In one of the embodiments, the judging whether the monitoring request and the client belong to the same region according to the shard information and the target data center comprises:
[0012] According to the shard information, obtaining a starting data center where the client is located;
[0013] If the starting data center and the target data center are the same data center, the monitoring request and the client belong to the same region.
[0014] If the starting data center and the target data center are not the same data center, the monitoring request and the client do not belong to the same region.
[0015] In one of the embodiments, the selecting a strategy corresponding to the judging result to process the monitoring request based on the judging result comprises:
[0016] If the judging result is that the monitoring request and the client belong to the same region, the starting data center responds to the monitoring request.
[0017] In one of the embodiments, the selecting a strategy corresponding to the judging result to process the monitoring request based on the judging result comprises:
[0018] If the judging result is that the monitoring request and the client do not belong to the same region, obtaining request header information contained in the monitoring request.
[0019] According to the request header information, judging whether the client supports redirection.
[0020] If the client supports redirection, updating a request path of the monitoring request to a domain name address of the target data center by the starting data center.
[0021] Sending the updated request path to the client.
[0022] In one of the embodiments, the selecting a strategy corresponding to the judging result to process the monitoring request based on the judging result further comprises:
[0023] If the client does not support redirection, performing cross-region proxy by the starting data center, forwarding the monitoring request to the target data center, and obtaining a response result of the target data center to the monitoring request and returning the response result to the client.
[0024] In a second aspect, the application provides a monitoring request processing device applied to any data center in a regional unit deployment system, the regional unit deployment system comprising a plurality of data centers, and the device comprising:
[0025] The acquisition module is configured to acquire user information and a target data center included in the monitoring request when any data center receives the monitoring request initiated by the client, wherein the target data center is a data center corresponding to a request address of the monitoring request.
[0026] The verification module is configured to verify whether the user information is correct, and acquire shard information included in the user information if the user information passes the verification.
[0027] The judgment module is configured to judge whether the monitoring request and the client belong to the same region according to the shard information and the target data center.
[0028] The request processing module is configured to process the monitoring request according to a strategy corresponding to the judgment result based on the judgment result, to obtain a response result corresponding to the monitoring request.
[0029] The result returning module is configured to send the response result to the client.
[0030] In one embodiment, the judgment module includes:
[0031] The acquisition sub-module is configured to acquire a starting data center where the client is located according to the shard information.
[0032] The first judgment sub-module is configured to determine that the monitoring request is a same-region request if the starting data center and the target data center are the same data center.
[0033] The second judgment sub-module is configured to determine that the monitoring request is not a same-region request if the starting data center and the target data center are not the same data center.
[0034] In a third aspect, the present application provides a storage medium, wherein the storage medium stores computer readable instructions, and the computer readable instructions are executed by one or more processors to enable the one or more processors to perform the steps of the monitoring request processing method according to any one of the above embodiments.
[0035] In a fourth aspect, the present application provides a computer device, which includes one or more processors and a memory.
[0036] The memory stores computer readable instructions, and the one or more processors execute the computer readable instructions to perform the steps of the monitoring request processing method according to any one of the above embodiments.
[0037] In a fifth aspect, the application provides a regional unit deployment system, which comprises a plurality of data centers, each of which is configured to perform the steps of the monitoring request processing method according to any one of the above embodiments, and when a failure occurs in the primary data center corresponding to any data center, the data center receives a monitoring request of a user in the primary data center corresponding to the data center and processes the monitoring request.
[0038] From the above technical solutions, it can be seen that the embodiments of the application have the following advantages:
[0039] The monitoring request processing method, device, storage medium, computer device and regional unit deployment system provided by the application can, when a monitoring request initiated by a client is received by any data center in the plurality of data centers of the regional unit deployment system, acquire user information and a target data center included in the monitoring request; the target data center is a data center corresponding to a request address of the monitoring request; the user information is verified, and when the user information passes the verification, shard information included in the user information is acquired; whether the monitoring request and the client belong to the same region is determined according to the shard information and the target data center; then, based on the determination result, a corresponding strategy is selected to process the monitoring request, to obtain a response result corresponding to the monitoring request; and the response result is sent to the client, so that the data centers of the regional unit deployment system can flexibly schedule the monitoring request, the response strategy can be dynamically adjusted when an exception occurs in any data center, system paralysis can be avoided, the anti-impact capability and availability of the data centers can be improved, and the load of the data centers can be balanced. BRIEF DESCRIPTION OF DRAWINGS
[0040] In order to more clearly illustrate the technical solutions in the embodiments of the application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description are only some embodiments of the application, and for those skilled in the art, other drawings can also be obtained without creative labor.
[0041] Figure 1 A flowchart of a monitoring request processing method provided by an embodiment of the application;
[0042] Figure 2 A flowchart of the step of selecting a corresponding strategy to process the monitoring request when the determination result is that the monitoring request and the client do not belong to the same region, provided by an embodiment of the application;
[0043] Figure 3 A structural diagram of a monitoring request processing device provided by an embodiment of the application;
[0044] Figure 4 An internal structure diagram of a computer device provided for an embodiment of the present application is shown in FIG. 1.
[0045] Figure 5 A structure schematic diagram of a regional unit deployment system provided for an embodiment of the present application is shown in FIG. 2. DETAILED DESCRIPTION
[0046] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.
[0047] As shown in FIG. 1, an embodiment of the present application provides a monitoring request processing method, which is applied to any data center in a regional unit deployment system, the regional unit deployment system includes a plurality of data centers, and the method includes the following steps. Figure 1
[0048] Step S101: When receiving a monitoring request initiated by a client, obtaining user information and a target data center contained in the monitoring request.
[0049] Among them, the target data center is a data center corresponding to a request address of the monitoring request.
[0050] Specifically, the user information includes but is not limited to user ID and shard information, and the data center corresponding to the request address of the monitoring request can be understood as a data center where a terminal device service called by the client finally locates.
[0051] Step S102: Verifying whether the user information is correct, and if the user information passes the verification, obtaining shard information contained in the user information.
[0052] Among them, verifying the user information mainly includes checking whether the shard information in the user information is missing and whether the user ID is registered in the regional unit deployment system.
[0053] Step S103: According to the shard information and the target data center, determining whether the monitoring request and the client belong to the same area.
[0054] In this step, according to the shard information, the data center to which the user corresponding to the client is allocated can be determined, and the data center is compared with the target data center, and the comparison result is used to determine whether the monitoring request and the client belong to the same area.
[0055] Step S104: based on the judgment result, selecting a strategy corresponding to the judgment result to process the monitoring request to obtain a response result corresponding to the monitoring request.
[0056] The response result is feedback information given to the client after the data center receiving the monitoring request adopts different strategies to process the monitoring request.
[0057] It can be understood that there is a strategy corresponding to the judgment result for different judgment results, and the monitoring request is processed according to the corresponding strategy.
[0058] Step S105: sending the response result to the client.
[0059] The monitoring request processing method provided in the application, when any data center of the plurality of data centers of the regional unit deployment system receives a monitoring request initiated by a client, the data center then obtains user information and a target data center contained in the monitoring request; wherein the target data center is a data center corresponding to a request address of the monitoring request; the user information is verified, and when the user information passes the verification, the shard information contained in the user information is obtained; according to the shard information and the target data center, it is judged whether the monitoring request and the client belong to the same region; and then based on the judgment result, a corresponding strategy is selected to process the monitoring request to obtain a response result corresponding to the monitoring request; the response result is sent to the client, so that each data center of the regional unit deployment system can realize flexible scheduling of the monitoring request, when any data center appears abnormal, the response strategy can be dynamically adjusted, system paralysis can be avoided, the anti-impact ability and availability of the data center can be improved, and at the same time, the load balancing of each data center can also be realized.
[0060] In one embodiment, the judgment of whether the monitoring request and the client belong to the same region according to the shard information and the target data center comprises:
[0061] According to the shard information, the starting data center where the client is located is obtained;
[0062] If the starting data center and the target data center are the same data center, the monitoring request and the client belong to the same region;
[0063] If the starting data center and the target data center are not the same data center, the monitoring request and the client do not belong to the same region.
[0064] The starting data center refers to the data center to which the user corresponding to the client is allocated.
[0065] In one of the embodiments, the processing of the monitoring request based on the judgment result comprises:
[0066] If the judgment result is that the monitoring request and the client belong to the same region, the monitoring request is responded by the starting data center.
[0067] Specifically, if the starting data center and the target data center are the same data center, i.e., the data center corresponding to the domain name IP in the request address of the monitoring request initiated by the client is the data center where the user is located, the monitoring request is processed and responded by the data center where the user is located.
[0068] As shown in Figure 2 the processing of the monitoring request based on the judgment result comprises:
[0069] Step S201: If the judgment result is that the monitoring request and the client do not belong to the same region, the request header information contained in the monitoring request is acquired.
[0070] Step S202: Whether the client supports redirection is judged according to the request header information.
[0071] Specifically, if the parameter related to redirection in the request header information is set to true or 1, it indicates that the client supports redirection, and if the parameter related to redirection in the request header information is set to false or 0, it indicates that the client does not support redirection.
[0072] Step S203: If the client supports redirection, the request path of the monitoring request is updated by the starting data center to the domain name address of the target data center.
[0073] Exemplarily, assuming that the data center receiving the monitoring request is the first data center, the initiator of the monitoring request supports redirection, the request address of the monitoring request is the third data center, the domain name of the third data center is ccc, and the monitoring request path is https: / / aaa / bbb, when the first data center receives the monitoring request, the processing of the monitoring request is to modify the request path of the monitoring request from https: / / aaa / bbb to https: / / ccc / bbb.
[0074] Step S204: The updated request path is sent to the client.
[0075] By using the domain name of the target data center to request access, flexible scheduling can be achieved to balance the load of each data center, and the service can be quickly switched to the standby data center in case of failure, further improving the impact resistance and availability of the platform.
[0076] As shown in Figure 2 In one embodiment, the method further includes:
[0077] Step S205: If the client does not support redirection, the starting data center performs cross-zone proxying, forwards the monitoring request to the target data center, and returns the response result of the target data center to the monitoring request to the client.
[0078] For example, assuming that the data center receiving the monitoring request is the first data center, the initiator of the monitoring request does not support redirection, and the request address of the monitoring request is the third data center, the first data center forwards the monitoring request to the third data center. After the third data center receives the monitoring request forwarded by the first data center, it returns a response result to the first data center, and the first data center returns the response result to the client. When the first data center fails, the operation and maintenance personnel will promptly resolve the domain name IP of the first data center to the domain name IP of the standby data center of the first data center, i.e., the domain name IP of the fourth data center. At this time, if there is a monitoring request initiated by a user of the first data center, the new IP address obtained after local domain name resolution is the IP address of the fourth data center, so the monitoring request is received and processed by the fourth data center.
[0079] It should be understood that although each step in the flowchart involved in each embodiment described above is shown in sequence according to the arrow, these steps are not necessarily executed in the order indicated by the arrow. Unless otherwise specified herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other orders. Moreover, at least part of the steps in the flowchart involved in each embodiment described above can include multiple steps or stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution sequence of these steps or stages is not necessarily sequential, but can be executed in rotation or alternation with at least part of other steps or steps or stages in other steps.
[0080] The monitoring request processing apparatus provided by the embodiments of the present application is described below, and the monitoring request processing apparatus described below can be correspondingly referred to the monitoring request processing method described above.
[0081] As shown in Figure 3 The embodiments of the present application provide a monitoring request processing apparatus 300, which is applied to any data center in a regional unit deployment system, the regional unit deployment system comprising a plurality of data centers, and the apparatus comprises:
[0082] The acquisition module 301 is configured to acquire user information and a target data center included in a monitoring request when any data center receives the monitoring request initiated by a client, wherein the target data center is a data center corresponding to a request address of the monitoring request.
[0083] The verification module 302 is configured to verify whether the user information is correct, and if the user information passes the verification, acquire shard information included in the user information.
[0084] The judgment module 303 is configured to judge whether the monitoring request and the client belong to the same area according to the shard information and the target data center.
[0085] The request processing module 304 is configured to process the monitoring request according to a strategy corresponding to the judgment result based on the judgment result, and obtain a response result corresponding to the monitoring request.
[0086] The result returning module 305 is configured to send the response result to the client.
[0087] In one of the embodiments, the judgment module 303 comprises:
[0088] The acquisition sub-module is configured to acquire a starting data center where the client is located according to the shard information.
[0089] The first judgment sub-module is configured to determine that the monitoring request is a same-area request if the starting data center and the target data center are the same data center.
[0090] The second judgment sub-module is configured to determine that the monitoring request is not a same-area request if the starting data center and the target data center are not the same data center.
[0091] In one of the embodiments, the request processing module 304 comprises:
[0092] The first response sub-module is configured to respond to the monitoring request by the starting data center if the judgment result is that the monitoring request and the client belong to the same area.
[0093] In one embodiment, the request processing module 304 comprises:
[0094] an information obtaining sub-module, configured to, if the judgment result is that the monitoring request and the client do not belong to the same region, obtain request header information contained in the monitoring request;
[0095] a third judgment sub-module, configured to judge whether the client supports redirection according to the request header information;
[0096] an updating sub-module, configured to, if the client supports redirection, update a request path of the monitoring request to a domain name address of the target data center by the starting data center;
[0097] a second response sub-module, configured to send the updated request path to the client.
[0098] In one embodiment, the request processing module 304 further comprises:
[0099] a third response sub-module, configured to, if the client does not support redirection, perform cross-region proxy by the starting data center, forward the monitoring request to the target data center, and return a response result of the target data center to the monitoring request to the client.
[0100] The division of each module in the above monitoring request processing apparatus is only for example, and in other embodiments, the monitoring request processing apparatus can be divided into different modules as needed to complete all or part of the functions of the above monitoring request processing apparatus. Each module in the above monitoring request processing apparatus can be realized by software, hardware and combinations thereof in whole or in part. Each module can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory in the computer device in software form, so as to be called and executed by the processor to perform the operations corresponding to each module.
[0101] In one embodiment, the present application further provides a storage medium, wherein the storage medium stores computer readable instructions, and the computer readable instructions are executed by one or more processors to make the one or more processors perform the following steps:
[0102] When receiving a monitoring request initiated by a client, obtaining user information and a target data center contained in the monitoring request; wherein the target data center is a data center corresponding to a request address of the monitoring request;
[0103] verifying whether the user information is correct, and if the user information passes the verification, obtaining sharding information contained in the user information;
[0104] determining whether the monitoring request and the client belong to the same slice according to the slice information and the target data center;
[0105] processing the monitoring request according to a strategy corresponding to the determination result to obtain a response result corresponding to the monitoring request;
[0106] sending the response result to the client.
[0107] In one of the embodiments, the computer readable instructions, when executed by the processor, further implement the following steps:
[0108] obtaining a starting data center where the client is located according to the slice information;
[0109] if the starting data center and the target data center are the same data center, the monitoring request and the client belong to the same slice;
[0110] if the starting data center and the target data center are not the same data center, the monitoring request and the client do not belong to the same slice.
[0111] In one of the embodiments, the computer readable instructions, when executed by the processor, further implement the following steps:
[0112] if the determination result is that the monitoring request and the client belong to the same slice, responding to the monitoring request by the starting data center.
[0113] In one of the embodiments, the computer readable instructions, when executed by the processor, further implement the following steps:
[0114] if the determination result is that the monitoring request and the client do not belong to the same slice, obtaining request header information contained in the monitoring request;
[0115] determining whether the client supports redirection according to the request header information;
[0116] if the client supports redirection, updating a request path of the monitoring request to a domain name address of the target data center by the starting data center;
[0117] sending the updated request path to the client.
[0118] In one of the embodiments, the computer readable instructions, when executed by the processor, further implement the following steps:
[0119] If the client does not support redirection, a cross-zone proxy is performed by the starting data center, the monitoring request is forwarded to the target data center, and a response result of the target data center to the monitoring request is returned to the client.
[0120] In one embodiment, the application further provides a computer device having computer readable instructions stored therein, and the one or more processors execute the computer readable instructions to perform the following steps:
[0121] When receiving a client-initiated monitoring request, user information and a target data center contained in the monitoring request are obtained; wherein the target data center is a data center corresponding to a request address of the monitoring request;
[0122] It is checked whether the user information is correct, and if the user information passes the check, shard information contained in the user information is obtained;
[0123] According to the shard information and the target data center, it is determined whether the monitoring request and the client belong to the same zone;
[0124] Based on the determination result, a strategy corresponding to the determination result is selected to process the monitoring request, and a response result corresponding to the monitoring request is obtained;
[0125] The response result is sent to the client.
[0126] In one embodiment, the processor further executes the following steps when executing the computer readable instructions:
[0127] According to the shard information, a starting data center where the client is located is obtained;
[0128] If the starting data center and the target data center are the same data center, the monitoring request and the client belong to the same zone;
[0129] If the starting data center and the target data center are not the same data center, the monitoring request and the client do not belong to the same zone.
[0130] In one embodiment, the processor further executes the following steps when executing the computer readable instructions:
[0131] If the determination result is that the monitoring request and the client belong to the same zone, the starting data center responds to the monitoring request.
[0132] In one embodiment, the processor further executes the following steps when executing the computer readable instructions:
[0133] If the judgment result is that the monitoring request and the client do not belong to the same region, obtaining request header information contained in the monitoring request;
[0134] According to the request header information, judging whether the client supports redirection;
[0135] If the client supports redirection, updating, by the starting data center, a request path of the monitoring request to a domain name address of the target data center;
[0136] Sending the updated request path to the client.
[0137] In one of the embodiments, the processor further performs the following steps when executing the computer readable instructions:
[0138] If the client does not support redirection, performing, by the starting data center, cross-region proxy, forwarding the monitoring request to the target data center, and obtaining a response result of the target data center to the monitoring request and returning the response result to the client.
[0139] As shown in Figure 4 , Figure 4 An internal structure schematic diagram of a computer device provided by the embodiment of the present application, the computer device 400 can be provided as a server. Referring to Figure 4 , the computer device 400 includes a processing component 402, which further includes one or more processors, and a memory resource represented by a memory 401, for storing instructions executable by the processing component 402, such as an application program. The application program stored in the memory 401 can include one or more than one module each corresponding to a set of instructions. In addition, the processing component 402 is configured to execute the instructions to perform the monitoring request processing method of any of the above embodiments.
[0140] The computer device 400 can further include a power supply component 403 configured to perform power management of the computer device 400, a wired or wireless network interface 404 configured to connect the computer device 400 to a network, and an input / output (I / O) interface 405. The computer device 400 can operate based on an operating system stored in the memory 401, such as Windows Server TM, Mac OS X TM, Unix TM, Linux TM, Free BSD TM or the like.
[0141] Those skilled in the art can understand, Figure 4The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0142] The present application provides a regional unit deployment system, which comprises a plurality of data centers, each of which is used to perform the steps of the monitoring request processing method according to any one of the above embodiments, and when the corresponding primary data center of any data center fails, the data center receives the monitoring request of the user in the corresponding primary data center and processes the monitoring request.
[0143] The regional unit deployment system provided by the present application can distribute the business of the video monitoring platform in multiple data centers, so that the business bearing capacity of the video monitoring platform is greatly improved, and moreover, the risk that the entire video monitoring platform service will be completely paralyzed once a single data center power failure or other unexpected situations occur can be avoided, and the disaster recovery capability of the video monitoring platform is improved.
[0144] Schematically, as Figure 5 shown, Figure 5 The structure of a regional unit deployment system provided by an embodiment of the present application is shown in the figure. The regional unit deployment system comprises a data center-1, a data center-2, a data center-3 and a data center-4. The data center-4 is a backup data center of the data center-1, the data center-1 is a backup data center of the data center-2, the data center-2 is a backup data center of the data center-3, and the data center-3 is a backup data center of the data center-4.
[0145] Figure 5As shown in the structure, any data center includes a gateway layer, a data layer, a service layer and data synchronization, wherein the gateway layer includes a business platform gateway, a capability middle platform gateway and a routing service, wherein the business platform gateway and the capability middle platform gateway correspond to the requests of the client and the device respectively, the functions are isolated to avoid the mutual influence of signaling storm, and the routing service provides routing function for the gateway, and distributes and forwards the request to the regional center platform service processing of different shards; the data layer mainly has user data storage customer identifier data, client bound device, device data storage device access information, cloud storage service and AI information, and routing data stores the unit shard routing data of global user and device; the service layer divides the platform service into a business platform and a video capability middle platform according to the access terminal (client and device) of product business, the business platform includes an application platform service to provide client API function interface, and the business middle platform service realizes specific business logic; the video capability middle platform provides device signaling access capability, and supports video cloud review and AI alarm push functions; the data synchronization can use TiDB, Cassandra and the like as database storage, supports multi-center data synchronization, and realizes the backup node synchronization measures of regional center data through the MGR (group replication) plug-in. The cache data synchronization can select multi-data source writing mode, supports different writing strategies, wherein the global unit data synchronization can adopt the ALWAY strategy, and the backup node data synchronization adopts the LOCAL strategy, the technical selection has self-developed cache synchronization technology or open source projects, for example: Ali RedisShake, NetEase Camellia and the like.
[0146] Those skilled in the art can understand that, Figure 5 As shown in the structure, only the block diagram of part of the structure related to the scheme of the present application is shown, and does not constitute a limitation on the regional unit deployment system to which the scheme of the present application is applied, and the specific regional unit deployment system can include more or less components than those shown in the figure, or combine certain components, or have different component arrangement.
[0147] Finally, it should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting. It will be apparent to those skilled in the art that various modifications and variations can be made in the present application without departing from the spirit or scope of the application. Thus, it is intended that the present application cover modifications and variations of this application provided they come within the scope of the appended claims and their equivalents.
[0148] Various embodiments are described herein with reference to the following terminology, which should be interpreted as follows. The terminology "comprises", "comprising", "includes", "including" or "has", "having" etc. is not intended to exclude that there can be additional items or steps. Thus, such terminology can be understood to mean that the item or items or step or steps covered by the terminology are included, but that one or more additional items or steps can also be included. The terminology "one", "said" and "the" etc. does not exclude the plural, and "comprising" does not exclude "consisting of". The terminology "based on" means "based, at least in part, on" and not "based solely on" unless specifically specified. The terminology "one embodiment" means "at least one embodiment" and not "exactly one embodiment", unless specifically specified. The terminology "another embodiment" means "at least one further embodiment" and not "exactly one further embodiment", unless specifically specified.
[0149] The above description of disclosed embodiments is intended to be illustrative and not restrictive. Many embodiments will be apparent to those of skill in the art upon reading and understanding the above description, and it is therefore contemplated to be within the scope of the application that several modifications can be made thereto, and the appended claims should be construed in accordance with the scope of the disclosure, including the novel features present in the foregoing and the full scope of equivalents thereto.
Claims
1. A monitoring request processing method, characterized in that: Applied to any data center in a regional unitized deployment system, the regional unitized deployment system including multiple data centers, the method comprising: When receiving a monitoring request initiated by a client, obtaining the user information and target data center contained in the monitoring request; wherein the target data center is the data center corresponding to the request address of the monitoring request; Verify whether the user information is correct. If the user information passes the verification, obtain the fragmentation information contained in the user information; Determining, based on the shard information and the target data center, whether the monitoring request and the client belong to the same shard; Based on the judgment result, selecting a strategy corresponding to the judgment result to process the monitoring request, and obtaining a response result corresponding to the monitoring request; Sending the response result to the client; The determining, based on the shard information and the target data center, whether the monitoring request and the client belong to the same shard area includes: According to the shard information, obtaining the starting data center where the client is located; If the starting data center and the target data center are the same data center, the monitoring request and the client belong to the same area; If the starting data center and the target data center are not the same data center, the monitoring request and the client do not belong to the same area; The data center that receives the monitoring request is equipped with a backup data center; when the data center that receives the monitoring request fails, the new monitoring request initiated by the data center that receives the monitoring request is received and processed by the backup data center.
2. The monitoring request processing method according to claim 1, wherein: The selecting, based on the judgment result, a policy corresponding to the judgment result to process the monitoring request includes: If the determination result is that the monitoring request and the client belong to the same area, the starting data center responds to the monitoring request.
3. The monitoring request processing method according to claim 1, wherein: The selecting, based on the judgment result, a policy corresponding to the judgment result to process the monitoring request includes: If the determination result is that the monitoring request and the client do not belong to the same zone, obtaining the request header information contained in the monitoring request; Determining whether the client supports redirection based on the request header information; If the client supports redirection, the originating data center updates the request path of the monitoring request to the domain name address of the target data center; The updated request path is sent to the client.
4. The monitoring request processing method according to claim 3, wherein: The selecting, based on the judgment result, a policy corresponding to the judgment result to process the monitoring request further includes: If the client does not support redirection, the starting data center will perform cross-region proxying, forward the monitoring request to the target data center, and obtain the response result of the target data center to the monitoring request and return it to the client.
5. A monitoring request processing device, characterized in that: Applicable to any data center in a regional unitized deployment system, the regional unitized deployment system including multiple data centers, the device comprising: An acquisition module, configured to, when any data center receives a monitoring request initiated by a client, acquire the user information and target data center contained in the monitoring request; wherein the target data center is the data center corresponding to the request address of the monitoring request; A verification module is used to verify whether the user information is correct, and if the user information passes the verification, obtain the fragmentation information contained in the user information; A judgment module, configured to judge whether the monitoring request and the client belong to the same slice according to the slice information and the target data center; A request processing module is used to select a strategy corresponding to the judgment result to process the monitoring request based on the judgment result, and obtain a response result corresponding to the monitoring request; A result returning module is used to send the response result to the client; The judgment module includes: An acquisition submodule, configured to acquire the starting data center where the client is located according to the shard information; A first judgment submodule is configured to determine, if the starting data center and the target data center are the same data center, that the monitoring request belongs to the same area request; A second judgment submodule is configured to determine that if the starting data center and the target data center are not the same data center, the monitoring request does not belong to the same area request; The data center that receives the monitoring request is equipped with a backup data center; when the data center that receives the monitoring request fails, the new monitoring request initiated by the data center that receives the monitoring request is received and processed by the backup data center.
6. A storage medium, characterized in that: The storage medium stores computer-readable instructions, which, when executed by one or more processors, enable the one or more processors to execute the steps of the monitoring request processing method according to any one of claims 1 to 4.
7. A computer device, characterized in that: include: one or more processors, and memory; The memory stores computer-readable instructions, and when the computer-readable instructions are executed by the one or more processors, the steps of the monitoring request processing method according to any one of claims 1 to 4 are executed.
8. A regional unitized deployment system, characterized in that: The system includes multiple data centers, each of which is used to execute the monitoring request processing method described in any one of claims 1 to 4. When the primary data center corresponding to any data center fails, the data center receives the monitoring request of the user in its corresponding primary data center and processes the monitoring request.
Citation Information
Patent Citations
Smart home client side access request processing method, smart home client side access request processing system, storage medium and computer equipment
CN108111527A
SyncML synchronous request reorienting method
CN1744462A