Server scheduling method, device, storage medium and electronic device

By dividing the server clusters through multi-dimensional scheduling information and determining the target server based on priority and selection probability, the problem of security equipment being unable to allocate the optimal server is solved, and efficient server allocation and service quality improvement are achieved.

CN116155908BActive Publication Date: 2025-09-19HANGZHOU HUACHENG SOFTWARE TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211733433.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-30
Publication Date
2025-09-19
Estimated Expiration
2042-12-30

AI Technical Summary

Technical Problem

Existing technologies are unable to effectively allocate optimal servers to security equipment, resulting in extended network latency, poor service quality, and an inability to meet the needs of computationally intensive video surveillance.

Method used

By obtaining multi-dimensional scheduling information of monitoring devices, including region, operator, user role, equipment manufacturer and business, it is divided into multiple server clusters, and the target server is determined according to priority and selection probability to achieve optimal server allocation.

Benefits of technology

It achieves efficient server allocation for security equipment, reduces network latency, improves service quality, supports proportional allocation of multiple clusters, and has rich policy customization flexibility and scalability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116155908B_ABST
    Figure CN116155908B_ABST
Patent Text Reader

Abstract

The present invention discloses a server scheduling method, device, storage medium, and electronic device, wherein the method comprises: obtaining a target message sent by a monitoring device, and obtaining scheduling information of N dimensions corresponding to the monitoring device, wherein N is a positive integer greater than or equal to 2; determining a target server in a group of server clusters based on the scheduling information of the N dimensions, wherein the group of server clusters includes P server clusters divided according to M dimensions, each server cluster in the P server clusters corresponds to one dimension of the M dimensions, the M dimensions include the N dimensions, M is a positive integer greater than or equal to 2, and P is a positive integer greater than or equal to 2; and processing the target message by the target server. The above technical solution solves the problem of being unable to assign the optimal server to the device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of big data technology, and in particular, to a server scheduling method, device, storage medium, and electronic device. Background Art

[0002] Currently, video surveillance features in security equipment are widely used by both home and business users. Users can use terminals to preview real-time videos, receive notifications, and access recorded videos. In practice, when a notification event occurs, users can access the recorded video and automatically captured images through the terminal. They can browse the corresponding images via the notification message and review historical recordings at any time, such as when a home user is monitoring their home or a business owner is monitoring their business. Furthermore, with the development of technologies like the Internet of Things and cloud computing, the application of cloud storage in the security industry has become a natural progression. Historical recordings and images are no longer limited to local storage on surveillance devices or within a local area network (LAN). Instead, they are stored in the cloud. This has driven a shift from the existing distributed storage model of DVR / NVRs near the edge to centralized storage in video data centers.

[0003] Traditional cloud computing systems struggle to provide high-quality services due to network bandwidth limitations, high cloud computing center costs, and high network latency. To address this, edge servers have emerged. Deploying edge servers near users to provide services reduces pressure on cloud computing centers, shortens service response times, and provides better service for users. However, the deployment of edge servers also presents new challenges: selecting the optimal edge server or edge service link in a multi-edge server environment to better meet user service needs.

[0004] Cloud recording and cloud image processing are critical features of video surveillance. They are computationally intensive, data-intensive, and time-sensitive. Data integrity, timeliness, and storage costs are crucial, placing high demands on server deployment. These requirements require proximity, low network latency, customizable services, and support for proportional allocation across multiple clusters. Currently, considering cost and the network conditions of various operators' data centers, single-line servers from major cloud vendors are typically used for service deployment, forming edge clusters with diverse node types.

[0005] In related technologies, when allocating a server to a device, only the operation and maintenance level indicators of the server itself, such as CPU, memory, and network bandwidth, are considered, and the server allocated to the device is not the optimal server.

[0006] Currently, no effective solution has been proposed to the problem in related technologies that an optimal server cannot be allocated to a device. Summary of the Invention

[0007] Embodiments of the present invention provide a server scheduling method, device, storage medium, and electronic device to at least solve the problem in related technologies that an optimal server cannot be allocated to a device.

[0008] According to one embodiment of the present invention, a server scheduling method is provided, comprising: obtaining a target message sent by a monitoring device, and obtaining scheduling information of N dimensions corresponding to the monitoring device, wherein N is a positive integer greater than or equal to 2; determining a target server in a group of server clusters based on the scheduling information of the N dimensions, wherein the group of server clusters includes P server clusters divided according to M dimensions, each server cluster in the P server clusters corresponds to one dimension of the M dimensions, the M dimensions include the N dimensions, M is a positive integer greater than or equal to 2, and P is a positive integer greater than or equal to 2; and processing the target message through the target server.

[0009] In an exemplary embodiment, determining a target server in a group of server clusters based on the scheduling information of the N dimensions includes: searching for a server cluster corresponding to the scheduling information of the N dimensions in the P server clusters to obtain K server clusters, where K is a positive integer greater than or equal to 2 and less than or equal to P, and each server cluster in the K server clusters includes one or more server subgroups; determining a target server subgroup in the K server clusters; and determining the target server in the target server subgroup.

[0010] In an exemplary embodiment, searching for a server cluster corresponding to the scheduling information of the N dimensions in the P server clusters to obtain K server clusters includes: when the scheduling information of the N dimensions includes the values ​​of the N dimensions, searching for a server cluster corresponding to the values ​​of each dimension in the values ​​of the N dimensions in the P server clusters to obtain N server clusters, wherein K is equal to N, and each server cluster in the P server clusters corresponds to a value of one dimension in the M dimensions.

[0011] In an exemplary embodiment, the values ​​of the N dimensions include at least two of the following: a first value, used to indicate the region where the monitoring device is located; a second value, used to indicate the operator of the network used by the monitoring device; a third value, used to indicate the user role to which the monitoring device belongs; a fourth value, used to indicate the device manufacturer to which the monitoring device belongs; and a fifth value, used to indicate the business to which the monitoring device belongs.

[0012] In an exemplary embodiment, determining the target server subgroup in the K server clusters includes: obtaining the priority of each server subgroup in the K server clusters; when the number of server subgroups with the highest priority in the K server clusters is 1, determining the server subgroup with the highest priority as the target server subgroup; when the number of server subgroups with the highest priority in the K server clusters is greater than 1, selecting a server subgroup from the server subgroups with the highest priority as the target server subgroup.

[0013] In an exemplary embodiment, obtaining the priority of each server subgroup in the K server clusters includes: obtaining the priority of the jth server subgroup in the i-th server cluster in the K server clusters through the following steps, wherein i is a positive integer greater than or equal to 1 and less than or equal to K, j is a positive integer greater than or equal to 1, and the scheduling information of the N dimensions includes the values ​​of the N dimensions: when the i-server cluster is a server cluster corresponding to the value of the i-th dimension, searching a preset first mapping table for a priority having a mapping relationship with the values ​​of the N dimensions and the j-th server subgroup, and determining the found priority as the priority of the j-th server subgroup, wherein the values ​​of the N dimensions include the value of the i-th dimension, K is equal to N, and the first mapping table records multiple sets of mapping information, each set of mapping information includes values ​​of one or more dimensions with a mapping relationship, a server subgroup, and a priority.

[0014] In an exemplary embodiment, selecting a server subgroup from the server subgroup with the highest priority as the target server subgroup includes: when the server subgroup with the highest priority is Q server subgroups, and Q is a positive integer greater than or equal to 2, obtaining the selection probability corresponding to each server subgroup in the Q server subgroups to obtain Q selection probabilities; and selecting a server subgroup from the Q server subgroups as the target server subgroup according to the Q selection probabilities.

[0015] In an exemplary embodiment, obtaining the selection probability corresponding to each server subgroup in the Q server subgroups to obtain the Q selection probabilities includes: obtaining the selection probability corresponding to the j-th server subgroup in the Q server subgroups through the following steps, wherein j is a positive integer greater than or equal to 1 and less than or equal to Q, and the scheduling information of the N dimensions includes the values ​​of the N dimensions: when the server cluster where the j-th server subgroup is located is a server cluster corresponding to the value of the i-th dimension, searching a preset second mapping table for a selection probability having a mapping relationship with the values ​​of the N dimensions and the j-th server subgroup, and determining the found selection probability as the selection probability corresponding to the j-th server subgroup, wherein the values ​​of the N dimensions include the value of the i-th dimension, i is a positive integer greater than or equal to 1 and less than or equal to K, K is equal to N, and the second mapping table records multiple sets of mapping information, each set of mapping information includes values ​​of one or more dimensions with a mapping relationship, a server subgroup, and a selection probability.

[0016] In an exemplary embodiment, determining the target server in the target server subgroup includes: upon obtaining the scheduling information of the target dimension corresponding to the monitoring device, searching for a server corresponding to the scheduling information of the target dimension in the target server subgroup, and determining the found server as the target server, wherein the M dimensions include the target dimension.

[0017] In an exemplary embodiment, determining the target server in the target server subgroup includes one of the following: randomly selecting a server in the target server subgroup as the target server; determining a pre-designated server in the target server subgroup as the target server; determining the server with the lowest load in the target server subgroup as the target server; or selecting a server in the target server subgroup as the target server according to a predetermined selection algorithm.

[0018] According to another embodiment of the present invention, a server scheduling device is also provided, including: an acquisition module for acquiring a target message sent by a monitoring device, and acquiring scheduling information of N dimensions corresponding to the monitoring device, wherein N is a positive integer greater than or equal to 2; a determination module for determining a target server in a group of server clusters based on the scheduling information of the N dimensions, wherein the group of server clusters includes P server clusters divided according to M dimensions, each server cluster in the P server clusters corresponds to one dimension of the M dimensions, the M dimensions include the N dimensions, M is a positive integer greater than or equal to 2, and P is a positive integer greater than or equal to 2; a processing module for processing the target message through the target server.

[0019] According to yet another embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored. The computer program is configured to execute the steps of any one of the above method embodiments when run.

[0020] According to another embodiment of the present invention, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to perform the steps in any one of the above method embodiments.

[0021] Through the present invention, the target message sent by the monitoring device is obtained, and the scheduling information of N dimensions corresponding to the monitoring device is obtained, wherein N is a positive integer greater than or equal to 2; then, based on the scheduling information of the N dimensions, the target server is determined in a group of server clusters, wherein the group of server clusters includes P server clusters divided according to M dimensions, each server cluster in the P server clusters corresponds to one dimension of the M dimensions, and the M dimensions include the N dimensions, and then the target message is processed by the target server. Since the server is allocated to the device based on the scheduling information of multiple dimensions of the device, the optimal server can be allocated to the device, achieving a balance in the allocation of servers for different devices, thereby solving the problem of not being able to allocate the optimal server to the device. In addition, since a group of server clusters includes P server clusters pre-divided according to M dimensions, it has rich policy customization flexibility and strong scalability. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 This is a block diagram of the hardware structure of a mobile terminal according to the server scheduling method of an embodiment of the present invention;

[0023] Figure 2 is a flow chart of a server scheduling method according to an embodiment of the present invention;

[0024] Figure 3 is a schematic diagram of a cloud video recording and cloud image scheduling system according to an embodiment of the present invention;

[0025] Figure 4 This is a schematic diagram of a scheduling mechanism of a scheduling center according to an embodiment of the present invention;

[0026] Figure 5 is a schematic diagram of server allocation according to an embodiment of the present invention;

[0027] Figure 6 It is a structural block diagram of a server scheduling device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0028] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings and in combination with embodiments.

[0029] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0030] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 FIG is a block diagram of the hardware structure of a mobile terminal according to the server scheduling method of an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown) a processor 102 (the processor 102 may include but is not limited to a microprocessor MCU or a programmable logic device FPGA and other processing devices) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input and output device 108 for communication functions. It will be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown.

[0031] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the server scheduling method in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, implementing the above-mentioned method. The memory 104 may include a high-speed random access memory and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely located relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0032] The transmission device 106 is used to receive or send data via a network. A specific example of the aforementioned network may include a wireless network provided by the mobile terminal's communications provider. In one embodiment, the transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In another embodiment, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0033] In this embodiment, a server scheduling method is provided, including but not limited to being applied in a scheduling center of a server. Figure 2 is a flow chart of a server scheduling method according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:

[0034] Step S202: Obtain a target message sent by a monitoring device, and obtain scheduling information of N dimensions corresponding to the monitoring device, where N is a positive integer greater than or equal to 2;

[0035] As an optional example, the above dimensions include, but are not limited to, region, operator, user role, device manufacturer, business, etc. The user role is used to indicate the product corresponding to the monitoring device. For example, when the dimension value corresponding to the user role is xx application, it means that the data collected by the monitoring device is used for xx application.

[0036] As an optional example, the scheduling information of N dimensions includes a dimension value corresponding to each dimension of the N dimensions.

[0037] Step S204: determining a target server in a group of server clusters based on the scheduling information of the N dimensions, wherein the group of server clusters includes P server clusters divided according to M dimensions, each server cluster in the P server clusters corresponds to one dimension of the M dimensions, the M dimensions include the N dimensions, M is a positive integer greater than or equal to 2, and P is a positive integer greater than or equal to 2;

[0038] As an optional example, each server cluster in a group of server clusters includes one or more server sub-groups. In an exemplary embodiment, the above step S204 can be implemented by the following steps S11-S13:

[0039] Step S11: searching for server clusters corresponding to the scheduling information of the N dimensions in the P server clusters to obtain K server clusters, where K is a positive integer greater than or equal to 2 and less than or equal to P, and each server cluster in the K server clusters includes one or more server sub-groups;

[0040] It should be noted that each of the K server clusters can be understood as a first-level cluster, which is a cluster combination obtained by preliminary screening based on scheduling information in N dimensions.

[0041] That is, step S11 may be performed first to determine a plurality of first-level clusters that meet the conditions according to the scheduling information of N dimensions.

[0042] As an optional example, the above step S11 can be implemented by the following method 1:

[0043] Method 1: When the scheduling information of the N dimensions includes the values ​​of the N dimensions, search the P server clusters for the server clusters corresponding to the values ​​of each dimension in the values ​​of the N dimensions to obtain N server clusters, where K is equal to N, and each server cluster in the P server clusters corresponds to a value of one dimension in the M dimensions.

[0044] As an optional example, the values ​​of the N dimensions include at least two of the following: a first value, used to indicate the region where the monitoring device is located; a second value, used to indicate the operator of the network used by the monitoring device; a third value, used to indicate the user role to which the monitoring device belongs; a fourth value, used to indicate the device manufacturer to which the monitoring device belongs; and a fifth value, used to indicate the business to which the monitoring device belongs.

[0045] As an optional example, the values ​​of the N dimensions may also include at least two of the following: a first value, used to indicate the region where the server is located; a second value, used to indicate the operator of the network used by the server; a third value, used to indicate the user role to which the server belongs; a fourth value, used to indicate the equipment manufacturer to which the server belongs; and a fifth value, used to indicate the business to which the server belongs.

[0046] It should be noted that in the case of method 1, the scheduling information of N dimensions includes a value corresponding to each dimension of the N dimensions. For example, when the scheduling information of N dimensions is "region: location 1; user role: application 1", the server cluster with the region dimension value of "location 1" and the user role dimension value of "application 1" is searched among the P server clusters to obtain the server cluster corresponding to "location 1" and the server cluster corresponding to "application 1".

[0047] As an optional example, the above step S11 can be implemented by the following second method:

[0048] Method 2: When the scheduling information of N dimensions includes a value corresponding to each dimension in N-1 dimensions and multiple values ​​corresponding to the Nth dimension, determine K values ​​in the scheduling information, and search for a server cluster corresponding to each of the K values ​​in the P server clusters to obtain K server clusters, where K is greater than N.

[0049] It should be noted that in the case of method 2, assuming that the scheduling information of N dimensions is "region: location 1; user role: application 1, application 2", then search for server clusters with region dimension values ​​of "location 1" and user role dimension values ​​of "application 1" and "application 2" respectively in P server clusters, and obtain the server cluster corresponding to "location 1" and the server clusters corresponding to "application 1" and "application 2".

[0050] It should be noted that because the monitoring data of a monitored device can be used simultaneously in different applications, the user role dimension can have multiple values ​​at the same time. It should be noted that the same principle applies to other dimensions within the N dimensions that allow multiple non-conflicting values.

[0051] Step S12: determining a target server subgroup in the K server clusters;

[0052] As an optional example, each server cluster has one or more server subgroups. After K server clusters are preliminarily screened out based on the scheduling information of N dimensions, the target server subgroup can be determined from the multiple server subgroups included in the K server clusters based on the priority and selection probability of each server subgroup in the K server clusters.

[0053] It should be noted that a server subgroup can be understood as a secondary cluster, and multiple secondary clusters of the same dimension constitute a primary cluster of the corresponding dimension.

[0054] In an exemplary embodiment, the above step S12 can be implemented by the following steps S121-S123:

[0055] Step S121: obtaining the priority of each server subgroup in the K server clusters;

[0056] In an exemplary embodiment, step S121 can be implemented as follows: obtaining the priority of the j-th server subgroup in the i-th server cluster in the K server clusters through the following step S1, where i is a positive integer greater than or equal to 1 and less than or equal to K, j is a positive integer greater than or equal to 1, and the scheduling information of the N dimensions includes the values ​​of the N dimensions:

[0057] Step S1: In the case that the i server clusters are server clusters corresponding to the values ​​of the i-th dimension, search for the priority having a mapping relationship with the values ​​of the N dimensions and the j-th server subgroup in a preset first mapping table, and determine the found priority as the priority of the j-th server subgroup, wherein the values ​​of the N dimensions include the value of the i-th dimension, K is equal to N, and the first mapping table records multiple groups of mapping information, each group of mapping information includes the values ​​of one or more dimensions with a mapping relationship, a server subgroup, and a priority.

[0058] For better understanding, as an optional example, the first mapping table can be shown as Table 1. It should be noted that the first mapping table is a general table and does not change with the change of N value. Then, the priority corresponding to each server subgroup in the K server cluster can be determined through Table 1.

[0059] Table 1

[0060]

[0061]

[0062] In an exemplary embodiment, the above step S121 may also be implemented in the following manner: obtaining the priority of the j-th server subgroup in the K server clusters through the following step S2, where j is a positive integer greater than or equal to 1:

[0063] Step S2: Search for a priority having a mapping relationship with the j-th server subgroup in a preset third mapping table, and determine the found priority as the priority of the j-th server subgroup, where K is equal to N, and the third mapping table records multiple groups of mapping information, each group of mapping information includes a server subgroup with a mapping relationship and a priority.

[0064] As an optional example, the third mapping table may be as shown in Table 2 below, and the priority of each server subgroup included in the K server clusters may be determined by the third mapping table:

[0065] Table 2

[0066] Cluster Priority Server subgroup 3 10 Server subgroup 4 10 Server subgroup 5 20 ... ...

[0067] Step S122: when the number of the server subgroup with the highest priority in the K server clusters is 1, determining the server subgroup with the highest priority as the target server subgroup;

[0068] Step S123: When the number of server subgroups with the highest priority in the K server clusters is greater than 1, select a server subgroup from the server subgroups with the highest priority as the target server subgroup.

[0069] That is, if there is a server subgroup with the highest priority among the multiple server subgroups included in the K server clusters, then this server subgroup with the highest priority is determined as the target server subgroup. If there are multiple server subgroups with the highest priority among the multiple server subgroups included in the K server clusters, then a target server subgroup needs to be determined from the multiple server subgroups with the highest priority. Alternatively, a target server subgroup can be determined from the multiple server subgroups with the highest priority based on the corresponding selection probabilities of the server subgroups.

[0070] As an optional example, the above-mentioned selection of a server subgroup as the target server subgroup from the server subgroup with the highest priority may be performed through the following steps S21-S22:

[0071] Step S21: When the server subgroups with the highest priority are Q server subgroups, and Q is a positive integer greater than or equal to 2, obtaining the selection probability corresponding to each server subgroup in the Q server subgroups to obtain Q selection probabilities;

[0072] In an exemplary embodiment, obtaining the selection probability corresponding to each server subgroup in the Q server subgroups to obtain the Q selection probabilities can be achieved as follows: obtaining the selection probability corresponding to the j-th server subgroup in the Q server subgroups through the following step S3, where j is a positive integer greater than or equal to 1 and less than or equal to Q, and the scheduling information of the N dimensions includes the values ​​of the N dimensions:

[0073] Step S3: When the server cluster where the j-th server subgroup is located is the server cluster corresponding to the value of the i-th dimension, search the preset second mapping table for the selection probability that has a mapping relationship with the values ​​of the N dimensions and the j-th server subgroup, and determine the searched selection probability as the selection probability corresponding to the j-th server subgroup, wherein the values ​​of the N dimensions include the value of the i-th dimension, i is a positive integer greater than or equal to 1 and less than or equal to K, K is equal to N, and the second mapping table records multiple groups of mapping information, each group of mapping information includes the values ​​of one or more dimensions with a mapping relationship, a server subgroup, and a selection probability.

[0074] As an optional example, the second mapping table can be as shown in Table 3 below. It should be noted that the second mapping table is also a general table and does not change with the change of N value. Therefore, the selection probability corresponding to each server subgroup in the Q server subgroups can be determined through the second mapping table.

[0075] Table 3

[0076]

[0077]

[0078] As an optional example, assuming that the scheduling information of the N dimensions of the monitoring device is "region: region 1; operator: operator A", and the server subgroups determined are server subgroup 3 and server subgroup 4, then if the priorities of server subgroup 3 and server subgroup 4 are the same, the selection probability of server subgroup 3 and server subgroup 4 can be determined by Table 3.

[0079] Step S22: According to the Q selection probabilities, a server subgroup is selected from the Q server subgroups as the target server subgroup.

[0080] As in the above example, the monitoring device has a 20% probability of being assigned to server subgroup 3 and an 80% probability of being assigned to server subgroup 4.

[0081] Step S13: Determine the target server in the target server subgroup.

[0082] In an exemplary embodiment, the above step S13 can be implemented in the following manner: when the scheduling information of the target dimension corresponding to the monitoring device is obtained, the server corresponding to the scheduling information of the target dimension is searched in the target server subgroup, and the found server is determined as the target server, wherein the M dimensions include the target dimension.

[0083] As an optional example, the target dimension is different from the above N dimensions, and the above target dimensions include but are not limited to: region, operator, user role, equipment manufacturer, business, etc.

[0084] In an exemplary embodiment, the above-mentioned step S13 can also be implemented by one of the following: randomly selecting a server in the target server subgroup as the target server; determining a pre-designated server in the target server subgroup as the target server; determining the server with the lowest load in the target server subgroup as the target server; selecting a server in the target server subgroup as the target server according to a predetermined selection algorithm.

[0085] As an optional example, the above selection algorithm includes but is not limited to: a consistent hash algorithm.

[0086] As an optional example, the strategy for determining the target server from different server subgroups may be as shown in Table 4 below:

[0087] Table 4

[0088]

[0089] As an optional example, assuming that the target server subgroup is server subgroup 1 and the operator to which the device belongs is operator B, the server of operator B in server subgroup 1 is determined as the target server.

[0090] As an optional example, assuming that the target server subgroup is server subgroup 2, a server is randomly selected from all servers in server subgroup 2 for scheduling as the target server.

[0091] As an optional example, assuming that the target server subgroup is server subgroup 3, a server with the lowest load weight is selected from server subgroup 3 as the target server.

[0092] As an optional example, assuming that the target server subgroup is server subgroup 13, the composite strategy of the above-mentioned similar operators and the above-mentioned load weights is used in combination, that is: if the operator to which the device belongs is operator B, then the server with the lowest load weight in the server set of operator B will be finally used as the target server.

[0093] Step S206: Process the target message through the target server.

[0094] As an optional example, the dispatch center may send the address of the target server to the monitoring device, and then the monitoring device reports the video monitoring data and the captured image data to the target server according to the address of the target server.

[0095] Through the above steps, the target message sent by the monitoring device is obtained, and the scheduling information of N dimensions corresponding to the monitoring device is obtained, wherein N is a positive integer greater than or equal to 2; then, based on the scheduling information of the N dimensions, the target server is determined in a group of server clusters, wherein a group of server clusters includes P server clusters divided according to M dimensions, each server cluster in the P server clusters corresponds to one dimension of the M dimensions, and the M dimensions include the N dimensions, and then the target message is processed by the target server. Since the server is allocated to the device based on the scheduling information of multiple dimensions of the device, the optimal server can be allocated to the device, achieving a balance in the allocation of servers for different devices, thereby solving the problem of not being able to allocate the optimal server to the device. In addition, since a group of server clusters includes P server clusters pre-divided according to M dimensions, it has rich policy customization flexibility and strong scalability.

[0096] Obviously, the embodiments described above are only part of the embodiments of the present invention, rather than all the embodiments. In order to better understand the above method, the above process is described below in conjunction with the embodiments, but it is not intended to limit the technical solutions of the embodiments of the present invention. Specifically:

[0097] In an exemplary embodiment, a cloud video and cloud picture scheduling system is provided, specifically Figure 3 As shown, the core of the scheduling system lies in:

[0098] 1. Dispatch Center: Allocate the service IP address of the cloud recording or cloud image server to the device based on multiple factors such as the preset ratio of each cluster, the location of the device, the network operator to which the device belongs, the binding relationship between the device and the user, the manufacturer to which the device belongs, and the device serial number. At the same time, it minimizes network latency, increases the speed and success rate of device data upload, enriches the business customizable strategies, and flexibly supports load balancing such as proportional allocation among multiple clusters.

[0099] 2. Regional clusters, operator clusters, user clusters, and manufacturer clusters: Based on the single or multiple factors listed above, the server cluster is physically or logically divided to carry the business traffic allocated by the dispatching center and form several nodes in the edge cluster.

[0100] 3. Cloud video and cloud image server: responsible for receiving video surveillance data and surveillance snapshot image data reported by the front-end device side, and dumping them to the corresponding cloud storage data center.

[0101] 4. Front-end monitoring equipment: Reports video surveillance data and captured image data according to the server address returned by the dispatch center.

[0102] 5. Terminal: Receive real-time prompt messages pushed by the cloud server to the client, and view cloud video and image data based on the message information.

[0103] As an optional example, Figure 4 The diagram of the dispatching mechanism of the dispatching center is shown, specifically:

[0104] Step 1: Based on the multi-dimensional matching conditions, determine the first-level clusters that meet the conditions in real time:

[0105] a) Assign the nearest first-level cluster based on the location of the monitoring equipment (including but not limited to cameras);

[0106] b) Based on the Internet Service Provider (ISP) to which the monitoring equipment's IP network belongs, assign a first-level cluster based on the same operator;

[0107] c) Assign the corresponding first-level cluster according to the user role to which the monitoring device belongs;

[0108] d) According to the manufacturer of the equipment, the corresponding first-level cluster is assigned according to the manufacturer;

[0109] e) According to the business to which the equipment belongs, the corresponding first-level cluster is allocated according to the special business.

[0110] Step 2: Calculate the weights based on the priorities and allocation ratios of the first-level clusters and match them to the second-level clusters that meet the requirements:

[0111] a) From the first-level clusters, a temporary second-level cluster group with a high priority is obtained according to the priority weight calculation.

[0112] b) From the temporary secondary cluster group, a specific secondary cluster is calculated based on the allocation ratio.

[0113] Step 3: Determine the qualified servers based on the internal policy preset by the secondary cluster. It should be noted that the internal policy is one of the following:

[0114] a) Randomly assign servers from the secondary cluster according to a random algorithm;

[0115] b) According to the default configuration, a fixed server is allocated from the secondary cluster;

[0116] c) Allocate the corresponding operator's server from the secondary cluster based on the device operator;

[0117] d) Allocate servers with lower load from the secondary cluster based on real-time load calculation;

[0118] e) Allocate servers from the secondary cluster based on the consistent hashing algorithm;

[0119] f) Allocate servers from the secondary cluster according to other customizable algorithms;

[0120] Step 4: Based on the above scheduling results, obtain the server address and send it to the device.

[0121] As an optional example, to better understand the design method of this system, the following example is given:

[0122] 1. Cluster Description

[0123] 1. Level 1 cluster: This is a cluster combination obtained by preliminary screening based on matching conditions in multiple dimensions. There can be multiple clusters.

[0124] 2. Secondary cluster: There is only one secondary cluster calculated from the primary cluster based on the cluster priority and allocation ratio.

[0125] 3. Cluster hierarchical relationship: For example, the cluster relationship is as follows:

[0126] 1) Level 1 cluster 1 is a regional cluster, with two level 2 clusters:

[0127] a) Secondary cluster 1: a cluster of a specific geographical location, Region 1; b) Secondary cluster 2: a cluster of a specific geographical location, Region 1;

[0128] c) When matching, the device in region 1 will be matched with both secondary clusters 1 and 2.

[0129] d) Traffic is distributed based on the priorities and ratios of secondary cluster 1 and secondary cluster 2, ultimately resulting in a secondary cluster.

[0130] 2) Level 1 cluster 2 is a region + user cluster, with two level 2 clusters:

[0131] a) Secondary cluster 3: clusters of specific geographical locations, region 2;

[0132] b) Secondary cluster 4: cluster of a specific user category, user A;

[0133] c) When matching, devices in region 2 will be matched with secondary cluster 3; when matching, user A's device will be matched with secondary cluster 4. If both the region 2 and user A conditions are met, both secondary clusters 3 and 4 will be matched.

[0134] d) If multiple secondary clusters are matched, the higher-priority secondary cluster is selected based on priority. If the priorities are consistent, traffic is distributed based on the ratio of secondary cluster 3 to secondary cluster 4, ultimately resulting in a single secondary cluster.

[0135] Figure 5 A server allocation diagram is shown. Specifically, Figure 5 On the left: The primary cluster is filtered by region only. After a secondary cluster is determined, select a server corresponding to the carrier in that secondary cluster. Figure 5 On the right: The first-level cluster's filtering criteria are region + user. After determining a second-level cluster, select a server corresponding to the operator in the second-level cluster.

[0136] 2. Example of Cluster Priority Description

[0137] As shown in Table 1 above, assume that the monitoring device meets multiple matching conditions simultaneously: the device belongs to "Region 2" and belongs to "Carrier A", and as shown in Table 1, the cluster priorities corresponding to the region and carrier dimensions are equal to 10, then server subgroup 3 and server subgroup 4 are both included in the candidate set and are ultimately allocated proportionally.

[0138] Assume that the monitoring device meets multiple matching conditions at the same time: the region to which the device belongs is "Region 2", the operator to which it belongs is "Operator B", and the priority of server subgroup 5 corresponding to operator B (20) is greater than the priority of server subgroup 3 corresponding to region 2 (10), then it will be matched according to the cluster corresponding to operator B, and will eventually be assigned to server subgroup 5.

[0139] 3. Example of cluster ratio description

[0140] As an optional example, as shown in Table 3 above, assuming that the region to which the device belongs is "Region 1", 50% is allocated to "Server Subgroup 1" and 50% is allocated to "Server Subgroup 2"; assuming that the region to which the device belongs is "Region 2", 100% is allocated to "Server Subgroup 3", assuming that the operator to which the device belongs is "Operator A", 100% is allocated to "Server Subgroup 4", and assuming that the device meets multiple matching conditions at the same time, that is: the region to which the device belongs is "Region 2", the operator to which it belongs is "Operator A", and the priorities of the two dimensions of region and operator are the same, then 20% is allocated to "Server Subgroup 3" and 80% is allocated to "Server Subgroup 4".

[0141] 4. Example of Cluster Internal Policy Description

[0142] Assuming that the secondary cluster has been assigned to server subgroup 1 and the operator to which the device belongs is operator B, it will eventually be scheduled to the server of operator B. Assuming that the secondary cluster has been assigned to server subgroup 2, a server will be randomly selected from all servers for scheduling. Assuming that the secondary cluster has been assigned to server subgroup 3, the server with the lowest load weight will be selected for scheduling. Assuming that the secondary cluster has been assigned to server subgroup 13, the composite strategy of the above-mentioned similar operators and the above-mentioned load weights will be used in combination, that is: if the operator to which the device belongs is operator B, it will eventually be scheduled to the server with the lowest load weight in the server set of operator B.

[0143] As an optional example, assume the following prerequisites: 1) Device 1 belongs to Region 1; 2) Device 1's network operator is Operator B; 3) Level 1 Cluster 1 belongs to Region 1; 4) Level 1 Cluster 1 contains two secondary clusters, Level 1 and Level 2, which have the same priority; 5) Level 1 Cluster 1 has an allocation ratio of 85%, and Level 2 Cluster 2 has an allocation ratio of 15%; 6) Level 1 Cluster 1's internal policy is the operator matching policy, and Level 2 Cluster 2's internal policy is the random matching policy.

[0144] Then there are the following steps:

[0145] Step 1: Match device 1 to the nearest first-level cluster 1 based on region 1.

[0146] Step 2: Compare the priorities of the two secondary clusters in the primary cluster 1 and select the cluster with higher priority. If the priorities are the same, proceed to the next step of proportional screening.

[0147] Step 3: Assign the data to one of the secondary clusters based on the ratio of the two secondary clusters in primary cluster 1. That is, there is an 85% probability of assigning the data to secondary cluster 1 and a 15% probability of assigning the data to secondary cluster 2. Assume that the result of this calculation is secondary cluster 1.

[0148] Step 4: Perform internal allocation within the secondary cluster, based on the operator matching policy for secondary cluster 1. The final result is: a server with operator B attributes in secondary cluster 1 is allocated, assuming it is server B-1.

[0149] Step 5: After the scheduling is completed, the address of server B-1 is obtained and provided to device 1 for the next business processing.

[0150] It should be noted that the present application implements a scheduling method and system for video surveillance recording and image servers. The system scheduling center does not simply rely on the server's own CPU, memory, network bandwidth and other operation and maintenance-level indicators, but can allocate corresponding edge cluster servers in a variety of ways, including the proximity strategy of the geographical area where the equipment is located, the network operator strategy to which the equipment belongs, the user group category, the equipment manufacturer, the server load, the business attributes, and the custom logic division rules. It can also flexibly preset the priority, allocation ratio, and cluster internal strategy for the edge cluster, thereby reducing the device network latency, increasing the rate and success rate of data upload by the device, enriching the flexibility of business policy customization and strong scalability, and realizing real-time load balancing of multiple cloud recording or cloud image edge cluster services, ultimately greatly optimizing the user experience, reducing service costs, and improving system scalability.

[0151] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present invention.

[0152] In this embodiment, a server scheduling device is also provided, which is used to implement the above-mentioned embodiments and preferred embodiments. The details that have been described will not be repeated here. As used below, the term "module" can refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.

[0153] Figure 6 is a structural block diagram of a server scheduling device according to an embodiment of the present invention. Figure 6 As shown, the device includes:

[0154] An acquisition module 602 is configured to acquire a target message sent by a monitoring device and acquire scheduling information of N dimensions corresponding to the monitoring device, where N is a positive integer greater than or equal to 2;

[0155] a determination module 604, configured to determine a target server in a group of server clusters based on the scheduling information of the N dimensions, wherein the group of server clusters includes P server clusters divided according to M dimensions, each server cluster in the P server clusters corresponds to one dimension of the M dimensions, the M dimensions include the N dimensions, M is a positive integer greater than or equal to 2, and P is a positive integer greater than or equal to 2;

[0156] The processing module 608 is configured to process the target message through the target server.

[0157] Through the above-mentioned device, the target message sent by the monitoring device is obtained, and the scheduling information of N dimensions corresponding to the monitoring device is obtained, wherein N is a positive integer greater than or equal to 2; then, based on the scheduling information of the N dimensions, the target server is determined in a group of server clusters, wherein the group of server clusters includes P server clusters divided according to M dimensions, each server cluster in the P server clusters corresponds to one dimension of the M dimensions, and the M dimensions include the N dimensions, and then the target message is processed by the target server. Since the server is allocated to the device based on the scheduling information of multiple dimensions of the device, the optimal server can be allocated to the device, achieving a balance in the allocation of servers for different devices, thereby solving the problem of not being able to allocate the optimal server to the device. In addition, since a group of server clusters includes P server clusters pre-divided according to M dimensions, it has rich policy customization flexibility and strong scalability.

[0158] In an exemplary embodiment, the determination module 604 is further used to search for a server cluster corresponding to the scheduling information of the N dimensions in the P server clusters to obtain K server clusters, where K is a positive integer greater than or equal to 2 and less than or equal to P, and each server cluster in the K server clusters includes one or more server subgroups; determine a target server subgroup in the K server clusters; and determine the target server in the target server subgroup.

[0159] In an exemplary embodiment, the determination module 604 is further used to search for a server cluster corresponding to the value of each dimension in the values ​​of the N dimensions in the P server clusters when the scheduling information of the N dimensions includes the values ​​of the N dimensions, so as to obtain N server clusters, where K is equal to N, and each server cluster in the P server clusters corresponds to a value of one dimension in the M dimensions.

[0160] In an exemplary embodiment, the values ​​of the N dimensions include at least two of the following: a first value, used to indicate the region where the monitoring device is located; a second value, used to indicate the operator of the network used by the monitoring device; a third value, used to indicate the user role to which the monitoring device belongs; a fourth value, used to indicate the device manufacturer to which the monitoring device belongs; and a fifth value, used to indicate the business to which the monitoring device belongs.

[0161] In an exemplary embodiment, the determination module 604 is also used to determine the target server subgroup in the K server clusters in the following manner: obtaining the priority of each server subgroup in the K server clusters; when the number of server subgroups with the highest priority in the K server clusters is 1, determining the server subgroup with the highest priority as the target server subgroup; when the number of server subgroups with the highest priority in the K server clusters is greater than 1, selecting a server subgroup from the server subgroup with the highest priority as the target server subgroup.

[0162] In an exemplary embodiment, the determination module 604 is further used to obtain the priority of each server subgroup in the K server clusters in the following manner: obtain the priority of the jth server subgroup in the ith server cluster in the K server clusters through the following steps, wherein i is a positive integer greater than or equal to 1 and less than or equal to K, j is a positive integer greater than or equal to 1, and the scheduling information of the N dimensions includes the values ​​of the N dimensions: when the i server cluster is a server cluster corresponding to the value of the ith dimension, search for the priority with a mapping relationship with the values ​​of the N dimensions and the jth server subgroup in a preset first mapping table, and determine the found priority as the priority of the jth server subgroup, wherein the values ​​of the N dimensions include the value of the ith dimension, K is equal to N, and the first mapping table records multiple groups of mapping information, each group of mapping information includes the values ​​of one or more dimensions with a mapping relationship, a server subgroup, and a priority.

[0163] In an exemplary embodiment, the determination module 604 is also used to obtain the selection probability corresponding to each server subgroup in the Q server subgroups when the server subgroup with the highest priority is Q server subgroups and Q is a positive integer greater than or equal to 2, so as to obtain Q selection probabilities; and according to the Q selection probabilities, select a server subgroup in the Q server subgroups as the target server subgroup.

[0164] In an exemplary embodiment, the determination module 604 is further configured to obtain the selection probability corresponding to each server subgroup in the Q server subgroups in the following manner to obtain Q selection probabilities: obtaining the selection probability corresponding to the j-th server subgroup in the Q server subgroups by the following steps, wherein j is a positive integer greater than or equal to 1 and less than or equal to Q, and the scheduling information of the N dimensions includes the values ​​of the N dimensions: when the server cluster where the j-th server subgroup is located is a server cluster corresponding to the value of the i-th dimension, searching a preset second mapping table for a selection probability having a mapping relationship with the values ​​of the N dimensions and the j-th server subgroup, and determining the found selection probability as the selection probability corresponding to the j-th server subgroup, wherein the values ​​of the N dimensions include the value of the i-th dimension, i is a positive integer greater than or equal to 1 and less than or equal to K, K is equal to N, and the second mapping table records multiple sets of mapping information, each set of mapping information includes values ​​of one or more dimensions having a mapping relationship, a server subgroup, and a selection probability.

[0165] In an exemplary embodiment, the determination module 604 is also used to determine the target server in the target server subgroup in the following manner: when the scheduling information of the target dimension corresponding to the monitoring device is obtained, the server corresponding to the scheduling information of the target dimension is searched in the target server subgroup, and the found server is determined as the target server, wherein the M dimensions include the target dimension.

[0166] In an exemplary embodiment, the determination module 604 is further used to determine the target server in the target server subgroup in one of the following ways: randomly selecting a server in the target server subgroup as the target server; determining a pre-designated server in the target server subgroup as the target server; determining the server with the lowest load in the target server subgroup as the target server; or selecting a server in the target server subgroup as the target server according to a predetermined selection algorithm.

[0167] It should be noted that the above modules can be implemented through software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.

[0168] An embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps of any one of the above method embodiments when running.

[0169] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.

[0170] An embodiment of the present invention further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0171] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0172] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail here.

[0173] Obviously, those skilled in the art will appreciate that the various modules or steps of the present invention described above can be implemented using a general-purpose computing device, can be centralized on a single computing device, or can be distributed across a network of multiple computing devices. They can be implemented using program code executable by the computing device, and thus, can be stored in a storage device and executed by the computing device. In some cases, the steps shown or described herein can be performed in a different order than that shown, or can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.

[0174] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the principles of the present invention are intended to be within the scope of protection of the present invention.

Claims

1. A server scheduling method, characterized in that: include: Obtain a target message sent by a monitoring device, and obtain scheduling information of N dimensions corresponding to the monitoring device, where N is a positive integer greater than or equal to 2; Determining a target server in a group of server clusters according to the scheduling information of the N dimensions, wherein the group of server clusters includes P server clusters divided according to M dimensions, each server cluster in the P server clusters corresponds to one dimension of the M dimensions, the M dimensions include the N dimensions, M is a positive integer greater than or equal to 2, and P is a positive integer greater than or equal to 2; Processing the target message through the target server; The step of determining a target server in a group of server clusters based on the scheduling information in the N dimensions includes: searching for a server cluster corresponding to the scheduling information in the N dimensions in the P server clusters to obtain K server clusters, where K is a positive integer greater than or equal to 2 and less than or equal to P, and each server cluster in the K server clusters includes one or more server subgroups; determining a target server subgroup in the K server clusters; and determining the target server in the target server subgroup. Wherein, determining the target server subgroup in the K server clusters includes: obtaining the priority of each server subgroup in the K server clusters; when the number of server subgroups with the highest priority in the K server clusters is 1, determining the server subgroup with the highest priority as the target server subgroup; when the number of server subgroups with the highest priority in the K server clusters is greater than 1, selecting a server subgroup from the server subgroups with the highest priority as the target server subgroup.

2. The method according to claim 1, characterized in that The step of searching the P server clusters for the scheduling information corresponding to the N dimensions to obtain K server clusters includes: In the case where the scheduling information of the N dimensions includes the values ​​of the N dimensions, a server cluster corresponding to the value of each dimension among the values ​​of the N dimensions is searched in the P server clusters to obtain N server clusters, where K is equal to N, and each server cluster in the P server clusters corresponds to a value of one dimension among the M dimensions.

3. The method according to claim 2, characterized in that The values ​​of the N dimensions include at least two of the following: The first value is used to represent the region where the monitoring device is located; The second value is used to represent the operator of the network used by the monitoring device; The third value is used to indicate the user role to which the monitoring device belongs; The fourth value is used to indicate the device manufacturer to which the monitoring device belongs; The fifth value is used to indicate the business to which the monitoring device belongs.

4. The method according to claim 1, wherein The obtaining of the priority of each server subgroup in the K server clusters includes: The priority of the j-th server subgroup in the i-th server cluster in the K server clusters is obtained by the following steps, where i is a positive integer greater than or equal to 1 and less than or equal to K, j is a positive integer greater than or equal to 1, and the scheduling information of the N dimensions includes the values ​​of the N dimensions: In the case that the i server clusters are server clusters corresponding to the values ​​of the i-th dimension, a priority having a mapping relationship with the values ​​of the N dimensions and the j-th server subgroup is searched in a preset first mapping table, and the found priority is determined as the priority of the j-th server subgroup, wherein the values ​​of the N dimensions include the value of the i-th dimension, K is equal to N, and the first mapping table records multiple groups of mapping information, each group of mapping information includes the values ​​of one or more dimensions with a mapping relationship, a server subgroup, and a priority.

5. The method according to claim 1, wherein The selecting a server subgroup from the server subgroup with the highest priority as the target server subgroup includes: When the server subgroups with the highest priority are Q server subgroups, and Q is a positive integer greater than or equal to 2, obtaining a selection probability corresponding to each server subgroup in the Q server subgroups to obtain Q selection probabilities; According to the Q selection probabilities, a server subgroup is selected from the Q server subgroups as the target server subgroup.

6. The method according to claim 5, characterized in that The obtaining of the selection probability corresponding to each server subgroup in the Q server subgroups to obtain the Q selection probabilities includes: The selection probability corresponding to the j-th server subgroup in the Q server subgroups is obtained by the following steps, where j is a positive integer greater than or equal to 1 and less than or equal to Q, and the scheduling information of the N dimensions includes the values ​​of the N dimensions: In the case that the server cluster where the j-th server subgroup is located is the server cluster corresponding to the value of the i-th dimension, the selection probability having a mapping relationship with the values ​​of the N dimensions and the j-th server subgroup is searched in the preset second mapping table, and the selection probability found is determined as the selection probability corresponding to the j-th server subgroup, wherein the values ​​of the N dimensions include the value of the i-th dimension, i is a positive integer greater than or equal to 1 and less than or equal to K, K is equal to N, and the second mapping table records multiple groups of mapping information, each group of mapping information includes the values ​​of one or more dimensions with a mapping relationship, a server subgroup, and a selection probability.

7. The method according to any one of claims 1 to 6, characterized in that The determining the target server in the target server subgroup includes: When the scheduling information of the target dimension corresponding to the monitoring device is obtained, a server corresponding to the scheduling information of the target dimension is searched in the target server subgroup, and the found server is determined as the target server, wherein the M dimensions include the target dimension.

8. The method according to any one of claims 1 to 6, characterized in that Determining the target server in the target server subgroup includes one of the following: Randomly selecting a server in the target server subgroup as the target server; determining a pre-specified server in the target server subgroup as the target server; Determine the server with the lowest load in the target server subgroup as the target server; A server is selected from the target server subgroup as the target server according to a predetermined selection algorithm.

9. A server scheduling device, characterized in that: include: An acquisition module, configured to acquire a target message sent by a monitoring device and acquire scheduling information of N dimensions corresponding to the monitoring device, where N is a positive integer greater than or equal to 2; a determination module, configured to determine a target server in a group of server clusters based on the scheduling information of the N dimensions, wherein the group of server clusters includes P server clusters divided according to M dimensions, each server cluster in the P server clusters corresponds to one dimension of the M dimensions, the M dimensions include the N dimensions, M is a positive integer greater than or equal to 2, and P is a positive integer greater than or equal to 2; A processing module, configured to process the target message through the target server; The determining module is further configured to search the P server clusters for the server cluster corresponding to the scheduling information of the N dimensions to obtain K server clusters, where K is a positive integer greater than or equal to 2 and less than or equal to P, and each server cluster in the K server clusters includes one or more server subgroups; determine a target server subgroup in the K server clusters; and determine the target server in the target server subgroup. Among them, the determination module is also used to determine the target server subgroup in the K server clusters in the following manner: obtain the priority of each server subgroup in the K server clusters; when the number of server subgroups with the highest priority in the K server clusters is 1, determine the server subgroup with the highest priority as the target server subgroup; when the number of server subgroups with the highest priority in the K server clusters is greater than 1, select a server subgroup from the server subgroups with the highest priority as the target server subgroup.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method according to any one of claims 1 to 8 when executed by a processor.

11. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • Routing method and apparatus

    CN107295033A