[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

WO2019141247A1 - 负载均衡方法、装置及计算机可读存储介质 - Google Patents

负载均衡方法、装置及计算机可读存储介质 Download PDF

Info

Publication number
WO2019141247A1
WO2019141247A1 PCT/CN2019/072376 CN2019072376W WO2019141247A1 WO 2019141247 A1 WO2019141247 A1 WO 2019141247A1 CN 2019072376 W CN2019072376 W CN 2019072376W WO 2019141247 A1 WO2019141247 A1 WO 2019141247A1
Authority
WO
WIPO (PCT)
Prior art keywords
storage nodes
recording
storage
performance
node
Prior art date
Application number
PCT/CN2019/072376
Other languages
English (en)
French (fr)
Inventor
陈广
龙映雪
付磊磊
Original Assignee
杭州海康威视系统技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 杭州海康威视系统技术有限公司 filed Critical 杭州海康威视系统技术有限公司
Publication of WO2019141247A1 publication Critical patent/WO2019141247A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/231Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/231Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion
    • H04N21/23103Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion using load balancing strategies, e.g. by placing or distributing content on different disks, different memories or different servers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/24Monitoring of processes or resources, e.g. monitoring of server load, available bandwidth, upstream requests
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/24Monitoring of processes or resources, e.g. monitoring of server load, available bandwidth, upstream requests
    • H04N21/2404Monitoring of server processing errors or hardware failure
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/24Monitoring of processes or resources, e.g. monitoring of server load, available bandwidth, upstream requests
    • H04N21/2405Monitoring of the internal components or processes of the server, e.g. server load
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/76Television signal recording
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast

Definitions

  • the present application relates to the field of data storage, and in particular, to a load balancing method, apparatus, and computer readable storage medium.
  • a video surveillance system usually includes a plurality of camera devices and a plurality of storage nodes, and one storage node may correspond to at least one camera device for storing a video stream recorded by the at least one camera device.
  • one storage node may correspond to at least one camera device for storing a video stream recorded by the at least one camera device.
  • the data volume of the video stream stored by the storage node is large, which may burden the operation of the storage node. Therefore, other storage nodes are required to share some video streams, that is, load balancing needs to be performed between the multiple storage nodes.
  • the video monitoring system may further include a management node.
  • the management node may determine the usage rate of each of the plurality of storage nodes, and store the video stream recorded by the camera through the storage node with the lowest usage rate. To achieve load balancing.
  • the video stream recorded by the camera device is stored by the storage node with the lowest usage rate, although the usage rate of the storage node is the lowest, when the hardware performance of the storage node is poor, the video stream is continuously stored through the storage node. This will cause the storage node to run too heavy, resulting in poor load balancing.
  • the embodiment of the present invention provides a load balancing method, device, and computer readable storage medium, which can solve the problem that the load balancing implementation effect is poor in the prior art.
  • the technical solution is as follows:
  • a load balancing method for a management node in a video surveillance system, the method comprising:
  • Determining a current performance score of the plurality of storage nodes in the video surveillance system where the performance score is determined based on a score of each performance indicator of the storage node, and is used to describe a capability of the storage node to currently run the resource;
  • the number of allocations of the recording plan allocated to each storage node is determined based on the number of the plurality of recording plans to be delivered and the performance scores of the plurality of storage nodes, including:
  • the allocating the multiple recording plans to the multiple storage nodes according to the determined number of allocations includes:
  • the allocating the multiple recording plans to the multiple storage nodes includes:
  • the method before determining the number of allocations of the recording plan allocated to each storage node, based on the number of the plurality of recording plans to be delivered and the performance scores of the plurality of storage nodes, the method further includes:
  • the plurality of recording plans carried in the received and unprocessed recording plan delivery request are determined as a plurality of recording plans to be delivered.
  • the method further includes:
  • the recording plan carried in the received and unprocessed recording plan deletion request is deleted from the corresponding storage node.
  • the method before determining the number of allocations of the recording plan allocated to each storage node, based on the number of the plurality of recording plans to be delivered and the performance scores of the plurality of storage nodes, the method further includes:
  • the method further includes:
  • the determining, according to the total number of executions of the multiple storage nodes and the performance scores of the multiple storage nodes, determining a load status of each of the plurality of storage nodes including:
  • the real number of the recording plan currently being executed by the storage node in the unbalanced state is re-allocated, including:
  • the number of overloaded means that the actual number of recording plans currently being executed by any one of the storage nodes is more than the theoretical number of recording plans currently being executed by any one of the storage nodes, and the number of the overloaded The number refers to the actual number of recording plans currently being executed by any one of the storage nodes is less than the theoretical number of recording plans currently being executed by any one of the storage nodes;
  • a recording plan in which the number of the unloaded numbers is allocated to any of the storage nodes is allocated.
  • the determining a current performance score of the multiple storage nodes in the video monitoring system includes:
  • the scores of the plurality of performance indicators of the storage node are higher than the preset scores, the scores of the multiple performance indicators are added to obtain the current performance score of the any storage node;
  • the method before the determining the total number of executions of the recording plan currently being executed in the plurality of storage nodes, the method further includes:
  • the step of determining the total number of executions of the recording plan currently being executed among the plurality of storage nodes is performed every second preset duration.
  • a load balancing apparatus for use in a management node in a video surveillance system, the apparatus comprising:
  • a first determining module configured to determine a current performance score of the multiple storage nodes in the video surveillance system, where the performance score is determined based on a score of each performance indicator of the storage node, and is used to describe a current running resource of the storage node.
  • a second determining module configured to determine, according to the number of the plurality of recording plans to be delivered and the performance scores of the plurality of storage nodes, the number of allocations of the recording plan allocated to each storage node, where the recording plan is used Describe time information of the video stream recorded by the camera device;
  • a first allocation module configured to allocate the plurality of recording plans to the plurality of storage nodes according to the determined number of allocations.
  • the second determining module includes:
  • a first calculation sub-module configured to divide a performance score of each storage node by a performance total score of the multiple storage nodes, to obtain a score weight of each storage node, where the total performance score is the plurality of The sum of the performance scores of the storage nodes;
  • the second calculation submodule is configured to multiply the number of the plurality of recording plans by the scoring weights of the storage nodes to obtain the number of allocations of the recording plans allocated to the storage nodes.
  • the first allocation module includes:
  • a first obtaining submodule configured to acquire a priority of the multiple recording plans
  • a first allocation submodule configured to allocate the plurality of recording plans to the plurality of storage nodes according to a priority order of the plurality of recording plans and a determined number of allocations.
  • the first allocation module includes:
  • a second obtaining submodule configured to acquire, for any one of the plurality of recording plans, a historical execution trajectory of the any recording plan, where the historical execution trajectory is used to describe that any of the recording plan history is Execution storage node and detailed information of execution;
  • a first determining submodule configured to determine, from the plurality of storage nodes, a storage node that fails to execute the any recording plan based on the historical execution trajectory;
  • a second allocation submodule configured to allocate the any recording plan to the non-failed storage node.
  • the device further includes:
  • a third determining module configured to determine, by the at least one storage node of the plurality of storage nodes that the operation fault has occurred, a plurality of recording plans that are currently being executed and not executed, as a plurality of recording plans to be delivered; and/or,
  • a fourth determining module configured to determine, by the plurality of recording plans to be delivered, the plurality of recording plans carried in the received and unprocessed recording plan delivery request.
  • the device further includes:
  • the deletion module is configured to delete the recording plan carried in the received and unprocessed recording plan deletion request from the corresponding storage node.
  • the device further includes:
  • a first triggering module configured to trigger the first determining module to be based on the number of the plurality of recording plans to be delivered and the plurality of the plurality of storage nodes The performance score of the storage node, determining the number of allocations of the recording plan assigned to each storage node; or,
  • the second triggering module is configured to trigger the second determining module to determine, according to the number of the plurality of recording plans to be delivered and the performance scores of the multiple storage nodes, to allocate to each storage The number of allocations for the node's recording plan.
  • the device further includes:
  • a fifth determining module configured to determine a total number of executions of the recording plan currently being executed among the plurality of storage nodes
  • a sixth determining module configured to determine a load status of each of the plurality of storage nodes based on a total number of executions of the plurality of storage nodes and a performance score of the plurality of storage nodes;
  • a second allocation module configured to re-allocate the actual number of recording plans currently being executed by the storage node in the unbalanced state when there is a storage node whose load status is an unbalanced state among the plurality of storage nodes .
  • the sixth determining module includes:
  • a third calculation sub-module configured to divide a performance score of each storage node by a performance total score of the plurality of storage nodes, to obtain a score weight of each storage node, where the total performance score is the plurality of The sum of the performance scores of the storage nodes;
  • a fourth calculation sub-module configured to multiply a total number of executions of the plurality of storage nodes by a score weight of each storage node, to obtain a theoretical number of recording plans currently being executed by each storage node;
  • a second determining submodule configured to determine, when the actual number of recording plans currently being executed in the plurality of storage nodes is different from the theoretical number of storage nodes, determining that the plurality of storage nodes have a load The storage node whose state is the unbalanced state.
  • the second allocation module includes:
  • a third determining submodule configured to determine, for any one of the storage nodes in the unbalanced state, an overloaded or unloaded number corresponding to the storage node;
  • the number of overloaded means that the actual number of recording plans currently being executed by any one of the storage nodes is more than the theoretical number of recording plans currently being executed by any one of the storage nodes, and the number of the overloaded The number refers to the actual number of recording plans currently being executed by any one of the storage nodes is less than the theoretical number of recording plans currently being executed by any one of the storage nodes;
  • a mobile submodule configured to remove, from the recording plan currently being executed by the storage node, a recording plan whose number is the number of overloads, or another storage node based on the storage node in the unbalanced state
  • the recording plan that is moved out is allocated to any of the storage nodes by a recording plan having the number of the unloaded.
  • the first determining module includes:
  • a fourth determining submodule configured to determine, according to the detailed information of the multiple performance indicators reported by the any storage node, the plurality of storage nodes a score for performance indicators
  • a fifth calculation submodule configured to add the scores of the multiple performance indicators to obtain any of the storages when the scores of the plurality of performance indicators of the any storage node are higher than a preset score The current performance score of the node;
  • a fifth determining sub-module configured to: when a score of the plurality of performance indicators of the any storage node is not all higher than the preset score, determine a score of a performance index with the lowest score among the plurality of performance indicators Rate the current performance of any of the storage nodes.
  • the device further includes:
  • the third triggering module is configured to trigger the fifth determining module to determine a total number of executions of the recording plan currently being executed among the plurality of storage nodes every second preset duration.
  • a management node includes:
  • a memory for storing processor executable instructions
  • processor is configured to perform the steps of any of the methods provided in the first aspect above.
  • a computer readable storage medium having stored thereon a computer program, the program being executed by a processor to implement the steps of any of the methods provided by the first aspect above.
  • the management node may determine the current performance scores of the multiple storage nodes, and determine the video allocated to each storage node based on the number of the multiple recording plans to be delivered and the performance scores of the multiple storage nodes.
  • the performance score can describe the capacity of the storage node to run the resource, and the number of allocated recording plans of each storage node can be determined by the corresponding performance score. Therefore, the determined number of allocations will be consistent with the capacity of each storage node to run resources. Determined Number of Assignments After multiple recording plans are assigned to multiple storage nodes, the multiple storage nodes will be in load balancing state, thus ensuring the accuracy of load balancing and improving the effect of load balancing.
  • FIG. 1 is a schematic structural diagram of a video monitoring system according to an embodiment of the present application.
  • FIG. 2 is a flowchart of a load balancing method according to an embodiment of the present application
  • FIG. 3 is a flowchart of another load balancing method provided by an embodiment of the present application.
  • FIG. 4A is a schematic structural diagram of a first load balancing apparatus according to an embodiment of the present application.
  • 4B is a schematic structural diagram of a second determining module according to an embodiment of the present application.
  • 4C is a schematic structural diagram of a first distribution module according to an embodiment of the present application.
  • 4D is a schematic structural diagram of another first distribution module according to an embodiment of the present application.
  • 4E is a schematic structural diagram of a second load balancing apparatus according to an embodiment of the present application.
  • 4F is a schematic structural diagram of a third load balancing device according to an embodiment of the present application.
  • 4G is a schematic structural diagram of a fourth load balancing apparatus according to an embodiment of the present application.
  • 4H is a schematic structural diagram of a sixth determining module according to an embodiment of the present application.
  • 4I is a schematic structural diagram of a second distribution module according to an embodiment of the present application.
  • 4J is a schematic structural diagram of a first determining module according to an embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of a node according to an embodiment of the present disclosure.
  • FIG. 6 is a schematic structural diagram of another node according to an embodiment of the present application.
  • a storage node can generally correspond to a plurality of camera devices, and the storage node can acquire and store video streams recorded by the plurality of camera devices.
  • the number of camera devices corresponding to the storage node is large, the running load of the storage node will be too heavy, thereby affecting the storage node to acquire a video stream from the camera device. Therefore, load balancing is often required through management nodes in the video surveillance system.
  • the management node can only acquire and store the video stream recorded by the camera through the storage node with the lowest usage rate.
  • the hardware performance of the storage node is poor, continuing to store the video stream through the storage node also causes the storage node to run too heavy, resulting in poor implementation of load balancing.
  • the embodiment of the present application provides a load balancing method capable of implementing load balancing and improving load balancing.
  • FIG. 1 is a schematic structural diagram of a video monitoring system according to an embodiment of the present application.
  • the system includes a management node 1, a plurality of storage nodes 2, and a plurality of camera devices 3.
  • the management node 1 includes a management node 1, a plurality of storage nodes 2, and a plurality of camera devices 3.
  • three storage nodes 2 and six camera devices 3 are described as an example in FIG.
  • the management node 1 and the plurality of storage nodes 2 may each be a server, or may be a terminal such as a tablet computer, and the management node 1 may be any one of the plurality of storage nodes 2, or is independent of multiple storages.
  • the plurality of imaging devices 3 can be connected to the management node 1 and the plurality of storage nodes 2, respectively, and the management node 1 can be connected to the plurality of storage nodes 2.
  • the management node 1 can manage a plurality of storage nodes 2 and detect requests sent by the plurality of camera devices 3, and in order to facilitate management of the plurality of storage nodes 2, each of the plurality of storage nodes 2 can be respectively The detailed information of the plurality of performance indicators is reported to the management node 1, so that the management node 1 can determine the current performance score of each storage node 2 according to the detailed information of the plurality of performance indicators reported by each storage node 2. In the meantime, in order to enable any one of the plurality of storage nodes 2 to acquire and store the video stream from any of the plurality of camera devices 3, the plurality of camera devices 3 can report the recording plan to the management node. 1.
  • the management node 1 may store the plurality of recording plans, and determine the recordings allocated to the respective storage nodes 2 based on the number of the plurality of recording plans and the performance score of each storage node 2.
  • the number of planned allocations is allocated to the plurality of storage nodes 2 according to the determined number of allocations.
  • the video surveillance system may include not only the management node 1, the plurality of storage nodes 2, and the plurality of camera devices 3, but also other devices, such as user terminals.
  • the user terminal can be connected to the plurality of imaging devices 3 and the management node 1, respectively, and the user terminal can set the recording schedule of the plurality of imaging devices 3. That is, the user terminal can serve as a management device of the plurality of camera devices 3.
  • the user terminal can also send the recording plan of the plurality of camera devices 3 to the management node 1, so that the camera device 3 is not required to send the respective recording plan to the management node 1.
  • the video monitoring system may include only one management node 1 or multiple management nodes 1.
  • any one of the plurality of management nodes 1 may be determined as the primary management node 1, and the other management nodes 1 of the plurality of management nodes 1 are determined.
  • the main management node 1 is configured to manage the detected recording plan and the plurality of storage nodes 2, and the plurality of slave management nodes 1 are used to synchronize the information in the main management node 1 in real time.
  • the primary management node 1 fails, any one of the plurality of secondary management nodes 1 can quickly take over the current execution process of the primary management node 1, thereby ensuring uninterrupted implementation of load balancing and improving the implementation load. Balanced reliability.
  • the video surveillance system may include multiple domains, or only one domain, and one camera device and storage node may belong to only one domain, and one domain may include multiple camera devices and multiple Storage nodes.
  • the domain may be an area in which the management authority of the management node is valid, and the area may be a network area where the camera device 3 and the storage node 2 are located, or may be a geographical location area where the camera device and the storage node 2 are located.
  • the management node can manage the respective camera devices 3 and the respective storage nodes 2 in the current domain, but cannot manage the respective camera devices 3 and the respective storage nodes 2 located in other domains.
  • FIG. 2 is a flowchart of a load balancing method according to an exemplary embodiment. Referring to FIG. 2, the method is applied to a management node in a video monitoring system, and includes the following steps.
  • Step 201 The management node determines a current performance score of the plurality of storage nodes in the video surveillance system.
  • the performance score is determined based on the scores of the performance indicators of the storage node, and is used to describe the current running resource of the storage node.
  • the management node Since the capability of running resources of any one of the plurality of storage nodes is related to the score of each performance indicator, the management node needs to determine video monitoring in order to achieve load balancing among multiple storage nodes and load balancing effects.
  • the current performance score for multiple storage nodes in the system Since the capability of running resources of any one of the plurality of storage nodes is related to the score of each performance indicator, the management node needs to determine video monitoring in order to achieve load balancing among multiple storage nodes and load balancing effects. The current performance score for multiple storage nodes in the system.
  • the operation of determining, by the management node, the current performance scores of the multiple storage nodes in the video surveillance system may be: for any one of the multiple storage nodes, based on the details of the multiple performance indicators reported by the storage node And determining a score of the plurality of performance indicators of the storage node; when the scores of the plurality of performance indicators of the storage node are higher than the preset score, adding the scores of the multiple performance indicators to obtain the score The current performance score of any of the storage nodes; when the scores of the plurality of performance indicators of the storage node are not all higher than the preset score, the score of the lowest score of the plurality of performance indicators is determined as the The current performance score of the storage node. Alternatively, when the scores of the plurality of performance indicators of the storage node are not all higher than the preset score, the preset score is determined as the current performance score of the storage node.
  • any one of the plurality of storage nodes may report detailed information of multiple performance indicators to the management node, and the management node may have multiple storage nodes.
  • the detailed information of the multiple performance indicators reported by any of the storage nodes is stored. Therefore, the management node may determine the current performance scores of the multiple storage nodes in the video surveillance system according to the detailed information reported by each storage node.
  • the detailed information of the multiple performance indicators may include a CPU (Central Processing Unit) utilization or idle rate, memory utilization or idle rate, network channel utilization or idle rate, and I/O ( (Input/Output, input/output) utilization or idle rate, storage medium storage capacity, and so on.
  • CPU Central Processing Unit
  • memory utilization or idle rate memory utilization or idle rate
  • network channel utilization or idle rate network channel utilization or idle rate
  • I/O input/Output, input/output
  • any of the plurality of performance indicators of the storage node may change, for example, the network channel may be subjected to the peak period of the Internet. Congestion occurs due to impact, or any storage node may generate additional operational information during operation, resulting in increased memory utilization and reduced idle rate. Therefore, in order to ensure the accuracy of the performance score of the current storage node, the storage node may report the detailed information of multiple performance indicators at a specified time.
  • the specified duration can be 20 seconds, 5 minutes, 30 minutes, and the like.
  • the management node can also send an information acquisition request to each storage node every specified time period, so that any one of the multiple storage nodes can passively report the detailed information of multiple performance indicators at a specified time.
  • the management node can receive the details of multiple performance indicators reported by the storage node each time. The information is determined by the current performance score of any of the storage nodes.
  • the management node can receive a plurality of recording plans reported by the plurality of imaging devices.
  • the management node can issue a plurality of recording plans reported by the plurality of imaging devices, so that the management node can also When a plurality of recording plans need to be sent to a plurality of storage nodes, the current performance score of the storage node is determined according to the detailed information of the plurality of performance indicators of the storage node that is stored last time.
  • the operation of determining, by the management node, the scores of the multiple performance indicators of the storage node may be: when the detailed information of the multiple performance indicators includes each performance.
  • the management node may obtain a total weight score corresponding to each performance indicator, and multiply the total weight score of each performance indicator by the idle rate to obtain a score of each performance indicator.
  • the management node may subtract the utilization rate of each performance indicator from 1 to obtain the idle rate of each performance, and obtain the total weight corresponding to each performance indicator.
  • the score is obtained by multiplying the total weight score of each performance indicator by the idle rate to obtain a score of each performance indicator.
  • the total weight score corresponding to the multiple performance indicators may be set in advance, and the total weight score corresponding to the multiple performance indicators may be the same, for example, the total weight score corresponding to the CPU, the memory, the network channel, and the I/O. Can be all 20. However, since the plurality of performance indicators have different degrees of influence on the storage node's ability to run resources, the total weight score corresponding to the multiple performance indicators may also be different. For example, the total weight score corresponding to the CPU may be 20, the total weight score corresponding to the memory may be 30, the total weight score corresponding to the network channel may be 10, and the total weight score corresponding to the I/O may be 15 or the like.
  • the total weight score corresponding to the multiple performance indicators may be stored in the management node, or may be included in the detailed information of multiple performance indicators reported by the storage node.
  • the management node may obtain multiple information from the multiple performance indicators. The total weight score corresponding to the performance indicator.
  • the management node may acquire the CPU,
  • the total weight score for memory, network channel, storage space, and I/O is 20. Multiply the total weight score of the CPU by 60% of the idle rate of the CPU, and obtain a score of 12 for the CPU, multiply the total weight score of the memory by the idle rate of the memory, and obtain a memory score of 8, and the network channel is obtained.
  • the total weight score 20 is multiplied by 50% of the idle rate of the network channel, and the score of the network channel is obtained as 10, and the total weight score of the I/O is multiplied by 50% of the I/O idle rate to obtain an I/O score. Is 10.
  • the storage node may still be overloaded, thereby affecting the operation of the storage node.
  • the idle rate of the CPU of the storage node B among the plurality of storage nodes is 9%, the storage node B is already overloaded, and the operation is difficult, even if the idle rate of the I/O, the memory, the network channel, and the like is high. The storage node B cannot continue to run.
  • the management node also needs to determine whether the scores of the plurality of performance indicators in the storage node B are higher than the preset score, and when the scores of the plurality of performance indicators in the storage node B are higher than the preset scores, The scores of the performance indicators are added to obtain the current performance score of the storage node B; when the scores of the plurality of performance indicators in the storage node B are not all higher than the preset score, that is, when the storage node B When the score of at least one of the plurality of performance indicators is lower than or equal to the preset score, the score of the lowest scored performance indicator of the plurality of performance indicators may be determined as the current performance score of the storage node B.
  • the preset score may also be determined as the current performance score of the storage node B. In this way, it is possible to avoid the situation that the capacity of the storage node to actually run the resource is inconsistent with the capability of the running resource described by the performance score, and the management node determines the accuracy of the performance score of each storage node, thereby avoiding the load of the subsequent storage node. It is too heavy and fails.
  • the preset score may be set in advance, for example, the preset score may be 10 points, 5 points, 3 points, and the like.
  • the scores of the plurality of performance indicators of the storage node may be determined one by one. Therefore, when the management node determines the score of any one of the plurality of performance indicators of the storage node. If the preset score is not higher than the preset score, it is determined that the performance index of the performance index of the storage node is not higher than the preset score, and the management node may not need to determine the score of the remaining performance indicator. Instead, the score of the determined performance indicator that is not higher than the preset score is directly determined as the performance score of the any storage node. Alternatively, the preset score is directly determined as the performance score of any of the storage nodes.
  • the management node determines the score of the CPU of the storage node B, the score of the I/O, the score of the memory, the score of the storage capacity of the storage medium, and the default score is 5, if the management node determines the storage node B If the score of the CPU is 3 points, the management node may determine the score of the storage capacity of the storage node by directly determining the score of the I/O, the memory, and the storage capacity of the storage medium. Alternatively, the 5 points are directly determined as the performance score of the storage node B.
  • the performance score of the storage node can be determined, thereby speeding up the performance of the management node to determine the performance score of each storage node, and reducing the calculation of the management node. The amount is avoided, and the management node is wasted resources by determining the scores of multiple storage nodes.
  • the detailed information of the multiple performance indicators reported by the storage node may include not only information such as CPU utilization or idle rate, memory utilization or idle rate, but also other information, such as multiple performances.
  • the detailed information of the indicator can also include the score of each performance indicator.
  • the management node may directly obtain the scores of the performance indicators from the detailed information of the multiple performance indicators, and compare the scores of the performance indicators. Add, get the current performance score of any of the storage nodes.
  • Step 202 The management node determines the number of allocations of the recording plan allocated to each storage node based on the number of the plurality of recording plans to be delivered and the performance scores of the plurality of storage nodes, and the recording plan is used to describe the recording of the camera. The time information of the video stream.
  • the management node may determine the number of the plurality of recording plans to be delivered and the performance scores of the plurality of storage nodes, and determine the allocation to each storage node. The number of allocations for the recording plan.
  • the operation node determines, according to the number of the plurality of recording plans to be delivered and the performance scores of the plurality of storage nodes, the operation of determining the number of allocations of the recording plans allocated to the respective storage nodes: Dividing the performance total scores of the plurality of storage nodes, obtaining a scoring weight of each storage node, the performance total score being a sum of performance scores of the plurality of storage nodes; multiplying the number of the plurality of recording plans by the respective storage
  • the score weight of the node is the number of allocations of the recording plan assigned to the respective storage node.
  • the recording plan is used to describe the time information of the video stream recorded by the camera device, that is, the recording plan can describe when the storage node acquires and stores the video stream from the corresponding camera device, and when to stop acquiring and storing the video stream.
  • the recording plan can be described as that the storage node acquires and stores the video stream from the corresponding camera device 24 hours a day, or can be described as the storage node starts to acquire and store the video stream from the corresponding camera device at 6 o'clock, and stops at 10 o'clock in the evening.
  • the video stream is acquired and stored from the corresponding camera.
  • the management node can accurately determine the video allocated to each storage node according to the scoring weight of each storage node.
  • the number of planned allocations increases the accuracy of load balancing.
  • the storage node 1 and the storage node 2 are stored. Add the performance score of storage node 3 to get a total performance score of 100. Dividing the performance score 30 of the storage node 1 by the total performance score of 100, obtaining the scoring weight of the storage node 1 is 0.5, dividing the performance score 30 of the storage node 2 by the total performance score of 100, and obtaining the scoring weight of the storage node 2 is 0.3.
  • Dividing the performance score 20 of the storage node 3 by the total performance score of 100 results in a storage node 3 having a scoring weight of 0.2.
  • the number of the plurality of recording plans 100 is multiplied by the scoring weights of the respective storage nodes, and the number of allocations of the recording plans assigned to the storage nodes 1, 2, and 3 is 50, 30, and 20, respectively.
  • the plurality of recording plans may be acquired by the management node from the recording plan sending request sent by the plurality of imaging devices, or the management node may be obtained from at least one storage node that has failed the operation, and
  • the plurality of recording plans acquired from the at least one storage node are a plurality of recording plans currently being executed and not executed by the at least one storage node.
  • the management node may determine the number of allocations of the recording plan to be allocated to each storage node based on the number of the plurality of recording plans to be delivered and the performance scores of the plurality of storage nodes.
  • the plurality of recording plans that are currently being executed and not executed by the at least one storage node in which the operation failure has occurred are determined as a plurality of recording plans to be delivered; and/or, the received and unprocessed recording plan is delivered in the request
  • a plurality of recording plans are determined as a plurality of recording plans to be issued.
  • any one of the multiple storage nodes may fail during operation, once the storage node fails, the storage node will not be able to acquire and store the video stream from the camera, which may result in the omission of important information. Therefore, in order to avoid the omission of information, when any storage node fails, the storage node may report a fault message to the management node, and when the management node receives the fault message, the storage node may be currently executing and not executing.
  • the plurality of recording plans are determined as a plurality of recording plans to be delivered, and the operations of step 202 are performed.
  • the management node may not process the recording plan delivery request in time, but detect the camera every first preset time period.
  • the request sent by the device is sent, and when the request is sent, the recording plan carried in the request for the recording plan is delivered. That is, the management node may perform the operation of step 202 every first preset duration.
  • the first preset duration may be set in advance.
  • the first preset duration may be 5 minutes, 10 minutes, or the like.
  • the imaging device may send a change request to the management node, for example, the camera device may send a recording plan to the management node. Delete the request.
  • the management node detects the recording plan deletion request, the recording plan carried in the received and unprocessed recording plan deletion request may be deleted from the corresponding storage node.
  • the video surveillance system may include one domain, and may also include multiple domains, and one camera device and storage node may belong to only one domain, and one domain may include multiple camera devices and multiple storage devices. node. If the video surveillance system includes multiple domains, the management node needs to determine the number of allocations of the recording plans of the respective storage nodes included in each domain when determining the number of allocations of the recording plans allocated to the respective storage nodes.
  • the management node needs to determine, from the plurality of storage nodes, all storage nodes belonging to the same domain as the storage node, and divide the performance score of the storage node by The total performance score of any storage node belonging to the same domain of any storage node, and the score weight of the storage node is obtained, and the total performance score is the sum of performance scores of all storage nodes belonging to the same domain as the any storage node.
  • the management node since one camera device and storage node can belong to only one domain, and the recording plan is used to describe the time information of the video stream recorded by the camera device, a recording plan can only belong to one domain, and one domain can include multiple videos. plan. Therefore, in order to accurately allocate a plurality of recording plans, the management node also needs to determine from all the recording plans all recording plans belonging to the same domain as the any storage node, and all recording plans belonging to the same domain as the any storage node The number is multiplied by the scoring weight of each storage node belonging to the same domain as the any storage node, and the number of allocations of the recording plan assigned to each storage node belonging to the same domain as the any storage node is obtained.
  • Step 203 The management node allocates the plurality of recording plans to the plurality of storage nodes according to the determined number of allocations.
  • the management node may directly allocate the multiple recording plans to the plurality of storage nodes according to the determined number of allocations. However, sometimes when the number of recording plans is too large, and the network status does not allow the management node to send a large number of recording plans at one time, the management nodes may only be allocated according to the preset number. That is, when the number of the plurality of recording plans is too large, the plurality of recording plans may be divided into a plurality of copies, each of which includes at most a preset number of recording plans, and the plurality of recording plans are sequentially transmitted until The multiple recording schedules are sent.
  • the preset number can be set in advance. For example, the preset number can be 10, 20, and the like.
  • the management node Because when the number of recording plans is too large, the management node sends multiple recording plans in sequence, so that the time allocated to the storage nodes will be different for some recording plans, and some important recording plans may cause information due to untimely allocation. Missing. Therefore, when the management node allocates the plurality of recording plans to the plurality of storage nodes according to the determined number of allocations, the priority of the plurality of recording plans can be acquired; according to the priority order and the determined allocation of the plurality of recording plans Number, the plurality of recording plans are assigned to the plurality of storage nodes.
  • the management node may divide multiple recording plans into multiple copies according to the order of priority from high to low, and each copy includes at most a preset number of recording plans. Since multiple recording schedules are divided into multiple copies in order of priority, there are also priorities among multiple recording schedules, in which case multiple recording schedules can be sequentially assigned in descending order of priority.
  • the priority of the multiple recording plans may be set in advance, and the priorities of the multiple recording plans may be set according to the location of the camera, for example, if the video monitoring system is a video surveillance system of the hotel, then When the imaging device is an imaging device of a hotel corridor, the priority of the recording plan transmitted by the imaging device is set to be high, and when the imaging device is the imaging device of the hotel lobby, the priority of the recording plan transmitted by the imaging device is set to In the case where the imaging device is an imaging device of a hotel door, the priority of the recording plan transmitted by the imaging device is set to be low. Of course, in actual application, it can also be set according to the time when the recording plan is executed.
  • the priority of the recording plan A is set to be high when the recording plan is executed.
  • the priority of the recording plan B is set to medium, and when the recording plan C is executed from 10:00 pm to 6:00 pm, the priority of the recording plan C is given.
  • the level is set to low.
  • the operation of the management node to allocate the multiple recording plans to the multiple storage nodes may also be: Obtaining, in any one of the plurality of recording plans, a historical execution trajectory of the any recording plan, the historical execution trajectory is used to describe a storage node in which the recording plan history is executed and detailed information of the execution; based on the history Executing a trajectory from which the storage node that did not fail when performing any of the recording plans is determined; assigning any recording plan to the storage node that has not failed.
  • any one of the multiple recording plans is sent by the management node, and any one of the plurality of storage nodes can report the fault message to the management node when the operation fault occurs, therefore, management The node can easily know the historical execution trajectory of the recording plan, and the information about whether the storage node is faulty when the recording plan is executed in one of the plurality of storage nodes, thereby ensuring that the management node can allocate the recording plan. Assigning a recording plan to a storage node that has not failed ensures that the recording plan can be executed smoothly.
  • the management node allocates a recording plan to each storage node, the management node allocates the recording plan belonging to the same domain as each storage node to each of the determined allocation numbers. Storage node.
  • the any storage node may determine the time information described by the allocated recording plan, and arrive at the execution of the recording when the current time is detected. At the scheduled time, the video stream is acquired and stored from the camera device described in the recording plan.
  • the video monitoring system can include a primary management node and multiple secondary management nodes, and multiple secondary management nodes can synchronize the information in the primary management node in real time. Therefore, when the primary management node fails, more Any slave management node in the management node can take over the current execution process of the master management node in time, thereby ensuring the implementation of load balancing without interruption and improving the reliability of load balancing.
  • the management node is taken as the main management node as an example for description.
  • the management node may determine the current performance scores of the multiple storage nodes, and determine the video allocated to each storage node based on the number of the multiple recording plans to be delivered and the performance scores of the multiple storage nodes.
  • the performance score can describe the capacity of the storage node to run the resource. Therefore, the number of allocations of the recording plans of each storage node determined by the performance score is the number of the resources that meet the storage resources of each storage node, according to the determined number of allocations.
  • the management node can implement load balancing during the process of issuing the recording plan through the operations of the foregoing steps 201-203.
  • the load may be imbalanced between multiple storage nodes for some reasons. Therefore, after determining the current performance scores of the multiple storage nodes in the video surveillance system, the management node may also adjust the number of recording plans currently being executed among the plurality of storage nodes to implement load balancing.
  • FIG. 3 another method for load balancing according to an embodiment of the present disclosure includes the following steps.
  • Step 301 The management node determines the total number of executions of the recording plan currently being executed among the plurality of storage nodes.
  • the management node may actively determine the total number of executions of the recording plan currently being executed among the plurality of storage nodes, and may also passively determine the total number of executions of the recording plan currently being executed among the plurality of storage nodes. The following describes the operation of actively determining the total number of executions and the operation of passively determining the total number of executions.
  • any one of the plurality of storage nodes performs the recording plan, at least one of the plurality of performance indicators of the storage node may change, thereby causing load imbalance, and therefore, The recording plan between the storage nodes is load balanced, and the management node needs to obtain the total number of executions of the recording plan currently being executed by the plurality of storage nodes.
  • the storage node 1 may be affected by the network channel of the storage node 1 during the peak period of the Internet, or the storage node 1 may generate additional operational information during the operation, resulting in As the memory usage increases, the idle rate decreases, and the load between the storage node and other storage nodes is no longer balanced. In this case, the management node needs to obtain the total number of executions of the recording plan currently being executed by multiple storage nodes.
  • the management node may determine the total number of executions of the recording plan currently being executed among the plurality of storage nodes every second preset duration.
  • the second preset duration may be set in advance.
  • the second preset duration may be 10 minutes, 20 minutes, or the like.
  • step 202 there may be a storage node that is faulty in operation among the plurality of storage nodes, and the management node may re-issue the recording plan that the failed storage node is executing and that is not executed. Therefore, when the failed storage node runs back to normal, there will be no executable recording plan in the storage node where the operation returns to normal, resulting in load imbalance between multiple storage nodes. Therefore, in order to load balance the recording plan between a plurality of storage nodes, the management node needs to acquire the total number of executions of the recording plan currently being executed by the plurality of storage nodes.
  • the storage node that returns to the normal operation may report the running back to the management node.
  • the management node may obtain multiple storage nodes. The total number of executions of the executed recording plan.
  • the video surveillance system may include multiple domains, when the management node determines the total number of executions of the currently scheduled recording plan, it is necessary to separately determine the total number of executions of the plurality of storage nodes belonging to the same domain.
  • Step 302 The management node determines a load status of each of the plurality of storage nodes based on a total number of executions of the plurality of storage nodes and a performance score of the plurality of storage nodes.
  • the management node needs to determine the plurality based on the total number of executions of the plurality of storage nodes and the performance scores of the plurality of storage nodes. The load status of each storage node in the storage node.
  • the operation node determines, according to the total number of executions of the plurality of storage nodes and the performance scores of the plurality of storage nodes, the operation of determining the load status of each of the plurality of storage nodes: performing performance of each storage node
  • the score is divided by the total performance score of the plurality of storage nodes, and the score weight of each storage node is obtained, where the total performance score is the sum of performance scores of the plurality of storage nodes; and the total number of executions of the plurality of storage nodes are respectively Multiplying the score weights of the storage nodes to obtain the theoretical number of recording plans currently being executed by the storage nodes; when the number of recording plans currently being executed in the plurality of storage nodes is different from the theoretical number When storing the node, it is determined that there is a storage node in the plurality of storage nodes whose load state is an unbalanced state.
  • the total number of executions of storage nodes 1, 2, and 3 is 100.
  • the score of storage node 1 is 50
  • the score of storage node 2 is 30, and the score of storage node 3 is 20, the performance of nodes 1, 2, and 3 will be stored.
  • the scores were divided by the total performance score of 100, and the score weights of the storage nodes 1, 2, and 3 were 0.5, 0.3, and 0.2, respectively.
  • the total number of executions of the plurality of recording plans is multiplied by the scoring weights of the respective storage nodes, and the theoretical numbers of the recording plans currently being executed for the storage nodes 1, 2, and 3 are 50, 30, and 20, respectively. Since the actual number of recording plans currently being executed by the storage node 2 and the storage node 3 is different from the theoretical number, it can be determined that the storage nodes in the storage nodes 1, 2, and 3 have an unbalanced load state, and That is, the storage node 2 and the storage node 3 are storage nodes whose load state is an unbalanced state.
  • the management node multiplies the total number of executions of the multiple storage nodes by the scoring weights of the storage nodes.
  • the theoretical number of each storage node is the number of recording plans that each storage node should currently execute when the storage nodes are in a load balancing state. Therefore, when there are storage nodes whose number of recording plans currently being executed is different from the theoretical number among the plurality of storage nodes, it may be determined that the storage nodes having the load state of the unbalanced state among the plurality of storage nodes are determined.
  • the management node needs to determine the total number of executions of the plurality of storage nodes belonging to the same domain and the performance scores of the plurality of storage nodes, and determine that the storage nodes belong to the same domain. The load status of each storage node.
  • Step 303 When there is a storage node whose load status is an unbalanced state among the plurality of storage nodes, the management node re-allocates the actual number of recording plans currently being executed by the storage node in the unbalanced state to implement multiple Load balancing between storage nodes.
  • the operation node re-allocating the actual number of recording plans currently being executed by the storage node in the unbalanced state may be: determining, for any storage node in the unbalanced storage node, the storage. The number of overloads or the number of unloaded nodes corresponding to the node; wherein the number of overloaded means that the actual number of recording plans currently being executed by any one of the storage nodes is more than the theoretical number of recording plans currently being executed by any storage node.
  • the number of the number of unloaded means that the actual number of recording plans currently being executed by any one of the storage nodes is less than the theoretical number of recording plans currently being executed by any of the storage nodes; from any of the storages
  • the management node may subtract the theoretical number from the actual number of any storage node, and when the obtained result is a negative number, determine that the result is the number of unloaded corresponding to any storage node; When the result is a positive number, the result is determined to be the number of overloads corresponding to any of the storage nodes.
  • the management node may determine that the number of unloaded ports corresponding to the storage node 2 is ten, and that the number of overloads corresponding to the storage node 3 is ten. At this time, the management node can remove 10 recording plans from the storage node 3 and allocate the 10 recording plans that have been moved out to the storage node 2.
  • the management node can only re-allocate the actual number of recording plans currently being executed by storage nodes belonging to the same domain in an unbalanced state.
  • the management node can perform load balancing on the storage nodes included in each domain in each domain. Therefore, when each domain is in the load balancing state, the entire video surveillance system will also be in a load balancing state.
  • the management node may determine a current performance score of the multiple storage nodes, and then determine each of the multiple storage nodes based on the total number of executions of the plurality of storage nodes and the performance scores of the plurality of storage nodes.
  • the load status of the storage node When there are storage nodes whose load status is unbalanced among the multiple storage nodes, the actual number of recording plans currently being executed by the storage node in the unbalanced state is re-allocated to ensure multiple When the load node is unbalanced due to some reasons during the execution of multiple recording schedules, the load balancing can be performed in time, thereby achieving load balancing not only during the recording process, but also during the execution of the recording plan. Load balancing improves the accuracy and effectiveness of load balancing across multiple storage nodes.
  • the load balancing device provided by the present application is introduced next.
  • FIG. 4A is a block diagram of a load balancing apparatus according to an embodiment of the present application.
  • the load balancing apparatus may be implemented by software, hardware, or a combination of the two.
  • the apparatus includes a first determining module 401, a second determining module 402, and a first assigning module 403.
  • the first determining module 401 is configured to determine a current performance score of the multiple storage nodes in the video monitoring system, where the performance score is determined based on a score of each performance indicator of the storage node, and is used to describe that the storage node is currently running. Resource capacity;
  • the second determining module 402 is configured to determine, according to the number of the plurality of recording plans to be delivered and the performance scores of the plurality of storage nodes, the number of allocations of the recording plan allocated to each storage node, where the recording plan is used For describing the time information of the video stream recorded by the camera device;
  • the first allocating module 403 is configured to allocate the multiple recording plans to the plurality of storage nodes according to the determined number of allocations.
  • the second determining module 402 includes:
  • a first calculation sub-module 4021 configured to divide a performance score of each storage node by a performance total score of the multiple storage nodes, to obtain a score weight of each storage node, where the total performance score is The sum of the performance scores of the storage nodes;
  • the second calculation sub-module 4022 is configured to multiply the number of the plurality of recording plans by the scoring weights of the storage nodes to obtain the number of allocations of the recording plans allocated to the storage nodes.
  • the first allocating module 403 includes:
  • a first obtaining submodule 4031 configured to acquire a priority of the multiple recording plans
  • the first distribution sub-module 4032 is configured to allocate the plurality of recording plans to the plurality of storage nodes according to a priority order of the plurality of recording plans and a determined number of allocations.
  • the first allocation module 403 includes:
  • a second obtaining sub-module 4033 configured to acquire, for any one of the plurality of recording plans, a historical execution trajectory of the any recording plan, where the historical execution trajectory is used to describe the any recording plan history
  • a first determining submodule 4034 configured to determine, from the plurality of storage nodes, a storage node that fails to execute the any recording plan based on the historical execution trajectory;
  • the second distribution sub-module 4035 is configured to allocate the any recording plan to the non-failed storage node.
  • the apparatus further includes:
  • a third determining module 404 configured to determine, by the at least one storage node of the plurality of storage nodes that the operation fault has occurred, a plurality of recording plans that are currently being executed and not executed, as a plurality of recording plans to be delivered; and/or ,
  • the fourth determining module 405 is configured to determine a plurality of recording plans carried in the received and unprocessed recording plan delivery request as the plurality of recording plans to be delivered.
  • the device further includes:
  • the deletion module is configured to delete the recording plan carried in the received and unprocessed recording plan deletion request from the corresponding storage node.
  • the apparatus further includes:
  • the first triggering module 406 is configured to trigger the first determining module to be based on the number of the plurality of recording plans to be delivered and the plurality of recording plans when detecting that any one of the plurality of storage nodes is faulty Performance scores of storage nodes to determine the number of allocations for recording plans assigned to each storage node; or
  • the second triggering module 407 is configured to trigger the second determining module to determine the number of the plurality of recording plans to be delivered and the performance scores of the multiple storage nodes, and determine the allocation to each of the plurality of storage nodes. The number of allocations of the recording plan of the storage node.
  • the apparatus further includes:
  • a fifth determining module 408, configured to determine a total number of executions of the recording plan currently being executed among the plurality of storage nodes
  • a sixth determining module 409 configured to determine a load status of each of the plurality of storage nodes based on a total number of executions of the plurality of storage nodes and a performance score of the plurality of storage nodes;
  • the second allocation module 410 is configured to re-execute the actual number of recording plans currently being executed by the storage node in the unbalanced state when there is a storage node whose load status is an unbalanced state among the plurality of storage nodes. distribution.
  • the sixth determining module 409 includes:
  • a third calculation sub-module 4091 configured to divide a performance score of each storage node by a performance total score of the multiple storage nodes, to obtain a score weight of each storage node, where the total performance score is The sum of the performance scores of the storage nodes;
  • a fourth calculation sub-module 4092 configured to multiply the total number of executions of the plurality of storage nodes by the scoring weights of the storage nodes, to obtain a theoretical number of recording plans currently being executed by the storage nodes;
  • a second determining sub-module 4093 configured to determine, when the number of recording plans currently being executed is different from the theoretical number of storage nodes among the plurality of storage nodes, determining that the plurality of storage nodes have a load The storage node whose state is the unbalanced state.
  • the second allocation module 410 includes:
  • a third determining sub-module 4101 configured to determine, for any one of the storage nodes in the unbalanced state, an overloaded or unloaded number corresponding to the storage node;
  • the number of overloaded means that the actual number of recording plans currently being executed by any one of the storage nodes is more than the theoretical number of recording plans currently being executed by any one of the storage nodes, and the number of the overloaded The number refers to the actual number of recording plans currently being executed by any one of the storage nodes is less than the theoretical number of recording plans currently being executed by any one of the storage nodes;
  • the mobile sub-module 4102 is configured to remove, from the recording plan currently being executed by the storage node, a recording plan whose number is the overloaded number, or other storage based on the storage node in the unbalanced state. A recording plan that is moved out of the node, and the recording plan is allocated to the storage node by the number of the missing number.
  • the first determining module 401 includes:
  • a fourth determining sub-module 4011 configured to determine, according to the detailed information of the multiple performance indicators reported by the any storage node, the storage node of any one of the plurality of storage nodes a score for multiple performance indicators;
  • a fifth calculation sub-module 4012 configured to add, when the scores of the multiple performance indicators of the any storage node are higher than a preset score, the scores of the multiple performance indicators, to obtain any of the The current performance score of the storage node;
  • a fifth determining sub-module 4013 configured to: when the scores of the multiple performance indicators of the any storage node are not all higher than the preset score, the score of the lowest performance index of the plurality of performance indicators Determine the current performance score for any of the storage nodes.
  • the device further includes:
  • the third triggering module is configured to trigger the fifth determining module to determine a total number of executions of the recording plan currently being executed among the plurality of storage nodes every second preset duration.
  • the management node may determine the current performance scores of the multiple storage nodes, and then determine the total number of executions of the multiple storage nodes and the performance scores of the multiple storage nodes.
  • the load status of each storage node in the storage node When there are storage nodes whose load status is unbalanced among the multiple storage nodes, the actual number of recording plans currently being executed by the storage node in the unbalanced state is re-allocated. This ensures that multiple storage nodes can perform load balancing in a timely manner when the load is unbalanced due to some reasons during the execution of multiple recording schedules, thereby realizing not only load balancing during the recording process, but also performing recording. Load balancing is implemented during the planning process, which improves the accuracy and effectiveness of load balancing between multiple storage nodes.
  • the load balancing device provided by the foregoing embodiment is only illustrated by the division of the foregoing functional modules when performing load balancing. In actual applications, the function allocation may be completed by different functional modules as needed. The internal structure of the device is divided into different functional modules to perform all or part of the functions described above. In addition, the load balancing device and the load balancing method are provided in the same embodiment. For details, refer to the method embodiment, and details are not described herein.
  • FIG. 5 is a block diagram showing the structure of a node 500 provided by an exemplary embodiment of the present application.
  • the node 500 can be a management node or any one of a plurality of storage nodes, and the node 500 can be: a tablet, a laptop, or a desktop computer.
  • Node 500 may also be referred to as a user device, a portable terminal, a laptop terminal, a desktop terminal, and the like.
  • the node 500 includes a processor 501 and a memory 502.
  • Processor 501 can include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like.
  • the processor 501 may be configured by at least one of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). achieve.
  • the processor 501 may also include a main processor and a coprocessor.
  • the main processor is a processor for processing data in an awake state, which is also called a CPU (Central Processing Unit); the coprocessor is A low-power processor for processing data in standby.
  • the processor 501 can be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and rendering of the content that the display needs to display.
  • the processor 501 may also include an AI (Artificial Intelligence) processor for processing computational operations related to machine learning.
  • AI Artificial Intelligence
  • Memory 502 can include one or more computer readable storage media, which can be non-transitory. Memory 502 can also include high speed random access memory, as well as non-volatile memory, such as one or more disk storage devices, flash storage devices. In some embodiments, the non-transitory computer readable storage medium in the memory 502 is configured to store at least one instruction for execution by the processor 501 to implement one of the methods provided by the method embodiments of the present application. Load balancing method.
  • node 500 can also optionally include a peripheral interface 503 and at least one peripheral.
  • the processor 501, the memory 502, and the peripheral device interface 503 can be connected by a bus or a signal line.
  • Each peripheral device can be connected to the peripheral device interface 503 via a bus, signal line or circuit board.
  • the peripheral device includes at least one of a radio frequency circuit 504, a touch display screen 505, a camera 506, an audio circuit 507, a positioning component 508, and a power source 509.
  • Peripheral device interface 503 can be used to connect at least one peripheral device associated with an I/O (Input/Output) to processor 501 and memory 502.
  • processor 501, memory 502, and peripheral interface 503 are integrated on the same chip or circuit board; in some other embodiments, any of processor 501, memory 502, and peripheral interface 503 or The two can be implemented on a separate chip or circuit board, which is not limited in this embodiment.
  • the RF circuit 504 is configured to receive and transmit an RF (Radio Frequency) signal, also referred to as an electromagnetic signal.
  • Radio frequency circuit 504 communicates with the communication network and other communication devices via electromagnetic signals.
  • the RF circuit 504 converts the electrical signal into an electromagnetic signal for transmission, or converts the received electromagnetic signal into an electrical signal.
  • the radio frequency circuit 504 includes an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and the like.
  • Radio frequency circuit 504 can communicate with other terminals via at least one wireless communication protocol.
  • the wireless communication protocols include, but are not limited to, the World Wide Web, a metropolitan area network, an intranet, generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and/or WiFi (Wireless Fidelity) networks.
  • the RF circuit 504 may also include NFC (Near Field Communication) related circuitry, which is not limited in this application.
  • the display screen 505 is used to display a UI (User Interface).
  • the UI can include graphics, text, icons, video, and any combination thereof.
  • display 505 is a touch display
  • display 505 also has the ability to acquire touch signals over the surface or surface of display 505.
  • the touch signal can be input to the processor 501 as a control signal for processing.
  • display 505 can also be used to provide virtual buttons and/or virtual keyboards, also referred to as soft buttons and/or soft keyboards.
  • the display screen 505 can be one, and the front panel of the node 500 is disposed; in other embodiments, the display screen 505 can be at least two, respectively disposed on different surfaces of the node 500 or in a folded design; In still other embodiments, display screen 505 can be a flexible display screen disposed on a curved surface or on a folded surface of node 500. Even the display screen 505 can be set to a non-rectangular irregular pattern, that is, a profiled screen.
  • the display screen 505 can be prepared by using an LCD (Liquid Crystal Display) or an OLED (Organic Light-Emitting Diode).
  • Camera component 506 is used to capture images or video.
  • camera assembly 506 includes a front camera and a rear camera.
  • the front camera is placed on the front panel of the terminal, and the rear camera is placed on the back of the terminal.
  • the rear camera is at least two, which are respectively a main camera, a depth camera, a wide-angle camera, and a telephoto camera, so as to realize the background blur function of the main camera and the depth camera, and the main camera Combine with a wide-angle camera for panoramic shooting and VR (Virtual Reality) shooting or other integrated shooting functions.
  • camera assembly 506 can also include a flash.
  • the flash can be a monochrome temperature flash or a two-color temperature flash.
  • the two-color temperature flash is a combination of a warm flash and a cool flash that can be used for light compensation at different color temperatures.
  • the audio circuit 507 can include a microphone and a speaker.
  • the microphone is used to collect sound waves of the user and the environment, and convert the sound waves into electrical signals for processing to the processor 501 for processing, or input to the RF circuit 504 for voice communication.
  • the microphones can be multiple, arranged at different locations of node 500, respectively.
  • the microphone can also be an array microphone or an omnidirectional acquisition microphone.
  • the speaker is then used to convert electrical signals from processor 501 or radio frequency circuit 504 into sound waves.
  • the speaker can be a conventional film speaker or a piezoelectric ceramic speaker.
  • the audio circuit 507 can also include a headphone jack.
  • the location component 508 is used to locate the current geographic location of the node 500 to implement navigation or LBS (Location Based Service).
  • the positioning component 508 can be a positioning component based on a US-based GPS (Global Positioning System), a Chinese Beidou system, or a Russian Galileo system.
  • Power source 509 is used to power various components in node 500.
  • the power source 509 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery.
  • the rechargeable battery may be a wired rechargeable battery or a wireless rechargeable battery.
  • a wired rechargeable battery is a battery that is charged by a wired line
  • a wireless rechargeable battery is a battery that is charged by a wireless coil.
  • the rechargeable battery can also be used to support fast charging technology.
  • node 500 also includes one or more sensors 510.
  • the one or more sensors 510 include, but are not limited to, an acceleration sensor 511, a gyro sensor 512, a pressure sensor 513, a fingerprint sensor 514, an optical sensor 515, and a proximity sensor 516.
  • the acceleration sensor 511 can detect the magnitude of the acceleration on the three coordinate axes of the coordinate system established by the node 500.
  • the acceleration sensor 511 can be used to detect components of gravity acceleration on three coordinate axes.
  • the processor 501 can control the touch display screen 505 to display the user interface in a landscape view or a portrait view according to the gravity acceleration signal collected by the acceleration sensor 511.
  • the acceleration sensor 511 can also be used for the acquisition of game or user motion data.
  • the gyro sensor 512 can detect the body direction and the rotation angle of the node 500, and the gyro sensor 512 can cooperate with the acceleration sensor 511 to collect the 3D motion of the user to the node 500. Based on the data collected by the gyro sensor 512, the processor 501 can implement functions such as motion sensing (such as changing the UI according to the user's tilting operation), image stabilization at the time of shooting, game control, and inertial navigation.
  • functions such as motion sensing (such as changing the UI according to the user's tilting operation), image stabilization at the time of shooting, game control, and inertial navigation.
  • the pressure sensor 513 can be disposed on a side border of the node 500 and/or a lower layer of the touch display screen 505.
  • the pressure sensor 513 When the pressure sensor 513 is disposed at the side frame of the node 500, the user's holding signal to the node 500 can be detected, and the processor 501 performs left and right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 513.
  • the operability control on the UI interface is controlled by the processor 501 according to the user's pressure on the touch display screen 505.
  • the operability control includes at least one of a button control, a scroll bar control, an icon control, and a menu control.
  • the fingerprint sensor 514 is used to collect the fingerprint of the user.
  • the processor 501 identifies the identity of the user according to the fingerprint collected by the fingerprint sensor 514, or the fingerprint sensor 514 identifies the identity of the user according to the collected fingerprint. Upon identifying that the identity of the user is a trusted identity, the processor 501 authorizes the user to perform related sensitive operations including unlocking the screen, viewing encrypted information, downloading software, paying and changing settings, and the like.
  • Fingerprint sensor 514 can be provided with the front, back or sides of node 500. When the physical button or vendor logo is set on the node 500, the fingerprint sensor 514 can be integrated with the physical button or the vendor logo.
  • Optical sensor 515 is used to collect ambient light intensity.
  • the processor 501 can control the display brightness of the touch display 505 based on the ambient light intensity acquired by the optical sensor 515. Specifically, when the ambient light intensity is high, the display brightness of the touch display screen 505 is raised; when the ambient light intensity is low, the display brightness of the touch display screen 505 is lowered.
  • the processor 501 can also dynamically adjust the shooting parameters of the camera assembly 506 based on the ambient light intensity acquired by the optical sensor 515.
  • Proximity sensor 516 also referred to as a distance sensor, is typically disposed on the front panel of node 500. Proximity sensor 516 is used to collect the distance between the user and the front of node 500. In one embodiment, when the proximity sensor 516 detects that the distance between the user and the front side of the node 500 is gradually decreasing, the processor 501 controls the touch display screen 505 to switch from the bright screen state to the screen state; when the proximity sensor 516 detects When the distance between the user and the front side of the node 500 gradually becomes larger, the processor 501 controls the touch display screen 505 to switch from the screen state to the bright screen state.
  • embodiments of the present application provide not only a node, but also a processor and a memory for storing processor-executable instructions, wherein the processor is configured to perform the operations in the embodiments shown in FIGS. 2 and 3.
  • the method of the present application further provides a computer readable storage medium having a computer program stored therein, which can be implemented by the processor to implement the embodiment shown in FIG. 2 and FIG. Load balancing method.
  • FIG. 5 does not constitute a limitation to node 500, may include more or fewer components than illustrated, or may combine certain components, or employ different component arrangements.
  • FIG. 6 is a schematic structural diagram of a node 600 according to an embodiment of the present disclosure.
  • the node 600 may be a management node, or may be any one of multiple storage nodes, and the node 600 may be a server, and the server Can be a server in a background server cluster. Specifically:
  • the node 600 includes a central processing unit (CPU) 601, a system memory 604 including a random access memory (RAM) 602 and a read only memory (ROM) 603, and a system bus 605 that connects the system memory 604 and the central processing unit 601.
  • Node 600 also includes a basic input/output system (I/O system) 606 that facilitates transfer of information between various devices within the computer, and a mass storage device 607 for storing operating system 613, applications 614, and other program modules 615.
  • I/O system basic input/output system
  • the basic input/output system 606 includes a display 608 for displaying information and an input device 609 such as a mouse, keyboard for inputting information by the user. Both display 608 and input device 609 are coupled to central processing unit 601 via an input and output controller 610 coupled to system bus 605.
  • the basic input/output system 606 can also include an input output controller 610 for receiving and processing input from a plurality of other devices, such as a keyboard, mouse, or electronic stylus. Similarly, input and output controller 610 also provides output to a display screen, printer, or other type of output device.
  • the mass storage device 607 is connected to the central processing unit 601 by a mass storage controller (not shown) connected to the system bus 605.
  • the mass storage device 607 and its associated computer readable medium provide non-volatile storage for the node 600. That is, the mass storage device 607 can include a computer readable medium (not shown) such as a hard disk or a CD-ROM drive.
  • Computer readable media may comprise computer storage media and communication media.
  • Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data.
  • Computer storage media include RAM, ROM, EPROM, EEPROM, flash memory or other solid state storage technologies, CD-ROM, DVD or other optical storage, tape cartridges, magnetic tape, magnetic disk storage or other magnetic storage devices.
  • RAM random access memory
  • ROM read only memory
  • EPROM Erasable programmable read-only memory
  • EEPROM electrically erasable programmable read-only memory
  • node 600 can also be operated by a remote computer connected to the network via a network such as the Internet. That is, node 600 can be connected to network 612 via network interface unit 611 connected to system bus 605, or network interface unit 611 can be used to connect to other types of networks or remote computer systems (not shown).
  • the above memory also includes one or more programs, one or more programs being stored in the memory and configured to be executed by the CPU.
  • the one or more programs are used to implement the load balancing method as shown in FIG. 2 or FIG. 3 provided by the embodiment of the present application.
  • a person skilled in the art may understand that all or part of the steps of implementing the above embodiments may be completed by hardware, or may be instructed by a program to execute related hardware, and the program may be stored in a computer readable storage medium.
  • the storage medium mentioned may be a read only memory, a magnetic disk or an optical disk or the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Closed-Circuit Television Systems (AREA)

Abstract

本申请公开了一种负载均衡方法、装置及计算机可读存储介质,属于数据存储领域。应用于视频监控系统中的管理节点,所述方法包括:确定所述视频监控系统中的多个存储节点当前的性能评分,所述性能评分是基于存储节点的各个性能指标的评分确定得到,且用于描述存储节点当前运行资源的能力;基于待下发的多个录像计划的个数和所述多个存储节点的性能评分,确定分配给各个存储节点的录像计划的分配个数,所述录像计划用于描述摄像装置录制视频流的时间信息;按照确定的所述分配个数,将所述多个录像计划分配给所述多个存储节点。本申请按照各个存储节点的性能评分下发多个录像计划,从而提高实现负载均衡的效果。

Description

负载均衡方法、装置及计算机可读存储介质
本申请要求于2018年01月19日提交的申请号为201810054177.8、发明名称为“负载均衡方法、装置及计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及数据存储领域,特别涉及一种负载均衡方法、装置及计算机可读存储介质。
背景技术
随着技术的发展,视频监控系统的应用越来越广泛,比如,可以应用在安全防范、远程监控、远程教学、远程会议等领域。目前,视频监控系统中通常包括多个摄像装置和多个存储节点,一个存储节点可以对应至少一个摄像装置,用于存储该至少一个摄像装置录制的视频流。但是,当一个存储节点对应的摄像装置较多时,该存储节点存储的视频流的数据量较大,从而会给该存储节点的运行带来负担。因此,需要其他存储节点分担一些视频流,也即是,需要在该多个存储节点之间进行负载均衡。
当实现该多个存储节点之间的负载均衡时,视频监控系统中还可以包括管理节点。这样,当管理节点接收到任一摄像装置的录像指令时,管理节点可以确定该多个存储节点中各个存储节点的使用率,并通过使用率最低的存储节点存储该摄像装置录制的视频流,以实现负载均衡。
但是,当通过使用率最低的存储节点存储该摄像装置录制的视频流时,虽然该存储节点的使用率最低,但是当该存储节点的硬件性能较差时,通过该存储节点继续存储视频流同样会导致该存储节点运行负担过重,从而导致负载均衡的实现效果较差。
发明内容
本申请实施例提供了一种负载均衡方法、装置及计算机可读存储介质,可以解决现有技术中负载均衡实现效果差的问题。所述技术方案如下:
第一方面,提供了一种负载均衡方法,应用于视频监控系统中的管理节点,所述方法包括:
确定所述视频监控系统中的多个存储节点当前的性能评分,所述性能评分是基于存储节点的各个性能指标的评分确定得到,且用于描述存储节点当前运行资源的能力;
基于待下发的多个录像计划的个数和所述多个存储节点的性能评分,确定分配给各个存储节点的录像计划的分配个数,所述录像计划用于描述摄像装置录制视频流的时间信息;
按照确定的所述分配个数,将所述多个录像计划分配给所述多个存储节点。
可选地,所述基于待下发的多个录像计划的个数和所述多个存储节点的性能评分,确定分配给各个存储节点的录像计划的分配个数,包括:
将所述各个存储节点的性能评分除以所述多个存储节点的性能总评分,得到所述各个存储节点的评分权重,所述性能总评分为所述多个存储节点的性能评分之和;
将所述多个录像计划的个数乘以所述各个存储节点的评分权重,得到分配给所述各个存储节点的录像计划的分配个数。
可选地,所述按照确定的所述分配个数,将所述多个录像计划分配给所述多个存储节点,包括:
获取所述多个录像计划的优先级;
按照所述多个录像计划的优先级顺序和确定的分配个数,将所述多个录像计划分配给所述多个存储节点。
可选地,所述将所述多个录像计划分配给所述多个存储节点,包括:
对于所述多个录像计划中的任一录像计划,获取所述任一录像计划的历史执行轨迹,所述历史执行轨迹用于描述所述任一录像计划历史被执行的存储节点以及执行的详情信息;
基于所述历史执行轨迹,从所述多个存储节点中确定执行所述任一录像计划时未失败的存储节点;
将所述任一录像计划分配给所述未失败的存储节点。
可选地,所述基于待下发的多个录像计划的个数和所述多个存储节点的性能评分,确定分配给各个存储节点的录像计划的分配个数之前,还包括:
将所述多个存储节点中已发生运行故障的至少一个存储节点当前正在执行和未执行的多个录像计划确定为待下发的多个录像计划;和/或,
将已接收且未处理的录像计划下发请求中携带的多个录像计划确定为待下发的多个录像计划。
可选地,所述方法还包括:
将已接收且未处理的录像计划删除请求中携带的录像计划从对应的存储节点中删除。
可选地,所述基于待下发的多个录像计划的个数和所述多个存储节点的性能评分,确定分配给各个存储节点的录像计划的分配个数之前,还包括:
当检测到所述多个存储节点中任一存储节点发生运行故障时,执行所述基于待下发的多个录像计划的个数和所述多个存储节点的性能评分,确定分配给各个存储节点的录像计划的分配个数的步骤;或者,
每隔第一预设时长,执行所述基于待下发的多个录像计划的个数和所述多个存储节点的性能评分,确定分配给各个存储节点的录像计划的分配个数的步骤。
可选地,所述确定所述视频监控系统中的多个存储节点当前的性能评分之后,还包括:
确定所述多个存储节点中当前正在执行的录像计划的执行总个数;
基于所述多个存储节点的执行总个数和所述多个存储节点的性能评分,确定所述多个存储节点中各个存储节点的负载状态;
当所述多个存储节点中存在负载状态为不均衡状态的存储节点时,对处于所述不均衡状态的存储节点当前正在执行的录像计划的实际个数重新进行分配。
可选地,所述基于所述多个存储节点的执行总个数和所述多个存储节点的性能评分,确定所述多个存储节点中各个存储节点的负载状态,包括:
将所述各个存储节点的性能评分除以所述多个存储节点的性能总评分,得到所述各个存储节点的评分权重,所述性能总评分为所述多个存储节点的性能评分之和;
将所述多个存储节点的执行总个数分别乘以所述各个存储节点的评分权重,得到所述各个存储节点当前正在执行的录像计划的理论个数;
当所述多个存储节点中存在当前正在执行的录像计划的实际个数与所述 理论个数不相同的存储节点时,确定所述多个存储节点中存在负载状态为所述不均衡状态的存储节点。
可选地,所述对处于所述不均衡状态的存储节点当前正在执行的录像计划的实际个数重新进行分配,包括:
对于处于所述不均衡状态的存储节点中的任一存储节点,确定所述任一存储节点对应的超载个数或者缺载个数;
其中,所述超载个数是指所述任一存储节点当前正在执行的录像计划的实际个数多于所述任一存储节点当前正在执行的录像计划的理论个数的数量,所述缺载个数是指所述任一存储节点当前正在执行的录像计划的实际个数少于所述任一存储节点当前正在执行的录像计划的理论个数的数量;
从所述任一存储节点当前正在执行的录像计划中移出个数为所述超载个数的录像计划,或者,基于处于所述不均衡状态的存储节点中的其他存储节点中移出的录像计划,向所述任一存储节点分配个数为所述缺载个数的录像计划。
可选地,所述确定所述视频监控系统中的多个存储节点当前的性能评分,包括:
对于所述多个存储节点中的任一存储节点,基于所述任一存储节点上报的多个性能指标的详情信息,确定所述任一存储节点的所述多个性能指标的评分;
当所述任一存储节点的所述多个性能指标的评分均高于预设评分时,将所述多个性能指标的评分相加,得到所述任一存储节点当前的性能评分;
当所述任一存储节点的所述多个性能指标的评分不全高于所述预设评分时,将所述多个性能指标中评分最低的性能指标的评分确定为所述任一存储节点当前的性能评分。
可选地,所述确定所述多个存储节点中当前正在执行的录像计划的执行总个数之前,还包括:
每隔第二预设时长,执行所述确定所述多个存储节点中当前正在执行的录像计划的执行总个数的步骤。
第二方面,提供了一种负载均衡装置,应用于视频监控系统中的管理节点,所述装置包括:
第一确定模块,用于确定所述视频监控系统中的多个存储节点当前的性能评分,所述性能评分是基于存储节点的各个性能指标的评分确定得到,且用于描述存储节点当前运行资源的能力;
第二确定模块,用于基于待下发的多个录像计划的个数和所述多个存储节点的性能评分,确定分配给各个存储节点的录像计划的分配个数,所述录像计划用于描述摄像装置录制视频流的时间信息;
第一分配模块,用于按照确定的所述分配个数,将所述多个录像计划分配给所述多个存储节点。
可选地,所述第二确定模块包括:
第一计算子模块,用于将所述各个存储节点的性能评分除以所述多个存储节点的性能总评分,得到所述各个存储节点的评分权重,所述性能总评分为所述多个存储节点的性能评分之和;
第二计算子模块,用于将所述多个录像计划的个数乘以所述各个存储节点的评分权重,得到分配给所述各个存储节点的录像计划的分配个数。
可选地,所述第一分配模块包括:
第一获取子模块,用于获取所述多个录像计划的优先级;
第一分配子模块,用于按照所述多个录像计划的优先级顺序和确定的分配个数,将所述多个录像计划分配给所述多个存储节点。
可选地,所述第一分配模块包括:
第二获取子模块,用于对于所述多个录像计划中的任一录像计划,获取所述任一录像计划的历史执行轨迹,所述历史执行轨迹用于描述所述任一录像计划历史被执行的存储节点以及执行的详情信息;
第一确定子模块,用于基于所述历史执行轨迹,从所述多个存储节点中确定执行所述任一录像计划时未失败的存储节点;
第二分配子模块,用于将所述任一录像计划分配给所述未失败的存储节点。
可选地,所述装置还包括:
第三确定模块,用于将所述多个存储节点中已发生运行故障的至少一个存储节点当前正在执行和未执行的多个录像计划确定为待下发的多个录像计划;和/或,
第四确定模块,用于将已接收且未处理的录像计划下发请求中携带的多个 录像计划确定为待下发的多个录像计划。
可选地,所述装置还包括:
删除模块,用于将已接收且未处理的录像计划删除请求中携带的录像计划从对应的存储节点中删除。
可选地,所述装置还包括:
第一触发模块,用于当检测到所述多个存储节点中任一存储节点发生运行故障时,触发所述第一确定模块基于待下发的多个录像计划的个数和所述多个存储节点的性能评分,确定分配给各个存储节点的录像计划的分配个数;或者,
第二触发模块,用于每隔第一预设时长,触发所述第二确定模块基于待下发的多个录像计划的个数和所述多个存储节点的性能评分,确定分配给各个存储节点的录像计划的分配个数。
可选地,所述装置还包括:
第五确定模块,用于确定所述多个存储节点中当前正在执行的录像计划的执行总个数;
第六确定模块,用于基于所述多个存储节点的执行总个数和所述多个存储节点的性能评分,确定所述多个存储节点中各个存储节点的负载状态;
第二分配模块,用于当所述多个存储节点中存在负载状态为不均衡状态的存储节点时,对处于所述不均衡状态的存储节点当前正在执行的录像计划的实际个数重新进行分配。
可选地,所述第六确定模块包括:
第三计算子模块,用于将所述各个存储节点的性能评分除以所述多个存储节点的性能总评分,得到所述各个存储节点的评分权重,所述性能总评分为所述多个存储节点的性能评分之和;
第四计算子模块,用于将所述多个存储节点的执行总个数分别乘以所述各个存储节点的评分权重,得到所述各个存储节点当前正在执行的录像计划的理论个数;
第二确定子模块,用于当所述多个存储节点中存在当前正在执行的录像计划的实际个数与所述理论个数不相同的存储节点时,确定所述多个存储节点中存在负载状态为所述不均衡状态的存储节点。
可选地,所述第二分配模块包括:
第三确定子模块,用于对于处于所述不均衡状态的存储节点中的任一存储 节点,确定所述任一存储节点对应的超载个数或者缺载个数;
其中,所述超载个数是指所述任一存储节点当前正在执行的录像计划的实际个数多于所述任一存储节点当前正在执行的录像计划的理论个数的数量,所述缺载个数是指所述任一存储节点当前正在执行的录像计划的实际个数少于所述任一存储节点当前正在执行的录像计划的理论个数的数量;
移动子模块,用于从所述任一存储节点当前正在执行的录像计划中移出个数为所述超载个数的录像计划,或者,基于处于所述不均衡状态的存储节点中的其他存储节点中移出的录像计划,向所述任一存储节点分配个数为所述缺载个数的录像计划。
可选地,所述第一确定模块包括:
第四确定子模块,用于对于所述多个存储节点中的任一存储节点,基于所述任一存储节点上报的多个性能指标的详情信息,确定所述任一存储节点的所述多个性能指标的评分;
第五计算子模块,用于当所述任一存储节点的所述多个性能指标的评分均高于预设评分时,将所述多个性能指标的评分相加,得到所述任一存储节点当前的性能评分;
第五确定子模块,用于当所述任一存储节点的所述多个性能指标的评分不全高于所述预设评分时,将所述多个性能指标中评分最低的性能指标的评分确定为所述任一存储节点当前的性能评分。
可选地,所述装置还包括:
第三触发模块,用于每隔第二预设时长,触发所述第五确定模块确定所述多个存储节点中当前正在执行的录像计划的执行总个数。
第三方面,提供了一种管理节点,所述管理节点包括:
处理器;
用于存储处理器可执行指令的存储器;
其中,所述处理器被配置为执行上述第一方面提供的任一项方法的步骤。
第四方面,提供了一种计算机可读存储介质,其上存储有计算机程序,所述程序被处理器执行时实现上述第一方面提供的任一所述方法的步骤。
本申请实施例提供的技术方案带来的有益效果至少包括:
在本申请实施例中,管理节点可以确定多个存储节点当前的性能评分,并基于待下发的多个录像计划的个数和多个存储节点的性能评分,确定分配给各个存储节点的录像计划的分配个数。由于性能评分可以描述存储节点当前运行资源的能力,且各个存储节点的录像计划的分配个数可以通过对应的性能评分确定,因此,确定的分配个数将符合各个存储节点运行资源的能力,按照确定的分配个数将多个录像计划分配给多个存储节点后,该多个存储节点之间将处于负载均衡状态,从而保证了负载均衡的准确性,提升了负载均衡的效果。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本申请实施例提供的一种视频监控系统的结构示意图;
图2是本申请实施例提供的一种负载均衡方法的流程图;
图3是本申请实施例提供的另一种负载均衡方法的流程图;
图4A是本申请实施例提供的第一种负载均衡装置的结构示意图;
图4B是本申请实施例提供的一种第二确定模块的结构示意图;
图4C是本申请实施例提供的一种第一分配模块的结构示意图;
图4D是本申请实施例提供的另一种第一分配模块的结构示意图;
图4E是本申请实施例提供的第二种负载均衡装置的结构示意图;
图4F是本申请实施例提供的第三种负载均衡装置的结构示意图;
图4G是本申请实施例提供的第四种负载均衡装置的结构示意图;
图4H是本申请实施例提供的一种第六确定模块的结构示意图;
图4I是本申请实施例提供的一种第二分配模块的结构示意图;
图4J是本申请实施例提供的一种第一确定模块的结构示意图;
图5是本申请实施例提供的一种节点的结构示意图;
图6是本申请实施例提供的另一种节点的结构示意图。
具体实施方式
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。
在对本申请实施例进行详细的解释说明之前,先对本申请实施例中涉及到的应用场景及系统架构分别进行解释说明。
首先,对本申请实施例涉及的应用场景进行介绍。
目前,在视频监控系统中,一个存储节点通常可以对应多个摄像装置,该存储节点可以获取并存储该多个摄像装置录制的视频流。但是,当该存储节点对应的摄像装置的数量较大时,该存储节点的运行负担将过重,从而影响该存储节点从摄像装置中获取视频流。因此,往往需要通过视频监控系统中的管理节点进行负载均衡。但是,目前在进行负载均衡时,管理节点仅能通过使用率最低的存储节点获取并存储摄像装置录制的视频流。当该存储节点的硬件性能较差时,通过该存储节点继续存储视频流同样会导致该存储节点运行负担过重,从而导致负载均衡的实现效果较差。
基于这样的场景,本申请实施例提供了一种能够实现负载均衡,并提高实现负载均衡的负载均衡方法。
接下来,对本申请实施例涉及的系统架构进行介绍。
图1是本申请实施例提供的一种视频监控系统的架构示意图,参见图1,该系统包括管理节点1,多个存储节点2和多个摄像装置3。为了方便进行描述,在图1中以3个存储节点2和6个摄像装置3为例进行描述。
其中,管理节点1和多个存储节点2均可以为服务器,也可以为诸如平板电脑等终端,且该管理节点1可以是多个存储节点2中的任一节点,或者为独立于多个存储节点2之外的能够用于进行负载均衡的节点。多个摄像装置3可以分别与管理节点1和多个存储节点2连接,管理节点1可以与多个存储节点2连接。该管理节点1可以管理多个存储节点2,以及检测多个摄像装置3发送的请求,且为了方便对该多个存储节点2进行管理,该多个存储节点2中的各个存储节点2可以分别将多个性能指标的详情信息上报给管理节点1,从而该管理节点1可以根据各个存储节点2上报的多个性能指标的详情信息,分别确定各个存储节点2当前的性能评分。同时,为了使多个存储节点2中任一存储节点2可以从多个摄像装置3中的任一摄像装置3中获取并存储视频流,该多个摄像装置3可以将录像计划上报给管理节点1。管理节点1在检测到多个 录像计划后,可以将该多个录像计划进行存储,并基于该多个录像计划的个数和各个存储节点2的性能评分,确定分配给各个存储节点2的录像计划的分配个数,按照确定的分配个数,将该多个录像计划分配给多个存储节点2。
需要说明的是,在本申请实施例中,该视频监控系统中不仅可以包括管理节点1、多个存储节点2和多个摄像装置3,还可以包括其他设备,比如,用户终端等。该用户终端可以分别与多个摄像装置3和管理节点1连接,该用户终端可以对多个摄像装置3的录像计划进行设置。也即是,该用户终端可以作为该多个摄像装置3的管理设备。可选地,该用户终端还可以将多个摄像装置3的录像计划发送至管理节点1,这样就不需要摄像装置3将各自的录像计划发送至管理节点1。
另外,在本申请实施例中,该视频监控系统中可以仅包括一个管理节点1,也可以包括多个管理节点1。当该视频监控系统中包括多个管理节点1时,可以将该多个管理节点1中的任一管理节点1确定为主管理节点1,将该多个管理节点1中的其他管理节点1确定为多个从管理节点1。其中,主管理节点1用于管理检测到的录像计划以及多个存储节点2,多个从管理节点1用于实时同步主管理节点1中的信息。当该主管理节点1发生故障时,多个从管理节点1中的任一从管理节点1可以快速接管主管理节点1当前执行的进程,从而保证不中断对负载均衡的实现,提高了实现负载均衡的可靠性。
再者,在本申请实施例中,该视频监控系统可以包括多个域,也可以只包括一个域,且一个摄像装置和存储节点只能属于一个域,一个域可以包括多个摄像装置和多个存储节点。需要说明的是,域可以为使管理节点的管理权限生效的区域,该区域可以为摄像装置3和存储节点2所在的网络区域,也可以为为3摄像装置和存储节点2所在的地理位置区域。管理节点可以管理当前所在域中的各个摄像装置3和各个存储节点2,但是无法管理位于其他域的各个摄像装置3和各个存储节点2。
在对本申请实施例的应用场景和系统架构进行介绍之后,接下来将结合附图对本申请实施例提供的负载均衡方法进行详细介绍。
图2是根据一示例性实施例示出的一种负载均衡方法的流程图,参见图2,该方法应用于视频监控系统中的管理节点,包括如下步骤。
步骤201:管理节点确定视频监控系统中的多个存储节点当前的性能评分, 该性能评分是基于存储节点的各个性能指标的评分确定得到,且用于描述存储节点当前运行资源的能力。
由于多个存储节点中任一存储节点的运行资源的能力与其各个性能指标的评分有关,因此,为了实现多个存储节点之间的负载均衡,以及负载均衡的实现效果,管理节点需要确定视频监控系统中的多个存储节点当前的性能评分。而管理节点确定该视频监控系统中的多个存储节点当前的性能评分的操作可以为:对于该多个存储节点中的任一存储节点,基于该任一存储节点上报的多个性能指标的详情信息,确定该任一存储节点的多个性能指标的评分;当该任一存储节点的多个性能指标的评分均高于预设评分时,将该多个性能指标的评分相加,得到该任一存储节点当前的性能评分;当该任一存储节点的多个性能指标的评分不全高于该预设评分时,将该多个性能指标中评分最低的性能指标的评分确定为该任一存储节点当前的性能评分。或者,当该任一存储节点的多个性能指标的评分不全高于该预设评分时,将该预设评分确定为该任一存储节点当前的性能评分。
需要说明的是,由上述可知,为了方便管理多个存储节点,该多个存储节点中任一存储节点可以将多个性能指标的详情信息上报给管理节点,且管理节点可以将多个存储节点中任一存储节点上报的多个性能指标的详情信息进行存储,因此,管理节点可以根据各个存储节点上报的详情信息确定视频监控系统中的多个存储节点当前的性能评分。
其中,该多个性能指标的详情信息可以包括CPU(Central Processing Unit,中央处理器)的利用率或空闲率、内存的利用率或空闲率、网络信道的利用率或空闲率、I/O((Input/Output,输入/输出)的利用率或空闲率、存储介质的存储容量等等。
另外,由于多个存储节点中的任一存储节点在运行过程中,该任一存储节点的多个性能指标中任一性能指标可能会发生变化,比如,网络信道可能会在上网高峰期时受到影响而发生拥堵,或者,该任一存储节点可能会在运行过程中产生额外的运行信息,导致内存利用率增加空闲率降低等。因此,为了保证该任一存储节点当前的性能评分的准确性,该任一存储节点可以每隔指定时长主动上报一次多个性能指标的详情信息。该指定时长可以为20秒、5分钟、30分钟等等。当然,管理节点也可以每隔指定时长向每个存储节点发送一次信息获取请求,这样,多个存储节点中的任一存储节点即可每隔指定时长被动上报 一次多个性能指标的详情信息。
还需要说明的是,由于该任一存储节点可以每隔指定时长上报一次多个性能指标的详情信息,因此,管理节点可以在每次接收到该任一存储节点上报的多个性能指标的详情信息时,确定该任一存储节点当前的性能评分。另外,由上述可知,管理节点可以接收多个摄像装置上报的多个录像计划,而通常情况下,管理节点可以将多个摄像装置上报的多个录像计划进行下发,因此,管理节点也可以在需要向多个存储节点下发多个录像计划时,根据最近一次存储的该任一存储节点的多个性能指标的详情信息,确定该任一存储节点当前的性能评分。
其中,管理节点基于该任一存储节点上报的多个性能指标的详情信息,确定该任一存储节点的多个性能指标的评分的操作可以为:当该多个性能指标的详情信息包括各个性能指标的空闲率时,管理节点可以获取每个性能指标对应的总权重评分,将该各个性能指标的总权重评分与空闲率相乘,得到各个性能指标的评分。当该多个性能指标的详情信息中包括各个性能指标的利用率时,管理节点可以将1减去各个性能指标的利用率,得到各个性能的空闲率,并获取每个性能指标对应的总权重评分,将该各个性能指标的总权重评分与空闲率相乘,得到各个性能指标的评分。
需要说明的是,该多个性能指标对应的总权重评分可以事先设置,且该多个性能指标对应的总权重评分可以相同,比如,CPU、内存、网络信道和I/O对应的总权重评分可以均为20。但是,由于该多个性能指标对存储节点运行资源的能力影响的程度不同,因此,该多个性能指标对应的总权重评分也可以不同。比如,CPU对应的总权重评分可以为20、内存对应的总权重评分可以为30、网络信道对应的总权重评分可以为10、I/O对应的总权重评分可以为15等等。
还需要说明的是,该多个性能指标对应的总权重评分可以存储在管理节点中,也可以包括于该任一存储节点上报的多个性能指标的详情信息中。当该任一存储节点的多个性能指标对应的总权重评分包括于该任一存储节点上报的多个性能指标的详情信息中时,管理节点可以从多个性能指标的详情信息中获取多个性能指标对应的总权重评分。
比如,当该多个性能指标的详情信息包括CPU的空闲率60%,内存的空闲率40%、网络信道的空闲率50%和I/O的空闲率50%时,管理节点可以获取 CPU、内存、网络信道、存储空间、I/O对应的总权重评分均为20。将该CPU的总权重评分与CPU的空闲率60%相乘,得到CPU的评分为12,将该内存的总权重评分与内存的空闲率相乘,得到内存的评分为8,将该网络信道的总权重评分20与网络信道的空闲率50%相乘,得到网络信道的评分10,将该I/O的总权重评分与I/O的空闲率50%相乘,得到I/O的评分为10。
另外,由于有时候当多个性能指标中任一性能指标的空闲率较低时,即使其它性能指标的空闲率较高,该存储节点可能还是会负载过高,从而影响存储节点的运行。比如,当多个存储节点中的存储节点B的CPU的空闲率为9%时,该存储节点B已经负载过重,运行困难,即使I/O、内存、网络信道等的空闲率较高,该存储节点B也无法继续运行。因此,管理节点还需要确定该存储节点B中多个性能指标的评分是否均高于预设评分,并当该存储节点B中多个性能指标的评分均高于预设评分时,将该多个性能指标的评分相加,得到该存储节点B当前的性能评分;当该存储节点B中该多个性能指标的评分不全高于该预设评分时,也即是,当该存储节点B中多个性能指标中至少一个性能指标的评分低于或等于该预设评分时,可以将该多个性能指标中评分最低的性能指标的评分确定为存储节点B当前的性能评分。或者,也可以将该预设评分确定为该存储节点B当前的性能评分。这样,可以避免出现存储节点当前实际运行资源的能力与性能评分所描述的运行资源的能力不一致的情况,保证了管理节点确定各个存储节点的性能评分的准确性,从而可以避免后续存储节点因负载过重而出现故障。
需要说明的是,该预设评分可以事先设置,比如,该预设评分可以为10分、5分、3分等等。
还需要说明的是,该任一存储节点的多个性能指标的评分有可能是逐个确定出来的,因此,当管理节点确定出该任一存储节点的多个性能指标中任一性能指标的评分不高于该预设评分时,即可确定该任一存储节点的多个性能指标中存在性能评分不高于预设评分的性能指标,此时,管理节点可以无需确定剩余性能指标的评分,而是直接将确定出的不高于预设评分的性能指标的评分确定为该任一存储节点的性能评分。或者,直接将预设评分确定为该任一存储节点的性能评分。
比如,该管理节点逐个确定存储节点B的CPU的评分、I/O的评分、内存的评分、存储介质的存储容量的评分,且预设评分为5分时,如果管理节点确 定该存储节点B的CPU的评分为3分,则管理节点可以无需继续确定I/O、内存、存储介质的存储容量的评分,而是直接将该3分确定为该存储节点B的性能评分。或者,直接将该5分确定为该存储节点B的性能评分。
值得说明的是,由于管理节点无需确定存储节点所有性能指标的评分即可确定该存储节点的性能评分,从而加快了管理节点确定每一个存储节点的性能评分的速度,减小了管理节点的计算量,避免了管理节点因确定多个存储节点的评分而浪费资源。
再者,该任一存储节点上报的多个性能指标的详情信息不仅可以包括CPU的利用率或空闲率、内存的利用率或空闲率等信息,也可以包括其他信息,比如,该多个性能指标的详细请信息中还可以包括各个性能指标的评分。当该多个性能指标的详细请信息中包括各个性能指标的评分时,管理节点可以直接从该多个性能指标的详细请信息中获取各个性能指标的评分,并将该各个性能指标的评分相加,得到该任一存储节点当前的性能评分。
步骤202:管理节点基于待下发的多个录像计划的个数和该多个存储节点的性能评分,确定分配给各个存储节点的录像计划的分配个数,该录像计划用于描述摄像装置录制视频流的时间信息。
由于通常情况下,当各个存储节点在接收到管理节点下发的录像计划后处于负载均衡状态时,那么该多个存储节点在执行录像计划的过程中同样也会处于负载均衡状态,因此,为了实现在下发录像计划的过程中多个存储节点之间的负载均衡,管理节点可以基于待下发的多个录像计划的个数和该多个存储节点的性能评分,确定分配给各个存储节点的录像计划的分配个数。而管理节点基于待下发的多个录像计划的个数和多个存储节点的性能评分,确定分配给各个存储节点的录像计划的分配个数的操作可以为:将该各个存储节点的性能评分除以该多个存储节点的性能总评分,得到各个存储节点的评分权重,该性能总评分为该多个存储节点的性能评分之和;将该多个录像计划的个数乘以该各个存储节点的评分权重,得到分配给该各个存储节点的录像计划的分配个数。
其中,录像计划用于描述摄像装置录制视频流的时间信息,也即是,录像计划可以描述存储节点什么时候从对应摄像装置中获取并存储视频流,什么时候停止获取及存储视频流。比如,录像计划可以描述为存储节点24小时不间断从对应摄像装置中获取并存储视频流,也可以描述为存储节点早6点开始从对应摄像装置中获取并存储视频流,在晚10点停止从对应摄像装置中获取并 存储视频流。
值得说明的是,由于各个存储节点的评分权重可以反映各个存储节点之间运行资源的能力的比例关系,因此,管理节点根据各个存储节点的评分权重可以准确地确定出分配给各个存储节点的录像计划的分配个数,从而提高了负载均衡的准确性。
比如,当多个录像计划的个数为100个,且存储节点1的性能评分为50、存储节点2的性能评分为30,存储节点3的性能评分为20,将存储节点1、存储节点2和存储节点3的性能评分相加,得到性能总评分为100。将存储节点1的性能评分30除以性能总评分100,得到存储节点1的评分权重为0.5,将存储节点2的性能评分30除以性能总评分100,得到存储节点2的评分权重为0.3,将存储节点3的性能评分20除以性能总评分100,得到存储节点3的评分权重为0.2。将该多个录像计划的个数100乘以该各个存储节点的评分权重,得到分配给该存储节点1、2和3的录像计划的分配个数分别为50、30和20。
需要说明的是,该多个录像计划可以是管理节点从多个摄像装置发送的录像计划下发请求中获取得到,也可以是管理节点从已发生运行故障的至少一个存储节点中获取得到,且从至少一个存储节点中获取的多个录像计划为该至少一个存储节点当前正在执行和未执行的多个录像计划。也即是,管理节点基于待下发的多个录像计划的个数和该多个存储节点的性能评分,确定分配给各个存储节点的录像计划的分配个数之前,可以将该多个存储节点中已发生运行故障的至少一个存储节点当前正在执行和未执行的多个录像计划确定为待下发的多个录像计划;和/或,将已接收且未处理的录像计划下发请求中携带的多个录像计划确定为待下发的多个录像计划。
由于多个存储节点中任一存储节点在运行过程中可能会出现故障,一旦存储节点出现故障则该存储节点将无法从摄像装置中获取并存储视频流,从而可能导致重要信息遗漏。因此,为了避免信息发生遗漏,当任一存储节点发生故障后,该存储节点可以向管理节点上报故障消息,管理节点在接收到该故障消息时,可以将该存储节点当前正在执行和未执行的多个录像计划确定为待下发的多个录像计划,并执行步骤202的操作。
另外,通常情况下,当多个摄像装置向管理节点发送录像计划下发请求后,管理节点可能并不会及时处理该录像计划下发请求,而是每隔第一预设时长,检测一次摄像装置发送的请求,并在检测到该录计划下发请求时,将录像计划 下发请求中携带的录像计划进行下发。也即是,管理节点可以每隔第一预设时长,执行步骤202的操作。
需要说明的是,该第一预设时长可以事先设置,比如,该第一预设时长可以为5分钟、10分钟等等。
另外,由于多个摄像装置中任一摄像装置的录像计划可能会发生更改,且当录像计划发生更改时,该摄像装置可以向管理节点发送更改请求,比如,摄像装置可以向管理节点发送录像计划删除请求。当该管理节点检测到该录像计划删除请求时,可以将已接收且未处理的录像计划删除请求中携带的录像计划从对应的存储节点中删除。
再者,由上述可知,视频监控系统中可能会包括一个域,也可能会包括多个域,且一个摄像装置和存储节点只能属于一个域,一个域可以包含多个摄像装置和多个存储节点。如果视频监控系统中包括多个域,则管理节点在确定分配给各个存储节点的录像计划的分配个数时,需要分别确定各个域中包括的各个存储节点的录像计划的分配个数。
其中,对于多个存储节点中任一存储节点,管理节点需要从多个存储节点中确定与该任一存储节点属于相同域的所有存储节点,将该任一存储节点的性能评分除以与该任一存储节点属于相同域的所有存储节点的性能总评分,得到该任一存储节点的评分权重,该性能总评分为与该任一存储节点属于相同域的所有存储节点的性能评分之和。
另外,由于一个摄像装置和存储节点只能属于一个域,且录像计划用于描述摄像装置录制视频流的时间信息,因此,一个录像计划也只能属于一个域,一个域中可以包括多个录像计划。因此,为了准确分配多个录像计划,管理节点还需要从多个录像计划中确定与该任一存储节点属于相同域的所有录像计划,将与该任一存储节点属于相同域的所有录像计划的个数乘以与该任一存储节点属于相同域的各个存储节点的评分权重,得到分配给与该任一存储节点属于相同域的各个存储节点的录像计划的分配个数。
步骤203:管理节点按照确定的分配个数,将该多个录像计划分配给该多个存储节点。
其中,管理节点可以直接按照确定的分配个数,将该多个录像计划分配给多个存储节点。但是,有时候当录像计划的个数过多,且网络状况不允许管理节点一次性发送大量的录像计划时,管理节点可能只能按照预设个数进行分 配。也即是,当该多个录像计划的个数过多时,可以将该多个录像计划分成多份,每份最多包括预设个数个录像计划,并将多份录像计划依次进行发送,直至该多个录像计划发送完。该预设个数可以事先设置,比如,该预设个数可以为10个、20个等等。
由于当录像计划的个数过多时,管理节点是依次发送多份录像计划,这样,该多个录像计划分配给存储节点的时间将会不同,一些重要的录像计划可能会因分配不及时导致信息遗漏。因此,管理节点按照确定的分配个数,将该多个录像计划分配给该多个存储节点时,可以获取多个录像计划的优先级;按照该多个录像计划的优先级顺序和确定的分配个数,将该多个录像计划分配给该多个存储节点。
其中,管理节点可以将多个录像计划按照优先级由高到低的顺序分成多份,每份最多包括预设个数个录像计划。由于按照优先级顺序将多个录像计划分成多份,因此,多份录像计划之间同样存在优先级,此时可以按照优先级由高到低顺序将多份录像计划依次进行分配。
需要说明的是,该多个录像计划的优先级可以事先设置,且该多个录像计划的优先级可以按照摄像装置的位置进行设置,比如,如果视频监控系统为酒店的视频监控系统,则当摄像装置为酒店走廊的摄像装置时,将该摄像装置发送的录像计划的优先级设置为高,当该摄像装置为酒店大厅的摄像装置时,将该摄像装置发送的录像计划的优先级设置为中,当该摄像装置为酒店大门的摄像装置时,将该摄像装置发送的录像计划的优先级设置为低。当然,在实际应用中,也可以按照执行录像计划的时间进行设置,比如,执行录像计划A的时间为24小时不间断执行时,将该录像计划A的优先级设置为高,当执行录像计划B的时间为早6点至10点时,将该录像计划B的优先级设置为中,当执行录像计划C的时间为晚上10点至第二天6点时,将该录像计划C的优先级设置为低。
另外,由于多个录像计划可能并不是第一次分配给存储节点,也即是,某个录像计划在当前时间之前被执行过,而且执行该录像计划的存储节点在执行过程中可能还发生了故障,因此,为了保证存储节点的正常运行,避免某些录像计划在特定存储节点上取流失败的问题,管理节点将该多个录像计划分配给该多个存储节点的操作还可以为:对于该多个录像计划中的任一录像计划,获取该任一录像计划的历史执行轨迹,该历史执行轨迹用于描述该任一录像计划 历史被执行的存储节点以及执行的详情信息;基于该历史执行轨迹,从该多个存储节点中确定执行该任一录像计划时未失败的存储节点;将该任一录像计划分配给未失败的存储节点。
需要说明的是,由于多个录像计划中任一录像计划都是由管理节点发送的,且多个存储节点中任一存储节点在发生运行故障时都可以向管理节点上报故障消息,因此,管理节点可以很容易获知录像计划的历史执行轨迹,以及录像计划在多个存储节点中的某个存储节点中执行时该存储节点是否发生故障等信息,从而保证了管理节点在分配录像计划时,能够将录像计划分配给未失败的存储节点,保证了录像计划能够被顺利执行。
再者,由于视频监控系统中可能会包括多个域,因此,管理节点在对各个存储节点分配录像计划时,将与各个存储节点属于相同域的录像计划,按照确定的分配个数分配给各个存储节点。
进一步地,当多个存储节点中的任一存储节点接收到管理节点分配的录像计划后,该任一存储节点可以确定分配的录像计划所描述的时间信息,并在检测到当前时间到达执行录像计划的时间时,从录像计划所描述的摄像装置中获取并存储视频流。
更进一步地,由上述可知,视频监控系统中可以包括一个主管理节点和多个从管理节点,多个从管理节点可以实时同步主管理节点中的信息,因此,当主管理节点发生故障时,多个从管理节点中的任一从管理节点可以及时接管主管理节点当前执行的进程,从而保证不中断对负载均衡的实现,提高了实现负载均衡的可靠性。其中,在本申请实施例中,以管理节点为主管理节点为例进行说明。
在本申请实施例中,管理节点可以确定多个存储节点当前的性能评分,并基于待下发的多个录像计划的个数和多个存储节点的性能评分,确定分配给各个存储节点的录像计划的分配个数。由于性能评分可以描述存储节点当前运行资源的能力,因此,通过性能评分确定的各个存储节点的录像计划的分配个数为符合各个存储节点运行资源的能力的个数,按照确定的分配个数将多个录像计划分配给多个存储节点后,该多个存储节点之间将处于负载均衡状态,从而保证了负载均衡的准确性,提升了实现负载均衡的效果。
值得说明的是,管理节点可以通过上述步骤201-步骤203的操作,在下发 录像计划的过程中实现负载均衡。但是,由于存储节点在执行录像计划的过程中,可能会因为一些原因,导致多个存储节点之间负载不均衡。因此,管理节点在确定视频监控系统中的多个存储节点当前的性能评分之后,还可以调整多个存储节点中当前正在执行的录像计划的个数,以实现负载均衡。参见图3,为本申请实施例提供的另一种负载均衡方法,该方法具体包括如下步骤。
步骤301:管理节点确定该多个存储节点中当前正在执行的录像计划的执行总个数。
需要说明的是,管理节点可以主动确定该多个存储节点中当前正在执行的录像计划的执行总个数,也可以被动确定该多个存储节点中当前正在执行的录像计划的执行总个数。下述分别对主动确定执行总个数的操作和被动确定执行总个数的操作进行说明。
主动确定执行总个数
由于多个存储节点中的任一存储节点在执行录像计划的过程中,该存储节点的多个性能指标中的至少一个性能指标可能会发生变化,从而导致负载不均衡,因此,为了将多个存储节点之间的录像计划进行负载均衡,管理节点需要获取多个存储节点当前正在执行的录像计划的执行总个数。
比如,存储节点1在执行录像计划的过程中,该存储节点1的网络信道可能会在上网高峰期受到影响而发生拥堵,或者,存储节点1可能会在运行过程中产生额外的运行信息,导致内存利用率增加空闲率降低等,从而导致存储节点与其他存储节点之间负载不再均衡,此时,管理节点需要获取多个存储节点当前正在执行的录像计划的执行总个数。
其中,管理节点可以每隔第二预设时长,确定该多个存储节点中当前正在执行的录像计划的执行总个数。该第二预设时长可以事先设置,比如,该第二预设时长可以为10分钟、20分钟等等。
被动确定执行总个数
由上述步骤202可知,该多个存储节点中可能会存在运行故障的存储节点,且管理节点可以将故障的存储节点正在执行以及未执行的录像计划重新进行下发。因此,当故障的存储节点运行恢复正常后,该运行恢复正常的存储节点中将没有可执行的录像计划,从而导致多个存储节点之间负载不均衡。因此,为了将多个存储节点之间的录像计划进行负载均衡,管理节点需要获取多个存储节点当前正在执行的录像计划的执行总个数。
其中,当运行故障的存储节点运行恢复正常后,该运行恢复正常的存储节点可以向管理节点上报运行恢复正常的消息,管理节点接收到该运行恢复正常的消息时,可以获取多个存储节点当前执行的录像计划的执行总个数。
另外,由于视频监控系统中可能会包括多个域,因此,管理节点确定当前正在执行的录像计划的执行总个数时,需要分别确定属于同一个域的多个存储节点的执行总个数。
步骤302:管理节点基于该多个存储节点的执行总个数和该多个存储节点的性能评分,确定该多个存储节点中各个存储节点的负载状态。
由于多个存储节点之间负载不均衡时,可能仅仅是多个存储节点中部分存储节点处于负载不均衡状态,另一部分存储节点可能依然处于负载均衡状态。因此,为了准确地对处于负载不均衡状态的存储节点所执行的录像计划进行调整,管理节点需要基于该多个存储节点的执行总个数和该多个存储节点的性能评分,确定该多个存储节点中各个存储节点的负载状态。
其中,管理节点基于该多个存储节点的执行总个数和该多个存储节点的性能评分,确定该多个存储节点中各个存储节点的负载状态的操作可以为:将该各个存储节点的性能评分除以该多个存储节点的性能总评分,得到该各个存储节点的评分权重,该性能总评分为该多个存储节点的性能评分之和;将该多个存储节点的执行总个数分别乘以该各个存储节点的评分权重,得到该各个存储节点当前正在执行的录像计划的理论个数;当该多个存储节点中存在当前正在执行的录像计划的实际个数与理论个数不相同的存储节点时,确定该多个存储节点中存在负载状态为不均衡状态的存储节点。
比如,当存储节点1、2和3当前正在执行的录像计划的实际个数分别为50、20和30时,存储节点1、2和3的执行总个数为100个。当存储节点1、2和3的性能总评分为100,存储节点1的评分为50、存储节点2的评分为30,存储节点3的评分为20时,将存储节点1、2和3的性能评分分别除以性能总评分100,得到存储节点1、2和3的评分权重分别为0.5、0.3和0.2。将该多个录像计划的执行总个数100乘以该各个存储节点的评分权重,得到给该存储节点1、2和3当前正在执行的录像计划的理论个数分别为50、30和20。由于存储节点2和存储节点3当前正在执行的录像计划的实际个数与理论个数不相同,因此,可以确定该存储节点1、2和3中存在负载状态为不均衡状态的存储节点,也即是,存储节点2和存储节点3为负载状态为不均衡状态的存储节 点。
需要说明的是,由于各个存储节点的评分权重可以反映各个存储节点之间运行资源的能力的比例关系,管理节点将该多个存储节点的执行总个数分别乘以该各个存储节点的评分权重,得到各个存储节点的理论个数即为当多个存储节点之间处于负载均衡状态时,各个存储节点当前应该执行的录像计划的个数。因此,当该多个存储节点中存在当前正在执行的录像计划的个数与理论个数不相同的存储节点时,可以确定该多个存储节点中存在负载状态为该不均衡状态的存储节点。
另外,当视频监控系统中包括多个域时,管理节点需要基于属于相同域的多个存储节点的执行总个数和该多个存储节点的性能评分,确定属于相同域的多个存储节点中各个存储节点的负载状态。
步骤303:当该多个存储节点中存在负载状态为不均衡状态的存储节点时,管理节点对处于不均衡状态的存储节点当前正在执行的录像计划的实际个数重新进行分配,以实现多个存储节点之间的负载均衡。
其中,管理节点对处于不均衡状态的存储节点当前正在执行的录像计划的实际个数重新进行分配的操作可以为:对于处于不均衡状态的存储节点中的任一存储节点,确定该任一存储节点对应的超载个数或者缺载个数;其中,超载个数是指该任一存储节点当前正在执行的录像计划的实际个数多于任一存储节点当前正在执行的录像计划的理论个数的数量,该缺载个数是指该任一存储节点当前正在执行的录像计划的实际个数少于该任一存储节点当前正在执行的录像计划的理论个数的数量;从该任一存储节点当前正在执行的录像计划中移出个数为超载个数的录像计划,或者,基于处于不均衡状态的存储节点中的其他存储节点中移出的录像计划,向该任一存储节点分配个数为缺载个数的录像计划。
需要说明的是,管理节点可以用该任一存储节点的实际个数减去理论个数,得到的结果为负数时,确定该结果为该任一存储节点对应的缺载个数;当得到的结果为正数时,确定该结果为该任一存储节点对应的超载个数。
比如,当存储节点2当前正在执行的录像计划的实际个数为20个,理论个数为30个,存储节点3当前正在执行的录像计划的实际个数为30个,理论个数为20个时,管理节点可以确定存储节点2对应的缺载个数为10个,确定存储节点3对应的超载个数为10个。此时,管理节点可以从存储节点3中移 出10个录像计划,并将移出的10个录像计划分配给存储节点2。
另外,当视频监控系统包括多个域时,管理节点只能对属于相同域中处于不均衡状态的存储节点当前正在执行的录像计划的实际个数重新进行分配。
值得说明的是,由于管理节点可以分别对多个域中每个域包括的存储节点进行负载均衡,因此,当每个域处于负载均衡状态时,整个视频监控系统也将处于负载均衡状态。
在本申请实施例中,管理节点可以确定多个存储节点当前的性能评分,之后,还可以基于多个存储节点的执行总个数和多个存储节点的性能评分,确定多个存储节点中各个存储节点的负载状态,当多个存储节点中存在负载状态为不均衡状态的存储节点时,对处于不均衡状态的存储节点当前正在执行的录像计划的实际个数重新进行分配,保证了多个存储节点在执行多个录像计划过程中因一些原因导致负载不均衡时,能够及时进行负载均衡,从而实现了不仅在录像计划下发过程中实现负载均衡,还能够在执行录像计划的过程中实现负载均衡,提高了实现多个存储节点之间负载均衡的准确性及效果。
在对本申请实施例提供的负载均衡方法进行解释说明之后,接下来,对本申请提供的负载均衡装置进行介绍。
图4A为本申请实施例提供的一种负载均衡装置的框图,参见图4A,该负载均衡装置可以由软件、硬件或者两者的结合实现。该装置包括:第一确定模块401、第二确定模块402和第一分配模块403。
第一确定模块401,用于确定所述视频监控系统中的多个存储节点当前的性能评分,所述性能评分是基于存储节点的各个性能指标的评分确定得到,且用于描述存储节点当前运行资源的能力;
第二确定模块402,用于基于待下发的多个录像计划的个数和所述多个存储节点的性能评分,确定分配给各个存储节点的录像计划的分配个数,所述录像计划用于描述摄像装置录制视频流的时间信息;
第一分配模块403,用于按照确定的分配个数,将所述多个录像计划分配给所述多个存储节点。
可选地,参见图4B,所述第二确定模块402包括:
第一计算子模块4021,用于将所述各个存储节点的性能评分除以所述多个存储节点的性能总评分,得到所述各个存储节点的评分权重,所述性能总评分 为所述多个存储节点的性能评分之和;
第二计算子模块4022,用于将所述多个录像计划的个数乘以所述各个存储节点的评分权重,得到分配给所述各个存储节点的录像计划的分配个数。
可选地,参见图4C,所述第一分配模块403包括:
第一获取子模块4031,用于获取所述多个录像计划的优先级;
第一分配子模块4032,用于按照所述多个录像计划的优先级顺序和确定的分配个数,将所述多个录像计划分配给所述多个存储节点。
可选地,参见图4D,所述第一分配模块403包括:
第二获取子模块4033,用于对于所述多个录像计划中的任一录像计划,获取所述任一录像计划的历史执行轨迹,所述历史执行轨迹用于描述所述任一录像计划历史被执行的存储节点以及执行的详情信息;
第一确定子模块4034,用于基于所述历史执行轨迹,从所述多个存储节点中确定执行所述任一录像计划时未失败的存储节点;
第二分配子模块4035,用于将所述任一录像计划分配给所述未失败的存储节点。
可选地,参见图4E,所述装置还包括:
第三确定模块404,用于将所述多个存储节点中已发生运行故障的至少一个存储节点当前正在执行和未执行的多个录像计划确定为待下发的多个录像计划;和/或,
第四确定模块405,用于将已接收且未处理的录像计划下发请求中携带的多个录像计划确定为待下发的多个录像计划。
可选地,所述装置还包括:
删除模块,用于将已接收且未处理的录像计划删除请求中携带的录像计划从对应的存储节点中删除。
可选地,参见图4F,所述装置还包括:
第一触发模块406,用于当检测到所述多个存储节点中任一存储节点发生运行故障时,触发所述第一确定模块基于待下发的多个录像计划的个数和所述多个存储节点的性能评分,确定分配给各个存储节点的录像计划的分配个数;或者,
第二触发模块407,用于每隔第一预设时长,触发所述第二确定模块基于待下发的多个录像计划的个数和所述多个存储节点的性能评分,确定分配给各 个存储节点的录像计划的分配个数。
可选地,参见图4G,所述装置还包括:
第五确定模块408,用于确定所述多个存储节点中当前正在执行的录像计划的执行总个数;
第六确定模块409,用于基于所述多个存储节点的执行总个数和所述多个存储节点的性能评分,确定所述多个存储节点中各个存储节点的负载状态;
第二分配模块410,用于当所述多个存储节点中存在负载状态为不均衡状态的存储节点时,对处于所述不均衡状态的存储节点当前正在执行的录像计划的实际个数重新进行分配。
可选地,参见图4H,所述第六确定模块409包括:
第三计算子模块4091,用于将所述各个存储节点的性能评分除以所述多个存储节点的性能总评分,得到所述各个存储节点的评分权重,所述性能总评分为所述多个存储节点的性能评分之和;
第四计算子模块4092,用于将所述多个存储节点的执行总个数分别乘以所述各个存储节点的评分权重,得到所述各个存储节点当前正在执行的录像计划的理论个数;
第二确定子模块4093,用于当所述多个存储节点中存在当前正在执行的录像计划的个数与所述理论个数不相同的存储节点时,确定所述多个存储节点中存在负载状态为所述不均衡状态的存储节点。
可选地,参见图4I,所述第二分配模块410包括:
第三确定子模块4101,用于对于处于所述不均衡状态的存储节点中的任一存储节点,确定所述任一存储节点对应的超载个数或者缺载个数;
其中,所述超载个数是指所述任一存储节点当前正在执行的录像计划的实际个数多于所述任一存储节点当前正在执行的录像计划的理论个数的数量,所述缺载个数是指所述任一存储节点当前正在执行的录像计划的实际个数少于所述任一存储节点当前正在执行的录像计划的理论个数的数量;
移动子模块4102,用于从所述任一存储节点当前正在执行的录像计划中移出个数为所述超载个数的录像计划,或者,基于处于所述不均衡状态的存储节点中的其他存储节点中移出的录像计划,向所述任一存储节点分配个数为所述缺载个数的录像计划。
可选地,参见图4J,所述第一确定模块401包括:
第四确定子模块4011,用于对于所述多个存储节点中的任一存储节点,基于所述任一存储节点上报的多个性能指标的详情信息,确定所述任一存储节点的所述多个性能指标的评分;
第五计算子模块4012,用于当所述任一存储节点的所述多个性能指标的评分均高于预设评分时,将所述多个性能指标的评分相加,得到所述任一存储节点当前的性能评分;
第五确定子模块4013,用于当所述任一存储节点的所述多个性能指标的评分不全高于所述预设评分时,将所述多个性能指标中评分最低的性能指标的评分确定为所述任一存储节点当前的性能评分。
可选地,所述装置还包括:
第三触发模块,用于每隔第二预设时长,触发所述第五确定模块确定所述多个存储节点中当前正在执行的录像计划的执行总个数。
综上所述,在本申请实施例中,管理节点可以确定多个存储节点当前的性能评分,之后,还可以基于多个存储节点的执行总个数和多个存储节点的性能评分,确定多个存储节点中各个存储节点的负载状态,当多个存储节点中存在负载状态为不均衡状态的存储节点时,对处于不均衡状态的存储节点当前正在执行的录像计划的实际个数重新进行分配,保证了多个存储节点在执行多个录像计划过程中因一些原因导致负载不均衡时,能够及时进行负载均衡,从而实现了不仅在录像计划下发过程中实现负载均衡,还能够在执行录像计划的过程中实现负载均衡,提高了实现多个存储节点之间负载均衡的准确性及效果。
需要说明的是:上述实施例提供的负载均衡装置在进行负载均衡时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的负载均衡装置与负载均衡方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。
图5示出了本申请一个示例性实施例提供的节点500的结构框图。该节点500可以是管理节点,也可以是多个存储节点中的任一个存储节点,且该节点500可以是:平板电脑、笔记本电脑或台式电脑。节点500还可能被称为用户 设备、便携式终端、膝上型终端、台式终端等其他名称。
通常,节点500包括有:处理器501和存储器502。
处理器501可以包括一个或多个处理核心,比如4核心处理器、8核心处理器等。处理器501可以采用DSP(Digital Signal Processing,数字信号处理)、FPGA(Field-Programmable Gate Array,现场可编程门阵列)、PLA(Programmable Logic Array,可编程逻辑阵列)中的至少一种硬件形式来实现。处理器501也可以包括主处理器和协处理器,主处理器是用于对在唤醒状态下的数据进行处理的处理器,也称CPU(Central Processing Unit,中央处理器);协处理器是用于对在待机状态下的数据进行处理的低功耗处理器。在一些实施例中,处理器501可以在集成有GPU(Graphics Processing Unit,图像处理器),GPU用于负责显示屏所需要显示的内容的渲染和绘制。一些实施例中,处理器501还可以包括AI(Artificial Intelligence,人工智能)处理器,该AI处理器用于处理有关机器学习的计算操作。
存储器502可以包括一个或多个计算机可读存储介质,该计算机可读存储介质可以是非暂态的。存储器502还可包括高速随机存取存储器,以及非易失性存储器,比如一个或多个磁盘存储设备、闪存存储设备。在一些实施例中,存储器502中的非暂态的计算机可读存储介质用于存储至少一个指令,该至少一个指令用于被处理器501所执行以实现本申请中方法实施例提供的一种负载均衡方法。
在一些实施例中,节点500还可选包括有:外围设备接口503和至少一个外围设备。处理器501、存储器502和外围设备接口503之间可以通过总线或信号线相连。各个外围设备可以通过总线、信号线或电路板与外围设备接口503相连。具体地,外围设备包括:射频电路504、触摸显示屏505、摄像头506、音频电路507、定位组件508和电源509中的至少一种。
外围设备接口503可被用于将I/O(Input/Output,输入/输出)相关的至少一个外围设备连接到处理器501和存储器502。在一些实施例中,处理器501、存储器502和外围设备接口503被集成在同一芯片或电路板上;在一些其他实施例中,处理器501、存储器502和外围设备接口503中的任意一个或两个可以在单独的芯片或电路板上实现,本实施例对此不加以限定。
射频电路504用于接收和发射RF(Radio Frequency,射频)信号,也称电磁信号。射频电路504通过电磁信号与通信网络以及其他通信设备进行通信。 射频电路504将电信号转换为电磁信号进行发送,或者,将接收到的电磁信号转换为电信号。可选地,射频电路504包括:天线系统、RF收发器、一个或多个放大器、调谐器、振荡器、数字信号处理器、编解码芯片组、用户身份模块卡等等。射频电路504可以通过至少一种无线通信协议来与其它终端进行通信。该无线通信协议包括但不限于:万维网、城域网、内联网、各代移动通信网络(2G、3G、4G及5G)、无线局域网和/或WiFi(Wireless Fidelity,无线保真)网络。在一些实施例中,射频电路504还可以包括NFC(Near Field Communication,近距离无线通信)有关的电路,本申请对此不加以限定。
显示屏505用于显示UI(User Interface,用户界面)。该UI可以包括图形、文本、图标、视频及其它们的任意组合。当显示屏505是触摸显示屏时,显示屏505还具有采集在显示屏505的表面或表面上方的触摸信号的能力。该触摸信号可以作为控制信号输入至处理器501进行处理。此时,显示屏505还可以用于提供虚拟按钮和/或虚拟键盘,也称软按钮和/或软键盘。在一些实施例中,显示屏505可以为一个,设置节点500的前面板;在另一些实施例中,显示屏505可以为至少两个,分别设置在节点500的不同表面或呈折叠设计;在再一些实施例中,显示屏505可以是柔性显示屏,设置在节点500的弯曲表面上或折叠面上。甚至,显示屏505还可以设置成非矩形的不规则图形,也即异形屏。显示屏505可以采用LCD(Liquid Crystal Display,液晶显示屏)、OLED(Organic Light-Emitting Diode,有机发光二极管)等材质制备。
摄像头组件506用于采集图像或视频。可选地,摄像头组件506包括前置摄像头和后置摄像头。通常,前置摄像头设置在终端的前面板,后置摄像头设置在终端的背面。在一些实施例中,后置摄像头为至少两个,分别为主摄像头、景深摄像头、广角摄像头、长焦摄像头中的任意一种,以实现主摄像头和景深摄像头融合实现背景虚化功能、主摄像头和广角摄像头融合实现全景拍摄以及VR(Virtual Reality,虚拟现实)拍摄功能或者其它融合拍摄功能。在一些实施例中,摄像头组件506还可以包括闪光灯。闪光灯可以是单色温闪光灯,也可以是双色温闪光灯。双色温闪光灯是指暖光闪光灯和冷光闪光灯的组合,可以用于不同色温下的光线补偿。
音频电路507可以包括麦克风和扬声器。麦克风用于采集用户及环境的声波,并将声波转换为电信号输入至处理器501进行处理,或者输入至射频电路504以实现语音通信。出于立体声采集或降噪的目的,麦克风可以为多个,分 别设置在节点500的不同部位。麦克风还可以是阵列麦克风或全向采集型麦克风。扬声器则用于将来自处理器501或射频电路504的电信号转换为声波。扬声器可以是传统的薄膜扬声器,也可以是压电陶瓷扬声器。当扬声器是压电陶瓷扬声器时,不仅可以将电信号转换为人类可听见的声波,也可以将电信号转换为人类听不见的声波以进行测距等用途。在一些实施例中,音频电路507还可以包括耳机插孔。
定位组件508用于定位节点500的当前地理位置,以实现导航或LBS(Location Based Service,基于位置的服务)。定位组件508可以是基于美国的GPS(Global Positioning System,全球定位系统)、中国的北斗系统或俄罗斯的伽利略系统的定位组件。
电源509用于为节点500中的各个组件进行供电。电源509可以是交流电、直流电、一次性电池或可充电电池。当电源509包括可充电电池时,该可充电电池可以是有线充电电池或无线充电电池。有线充电电池是通过有线线路充电的电池,无线充电电池是通过无线线圈充电的电池。该可充电电池还可以用于支持快充技术。
在一些实施例中,节点500还包括有一个或多个传感器510。该一个或多个传感器510包括但不限于:加速度传感器511、陀螺仪传感器512、压力传感器513、指纹传感器514、光学传感器515以及接近传感器516。
加速度传感器511可以检测以节点500建立的坐标系的三个坐标轴上的加速度大小。比如,加速度传感器511可以用于检测重力加速度在三个坐标轴上的分量。处理器501可以根据加速度传感器511采集的重力加速度信号,控制触摸显示屏505以横向视图或纵向视图进行用户界面的显示。加速度传感器511还可以用于游戏或者用户的运动数据的采集。
陀螺仪传感器512可以检测节点500的机体方向及转动角度,陀螺仪传感器512可以与加速度传感器511协同采集用户对节点500的3D动作。处理器501根据陀螺仪传感器512采集的数据,可以实现如下功能:动作感应(比如根据用户的倾斜操作来改变UI)、拍摄时的图像稳定、游戏控制以及惯性导航。
压力传感器513可以设置在节点500的侧边框和/或触摸显示屏505的下层。当压力传感器513设置在节点500的侧边框时,可以检测用户对节点500的握持信号,由处理器501根据压力传感器513采集的握持信号进行左右手识别或快捷操作。当压力传感器513设置在触摸显示屏505的下层时,由处理器 501根据用户对触摸显示屏505的压力操作,实现对UI界面上的可操作性控件进行控制。可操作性控件包括按钮控件、滚动条控件、图标控件、菜单控件中的至少一种。
指纹传感器514用于采集用户的指纹,由处理器501根据指纹传感器514采集到的指纹识别用户的身份,或者,由指纹传感器514根据采集到的指纹识别用户的身份。在识别出用户的身份为可信身份时,由处理器501授权该用户执行相关的敏感操作,该敏感操作包括解锁屏幕、查看加密信息、下载软件、支付及更改设置等。指纹传感器514可以被设置节点500的正面、背面或侧面。当节点500上设置有物理按键或厂商Logo时,指纹传感器514可以与物理按键或厂商Logo集成在一起。
光学传感器515用于采集环境光强度。在一个实施例中,处理器501可以根据光学传感器515采集的环境光强度,控制触摸显示屏505的显示亮度。具体地,当环境光强度较高时,调高触摸显示屏505的显示亮度;当环境光强度较低时,调低触摸显示屏505的显示亮度。在另一个实施例中,处理器501还可以根据光学传感器515采集的环境光强度,动态调整摄像头组件506的拍摄参数。
接近传感器516,也称距离传感器,通常设置在节点500的前面板。接近传感器516用于采集用户与节点500的正面之间的距离。在一个实施例中,当接近传感器516检测到用户与节点500的正面之间的距离逐渐变小时,由处理器501控制触摸显示屏505从亮屏状态切换为息屏状态;当接近传感器516检测到用户与节点500的正面之间的距离逐渐变大时,由处理器501控制触摸显示屏505从息屏状态切换为亮屏状态。
也即是,本申请实施例不仅提供了一种节点,包括处理器和用于存储处理器可执行指令的存储器,其中,处理器被配置为执行图2和图3所示的实施例中的方法,而且,本申请实施例还提供了一种计算机可读存储介质,该存储介质内存储有计算机程序,该计算机程序被处理器执行时可以实现图2和图3所示的实施例中的负载均衡方法。
本领域技术人员可以理解,图5中示出的结构并不构成对节点500的限定,可以包括比图示更多或更少的组件,或者组合某些组件,或者采用不同的组件布置。
图6是本申请实施例提供的一种节点600的结构示意图,该节点600可以是管理节点,也可以是多个存储节点中的任一个存储节点,且该节点600可以为服务器,且该服务器可以是后台服务器集群中的服务器。具体来讲:
节点600包括中央处理单元(CPU)601、包括随机存取存储器(RAM)602和只读存储器(ROM)603的系统存储器604,以及连接系统存储器604和中央处理单元601的系统总线605。节点600还包括帮助计算机内的各个器件之间传输信息的基本输入/输出系统(I/O系统)606,和用于存储操作系统613、应用程序614和其他程序模块615的大容量存储设备607。
基本输入/输出系统606包括有用于显示信息的显示器608和用于用户输入信息的诸如鼠标、键盘之类的输入设备609。其中显示器608和输入设备609都通过连接到系统总线605的输入输出控制器610连接到中央处理单元601。基本输入/输出系统606还可以包括输入输出控制器610以用于接收和处理来自键盘、鼠标、或电子触控笔等多个其他设备的输入。类似地,输入输出控制器610还提供输出到显示屏、打印机或其他类型的输出设备。
大容量存储设备607通过连接到系统总线605的大容量存储控制器(未示出)连接到中央处理单元601。大容量存储设备607及其相关联的计算机可读介质为节点600提供非易失性存储。也就是说,大容量存储设备607可以包括诸如硬盘或者CD-ROM驱动器之类的计算机可读介质(未示出)。
不失一般性,计算机可读介质可以包括计算机存储介质和通信介质。计算机存储介质包括以用于存储诸如计算机可读指令、数据结构、程序模块或其他数据等信息的任何方法或技术实现的易失性和非易失性、可移动和不可移动介质。计算机存储介质包括RAM、ROM、EPROM、EEPROM、闪存或其他固态存储其技术,CD-ROM、DVD或其他光学存储、磁带盒、磁带、磁盘存储或其他磁性存储设备。当然,本领域技术人员可知计算机存储介质不局限于上述几种。上述的系统存储器604和大容量存储设备607可以统称为存储器。
根据本申请的各种实施例,节点600还可以通过诸如因特网等网络连接到网络上的远程计算机运行。也即节点600可以通过连接在系统总线605上的网络接口单元611连接到网络612,或者说,也可以使用网络接口单元611来连接到其他类型的网络或远程计算机系统(未示出)。
上述存储器还包括一个或者一个以上的程序,一个或者一个以上程序存储于存储器中,被配置由CPU执行。所述一个或者一个以上程序用于实现本本 申请实施例提供的如上述图2或图3所示的负载均衡方法。
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。
以上所述仅为本申请的较佳实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。

Claims (25)

  1. 一种负载均衡方法,应用于视频监控系统中的管理节点,所述方法包括:
    确定所述视频监控系统中的多个存储节点当前的性能评分,所述性能评分是基于存储节点的各个性能指标的评分确定得到,且用于描述存储节点当前运行资源的能力;
    基于待下发的多个录像计划的个数和所述多个存储节点的性能评分,确定分配给各个存储节点的录像计划的分配个数,所述录像计划用于描述摄像装置录制视频流的时间信息;
    按照确定的所述分配个数,将所述多个录像计划分配给所述多个存储节点。
  2. 如权利要求1所述的方法,其中,所述基于待下发的多个录像计划的个数和所述多个存储节点的性能评分,确定分配给各个存储节点的录像计划的分配个数,包括:
    将所述各个存储节点的性能评分除以所述多个存储节点的性能总评分,得到所述各个存储节点的评分权重,所述性能总评分为所述多个存储节点的性能评分之和;
    将所述多个录像计划的个数乘以所述各个存储节点的评分权重,得到分配给所述各个存储节点的录像计划的分配个数。
  3. 如权利要求1所述的方法,其中,所述按照确定的所述分配个数,将所述多个录像计划分配给所述多个存储节点,包括:
    获取所述多个录像计划的优先级;
    按照所述多个录像计划的优先级顺序和确定的分配个数,将所述多个录像计划分配给所述多个存储节点。
  4. 如权利要求1或3所述的方法,其中,所述将所述多个录像计划分配给所述多个存储节点,包括:
    对于所述多个录像计划中的任一录像计划,获取所述任一录像计划的历史执行轨迹,所述历史执行轨迹用于描述所述任一录像计划历史被执行的存储节点以及执行的详情信息;
    基于所述历史执行轨迹,从所述多个存储节点中确定执行所述任一录像计划时未失败的存储节点;
    将所述任一录像计划分配给所述未失败的存储节点。
  5. 如权利要求1所述的方法,其中,所述基于待下发的多个录像计划的个数和所述多个存储节点的性能评分,确定分配给各个存储节点的录像计划的分配个数之前,还包括:
    将所述多个存储节点中已发生运行故障的至少一个存储节点当前正在执行和未执行的多个录像计划确定为待下发的多个录像计划;和/或,
    将已接收且未处理的录像计划下发请求中携带的多个录像计划确定为待下发的多个录像计划。
  6. 如权利要求1所述的方法,其中,所述方法还包括:
    将已接收且未处理的录像计划删除请求中携带的录像计划从对应的存储节点中删除。
  7. 如权利要求1所述的方法,其中,所述基于待下发的多个录像计划的个数和所述多个存储节点的性能评分,确定分配给各个存储节点的录像计划的分配个数之前,还包括:
    当检测到所述多个存储节点中任一存储节点发生运行故障时,执行所述基于待下发的多个录像计划的个数和所述多个存储节点的性能评分,确定分配给各个存储节点的录像计划的分配个数的步骤;或者,
    每隔第一预设时长,执行所述基于待下发的多个录像计划的个数和所述多个存储节点的性能评分,确定分配给各个存储节点的录像计划的分配个数的步骤。
  8. 如权利要求1所述的方法,其中,所述确定所述视频监控系统中的多个存储节点当前的性能评分之后,还包括:
    确定所述多个存储节点中当前正在执行的录像计划的执行总个数;
    基于所述多个存储节点的执行总个数和所述多个存储节点的性能评分,确定所述多个存储节点中各个存储节点的负载状态;
    当所述多个存储节点中存在负载状态为不均衡状态的存储节点时,对处于所述不均衡状态的存储节点当前正在执行的录像计划的实际个数重新进行分配。
  9. 如权利要求8所述的方法,其中,所述基于所述多个存储节点的执行总个数和所述多个存储节点的性能评分,确定所述多个存储节点中各个存储节点的负载状态,包括:
    将所述各个存储节点的性能评分除以所述多个存储节点的性能总评分,得到所述各个存储节点的评分权重,所述性能总评分为所述多个存储节点的性能评分之和;
    将所述多个存储节点的执行总个数分别乘以所述各个存储节点的评分权重,得到所述各个存储节点当前正在执行的录像计划的理论个数;
    当所述多个存储节点中存在当前正在执行的录像计划的实际个数与所述理论个数不相同的存储节点时,确定所述多个存储节点中存在负载状态为所述不均衡状态的存储节点。
  10. 如权利要求8或9所述的方法,其中,所述对处于所述不均衡状态的存储节点当前正在执行的录像计划的实际个数重新进行分配,包括:
    对于处于所述不均衡状态的存储节点中的任一存储节点,确定所述任一存储节点对应的超载个数或者缺载个数;
    其中,所述超载个数是指所述任一存储节点当前正在执行的录像计划的实际个数多于所述任一存储节点当前正在执行的录像计划的理论个数的数量,所述缺载个数是指所述任一存储节点当前正在执行的录像计划的实际个数少于所述任一存储节点当前正在执行的录像计划的理论个数的数量;
    从所述任一存储节点当前正在执行的录像计划中移出个数为所述超载个数的录像计划,或者,基于处于所述不均衡状态的存储节点中的其他存储节点中移出的录像计划,向所述任一存储节点分配个数为所述缺载个数的录像计划。
  11. 如权利要求1所述的方法,其中,所述确定所述视频监控系统中的多个存储节点当前的性能评分,包括:
    对于所述多个存储节点中的任一存储节点,基于所述任一存储节点上报的 多个性能指标的详情信息,确定所述任一存储节点的所述多个性能指标的评分;
    当所述任一存储节点的所述多个性能指标的评分均高于预设评分时,将所述多个性能指标的评分相加,得到所述任一存储节点当前的性能评分;
    当所述任一存储节点的所述多个性能指标的评分不全高于所述预设评分时,将所述多个性能指标中评分最低的性能指标的评分确定为所述任一存储节点当前的性能评分。
  12. 如权利要求8所述的方法,其中,所述确定所述多个存储节点中当前正在执行的录像计划的执行总个数之前,还包括:
    每隔第二预设时长,执行所述确定所述多个存储节点中当前正在执行的录像计划的执行总个数的步骤。
  13. 一种负载均衡装置,应用于视频监控系统中的管理节点,所述装置包括:
    第一确定模块,用于确定所述视频监控系统中的多个存储节点当前的性能评分,所述性能评分是基于存储节点的各个性能指标的评分确定得到,且用于描述存储节点当前运行资源的能力;
    第二确定模块,用于基于待下发的多个录像计划的个数和所述多个存储节点的性能评分,确定分配给各个存储节点的录像计划的分配个数,所述录像计划用于描述摄像装置录制视频流的时间信息;
    分配模块,用于按照确定的所述分配个数,将所述多个录像计划分配给所述多个存储节点。
  14. 如权利要求13所述的装置,其中,所述第二确定模块包括:
    第一计算子模块,用于将所述各个存储节点的性能评分除以所述多个存储节点的性能总评分,得到所述各个存储节点的评分权重,所述性能总评分为所述多个存储节点的性能评分之和;
    第二计算子模块,用于将所述多个录像计划的个数乘以所述各个存储节点的评分权重,得到分配给所述各个存储节点的录像计划的分配个数。
  15. 如权利要求13所述的装置,其中,所述第一分配模块包括:
    第一获取子模块,用于获取所述多个录像计划的优先级;
    第一分配子模块,用于按照所述多个录像计划的优先级顺序和确定的分配个数,将所述多个录像计划分配给所述多个存储节点。
  16. 如权利要求13或15所述的装置,其中,所述第一分配模块包括:
    第二获取子模块,用于对于所述多个录像计划中的任一录像计划,获取所述任一录像计划的历史执行轨迹,所述历史执行轨迹用于描述所述任一录像计划历史被执行的存储节点以及执行的详情信息;
    第一确定子模块,用于基于所述历史执行轨迹,从所述多个存储节点中确定执行所述任一录像计划时未失败的存储节点;
    第二分配子模块,用于将所述任一录像计划分配给所述未失败的存储节点。
  17. 如权利要求13所述的装置,其中,所述装置还包括:
    第三确定模块,用于将所述多个存储节点中已发生运行故障的至少一个存储节点当前正在执行和未执行的多个录像计划确定为待下发的多个录像计划;和/或,
    第四确定模块,用于将已接收且未处理的录像计划下发请求中携带的多个录像计划确定为待下发的多个录像计划。
  18. 如权利要求13所述的装置,其中,所述装置还包括:
    删除模块,用于将已接收且未处理的录像计划删除请求中携带的录像计划从对应的存储节点中删除。
  19. 如权利要求13所述的装置,其中,所述装置还包括:
    第一触发模块,用于当检测到所述多个存储节点中任一存储节点发生运行故障时,执行所述基于待下发的多个录像计划的个数和所述多个存储节点的性能评分,确定分配给各个存储节点的录像计划的分配个数的步骤;或者,
    第二触发模块,用于每隔第一预设时长,执行所述基于待下发的多个录像计划的个数和所述多个存储节点的性能评分,确定分配给各个存储节点的录像计划的分配个数的步骤。
  20. 如权利要求13所述的装置,其中,所述装置还包括:
    第五确定模块,用于确定所述多个存储节点中当前正在执行的录像计划的执行总个数;
    第六确定模块,用于基于所述多个存储节点的执行总个数和所述多个存储节点的性能评分,确定所述多个存储节点中各个存储节点的负载状态;
    第二分配模块,用于当所述多个存储节点中存在负载状态为不均衡状态的存储节点时,对处于所述不均衡状态的存储节点当前正在执行的录像计划的实际个数重新进行分配。
  21. 如权利要求20所述的装置,其中,所述第六确定模块包括:
    第三计算子模块,用于将所述各个存储节点的性能评分除以所述多个存储节点的性能总评分,得到所述各个存储节点的评分权重,所述性能总评分为所述多个存储节点的性能评分之和;
    第四计算子模块,用于将所述多个存储节点的执行总个数分别乘以所述各个存储节点的评分权重,得到所述各个存储节点当前正在执行的录像计划的理论个数;
    第二确定子模块,用于当所述多个存储节点中存在当前正在执行的录像计划的实际个数与所述理论个数不相同的存储节点时,确定所述多个存储节点中存在负载状态为所述不均衡状态的存储节点。
  22. 如权利要求20或21所述的装置,其中,所述第二分配模块包括:
    第三确定子模块,用于对于处于所述不均衡状态的存储节点中的任一存储节点,确定所述任一存储节点对应的超载个数或者缺载个数;
    其中,所述超载个数是指所述任一存储节点当前正在执行的录像计划的实际个数多于所述任一存储节点当前正在执行的录像计划的理论个数的数量,所述缺载个数是指所述任一存储节点当前正在执行的录像计划的实际个数少于所述任一存储节点当前正在执行的录像计划的理论个数的数量;
    移动子模块,用于从所述任一存储节点当前正在执行的录像计划中移出个数为所述超载个数的录像计划,或者,基于处于所述不均衡状态的存储节点中的其他存储节点中移出的录像计划,向所述任一存储节点分配个数为所述缺载个数的录像计划。
  23. 如权利要求13任一所述的装置,其中,所述第一确定模块包括:
    第四确定子模块,用于对于所述多个存储节点中的任一存储节点,基于所述任一存储节点上报的多个性能指标的详情信息,确定所述任一存储节点的所述多个性能指标的评分;
    第五计算子模块,用于当所述任一存储节点的所述多个性能指标的评分均高于预设评分时,将所述多个性能指标的评分相加,得到所述任一存储节点当前的性能评分;
    第五确定子模块,用于当所述任一存储节点的所述多个性能指标的评分不全高于所述预设评分时,将所述多个性能指标中评分最低的性能指标的评分确定为所述任一存储节点当前的性能评分。
  24. 如权利要求20所述的装置,其中,所述装置还包括:
    第三触发模块,用于每隔第二预设时长,执行所述确定所述多个存储节点中当前正在执行的录像计划的执行总个数的步骤。
  25. 一种计算机可读存储介质,其上存储有计算机程序,其中,所述程序被处理器执行时实现权利要求1-12任一所述方法的步骤。
PCT/CN2019/072376 2018-01-19 2019-01-18 负载均衡方法、装置及计算机可读存储介质 WO2019141247A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810054177.8 2018-01-19
CN201810054177.8A CN110062199B (zh) 2018-01-19 2018-01-19 负载均衡方法、装置及计算机可读存储介质

Publications (1)

Publication Number Publication Date
WO2019141247A1 true WO2019141247A1 (zh) 2019-07-25

Family

ID=67301686

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/072376 WO2019141247A1 (zh) 2018-01-19 2019-01-18 负载均衡方法、装置及计算机可读存储介质

Country Status (2)

Country Link
CN (1) CN110062199B (zh)
WO (1) WO2019141247A1 (zh)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111428266B (zh) * 2019-09-05 2020-11-27 温永宁 基于大数据的存储节点空间容量和安全性评估方法
CN113225506B (zh) * 2020-01-21 2022-09-30 杭州海康威视数字技术股份有限公司 录像数据分析方法及装置
CN111401170B (zh) * 2020-03-06 2023-06-06 西安奥卡云数据科技有限公司 一种人脸检测方法及装置
CN111580755B (zh) * 2020-05-09 2022-07-05 杭州海康威视系统技术有限公司 分布式数据处理系统、分布式数据处理方法
CN114298489B (zh) * 2021-12-07 2024-09-13 国久大数据股份有限公司 一种针对不同餐饮后厨的智能监控方法、系统及存储介质
CN116684664B (zh) * 2023-06-21 2024-07-05 杭州瑞网广通信息技术有限公司 一种流媒体集群的调度方法

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101365119A (zh) * 2008-09-25 2009-02-11 北京中星微电子有限公司 用于网络视频监控系统所使用的录像负载均衡方法
CN102333120A (zh) * 2011-09-29 2012-01-25 广东高新兴通信股份有限公司 一种负载均衡处理的流存储系统
US20140267571A1 (en) * 2013-03-15 2014-09-18 Blue Jeans Network Provision of video conferencing with load balancing
CN104580016A (zh) * 2013-10-11 2015-04-29 中兴通讯股份有限公司 节点分配方法、装置及系统
CN105450964A (zh) * 2014-09-30 2016-03-30 杭州海康威视系统技术有限公司 对录像数据进行云存储的方法、系统及管理节点
CN106506665A (zh) * 2016-11-18 2017-03-15 郑州云海信息技术有限公司 一种分布式视频监控系统的负载均衡方法及平台

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101005514A (zh) * 2006-12-27 2007-07-25 北京航空航天大学 用于网络游戏的多服务器组织方法
US20100111095A1 (en) * 2008-11-03 2010-05-06 Bridgeworks Limited Data transfer
GB2508403B (en) * 2012-11-30 2016-01-27 Xyratex Tech Ltd Data communication method and apparatus
CN103905530A (zh) * 2014-03-11 2014-07-02 浪潮集团山东通用软件有限公司 一种高性能全局负载均衡的分布式数据库数据路由方法
CN104113735B (zh) * 2014-07-30 2017-05-17 武汉烽火众智数字技术有限责任公司 一种分布式视频监控存储系统及其方法
JP6093055B1 (ja) * 2016-02-04 2017-03-08 京セラ株式会社 通信装置、通信制御方法、及びプログラム
CN106790726B (zh) * 2017-03-30 2020-08-11 电子科技大学 一种基于Docker云平台的优先级队列动态反馈负载均衡资源调度方法
CN107196869B (zh) * 2017-07-14 2019-11-15 北京知道创宇信息技术股份有限公司 基于主机实际负载的自适应负载均衡方法、设备和系统

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101365119A (zh) * 2008-09-25 2009-02-11 北京中星微电子有限公司 用于网络视频监控系统所使用的录像负载均衡方法
CN102333120A (zh) * 2011-09-29 2012-01-25 广东高新兴通信股份有限公司 一种负载均衡处理的流存储系统
US20140267571A1 (en) * 2013-03-15 2014-09-18 Blue Jeans Network Provision of video conferencing with load balancing
CN104580016A (zh) * 2013-10-11 2015-04-29 中兴通讯股份有限公司 节点分配方法、装置及系统
CN105450964A (zh) * 2014-09-30 2016-03-30 杭州海康威视系统技术有限公司 对录像数据进行云存储的方法、系统及管理节点
CN106506665A (zh) * 2016-11-18 2017-03-15 郑州云海信息技术有限公司 一种分布式视频监控系统的负载均衡方法及平台

Also Published As

Publication number Publication date
CN110062199A (zh) 2019-07-26
CN110062199B (zh) 2020-07-10

Similar Documents

Publication Publication Date Title
WO2019141247A1 (zh) 负载均衡方法、装置及计算机可读存储介质
CN110134521B (zh) 资源分配的方法、装置、资源管理器及存储介质
CN110209488B (zh) 任务执行方法、装置、设备、系统及存储介质
CN111090687B (zh) 数据处理方法及装置、系统、计算机可读存储介质
WO2020001564A1 (zh) 一种处理任务的方法、装置及系统
US20220171776A1 (en) Block processing method and apparatus, and blockchain-based data query method and apparatus
CN111182083A (zh) 设备控制方法、装置和边缘设备
WO2020249025A1 (zh) 身份信息的确定方法、装置及存储介质
US8799474B2 (en) Apparatus and method to allocate limited resources
CN111897525A (zh) 大数据处理方法及系统
WO2020088542A1 (zh) 数据管理方法、装置、系统、服务器、终端及存储介质
CN111061550A (zh) 任务处理方法、装置、设备及存储介质
CN113144622A (zh) 节点切换方法、装置、设备及计算机可读存储介质
CN110381155B (zh) 任务管理方法、装置、存储介质及终端
CN113069760A (zh) 资源分配方法、装置、计算设备及计算机可读存储介质
CN111813322B (zh) 存储池的创建方法、装置、设备及存储介质
CN111914985B (zh) 深度学习网络模型的配置方法、装置及存储介质
WO2020135106A1 (zh) 一种跟踪目标对象的方法、装置、监控设备和存储介质
CN112181915B (zh) 执行业务的方法、装置、终端和存储介质
CN112052153A (zh) 产品版本测试方法及装置
CN111080033B (zh) 预测服务容量的方法、装置、计算机设备及存储介质
CN110365545B (zh) 下发率处理方法、装置、服务器及存储介质
CN114124405B (zh) 业务处理方法、系统、计算机设备及计算机可读存储介质
CN109871291B (zh) 数据处理方法及装置
CN111381979B (zh) 神经网络的开发验证方法、装置、系统及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19741023

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19741023

Country of ref document: EP

Kind code of ref document: A1