CN110062199A - Load-balancing method, device and computer readable storage medium - Google Patents
Load-balancing method, device and computer readable storage medium Download PDFInfo
- Publication number
- CN110062199A CN110062199A CN201810054177.8A CN201810054177A CN110062199A CN 110062199 A CN110062199 A CN 110062199A CN 201810054177 A CN201810054177 A CN 201810054177A CN 110062199 A CN110062199 A CN 110062199A
- Authority
- CN
- China
- Prior art keywords
- memory node
- video recording
- node
- performance
- recording plan
- Prior art date
- Legal status (The legal status 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 status listed.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/067—Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/231—Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/231—Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion
- H04N21/23103—Content 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/24—Monitoring of processes or resources, e.g. monitoring of server load, available bandwidth, upstream requests
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/24—Monitoring of processes or resources, e.g. monitoring of server load, available bandwidth, upstream requests
- H04N21/2404—Monitoring of server processing errors or hardware failure
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/24—Monitoring of processes or resources, e.g. monitoring of server load, available bandwidth, upstream requests
- H04N21/2405—Monitoring of the internal components or processes of the server, e.g. server load
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N5/00—Details of television systems
- H04N5/76—Television signal recording
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N7/00—Television systems
- H04N7/18—Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast
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
The invention discloses a kind of load-balancing method, device and computer readable storage mediums, belong to field of data storage.Applied to the management node in video monitoring system, the described method includes: determining the current Performance Score of multiple memory nodes in the video monitoring system, the Performance Score is obtained based on the scoring determination of each performance indicator of memory node, and for describing the ability that memory node currently runs resource;The Performance Score of number and the multiple memory node based on multiple video recording plans to be issued, determines the distribution number for distributing to the video recording plan of each memory node, and the video recording is designed for describing the temporal information of photographic device recorded video stream;According to the determining distribution number, the multiple video recording planned assignment is given to the multiple memory node.The present invention issues multiple video recording plans according to the Performance Score of each memory node, to improve the effect for realizing load balancing.
Description
Technical field
The present invention relates to field of data storage, in particular to a kind of load-balancing method, device and computer-readable storage
Medium.
Background technique
With the development of technology, video monitoring system using more and more extensive, for example, can apply safety precaution,
The fields such as long-range monitoring, remote teaching, teleconference.Currently, generally including multiple photographic devices and more in video monitoring system
A memory node, a memory node can correspond at least one photographic device, for storing at least one photographic device record
The video flowing of system.But when the corresponding photographic device of a memory node is more, the number of the video flowing of memory node storage
It is larger according to measuring, so that burden can be brought to the operation of the memory node.Therefore, it is necessary to other memory nodes to share some videos
Stream, that is to say, need to carry out load balancing between multiple memory node.
It can also include management section in video monitoring system when realizing the load balancing between multiple memory node
Point.In this way, management node can determine multiple storage section when management node receives the video recording instruction of any photographic device
The utilization rate of the corresponding each memory node of the photographic device in point, and the camera shooting is stored by using the minimum memory node of rate
The video flowing that device is recorded, to realize load balancing.
But when storing the video flowing of photographic device recording by using the minimum memory node of rate, although this is deposited
The utilization rate for storing up node is minimum, but when the hardware performance of the memory node is poor, continues storage view by the memory node
Frequency stream also results in memory node operation, and over-burden, poor so as to cause the realization effect of load balancing.
Summary of the invention
The embodiment of the invention provides a kind of load-balancing method, device and computer readable storage mediums, for solving
Load balancing realizes the problem of effect difference in the prior art.The technical solution is as follows:
On the one hand, a kind of load-balancing method is provided, applied to the management node in video monitoring system, the method
Include:
Determine the current Performance Score of multiple memory nodes in the video monitoring system, the Performance Score is to be based on
The scoring determination of each performance indicator of memory node obtains, and for describing the ability that memory node currently runs resource;
The Performance Score of number and the multiple memory node based on multiple video recording plans to be issued, determination are distributed to
The distribution number of the video recording plan of each memory node, the video recording are designed for describing the time of photographic device recorded video stream
Information;
According to the determining distribution number, the multiple video recording planned assignment is given to the multiple memory node.
Optionally, described to be commented based on the number of multiple video recording plans and the performance of the multiple memory node to be issued
Point, determine the distribution number for distributing to the video recording plan of each memory node, comprising:
By the Performance Score of each memory node divided by the performance overall score of the multiple memory node, obtain described
The scoring weight of each memory node, the performance general comment are divided into the sum of the Performance Score of the multiple memory node;
By the number of the multiple video recording plan multiplied by the scoring weight of each memory node, obtain distributing to described
The distribution number of the video recording plan of each memory node.
Optionally, described according to the determining distribution number, the multiple video recording planned assignment is deposited to the multiple
Store up node, comprising:
Obtain the priority of the multiple video recording plan;
According to the priority orders and determining distribution number of the multiple video recording plan, by the multiple video recording plan point
The multiple memory node of dispensing.
It is optionally, described to give the multiple video recording planned assignment to the multiple memory node, comprising:
For any video recording plan of the multiple video recording in the works, the history for obtaining any video recording plan executes rail
Mark, the history execution track are used to describe the details of any video recording plan history memory node being performed and execution
Information;
Based on the history execution track, determines and executed when any video recording is planned not from the multiple memory node
The memory node of failure;
By any video recording planned assignment to the memory node not failed.
Optionally, described to be commented based on the number of multiple video recording plans and the performance of the multiple memory node to be issued
Point, before the distribution number for determining the video recording plan for distributing to each memory node, further includes:
At least one memory node that operation troubles has occurred in the multiple memory node is currently executing and not
The multiple video recording plans executed are determined as multiple video recording plans to be issued;And/or
To receive and untreated video recording plan issue multiple video recording plans for carrying in request be determined as it is to be issued
Multiple video recording plans.
Optionally, the method also includes:
By the video recording plan for having received and having been carried in untreated video recording plan removal request from corresponding memory node
It deletes.
Optionally, described to be commented based on the number of multiple video recording plans and the performance of the multiple memory node to be issued
Point, before the distribution number for determining the video recording plan for distributing to each memory node, further includes:
When detecting that operation troubles occurs for any memory node in the multiple memory node, execute described based on under
The number of multiple video recording plans of hair and the Performance Score of the multiple memory node, determine the record for distributing to each memory node
The step of distribution number of picture plan;Alternatively,
Every the first preset duration, the number and the multiple storage based on multiple video recording plans to be issued are executed
The step of Performance Score of node, the distribution number of the determining video recording plan for distributing to each memory node.
Optionally, after the current Performance Score of multiple memory nodes in the determination video monitoring system, also
Include:
Determine the execution total number for the video recording plan being currently executing in the multiple memory node;
The Performance Score of execution total number and the multiple memory node based on the multiple memory node, determine described in
The load condition of each memory node in multiple memory nodes;
When in the multiple memory node there are when the memory node that load condition is imbalance, in it is described not
The actual number for the video recording plan that the memory node of equilibrium state is currently executing re-starts distribution.
Optionally, the execution total number based on the multiple memory node and the performance of the multiple memory node are commented
Point, determine the load condition of each memory node in the multiple memory node, comprising:
By the Performance Score of each memory node divided by the performance overall score of the multiple memory node, obtain described
The scoring weight of each memory node, the performance general comment are divided into the sum of the Performance Score of the multiple memory node;
By the execution total number of the multiple memory node respectively multiplied by the scoring weight of each memory node, obtain
The theoretical number for the video recording plan that each memory node is currently executing;
When the actual number and the theory that there is the video recording plan being currently executing in the multiple memory node
When the different memory node of number, determine that there are the storages that load condition is the imbalance in the multiple memory node
Node.
Optionally, the reality for the video recording plan that the described pair of memory node in the imbalance is currently executing
Number re-starts distribution, comprising:
For any memory node in the memory node in the imbalance, any memory node is determined
Corresponding overload number or under load number;
Wherein, the overload number refers to the actual number for the video recording plan that any memory node is currently executing
The quantity of the theoretical number for the video recording plan being currently executing more than any memory node, the under load number refer to institute
The actual number for stating the video recording plan that any memory node is currently executing currently is being held less than any memory node
The quantity of the theoretical number of capable video recording plan;
The video recording being currently executing from any memory node removes the record that number is the overload number in the works
As plan, alternatively, based on the video recording plan removed in other memory nodes in the memory node in the imbalance,
It is the video recording plan of the under load number to any memory node distribution number.
Optionally, the current Performance Score of multiple memory nodes in the determination video monitoring system, comprising:
For any memory node in the multiple memory node, the multiple property reported based on any memory node
The detail information of energy index, determines the scoring of multiple performance indicators described in any memory node;
It, will be the multiple when the scoring of multiple performance indicators described in any memory node is above default scoring
The scoring of performance indicator is added, and obtains the current Performance Score of any memory node;
Overall height is not when the default scoring for the scoring of multiple performance indicators described in any memory node, by institute
The scoring for stating the minimum performance indicator that scores in multiple performance indicators is determined as the current Performance Score of any memory node.
Optionally, the execution total number for the video recording plan being currently executing in the multiple memory node of the determination it
Before, further includes:
Every the second preset duration, the video recording plan being currently executing in the multiple memory node of the determination is executed
Execution total number the step of.
On the other hand, a kind of load balancing apparatus is provided, applied to the management node in video monitoring system, the dress
It sets and includes:
First determining module, for determining the current Performance Score of multiple memory nodes in the video monitoring system,
The Performance Score is obtained based on the scoring determination of each performance indicator of memory node, and for describe memory node current
Run the ability of resource;
Second determining module, the property for number and the multiple memory node based on multiple video recording plans to be issued
It can score, determine the distribution number for distributing to the video recording plan of each memory node, the video recording is designed for description camera shooting and fills
Set the temporal information of recorded video stream;
First distribution module, for the multiple video recording planned assignment being given described according to the determining distribution number
Multiple memory nodes.
Optionally, second determining module includes:
First computational submodule, for by the Performance Score of each memory node divided by the multiple memory node
Performance overall score, obtains the scoring weight of each memory node, and the performance general comment is divided into the multiple memory node
The sum of Performance Score;
Second computational submodule, for the scoring by the number of the multiple video recording plan multiplied by each memory node
Weight obtains the distribution number for distributing to the video recording plan of each memory node.
Optionally, first distribution module includes:
First acquisition submodule, for obtaining the priority of the multiple video recording plan;
First distribution sub module, priority orders and determining distribution number for planning according to the multiple video recording,
Give the multiple video recording planned assignment to the multiple memory node.
Optionally, first distribution module includes:
Second acquisition submodule obtains described any for any video recording plan for the multiple video recording in the works
It records a video the history execution track of plan, the history execution track is used to describe that any video recording plan history to be performed deposits
Store up the detail information of node and execution;
First determines submodule, for being based on the history execution track, determines and executes from the multiple memory node
The memory node not failed when any video recording plan;
Second distribution sub module, the memory node for any video recording planned assignment not to fail to described in.
Optionally, described device further include:
Third determining module, at least one memory node of operation troubles will to have occurred in the multiple memory node
The multiple video recording plans for being currently executing and being not carried out are determined as multiple video recording plans to be issued;And/or
4th determining module, by that will receive and untreated video recording plan issues in request based on multiple video recordings for carrying
It draws and is determined as multiple video recording plans to be issued.
Optionally, described device further include:
Removing module, video recording plan for will receive and carried in untreated video recording plan removal request is from correspondence
Memory node in delete.
Optionally, described device further include:
First trigger module detects that operation troubles occurs for any memory node in the multiple memory node for working as
When, trigger the performance of the number and the multiple memory node of first determining module based on multiple video recording plans to be issued
Scoring determines the distribution number for distributing to the video recording plan of each memory node;Alternatively,
Second trigger module, for every the first preset duration, triggering second determining module based on to be issued more
The number of a video recording plan and the Performance Score of the multiple memory node, determine the video recording plan for distributing to each memory node
Distribution number.
Optionally, described device further include:
5th determining module, the execution for determining the video recording plan being currently executing in the multiple memory node are total
Number;
6th determining module, for based on the multiple memory node execution total number and the multiple memory node
Performance Score determines the load condition of each memory node in the multiple memory node;
Second distribution module, for when there are the storage sections that load condition is imbalance in the multiple memory node
When point, the actual number of video recording plan that the memory node in the imbalance is currently executing is re-started point
Match.
Optionally, the 6th determining module includes:
Third computational submodule, for by the Performance Score of each memory node divided by the multiple memory node
Performance overall score, obtains the scoring weight of each memory node, and the performance general comment is divided into the multiple memory node
The sum of Performance Score;
4th computational submodule, for by the execution total number of the multiple memory node respectively multiplied by each storage
The scoring weight of node obtains the theoretical number for the video recording plan that each memory node is currently executing;
Second determines submodule, for when the reality that there is the video recording plan being currently executing in the multiple memory node
When border number and the different memory node of the theoretical number, determine in the multiple memory node there are load condition to be institute
State the memory node of imbalance.
Optionally, second distribution module includes:
Third determines submodule, for in the imbalance memory node in any memory node,
Determine the corresponding overload number of any memory node or under load number;
Wherein, the overload number refers to the actual number for the video recording plan that any memory node is currently executing
The quantity of the theoretical number for the video recording plan being currently executing more than any memory node, the under load number refer to institute
The actual number for stating the video recording plan that any memory node is currently executing currently is being held less than any memory node
The quantity of the theoretical number of capable video recording plan;
Mobile submodule, the video recording for being currently executing from any memory node remove number in the works as institute
The video recording plan of overload number is stated, alternatively, based in other memory nodes in the memory node in the imbalance
The video recording plan of removal is the video recording plan of the under load number to any memory node distribution number.
Optionally, first determining module includes:
4th determines submodule, for being based on described any for any memory node in the multiple memory node
The detail information for multiple performance indicators that memory node reports determines multiple performance indicators described in any memory node
Scoring;
5th computational submodule, the scoring for working as multiple performance indicators described in any memory node are above pre-
If when scoring, the scoring of the multiple performance indicator being added, the current Performance Score of any memory node is obtained;
5th determines submodule, the scoring for multiple performance indicators described in any memory node not overall height in
When the default scoring, the scoring for the minimum performance indicator that scores in the multiple performance indicator is determined as any storage
The current Performance Score of node.
Optionally, described device further include:
Third trigger module, for triggering the 5th determining module and determining the multiple deposit every the second preset duration
The execution total number for the video recording plan being currently executing in storage node.
On the other hand, a kind of computer readable storage medium is provided, computer program, described program quilt are stored thereon with
Processor realizes the step of any the method that above-mentioned first aspect provides when executing.
Technical solution provided in an embodiment of the present invention has the benefit that
In embodiments of the present invention, management node can determine the current Performance Score of multiple memory nodes, and based on to
The number of the multiple video recording plans issued and the Performance Score of multiple memory nodes determine the video recording for distributing to each memory node
The distribution number of plan.Since Performance Score can describe the ability that memory node currently runs resource, passage capacity is commented
The distribution number for dividing the video recording plan of determining each memory node is to meet of the ability of each memory node operation resource
Number will between multiple memory node after giving multiple video recording planned assignments to multiple memory nodes according to determining distribution number
In load balancing state, to ensure that the accuracy of load balancing, the effect of load balancing is improved.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment
Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for
For those of ordinary skill in the art, without creative efforts, it can also be obtained according to these attached drawings other
Attached drawing.
Fig. 1 is a kind of structural schematic diagram of SiteServer LBS provided in an embodiment of the present invention;
Fig. 2 is a kind of flow chart of load-balancing method provided in an embodiment of the present invention;
Fig. 3 is the flow chart of another load-balancing method provided in an embodiment of the present invention;
Fig. 4 A is the structural schematic diagram of the first load balancing apparatus provided in an embodiment of the present invention;
Fig. 4 B is a kind of structural schematic diagram of second determining module provided in an embodiment of the present invention;
Fig. 4 C is a kind of structural schematic diagram of first distribution module provided in an embodiment of the present invention;
Fig. 4 D is the structural schematic diagram of another first distribution module provided in an embodiment of the present invention;
Fig. 4 E is the structural schematic diagram of second of load balancing apparatus provided in an embodiment of the present invention;
Fig. 4 F is the structural schematic diagram of the third load balancing apparatus provided in an embodiment of the present invention;
Fig. 4 G is the structural schematic diagram of the 4th kind of load balancing apparatus provided in an embodiment of the present invention;
Fig. 4 H is a kind of structural schematic diagram of 6th determining module provided in an embodiment of the present invention;
Fig. 4 I is a kind of structural schematic diagram of second distribution module provided in an embodiment of the present invention;
Fig. 4 J is a kind of structural schematic diagram of first determining module provided in an embodiment of the present invention;
Fig. 5 is a kind of structural schematic diagram of node provided in an embodiment of the present invention;
Fig. 6 is the structural schematic diagram of another node provided in an embodiment of the present invention.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached drawing to embodiment party of the present invention
Formula is described in further detail.
Before carrying out detailed explanation to the embodiment of the present invention, the first application to being related in the embodiment of the present invention
Scene and system architecture are explained respectively.
Firstly, to the present embodiments relate to application scenarios be introduced.
Currently, a memory node can usually correspond to multiple photographic devices, the memory node in video monitoring system
Video flowing that is available and storing multiple photographic device recording.But when the number of the corresponding photographic device of the memory node
When measuring larger, the operation burden of the memory node will be overweight, so that influence the memory node obtains video flowing from photographic device.
Therefore, it generally requires to carry out load balancing by the management node in video monitoring system.But carrying out load balancing at present
When, management node is only capable of that the video flowing of photographic device recording is obtained and stored by using the minimum memory node of rate.When this is deposited
Store up node hardware performance it is poor when, continuing to store video flowing by the memory node, to also result in memory node operation negative
Carry on a shoulder pole it is overweight, it is poor so as to cause the realization effect of load balancing.
Based on such scene, the embodiment of the invention provides one kind can be realized load balancing, and improves realization load
The load-balancing method of balanced success rate.
Next, to the present embodiments relate to system architecture be introduced.
Fig. 1 is a kind of configuration diagram of SiteServer LBS provided in an embodiment of the present invention, referring to Fig. 1, the system packet
Include management node 1, multiple memory nodes 2 and multiple photographic devices 3.It is described, is saved in Fig. 1 with 3 storages for convenience
It is described for point 2 and 6 photographic devices 3.
Wherein, management node 1 and multiple memory nodes 2 all can be servers, or tablet computer etc. is eventually
End, and the management node 1 can be any node in multiple memory nodes 2, or for except independently of multiple memory nodes 2
Can be used in carry out load balancing node.Multiple photographic devices 3 can respectively with management node 1 and multiple memory nodes 2
Connection, management node 1 can be connect with multiple memory nodes 2.The management node 1 can manage multiple memory nodes 2, Yi Jijian
The request that multiple photographic devices 3 are sent is surveyed, and multiple memory node 2 is managed for convenience, multiple memory node 2
In each memory node 2 detail information of multiple performance indicators can be reported to management node 1, thus the management node 1
The detail information for the multiple performance indicators that can be reported according to each memory node 2 determines the current property of multiple memory node 2
It can scoring.Meanwhile in order to allow any memory node 2 in multiple memory nodes 2 to obtain and deposit from corresponding photographic device 3
Video flowing is stored up, multiple video recording plans can be reported to management node 1 by multiple photographic device 3.Management node 1 detect it is more
After multiple video recording plans that a photographic device 3 reports, multiple video recording plan can be stored, and be based on multiple video recording
The Performance Score of the number of plan and multiple memory nodes 2 determines the distribution for the video recording plan for distributing to each memory node 2
Number gives multiple video recording planned assignment to multiple memory nodes 2 according to determining distribution number.
It should be noted that in embodiments of the present invention, not only may include in the SiteServer LBS management node 1,
Multiple memory nodes 2 and multiple photographic devices 3 can also include other equipment, for example, user terminal etc..The user terminal can
To connect respectively with multiple photographic devices 3 and management node 1, which can be to the video recording plan of multiple photographic devices 3
It is configured, and the video recording plan of multiple photographic devices 3 is sent to management node 1.It that is to say, which can be used as
The management equipment of multiple photographic device 3, so as to which the video recording plan of multiple photographic device 3 is arranged.
It, can also be in addition, can only include a management node 1 in the SiteServer LBS in embodiments of the present invention
Including multiple management nodes 1.It, can be by multiple management node 1 when in the SiteServer LBS including multiple management nodes 1
In any management node 1 be determined as main management node 1, other management nodes 1 in multiple management node 1 are determined as more
It is a from management node 1.Wherein, main management node 1 is multiple for managing the video recording plan detected and multiple memory nodes 2
From management node 1 for the information in real-time synchronization main management node 1.It is multiple from pipe when the main management node 1 breaks down
Manage node 1 in it is any from management node 1 can with the currently performed process of rapid pipe connecting main management node 1, thus guarantee not in
The disconnected realization to load balancing, improves the reliability for realizing load balancing.
Furthermore in embodiments of the present invention, which may include multiple domains, can also only include one
Domain, an and photographic device and memory node can only belong to a domain, a domain may include multiple photographic devices and multiple deposit
Store up node.
It, next will be in conjunction with attached drawing to this in the application scenarios to the embodiment of the present invention and after system architecture is introduced
The load-balancing method that inventive embodiments provide describes in detail.
Fig. 2 is a kind of flow chart of load-balancing method shown according to an exemplary embodiment, referring to fig. 2, this method
Applied to the management node in video monitoring system, include the following steps.
Step 201: management node determines the current Performance Score of multiple memory nodes in video monitoring system, the performance
Scoring is to be obtained based on the scoring determination of each performance indicator of memory node, and currently run resource for describing memory node
Ability.
Due to the scoring of the ability of the operation resource of any memory node and its each performance indicator in multiple memory nodes
Related, therefore, in order to realize the load balancing between multiple memory nodes, management node is it needs to be determined that in video monitoring system
The current Performance Score of multiple memory nodes.And management node determines that multiple memory nodes in the video monitoring system are current
The operation of Performance Score can be with are as follows: for any memory node in multiple memory node, based on any memory node
The detail information of multiple performance indicators of report, determines the scoring of multiple performance indicators in any memory node;It is deposited when this is any
When the scoring of multiple performance indicators is above default scoring in storage node, the scoring of multiple performance indicator is added, is somebody's turn to do
The current Performance Score of any memory node;When overall height is not pre- in this for the scoring of multiple performance indicator in any memory node
If scoring, by the scoring for the minimum performance indicator that scores in multiple performance indicator be determined as any memory node currently
Performance Score.
It should be noted that it can be seen from the above, manage multiple memory nodes for convenience, it is any in multiple memory node
The detail information of multiple performance indicators can be reported to management node by memory node, and management node can save multiple storages
The detail information for multiple performance indicators that any memory node reports in point is stored, and therefore, management node can be according to each
The detail information that a memory node reports determines the current Performance Score of multiple memory nodes in video monitoring system.
Wherein, the detail information of multiple performance indicator may include (Central Processing Unit, the center CPU
Processor) utilization rate or idleness, the utilization rate of memory or idleness, the utilization rate of network channel or idleness, I/O
(utilization rate or idleness of (Input/Output, input/output), the memory capacity of storage medium etc..
In addition, in the process of running due to any memory node in multiple memory nodes, any memory node it is more
Any performance indicator may change in a performance indicator, for example, network channel may when surfing the Internet peak period by
It influences and gets congestion, alternatively, any memory node may generate additional operation information in the process of running, cause interior
It deposits utilization rate and increases idleness reduction etc..It therefore, should in order to guarantee the accuracy of the current Performance Score of any memory node
Any memory node can be every the detail information for specifying duration to report primary multiple performance indicators.The specified duration can be 20
Second, 5 minutes, 30 minutes etc..
It should also be noted that, since any memory node can report primary multiple performance indicators every specified duration
Detail information, therefore, management node can receive every time the detailed of multiple performance indicators that any memory node reports
When feelings information, the current Performance Score of any memory node is determined.In addition, it can be seen from the above, management node can receive it is more
Multiple video recording plans that a photographic device reports, and under normal conditions, management node can report multiple photographic devices more
A video recording plan is issued, therefore, management node can also need issue multiple video recording plans to multiple memory nodes when,
According to the detail information of multiple performance indicators of any memory node of the last time storage, determine that any memory node is worked as
Preceding Performance Score.
Wherein, the detail information for multiple performance indicators that management node is reported based on any memory node determines this
The operation of the scoring of multiple performance indicators can be in one memory node are as follows: when the detail information of multiple performance indicator includes each
When the idleness of performance indicator, the corresponding total weight scoring of the available each performance indicator of management node, by each performance
Total weight scoring of index is multiplied with idleness, obtains the scoring of each performance indicator.When the details of multiple performance indicator are believed
When including the utilization rate of each performance indicator in breath, the utilization rate that management node can subtract each performance indicator for 1 is obtained each
The idleness of a performance, and the corresponding total weight scoring of each performance indicator is obtained, total weight of each performance indicator is commented
Divide and be multiplied with idleness, obtains the scoring of each performance indicator.
It should be noted that the corresponding total weight scoring of multiple performance indicator can be arranged in advance, and multiple performance
The corresponding total weight scoring of index can be identical, for example, CPU, memory, network channel and the corresponding total weight scoring of I/O can be with
It is 20.But since degree of multiple performance indicator to the capacity of memory node operation resource is different, it should
The corresponding total weight scoring of multiple performance indicators can also be different.For example, the corresponding total weight scoring of CPU can be 20, memory
Corresponding total weight scoring can be able to be the corresponding total weight scoring of 10, I/O for the corresponding total weight scoring of 30, network channel
It can be 15 etc..
It should also be noted that, the corresponding total weight scoring of multiple performance indicator can store in management node,
It may include in the detail information for multiple performance indicators that any memory node reports.It is multiple when any memory node
When the corresponding total weight scoring of performance indicator is included in the detail information for multiple performance indicators that any memory node reports,
Management node can obtain the corresponding total weight scoring of multiple performance indicators from the detail information of multiple performance indicators.
For example, when multiple performance indicator detail information include CPU idleness 60%, the idleness 40% of memory,
When the idleness 50% of the idleness 50% of network channel and I/O, the available CPU of management node, memory, network channel, deposit
Store up space, the corresponding total weight scoring of I/O is 20.Total weight of the CPU is scored and is multiplied with the idleness of CPU 60%, is obtained
Scoring to CPU is 12, and total weight of the memory is scored and is multiplied with the idleness of memory, and the scoring for obtaining memory is 8, by this
Total weight scoring 20 of network channel is multiplied with the idleness of network channel 50%, the scoring 10 of network channel is obtained, by the I/O
Total weight scoring be multiplied with the idleness of I/O 50%, obtain I/O scoring be 10.
In addition, due to sometimes when the idleness of performance indicator any in multiple performance indicators is lower, even if other property
The idleness of energy index is higher, which may still understand load too high, to influence the operation of memory node.For example,
When the idleness of the CPU of the memory node B in multiple memory nodes is 9%, memory node B overload, operation
Difficulty, even if the idleness of I/O, memory, network channel etc. is higher, memory node B can not also be continued to run.Therefore, it manages
Node is also it needs to be determined that whether multiple performance indicators are above default scoring in memory node B, and when more in memory node B
When the scoring of a performance indicator is above default scoring, the scoring of multiple performance indicator is added, memory node B is obtained and works as
Preceding Performance Score;When overall height does not preset scoring in this for the scoring of multiple performance indicator in memory node B, that is to say,
It, can when the scoring of at least one performance indicator is less than or equal to the default scoring in multiple performance indicators in memory node B
The scoring for the minimum performance indicator that scores in multiple performance indicator is determined as the current Performance Score of memory node B.When
So in practical applications, which can also be determined as the current Performance Score of memory node B.In this way, can keep away
The ability for exempting from the ability for the currently practical operation resource of memory node occur and the described operation resource of Performance Score is inconsistent
Situation ensure that management node determines the accuracy of the Performance Score of each memory node, so as to avoid follow-up storage section
Point breaks down because of overload.
It should be noted that the default scoring can be arranged in advance, for example, the default scoring can be 10 points, 5 points, 3 points
Etc..
It should also be noted that, the scoring of multiple performance indicators of any memory node is likely to be and determines one by one
, therefore, when the scoring of performance indicator any in multiple performance indicators that management node determines any memory node is not high
When the default scoring, that is, it can determine that there are Performance Scores to be not higher than default comment in multiple performance indicators of any memory node
The performance indicator divided at this point, management node may not need the scoring for determining remaining performance indicator, but will directly be determined not
Scoring higher than the performance indicator of default scoring is determined as the Performance Score of any memory node.
For example, the management node determines the scoring of CPU, the scoring of I/O, the scoring of memory, the storage of memory node B one by one
The scoring of the memory capacity of medium, and default scoring is 5 timesharing, if management node determines the scoring of the CPU of memory node B
It is 3 points, then management node may not need the scoring for continuing to determine the memory capacity of I/O, memory, storage medium, but directly will
This 3 points Performance Scores for being determined as memory node B.
It is worth noting that since the scoring that management node does not need to determine memory node all properties index can determine this
The Performance Score of memory node reduces to accelerate the speed that management node determines the Performance Score of each memory node
The calculation amount of management node, avoids management node waste of resource due to the scoring of the multiple memory nodes of determination.
Furthermore the detail information for multiple performance indicators that any memory node reports not only may include the utilization of CPU
The information such as rate or idleness, the utilization rate of memory or idleness, also may include other information, for example, multiple performance indicator
Ask in information in detail can also include each performance indicator scoring.When asking in information in detail for multiple performance indicator includes
When the scoring of each performance indicator, management node directly can obtain each individual character from asking in information in detail for multiple performance indicator
The scoring of energy index, and the scoring of each performance indicator is added, obtain the current Performance Score of any memory node.
Step 202: the performance of number and multiple memory node of the management node based on multiple video recording plans to be issued
Scoring, determines the distribution number for distributing to the video recording plan of each memory node, which is designed for describing photographic device record
The temporal information of video flowing processed.
Due under normal conditions, when each memory node can be realized after receiving the video recording plan that management node issues
Load balancing, then multiple memory node equally can also be in load balancing state during executing video recording plan, because
This, in order to realize that load balancing during issuing video recording plan between multiple memory nodes, management node can be based on
Each memory node is distributed in the number of multiple video recording plans to be issued and the Performance Score of multiple memory node, determination
The distribution number of video recording plan.And the property of number and multiple memory node of the management node based on multiple video recording plans to be issued
Can scoring, determine that the operation for the distribution number of video recording plan for distributing to each memory node can be with are as follows: by each storage section
The Performance Score of point obtains the scoring weight of each memory node, the performance divided by the performance overall score of multiple memory node
General comment is divided into the sum of the Performance Score of multiple memory node;By the number of multiple video recording plan multiplied by each memory node
Scoring weight, obtain the distribution number for the video recording plan for distributing to each memory node.
Wherein, video recording is designed for describing the temporal information of photographic device recorded video stream, that is to say, video recording plan can be with
When description memory node from corresponding photographic device obtains and stores video flowing, when stops obtaining and storing view
Frequency flows.It is uninterruptedly obtained from corresponding photographic device for example, video recording plan can be described as memory node 24 hours and stores view
Frequency flows, and also can be described as early 6 points of memory node and starts to obtain and store video flowing from corresponding photographic device, stops for 10 points in evening
It is only obtained from corresponding photographic device and stores video flowing.
It is worth noting that running money between each memory node since the scoring weight of each memory node can reflect
The proportionate relationship of the ability in source, therefore, management node can accurately determine out according to the scoring weight of each memory node divides
The distribution number of the video recording plan of each memory node of dispensing, to improve the accuracy of load balancing.
For example, when the number of multiple video recording plans is 100, and the Performance Score of memory node 1 is 50, memory node 2
Performance Score be 30, the Performance Score of memory node 3 is 20, by the performance of memory node 1, memory node 2 and memory node 3
Scoring is added, and is obtained performance general comment and is divided into 100.By the Performance Score 30 of memory node 1 divided by performance overall score 100, deposited
The scoring weight for storing up node 1 is 0.5, by the Performance Score 30 of memory node 2 divided by performance overall score 100, obtains memory node 2
Scoring weight be 0.3, by the Performance Score 20 of memory node 3 divided by performance overall score 100, obtain the scoring of memory node 3
Weight is 0.2.By the number 100 of multiple video recording plan multiplied by the scoring weight of each memory node, obtain distributing to this
The distribution number of the video recording plan of memory node 1,2 and 3 is respectively 50,30 and 20.
It should be noted that multiple video recording plan, which can be management node, detects the video recording that multiple photographic devices are sent
When plan issues request, issues in request and acquire from the video recording plan, be also possible to management node and receive multiple storages
When the failure message that at least one memory node of operation troubles reports having occurred in node, operation troubles has occurred for acquisition
Multiple video recording plans that at least one memory node is currently executing and is not carried out.It that is to say, management node is based on wait issue
Multiple video recording plans number and multiple memory node Performance Score, determine and distribute to the video recording meter of each memory node
Before the distribution number drawn, at least one memory node of operation troubles can will occur in multiple memory node currently just
It is determined as multiple video recording plans to be issued in the multiple video recording plans for executing and being not carried out;And/or it will receive and untreated
Video recording plan issue multiple video recording plans for carrying in request and be determined as multiple video recording plans to be issued.
Due in multiple memory nodes any memory node in the process of running it is possible that failure, once memory node
The then memory node that breaks down will be unable to obtain video flowing from photographic device, so as to cause important information to be omitted.Cause
This, in order to avoid information is omitted, after any memory node breaks down, which can report to management node
The memory node can be currently executing and be not carried out when receiving the failure message by failure message, management node
Multiple video recording plans are determined as multiple video recording plans to be issued, and execute the operation of step 202.
In addition, it is generally the case that after multiple photographic devices, which send video recording plan to management node, issues request, management section
Point can't may handle in time the video recording plan and issue request, but every the first preset duration, detect a photographic device
The request of transmission, and when detecting that the record plan issues request, by video recording plan issue the video recording carried in request plan into
Row issues.It that is to say, management node can execute the operation of step 202 every the first preset duration.
It should be noted that first preset duration can be arranged in advance, for example, first preset duration can be 5 points
Clock, 10 minutes etc..
In addition, since the video recording plan of any photographic device in multiple photographic devices may be changed, and when video recording
When plan is changed, which can send change request to management node, for example, video recording plan can be saved to management
Point sends video recording plan removal request.When the management node detects the video recording plan removal request, can will receive and
The video recording plan carried in untreated video recording plan removal request is deleted from corresponding memory node.
Furthermore it can be seen from the above, may include a domain in video monitoring system, it is also possible to it will include multiple domains, and
One photographic device and memory node can only belong to a domain, and a domain may include multiple photographic devices and multiple storages section
Point.If in video monitoring system including multiple domains, management node distributes to the video recording plan of each memory node determining
Distribution number when, need to determine in each domain the distribution number of the video recording plan for each memory node for including respectively.
Wherein, for any memory node in multiple memory nodes, management node needs to determine from multiple memory nodes
All memory nodes for belonging to same domain with any memory node, by the Performance Score of any memory node divided by with this
One memory node belongs to the performance overall score of all memory nodes of same domain, obtains the scoring weight of any memory node,
The performance general comment is divided into the sum of the Performance Score for belonging to all memory nodes of same domain with any memory node.
In addition, since a photographic device and memory node can only belong to a domain, and video recording is designed for description camera shooting
The temporal information of device recorded video stream, therefore, a video recording plan can only also belong to a domain, may include more in a domain
A video recording plan.Therefore, in order to accurately distribute multiple video recording plans, management node also need to determine in the works from multiple video recordings with
Any memory node belongs to all video recording plans of same domain, and all video recordings of same domain will be belonged to any memory node
The number of plan multiplied by each memory node for belonging to same domain with any memory node scoring weight, obtain distributing to
Any memory node belongs to the distribution number of the video recording plan of each memory node of same domain.
Step 203: management node is saved according to determining distribution number, by multiple video recording planned assignment to multiple storage
Point.
Wherein, management node can deposit multiple video recording planned assignment to multiple directly according to determining distribution number
Store up node.But sometimes when the number of video recording plan is excessive, and Network status does not allow management node disposably to send largely
Video recording plan when, management node may can only be allocated according to predetermined number.At this point, management node plans multiple video recordings
The time for distributing to memory node will be different, and some important video recording plans may cause information to be lost not in time because of distribution
Leakage.Therefore, management node can when giving multiple video recording planned assignment to multiple memory node according to determining distribution number
To obtain the priority of multiple video recording plans;It, will according to the priority orders and determining distribution number of multiple video recording plan
Multiple memory node is given in multiple video recording planned assignment.
It should be noted that the priority of multiple video recording plan can be arranged in advance, and multiple video recording plan is excellent
First grade can be configured according to the position of photographic device, for example, if video monitoring system is the video monitoring system in hotel,
Then when photographic device is the photographic device in hotel corridor, set the priority for the video recording plan that the photographic device is sent to
Height, when the photographic device is the photographic device of lounge, the priority setting for the video recording plan which is sent
For in, when the photographic device is the photographic device at hotel gate, the priority for the video recording plan which sends is set
It is set to low.Certainly, in practical applications, can also be configured according to the time for executing video recording plan, for example, executing video recording meter
It when the time for drawing A is uninterrupted execution in 24 hours, sets high for the priority of video recording plan A, records a video plan B's when executing
It when time is early 6 points to 10, sets the priority of video recording plan B to, is at night when the time for executing the plan C that records a video
At 10 points to second day 6, set low for the priority of video recording plan C.
In addition, that is to say since multiple video recording plans may not be to distribute to memory node for the first time, some video recording meter
It draws and was performed before current time, and the memory node for executing the video recording plan may also have occurred in the process of implementation
Therefore failure in order to guarantee the normal operation of memory node, avoids certain video recordings from planning to take loss to lose on particular memory node
The problem of, management node can be with to the operation of multiple memory node by multiple video recording planned assignment are as follows: for multiple
Any video recording plan of video recording in the works, obtains the history execution track of any video recording plan, which is used for
The detail information of any video recording plan history memory node being performed and execution is described;Based on the history execution track,
The memory node for executing and not failing when any video recording plan is determined from multiple memory node;By any video recording plan point
The memory node that dispensing does not fail.
It should be noted that since any video recording plans are sent by management node in the works for multiple video recordings, and it is more
Any memory node can be managed when operation troubles occurs to management node reporting fault message, therefore in a memory node
Reason node can be easy to know that the history execution track of video recording plan, and video recording plan some in multiple memory nodes
Whether the memory node information such as breaks down when executing in memory node, to ensure that management node in distribution video recording plan
When, the safety of memory node.
Furthermore due to that may include multiple domains in video monitoring system, management node is to each memory node
When distribution video recording plan, the video recording plan of same domain will be belonged to each memory node, distributed to according to determining distribution number
Each memory node.
Further, when any memory node in multiple memory nodes receives the video recording plan of management node distribution
Afterwards, which can determine temporal information described in the video recording plan of distribution, and detect that current time arrives
Up to when executing the time recorded a video and planned, is obtained from photographic device described in video recording plan and store video flowing.
Further, it can be seen from the above, may include a main management node in video monitoring system and multiple from pipe
Manage node, it is multiple can be with the information in real-time synchronization main management node, therefore, when main management node breaks down from management node
When, it is multiple from management node it is any from management node can the currently performed process of adapter tube main management node in time, thus
Guarantee not interrupting the realization to load balancing, improves the reliability for realizing load balancing.
In embodiments of the present invention, management node can determine the current Performance Score of multiple memory nodes, and based on to
The number of the multiple video recording plans issued and the Performance Score of multiple memory nodes determine the video recording for distributing to each memory node
The distribution number of plan.Since Performance Score can describe the ability that memory node currently runs resource, passage capacity is commented
The distribution number for dividing the video recording plan of determining each memory node is to meet of the ability of each memory node operation resource
Number will between multiple memory node after giving multiple video recording planned assignments to multiple memory nodes according to determining distribution number
In load balancing state, to ensure that the accuracy of load balancing, the effect for realizing load balancing is improved.
It is worth noting that management node can issue video recording plan with the operation of 201- step 203 through the above steps
During realize load balancing.It, may be because of some originals but since memory node is during executing video recording plan
Cause leads to load imbalance between multiple memory nodes.Therefore, management node is determining multiple storages in video monitoring system
After the current Performance Score of node, the number for the video recording plan being currently executing in multiple memory nodes can also be adjusted,
To realize load balancing.Referring to Fig. 3, for another load-balancing method provided in an embodiment of the present invention, this method is specifically included
Following steps.
Step 301: management node determines that the execution for the video recording plan being currently executing in multiple memory node is always a
Number.
It should be noted that management node can actively determine the video recording meter being currently executing in multiple memory node
The execution total number drawn, can also passively determine that the execution for the video recording plan being currently executing in multiple memory node is always a
Number.It is following to determine that the operation for executing total number determines that the operation for executing total number is illustrated with passive to active respectively.
It actively determines and executes total number
Due to any memory node in multiple memory nodes execute video recording plan during, the memory node it is more
At least one performance indicator in a performance indicator may change, so as to cause load imbalance, therefore, in order to will be more
Video recording plan between a memory node carries out load balancing, and management node needs to obtain multiple memory nodes and is currently executing
Video recording plan execution total number.
For example, memory node 1 is during executing video recording plan, the network channel of the memory node 1 may be upper
Net peak period is affected and gets congestion, alternatively, memory node 1 may generate additional operation letter in the process of running
Breath causes memory usage to increase idleness reduction etc., loads no longer so as to cause between memory node and other memory nodes
Equilibrium, at this point, management node needs to obtain the execution total number for the video recording plan that multiple memory nodes are currently executing.
Wherein, management node can be determined and be currently executing in multiple memory node every the second preset duration
The execution total number of video recording plan.Second preset duration can be arranged in advance, for example, second preset duration can be 10 points
Clock, 20 minutes etc..
Passive determine executes total number
By above-mentioned steps 202 it is found that there may be the memory node of operation troubles in multiple memory node, and manage
The video recording plan that the memory node of failure is carrying out and is not carried out can be re-started and be issued by node.Therefore, work as failure
Memory node restoring running it is normal after, the video recording plan that will not can be performed in the normal memory node of the restoring running, from
And lead to load imbalance between multiple memory nodes.Therefore, in order to the video recording plan between multiple memory nodes is born
Equilibrium is carried, management node needs to obtain the execution total number for the video recording plan that multiple memory nodes are currently executing.
Wherein, after the memory node restoring running of operation troubles is normal, the normal memory node of the restoring running can be with
The normal message of restoring running is reported to management node, when management node receives the restoring running normal message, can be obtained
Take the execution total number of the currently performed video recording plan of multiple memory nodes.
In addition, due to that may include multiple domains in video monitoring system, management node determination is currently executing
Video recording plan execution total number when, need to determine the execution total number for belonging to multiple memory nodes in the same domain respectively.
Step 302: the performance of execution total number and multiple memory node of the management node based on multiple memory node
Scoring, determines the load condition of each memory node in multiple memory node.
Due to that when load imbalance, may be only part memory node in multiple memory nodes between multiple memory nodes
In load imbalance state, another part memory node may be still in load balancing state.Therefore, in order to accurately right
Video recording plan performed by memory node in load imbalance state is adjusted, and management node needs to deposit based on multiple
The execution total number of node and the Performance Score of multiple memory node are stored up, determines each memory node in multiple memory node
Load condition.
Wherein, the performance of execution total number and multiple memory node of the management node based on multiple memory node is commented
Point, determine that the operation of the load condition of each memory node in multiple memory node can be with are as follows: by each memory node
Performance Score obtains the scoring weight of each memory node divided by the performance overall score of multiple memory node, and the performance is total
Scoring is the sum of the Performance Score of multiple memory node;The execution total number of multiple memory node is each multiplied by this respectively
The scoring weight of memory node obtains the theoretical number for the video recording plan that each memory node is currently executing;When this is more
In a memory node when memory node different with theoretical number in the presence of the actual number for the video recording plan being currently executing,
Determine that there are the memory nodes that load condition is the imbalance in multiple memory node.
For example, the actual number for working as the video recording plan that memory node 1,2 and 3 is currently executing is respectively 50,20 and 30
When, the execution total number of memory node 1,2 and 3 is 100.When the performance general comment of memory node 1,2 and 3 is divided into 100, storage is saved
The scoring of point 1 is 50, the scoring of memory node 2 is 30, when the scoring of memory node 3 is 20, by the property of memory node 1,2 and 3
It can score respectively divided by performance overall score 100, the scoring weight for obtaining memory node 1,2 and 3 is respectively 0.5,0.3 and 0.2.It will
The execution total number 100 of multiple video recording plan obtains giving the memory node 1,2 multiplied by the scoring weight of each memory node
The theoretical number for the video recording plan being currently executing with 3 is respectively 50,30 and 20.Since memory node 2 and memory node 3 are worked as
Before the actual number of video recording plan that is carrying out and theoretical number it is not identical, hence, it can be determined that the memory node 1,2 and 3
It is middle there are load condition be imbalance memory node, that is to say, memory node 2 and memory node 3 are for load condition
The memory node of imbalance.
It should be noted that running money between each memory node since the scoring weight of each memory node can reflect
The proportionate relationship of the ability in source, management node is by the execution total number of multiple memory node respectively multiplied by each memory node
Scoring weight, the theoretical number for obtaining each memory node is to work as between multiple memory nodes in load balancing state
When, the number for the video recording plan that each memory node should currently execute.Therefore, when exist in multiple memory node it is current just
In the different memory node of the number and theory number of the video recording plan of execution, it can determine and be deposited in multiple memory node
In the memory node that load condition is the imbalance.
In addition, management node needs to deposit based on belonging to the multiple of same domain when in video monitoring system including multiple domains
The execution total number of node and the Performance Score of multiple memory node are stored up, is determined each in the multiple memory nodes for belonging to same domain
The load condition of a memory node.
Step 303: when, there are when the memory node that load condition is imbalance, management saves in multiple memory node
Point re-starts distribution to the actual number for the video recording plan that the memory node in imbalance is currently executing, with reality
Load balancing between existing multiple memory nodes.
Wherein, practical of the video recording plan that management node is currently executing the memory node in imbalance
The operations that number re-starts distribution can be with are as follows: for any memory node in the memory node in imbalance, determines
Any corresponding overload number of memory node or under load number;Wherein, overload number refers to that any memory node is current
Theoretical number of the actual number for the video recording plan being carrying out more than the video recording plan that any memory node is currently executing
Quantity, which refers to that the actual number of the video recording plan that any memory node is currently executing is any less than this
The quantity of the theoretical number for the video recording plan that memory node is currently executing;It is currently executing from any memory node
Video recording removes the video recording plan that number is overload number in the works, alternatively, based in the memory node in imbalance
The video recording plan removed in other memory nodes is the video recording plan of under load number to any memory node distribution number.
It should be noted that management node can subtract theoretical number with the actual number of any memory node, obtain
Result when being negative, determine that the result is the corresponding under load number of any memory node;When obtained result is positive number,
Determine that the result is the corresponding overload number of any memory node.
For example, the actual number for working as the video recording plan that memory node 2 is currently executing is 20, theoretical number is 30
A, the actual number for the video recording plan that memory node 3 is currently executing is 30, when theoretical number is 20, management node
It can determine that the corresponding under load number of memory node 2 is 10, determine that the corresponding overload number of memory node 3 is 10.At this point,
Management node can remove 10 video recording plans from memory node 3, and give 10 video recording planned assignments of removal to storage section
Point 2.
In addition, management node can only be in unbalanced to belonging in same domain when video monitoring system includes multiple domains
The actual number for the video recording plan that the memory node of state is currently executing re-starts distribution.
It is worth noting that since the memory node that management node can include to each domain in multiple domains respectively is born
Equilibrium is carried, therefore, each domain may be at load balancing state, so that entire video monitoring system will also be in load balancing shape
State.
In embodiments of the present invention, management node can determine that the current Performance Score of multiple memory nodes may be used also later
With the Performance Score of execution total number and multiple memory nodes based on multiple memory nodes, determine each in multiple memory nodes
The load condition of memory node, when in multiple memory nodes there are load condition be imbalance memory node when, to place
Distribution is re-started in the actual number for the video recording plan that the memory node of imbalance is currently executing, ensure that multiple
When memory node leads to load imbalance because of some reasons in executing multiple video recording planning process, it can carry out loading in time
Weighing apparatus, not only realizes load balancing during video recording plan issues to realize, additionally it is possible in the process for executing video recording plan
Middle realization load balancing improves the accuracy and effect for realizing load balancing between multiple memory nodes.
After load-balancing method provided in an embodiment of the present invention is explained, next, being mentioned to the present invention
The load balancing apparatus of confession is introduced.
Fig. 4 A is a kind of block diagram of load balancing apparatus provided in an embodiment of the present invention, referring to fig. 4 A, load balancing dress
Setting being implemented in combination with by software, hardware or both.The device includes: the first determining module 401, the second determining module
402 and first distribution module 403.
First determining module 401, for determining that the current performance of multiple memory nodes in the video monitoring system is commented
Point, the Performance Score is obtained based on the scoring determination of each performance indicator of memory node, and for describing memory node
The ability of current operation resource;
Second determining module 402, for based on multiple video recording plans to be issued number and the multiple memory node
Performance Score, determine distribute to each memory node video recording plan distribution number, it is described video recording be designed for description take the photograph
As the temporal information of device recorded video stream;
First distribution module 403, for the multiple video recording planned assignment being given described more according to determining distribution number
A memory node.
Optionally, B, second determining module 402 include: referring to fig. 4
First computational submodule 4021, for saving the Performance Score of each memory node divided by the multiple storage
The performance overall score of point, obtains the scoring weight of each memory node, and the performance general comment is divided into the multiple storage section
The sum of the Performance Score of point;
Second computational submodule 4022, the number for planning the multiple video recording is multiplied by each memory node
Score weight, obtains the distribution number for distributing to the video recording plan of each memory node.
Optionally, C, first distribution module 403 include: referring to fig. 4
First acquisition submodule 4031, for obtaining the priority of the multiple video recording plan;
First distribution sub module 4032, for the priority orders according to the multiple video recording plan and the distribution determined
Number gives the multiple video recording planned assignment to the multiple memory node.
Optionally, D, first distribution module 403 include: referring to fig. 4
Second acquisition submodule 4033, for for the multiple video recording any video recording plan in the works, described in acquisition
The history execution track of any video recording plan, the history execution track are performed for describing any video recording plan history
Memory node and execution detail information;
First determines submodule 4034, for being based on the history execution track, determines from the multiple memory node
Execute the memory node not failed when any video recording plan;
Second distribution sub module 4035, the memory node for any video recording planned assignment not to fail to described in.
Optionally, E referring to fig. 4, described device further include:
Third determining module 404, at least one storage of operation troubles will to have occurred in the multiple memory node
Multiple video recording plans that node is currently executing and is not carried out are determined as multiple video recording plans to be issued;And/or
4th determining module 405, for that will receive and untreated video recording plan issues multiple records for carrying in request
As plan is determined as multiple video recording plans to be issued.
Optionally, described device further include:
Removing module, video recording plan for will receive and carried in untreated video recording plan removal request is from correspondence
Memory node in delete.
Optionally, F referring to fig. 4, described device further include:
First trigger module 406 detects that operation event occurs for any memory node in the multiple memory node for working as
When barrier, the property of the number and the multiple memory node of first determining module based on multiple video recording plans to be issued is triggered
It can score, determine the distribution number for distributing to the video recording plan of each memory node;Alternatively,
Second trigger module 407, for triggering second determining module based on to be issued every the first preset duration
The number of multiple video recording plans and the Performance Score of the multiple memory node, determine the video recording meter for distributing to each memory node
The distribution number drawn.
Optionally, G referring to fig. 4, described device further include:
5th determining module 408, for determining holding for the video recording plan being currently executing in the multiple memory node
Row total number;
6th determining module 409, for execution total number and the multiple storage section based on the multiple memory node
The Performance Score of point, determines the load condition of each memory node in the multiple memory node;
Second distribution module 410, for there are load condition being depositing for imbalance in the multiple memory node
When storing up node, the actual number of video recording plan that the memory node in the imbalance is currently executing again into
Row distribution.
Optionally, H, the 6th determining module 409 include: referring to fig. 4
Third computational submodule 4091, for saving the Performance Score of each memory node divided by the multiple storage
The performance overall score of point, obtains the scoring weight of each memory node, and the performance general comment is divided into the multiple storage section
The sum of the Performance Score of point;
4th computational submodule 4092, for by the execution total number of the multiple memory node respectively multiplied by described each
The scoring weight of memory node obtains the theoretical number for the video recording plan that each memory node is currently executing;
Second determines submodule 4093, for working as the video recording plan for existing in the multiple memory node and being currently executing
Number and when the different memory node of the theoretical number, determine in the multiple memory node there are load condition to be institute
State the memory node of imbalance.
Optionally, I, second distribution module 410 include: referring to fig. 4
Third determines submodule 4101, for for any storage section in the memory node in the imbalance
Point determines the corresponding overload number of any memory node or under load number;
Wherein, the overload number refers to the actual number for the video recording plan that any memory node is currently executing
The quantity of the theoretical number for the video recording plan being currently executing more than any memory node, the under load number refer to institute
The actual number for stating the video recording plan that any memory node is currently executing currently is being held less than any memory node
The quantity of the theoretical number of capable video recording plan;
Mobile submodule 4102, the video recording for being currently executing from any memory node remove number in the works
For it is described overload number video recording plan, alternatively, based in the imbalance memory node in other storage section
The video recording plan removed in point is the video recording plan of the under load number to any memory node distribution number.
Optionally, J, first determining module 401 include: referring to fig. 4
4th determines submodule 4011, for being based on described for any memory node in the multiple memory node
The detail information for multiple performance indicators that any memory node reports determines that multiple performances described in any memory node refer to
Target scoring;
5th computational submodule 4012, the scoring for working as multiple performance indicators described in any memory node are high
When default scoring, the scoring of the multiple performance indicator is added, the current Performance Score of any memory node is obtained;
5th determines submodule 4013, and the scoring for working as multiple performance indicators described in any memory node is not complete
When higher than the default scoring, the scoring for the minimum performance indicator that scores in the multiple performance indicator is determined as described any
The current Performance Score of memory node.
Optionally, described device further include:
Third trigger module, for triggering the 5th determining module and determining the multiple deposit every the second preset duration
The execution total number for the video recording plan being currently executing in storage node.
In conclusion in embodiments of the present invention, management node can determine the current Performance Score of multiple memory nodes,
Later, it is also based on the execution total number of multiple memory nodes and the Performance Score of multiple memory nodes, determines multiple storages
The load condition of each memory node in node, when there are the storage sections that load condition is imbalance in multiple memory nodes
When point, distribution is re-started to the actual number for the video recording plan that the memory node in imbalance is currently executing,
It, can be timely when ensure that multiple memory nodes lead to load imbalance because of some reasons in executing multiple video recording planning process
Load balancing is carried out, not only realizes load balancing during video recording plan issues to realize, additionally it is possible to execute video recording
Load balancing is realized during plan, improves the accuracy and effect for realizing load balancing between multiple memory nodes.
It should be understood that load balancing apparatus provided by the above embodiment is when carrying out load balancing, only with above-mentioned each
The division progress of functional module can according to need and for example, in practical application by above-mentioned function distribution by different function
Energy module is completed, i.e., the internal structure of device is divided into different functional modules, to complete whole described above or portion
Divide function.In addition, load balancing apparatus provided by the above embodiment and load-balancing method embodiment belong to same design, have
Body realizes that process is detailed in embodiment of the method, and which is not described herein again.
Fig. 5 shows the structural block diagram of the node 500 of an illustrative embodiment of the invention offer.The node 500 can be with
Management node, any one memory node being also possible in multiple memory nodes, and the node 500 may is that tablet computer,
Laptop or desktop computer.Node 500 is also possible to referred to as user equipment, portable terminal, laptop terminal, desk-top end
Other titles such as end.
In general, node 500 includes: processor 501 and memory 502.
Processor 501 may include one or more processing cores, such as 4 core processors, 8 core processors etc..Place
Reason device 501 can use DSP (Digital Signal Processing, Digital Signal Processing), FPGA (Field-
Programmable Gate Array, field programmable gate array), PLA (Programmable LogicArray, may be programmed
Logic array) at least one of example, in hardware realize.Processor 501 also may include primary processor and coprocessor, master
Processor is the processor for being handled data in the awake state, also referred to as CPU (Central Processing
Unit, central processing unit);Coprocessor is the low power processor for being handled data in the standby state.?
In some embodiments, processor 501 can be integrated with GPU (Graphics Processing Unit, image processor),
GPU is used to be responsible for the rendering and drafting of content to be shown needed for display screen.In some embodiments, processor 501 can also be wrapped
AI (Artificial Intelligence, artificial intelligence) processor is included, the AI processor is for handling related machine learning
Calculating operation.
Memory 502 may include one or more computer readable storage mediums, which can
To be non-transient.Memory 502 may also include high-speed random access memory and nonvolatile memory, such as one
Or multiple disk storage equipments, flash memory device.In some embodiments, the non-transient computer in memory 502 can
Storage medium is read for storing at least one instruction, at least one instruction performed by processor 501 for realizing this Shen
Please in embodiment of the method provide a kind of load-balancing method.
In some embodiments, node 500 is also optional includes: peripheral device interface 503 and at least one peripheral equipment.
It can be connected by bus or signal wire between processor 501, memory 502 and peripheral device interface 503.Each peripheral equipment
It can be connected by bus, signal wire or circuit board with peripheral device interface 503.Specifically, peripheral equipment includes: radio circuit
504, at least one of touch display screen 505, camera 506, voicefrequency circuit 507, positioning component 508 and power supply 509.
Peripheral device interface 503 can be used for I/O (Input/Output, input/output) is relevant outside at least one
Peripheral equipment is connected to processor 501 and memory 502.In some embodiments, processor 501, memory 502 and peripheral equipment
Interface 503 is integrated on same chip or circuit board;In some other embodiments, processor 501, memory 502 and outer
Any one or two in peripheral equipment interface 503 can realize on individual chip or circuit board, the present embodiment to this not
It is limited.
Radio circuit 504 is for receiving and emitting RF (Radio Frequency, radio frequency) signal, also referred to as electromagnetic signal.It penetrates
Frequency circuit 504 is communicated by electromagnetic signal with communication network and other communication equipments.Radio circuit 504 turns electric signal
It is changed to electromagnetic signal to be sent, alternatively, the electromagnetic signal received is converted to electric signal.Optionally, radio circuit 504 wraps
It includes: antenna system, RF transceiver, one or more amplifiers, tuner, oscillator, digital signal processor, codec chip
Group, user identity module card etc..Radio circuit 504 can be carried out by least one wireless communication protocol with other terminals
Communication.The wireless communication protocol includes but is not limited to: WWW, Metropolitan Area Network (MAN), Intranet, each third generation mobile communication network (2G, 3G,
4G and 5G), WLAN and/or WiFi (Wireless Fidelity, Wireless Fidelity) network.In some embodiments, it penetrates
Frequency circuit 504 can also include NFC (Near Field Communication, wireless near field communication) related circuit, this
Application is not limited this.
Display screen 505 is for showing UI (UserInterface, user interface).The UI may include figure, text, figure
Mark, video and its their any combination.When display screen 505 is touch display screen, display screen 505 also there is acquisition to show
The ability of the touch signal on the surface or surface of screen 505.The touch signal can be used as control signal and be input to processor
501 are handled.At this point, display screen 505 can be also used for providing virtual push button and/or dummy keyboard, also referred to as soft button and/or
Soft keyboard.In some embodiments, display screen 505 can be one, and the front panel of node 500 is arranged;In other embodiments
In, display screen 505 can be at least two, be separately positioned on the different surfaces of node 500 or in foldover design;In still other reality
It applies in example, display screen 505 can be flexible display screen, be arranged on the curved surface of node 500 or on fold plane.Even, it shows
Display screen 505 can also be arranged to non-rectangle irregular figure, namely abnormity screen.Display screen 505 can use LCD (Liquid
Crystal Display, liquid crystal display), OLED (Organic Light-Emitting Diode, Organic Light Emitting Diode)
Etc. materials preparation.
CCD camera assembly 506 is for acquiring image or video.Optionally, CCD camera assembly 506 include front camera and
Rear camera.In general, the front panel of terminal is arranged in front camera, the back side of terminal is arranged in rear camera.One
In a little embodiments, rear camera at least two is main camera, depth of field camera, wide-angle camera, focal length camera shooting respectively
Any one in head, to realize that main camera and the fusion of depth of field camera realize background blurring function, main camera and wide-angle
Camera fusion realizes that pan-shot and VR (Virtual Reality, virtual reality) shooting function or other fusions are clapped
Camera shooting function.In some embodiments, CCD camera assembly 506 can also include flash lamp.Flash lamp can be monochromatic warm flash lamp,
It is also possible to double-colored temperature flash lamp.Double-colored temperature flash lamp refers to the combination of warm light flash lamp and cold light flash lamp, can be used for not
With the light compensation under colour temperature.
Voicefrequency circuit 507 may include microphone and loudspeaker.Microphone is used to acquire the sound wave of user and environment, and will
Sound wave, which is converted to electric signal and is input to processor 501, to be handled, or is input to radio circuit 504 to realize voice communication.
For stereo acquisition or the purpose of noise reduction, microphone can be separately positioned on the different parts of node 500 to be multiple.Mike
Wind can also be array microphone or omnidirectional's acquisition type microphone.Loudspeaker is then used to that processor 501 or radio circuit will to be come from
504 electric signal is converted to sound wave.Loudspeaker can be traditional wafer speaker, be also possible to piezoelectric ceramic loudspeaker.When
When loudspeaker is piezoelectric ceramic loudspeaker, the audible sound wave of the mankind can be not only converted electrical signals to, it can also be by telecommunications
Number the sound wave that the mankind do not hear is converted to carry out the purposes such as ranging.In some embodiments, voicefrequency circuit 507 can also include
Earphone jack.
Positioning component 508 is used for the current geographic position of positioning node 500, to realize navigation or LBS (Location
Based Service, location based service).Positioning component 508 can be the GPS (Global based on the U.S.
Positioning System, global positioning system), China dipper system or Russia Galileo system positioning group
Part.
Power supply 509 is used to be powered for the various components in node 500.Power supply 509 can be alternating current, direct current,
Disposable battery or rechargeable battery.When power supply 509 includes rechargeable battery, which can be wired charging electricity
Pond or wireless charging battery.Wired charging battery is the battery to be charged by Wireline, and wireless charging battery is by wireless
The battery of coil charges.The rechargeable battery can be also used for supporting fast charge technology.
In some embodiments, node 500 further includes having one or more sensors 510.The one or more sensors
510 include but is not limited to: acceleration transducer 511, gyro sensor 512, pressure sensor 513, fingerprint sensor 514,
Optical sensor 515 and proximity sensor 516.
The acceleration that acceleration transducer 511 can detecte in three reference axis of the coordinate system established with node 500 is big
It is small.For example, acceleration transducer 511 can be used for detecting component of the acceleration of gravity in three reference axis.Processor 501 can
With the acceleration of gravity signal acquired according to acceleration transducer 511, touch display screen 505 is controlled with transverse views or longitudinal view
Figure carries out the display of user interface.Acceleration transducer 511 can be also used for the acquisition of game or the exercise data of user.
Gyro sensor 512 can detecte body direction and the rotational angle of node 500, and gyro sensor 512 can
To cooperate with acquisition user to act the 3D of node 500 with acceleration transducer 511.Processor 501 is according to gyro sensor 512
Following function may be implemented in the data of acquisition: when action induction (for example changing UI according to the tilt operation of user), shooting
Image stabilization, game control and inertial navigation.
The lower layer of side frame and/or touch display screen 505 in node 500 can be set in pressure sensor 513.Work as pressure
When the side frame of node 500 is arranged in sensor 513, user can detecte to the gripping signal of node 500, by processor 501
Right-hand man's identification or prompt operation are carried out according to the gripping signal that pressure sensor 513 acquires.When the setting of pressure sensor 513 exists
When the lower layer of touch display screen 505, the pressure operation of touch display screen 505 is realized to UI circle according to user by processor 501
Operability control on face is controlled.Operability control includes button control, scroll bar control, icon control, menu
At least one of control.
Fingerprint sensor 514 is used to acquire the fingerprint of user, collected according to fingerprint sensor 514 by processor 501
The identity of fingerprint recognition user, alternatively, by fingerprint sensor 514 according to the identity of collected fingerprint recognition user.It is identifying
When the identity of user is trusted identity out, the user is authorized to execute relevant sensitive operation, the sensitive operation packet by processor 501
Include solution lock screen, check encryption information, downloading software, payment and change setting etc..Node can be set in fingerprint sensor 514
500 front, the back side or side.When being provided with physical button or manufacturer Logo on node 500, fingerprint sensor 514 can be with
It is integrated with physical button or manufacturer Logo.
Optical sensor 515 is for acquiring ambient light intensity.In one embodiment, processor 501 can be according to optics
The ambient light intensity that sensor 515 acquires controls the display brightness of touch display screen 505.Specifically, when ambient light intensity is higher
When, the display brightness of touch display screen 505 is turned up;When ambient light intensity is lower, the display for turning down touch display screen 505 is bright
Degree.In another embodiment, the ambient light intensity that processor 501 can also be acquired according to optical sensor 515, dynamic adjust
The acquisition parameters of CCD camera assembly 506.
Proximity sensor 516, also referred to as range sensor are generally arranged at the front panel of node 500.Proximity sensor 516
For acquiring the distance between the front of user Yu node 500.In one embodiment, when proximity sensor 516 detects use
When family and the distance between the front of node 500 gradually become smaller, touch display screen 505 is controlled from bright screen state by processor 501
It is switched to breath screen state;When proximity sensor 516 detects user and the distance between the front of node 500 becomes larger,
Touch display screen 505 is controlled by processor 501 and is switched to bright screen state from breath screen state.
It that is to say, the embodiment of the present invention provides not only a kind of node, including processor and can hold for storage processor
The memory of row instruction, wherein processor is configured as executing the method in Fig. 2 and embodiment shown in Fig. 3, moreover, this hair
Bright embodiment additionally provides a kind of computer readable storage medium, is stored with computer program in the storage medium, the computer
The load-balancing method in Fig. 2 and embodiment shown in Fig. 3 may be implemented when program is executed by processor.
It will be understood by those skilled in the art that the restriction of the not structure paired node 500 of structure shown in Fig. 5, can wrap
It includes than illustrating more or fewer components, perhaps combine certain components or is arranged using different components.
Fig. 6 is a kind of structural schematic diagram of node 600 provided in an embodiment of the present invention, which can be management section
Point, any one memory node being also possible in multiple memory nodes, and the node 600 can be server, and the server
It can be the server in background server cluster.Specifically:
Node 600 includes central processing unit (CPU) 601 including random access memory (RAM) 602 and read-only storage
The system storage 604 of device (ROM) 603, and the system bus of connection system storage 604 and central processing unit 601
605.Node 600 further includes basic input/output (the I/O system that information is transmitted between each device helped in computer
System) 606, and for the mass-memory unit 607 of storage program area 613, application program 614 and other program modules 615.
Basic input/output 606 includes display 608 for showing information and inputs information for user
The input equipment 609 of such as mouse, keyboard etc.Wherein display 608 and input equipment 609 are all by being connected to system bus
605 input and output controller 610 is connected to central processing unit 601.Basic input/output 606 can also include defeated
Enter o controller 610 for receiving and handling from the defeated of multiple other equipment such as keyboard, mouse or electronic touch pen
Enter.Similarly, input and output controller 610 also provides output to display screen, printer or other kinds of output equipment.
Mass-memory unit 607 is connected by being connected to the bulk memory controller (not shown) of system bus 605
To central processing unit 601.Mass-memory unit 607 and its associated computer-readable medium provide non-for node 600
Volatile storage.That is, mass-memory unit 607 may include the meter of such as hard disk or CD-ROM drive etc
Calculation machine readable medium (not shown).
Without loss of generality, computer-readable medium may include computer storage media and communication media.Computer storage
Medium includes any of the information such as computer readable instructions, data structure, program module or other data for storage
The volatile and non-volatile of method or technique realization, removable and irremovable medium.Computer storage medium include RAM,
ROM, EPROM, EEPROM, flash memory or other solid-state storages its technologies, CD-ROM, DVD or other optical storages, cassette, magnetic
Band, disk storage or other magnetic storage devices.Certainly, skilled person will appreciate that computer storage medium is not limited to
It states several.Above-mentioned system storage 604 and mass-memory unit 607 may be collectively referred to as memory.
According to various embodiments of the present invention, node 600 can also be connected to the network by internet etc. onto network
Remote computer operation.Namely node 600 can be connected by the Network Interface Unit 611 being connected on system bus 605
To network 612, in other words, Network Interface Unit 611 can be used also to be connected to other kinds of network or remote computer
System (not shown).
Above-mentioned memory further includes one, and perhaps more than one program one or more than one program are stored in storage
In device, it is configured to be executed by CPU.The one or more programs are for realizing provided in an embodiment of the present invention as above-mentioned
Fig. 2 or load-balancing method shown in Fig. 3.
Those of ordinary skill in the art will appreciate that realizing that all or part of the steps of above-described embodiment can pass through hardware
It completes, relevant hardware can also be instructed to complete by program, the program can store in a kind of computer-readable
In storage medium, storage medium mentioned above can be read-only memory, disk or CD etc..
The foregoing is merely presently preferred embodiments of the present invention, is not intended to limit the invention, it is all in spirit of the invention and
Within principle, any modification, equivalent replacement, improvement and so on be should all be included in the protection scope of the present invention.
Claims (25)
1. a kind of load-balancing method, applied to the management node in video monitoring system, which is characterized in that the method packet
It includes:
Determine that the current Performance Score of multiple memory nodes in the video monitoring system, the Performance Score are based on storage
The scoring determination of each performance indicator of node obtains, and for describing the ability that memory node currently runs resource;
The Performance Score of number and the multiple memory node based on multiple video recording plans to be issued, determination are distributed to each
The distribution number of the video recording plan of memory node, the video recording are designed for describing the time letter of photographic device recorded video stream
Breath;
According to the determining distribution number, the multiple video recording planned assignment is given to the multiple memory node.
2. the method as described in claim 1, which is characterized in that the number and institute based on multiple video recording plans to be issued
The Performance Score of multiple memory nodes is stated, determines the distribution number for distributing to the video recording plan of each memory node, comprising:
By the Performance Score of each memory node divided by the performance overall score of the multiple memory node, obtain described each
The scoring weight of memory node, the performance general comment are divided into the sum of the Performance Score of the multiple memory node;
By the number of the multiple video recording plan multiplied by the scoring weight of each memory node, obtain distributing to described each
The distribution number of the video recording plan of memory node.
3. the method as described in claim 1, which is characterized in that it is described according to the determining distribution number, it will be the multiple
Planned assignment record a video to the multiple memory node, comprising:
Obtain the priority of the multiple video recording plan;
According to the priority orders and determining distribution number of the multiple video recording plan, the multiple video recording planned assignment is given
The multiple memory node.
4. method as claimed in claim 1 or 3, which is characterized in that it is described by the multiple video recording planned assignment to described more
A memory node, comprising:
For any video recording plan of the multiple video recording in the works, the history execution track of any video recording plan is obtained,
The history execution track is used to describe the details letter of any video recording plan history memory node being performed and execution
Breath;
Based on the history execution track, determines from the multiple memory node and do not fail when executing any video recording plan
Memory node;
By any video recording planned assignment to the memory node not failed.
5. the method as described in claim 1, which is characterized in that the number and institute based on multiple video recording plans to be issued
The Performance Score of multiple memory nodes is stated, before the distribution number for determining the video recording plan for distributing to each memory node, is also wrapped
It includes:
At least one memory node that operation troubles has occurred in the multiple memory node is currently executing and is not carried out
Multiple video recording plans be determined as multiple video recording plans to be issued;And/or
To receive and untreated video recording plan issue multiple video recording plans for carrying in request be determined as it is to be issued multiple
Video recording plan.
6. the method as described in claim 1, which is characterized in that the method also includes:
It will receive and the video recording plan carried in untreated video recording plan removal request deleted from corresponding memory node.
7. the method as described in claim 1-6 is any, which is characterized in that based on multiple video recording plans to be issued
Several and the multiple memory node Performance Scores, determine the video recording plan for distributing to each memory node distribution number it
Before, further includes:
When detecting that operation troubles occurs for any memory node in the multiple memory node, execute described based on to be issued
The number of multiple video recording plans and the Performance Score of the multiple memory node, determine the video recording meter for distributing to each memory node
The step of distribution number drawn;Alternatively,
Every the first preset duration, the number based on multiple video recording plans to be issued and the multiple memory node are executed
Performance Score, determine distribute to each memory node video recording plan distribution number the step of.
8. the method as described in claim 1, which is characterized in that multiple storage sections in the determination video monitoring system
After the current Performance Score of point, further includes:
Determine the execution total number for the video recording plan being currently executing in the multiple memory node;
The Performance Score of execution total number and the multiple memory node based on the multiple memory node, determines the multiple
The load condition of each memory node in memory node;
When in the multiple memory node there are when the memory node that load condition is imbalance, in described unbalanced
The actual number for the video recording plan that the memory node of state is currently executing re-starts distribution.
9. method according to claim 8, which is characterized in that the execution total number based on the multiple memory node and
The Performance Score of the multiple memory node determines the load condition of each memory node in the multiple memory node, comprising:
By the Performance Score of each memory node divided by the performance overall score of the multiple memory node, obtain described each
The scoring weight of memory node, the performance general comment are divided into the sum of the Performance Score of the multiple memory node;
By the execution total number of the multiple memory node respectively multiplied by the scoring weight of each memory node, obtain described
The theoretical number for the video recording plan that each memory node is currently executing;
When there is the actual number of video recording plan being currently executing and the theoretical number in the multiple memory node not
When identical memory node, determine that there are the storage sections that load condition is the imbalance in the multiple memory node
Point.
10. method as claimed in claim 8 or 9, which is characterized in that the described pair of memory node in the imbalance
The actual number for the video recording plan being currently executing re-starts distribution, comprising:
For any memory node in the memory node in the imbalance, determine that the memory node A is corresponding
The number that overloads or under load number;
Wherein, the overload number refers to that the actual number for the video recording plan that any memory node is currently executing is more than
The quantity of the theoretical number for the video recording plan that any memory node is currently executing, the under load number refer to described appoint
What the actual number for the video recording plan that one memory node is currently executing was currently executing less than any memory node
The quantity for the theoretical number planned of recording a video;
The video recording being currently executing from any memory node removes the video recording meter that number is the overload number in the works
It draws, alternatively, based on the video recording plan removed in other memory nodes in the memory node in the imbalance, to institute
State the video recording plan that any memory node distribution number is the under load number.
11. the method as described in claim 1-10 is any, which is characterized in that more in the determination video monitoring system
The current Performance Score of a memory node, comprising:
For any memory node in the multiple memory node, the multiple performances reported based on any memory node are referred to
Target detail information determines the scoring of multiple performance indicators described in any memory node;
When the scoring of multiple performance indicators described in any memory node is above default scoring, by the multiple performance
The scoring of index is added, and obtains the current Performance Score of any memory node;
Overall height, will be described not more when the default scoring for the scoring of multiple performance indicators described in any memory node
The scoring for the minimum performance indicator that scores in a performance indicator is determined as the current Performance Score of any memory node.
12. the method as described in claim 8-11 is any, which is characterized in that current in the multiple memory node of determination
Before the execution total number for the video recording plan being carrying out, further includes:
Every the second preset duration, holding for the video recording plan being currently executing in the multiple memory node of the determination is executed
The step of row total number.
13. a kind of load balancing apparatus, applied to the management node in video monitoring system, which is characterized in that described device packet
It includes:
First determining module, it is described for determining the current Performance Score of multiple memory nodes in the video monitoring system
Performance Score is to be obtained based on the scoring determination of each performance indicator of memory node, and currently run for describing memory node
The ability of resource;
Second determining module, for being commented based on the number of multiple video recording plans and the performance of the multiple memory node to be issued
Point, determine the distribution number for distributing to the video recording plan of each memory node, the video recording is designed for describing photographic device record
The temporal information of video flowing processed;
Distribution module, for giving the multiple video recording planned assignment to the multiple storage according to the determining distribution number
Node.
14. device as claimed in claim 13, which is characterized in that second determining module includes:
First computational submodule, for the performance by the Performance Score of each memory node divided by the multiple memory node
Overall score, obtains the scoring weight of each memory node, and the performance general comment is divided into the performance of the multiple memory node
The sum of scoring;
Second computational submodule, for weighing the number of the multiple video recording plan multiplied by the scoring of each memory node
Weight, obtains the distribution number for distributing to the video recording plan of each memory node.
15. device as claimed in claim 13, which is characterized in that first distribution module includes:
First acquisition submodule, for obtaining the priority of the multiple video recording plan;
First distribution sub module, for the priority orders according to the multiple video recording plan and the distribution number determined, by institute
Multiple video recording planned assignments are stated to the multiple memory node.
16. the device as described in claim 13 or 15, which is characterized in that first distribution module includes:
Second acquisition submodule obtains any video recording for any video recording plan for the multiple video recording in the works
The history execution track of plan, the history execution track is for describing the storage section that any video recording plan history is performed
Point and the detail information executed;
First determines submodule, for being based on the history execution track, is determined described in executing from the multiple memory node
The memory node not failed when any video recording plan;
Second distribution sub module, the memory node for any video recording planned assignment not to fail to described in.
17. device as claimed in claim 13, which is characterized in that described device further include:
Third determining module, at least one memory node for operation troubles will occur in the multiple memory node are current
The multiple video recording plans for being carrying out and being not carried out are determined as multiple video recording plans to be issued;And/or
4th determining module, for will receive and untreated video recording plan to issue multiple video recording plans for carrying in request true
It is set to multiple video recording plans to be issued.
18. device as claimed in claim 13, which is characterized in that described device further include:
Removing module, for will receive and the video recording plan carried in untreated video recording plan removal request is deposited from corresponding
It is deleted in storage node.
19. the device as described in claim 13-18 is any, which is characterized in that described device further include:
First trigger module, for holding when detecting that operation troubles occurs for any memory node in the multiple memory node
The Performance Score of the row number and the multiple memory node based on multiple video recording plans to be issued, determines and distributes to respectively
The step of distribution number of the video recording plan of a memory node;Alternatively,
Second trigger module, for executing the number based on multiple video recording plans to be issued every the first preset duration
With the Performance Score of the multiple memory node, the step for distributing to the distribution number of video recording plan of each memory node is determined
Suddenly.
20. device as claimed in claim 13, which is characterized in that described device further include:
5th determining module, the execution for determining the video recording plan being currently executing in the multiple memory node are always a
Number;
6th determining module, the performance for execution total number and the multiple memory node based on the multiple memory node
Scoring, determines the load condition of each memory node in the multiple memory node;
Second distribution module, for when there are the memory nodes that load condition is imbalance in the multiple memory node
When, the actual number of video recording plan that the memory node in the imbalance is currently executing is re-started point
Match.
21. device as claimed in claim 20, which is characterized in that the 6th determining module includes:
Third computational submodule, for the performance by the Performance Score of each memory node divided by the multiple memory node
Overall score, obtains the scoring weight of each memory node, and the performance general comment is divided into the performance of the multiple memory node
The sum of scoring;
4th computational submodule, for by the execution total number of the multiple memory node respectively multiplied by each memory node
Scoring weight, obtain the theoretical number for the video recording plan that each memory node is currently executing;
Second determines submodule, for as practical for there is the video recording plan being currently executing in the multiple memory node
When several memory node different with the theoretical number, determine in the multiple memory node there are load condition be it is described not
The memory node of equilibrium state.
22. the device as described in claim 20 or 21, which is characterized in that second distribution module includes:
Third determines submodule, for determining for any memory node in the memory node in the imbalance
The corresponding overload number of memory node A or under load number;
Wherein, the overload number refers to that the actual number for the video recording plan that any memory node is currently executing is more than
The quantity of the theoretical number for the video recording plan that any memory node is currently executing, the under load number refer to described appoint
What the actual number for the video recording plan that one memory node is currently executing was currently executing less than any memory node
The quantity for the theoretical number planned of recording a video;
Mobile submodule, it is described super that the video recording for being currently executing from any memory node removes number in the works
The video recording plan of number is carried, alternatively, based on removing in other memory nodes in the memory node in the imbalance
Video recording plan, be the video recording plan of the under load number to any memory node distribution number.
23. the device as described in claim 13-22 is any, which is characterized in that first determining module includes:
4th determines submodule, for being based on any storage for any memory node in the multiple memory node
The detail information for multiple performance indicators that node reports determines commenting for multiple performance indicators described in any memory node
Point;
5th computational submodule, the scoring for working as multiple performance indicators described in any memory node are above default comment
The scoring of the multiple performance indicator is added, obtains the current Performance Score of any memory node by timesharing;
5th determines submodule, the scoring for multiple performance indicators described in any memory node not overall height in described
When default scoring, the scoring for the minimum performance indicator that scores in the multiple performance indicator is determined as any memory node
Current Performance Score.
24. the device as described in claim 20-23 is any, which is characterized in that described device further include:
Third trigger module, for every the second preset duration, execute in the multiple memory node of the determination it is current
The step of execution total number of the video recording plan of execution.
25. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that described program is processed
The step of claim 1-12 any the method is realized when device executes.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810054177.8A CN110062199B (en) | 2018-01-19 | 2018-01-19 | Load balancing method and device and computer readable storage medium |
PCT/CN2019/072376 WO2019141247A1 (en) | 2018-01-19 | 2019-01-18 | Load balance method and apparatus, and computer-readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810054177.8A CN110062199B (en) | 2018-01-19 | 2018-01-19 | Load balancing method and device and computer readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110062199A true CN110062199A (en) | 2019-07-26 |
CN110062199B CN110062199B (en) | 2020-07-10 |
Family
ID=67301686
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810054177.8A Active CN110062199B (en) | 2018-01-19 | 2018-01-19 | Load balancing method and device and computer readable storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN110062199B (en) |
WO (1) | WO2019141247A1 (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111401170A (en) * | 2020-03-06 | 2020-07-10 | 西安奥卡云数据科技有限公司 | Face detection method and device |
CN111428266A (en) * | 2019-09-05 | 2020-07-17 | 广州知弘科技有限公司 | Storage node space capacity and security evaluation method based on big data |
CN111580755A (en) * | 2020-05-09 | 2020-08-25 | 杭州海康威视***技术有限公司 | Distributed data processing system and distributed data processing method |
CN113225506A (en) * | 2020-01-21 | 2021-08-06 | 杭州海康威视数字技术股份有限公司 | Video data analysis method and device |
CN116684664A (en) * | 2023-06-21 | 2023-09-01 | 杭州瑞网广通信息技术有限公司 | Scheduling method of streaming media cluster |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101005514A (en) * | 2006-12-27 | 2007-07-25 | 北京航空航天大学 | Multiple server organizing method for network game |
GB0915712D0 (en) * | 2008-11-03 | 2009-10-07 | Bridgeworks Ltd | Data transfer |
CN103905530A (en) * | 2014-03-11 | 2014-07-02 | 浪潮集团山东通用软件有限公司 | High-performance global load balance distributed database data routing method |
CN104113735A (en) * | 2014-07-30 | 2014-10-22 | 武汉烽火众智数字技术有限责任公司 | Distributed video monitoring storing system and method thereof |
GB2508403B (en) * | 2012-11-30 | 2016-01-27 | Xyratex Tech Ltd | Data communication method and apparatus |
CN105450964A (en) * | 2014-09-30 | 2016-03-30 | 杭州海康威视***技术有限公司 | Method, system and management node for carrying out cloud storage on picture recording data |
CN106506665A (en) * | 2016-11-18 | 2017-03-15 | 郑州云海信息技术有限公司 | A kind of load-balancing method of distributed video monitoring system and platform |
CN106790726A (en) * | 2017-03-30 | 2017-05-31 | 电子科技大学 | A kind of priority query's dynamic feedback of load equilibrium resource regulating method based on Docker cloud platforms |
JP2017139634A (en) * | 2016-02-04 | 2017-08-10 | 京セラ株式会社 | Communication device, communication control method and program |
CN107196869A (en) * | 2017-07-14 | 2017-09-22 | 北京知道创宇信息技术有限公司 | The adaptive load balancing method, apparatus and system of Intrusion Detection based on host actual loading |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101365119B (en) * | 2008-09-25 | 2013-02-13 | 北京中星微电子有限公司 | Video recording balance equalizing method used for network video monitoring system |
CN102333120B (en) * | 2011-09-29 | 2014-05-21 | 高新兴科技集团股份有限公司 | Flow storage system for load balance processing |
US9154735B2 (en) * | 2013-03-15 | 2015-10-06 | Blue Jeans Network | Provision of video conferencing with load balancing |
WO2014176990A1 (en) * | 2013-10-11 | 2014-11-06 | 中兴通讯股份有限公司 | Node allocation method, device and system |
-
2018
- 2018-01-19 CN CN201810054177.8A patent/CN110062199B/en active Active
-
2019
- 2019-01-18 WO PCT/CN2019/072376 patent/WO2019141247A1/en active Application Filing
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101005514A (en) * | 2006-12-27 | 2007-07-25 | 北京航空航天大学 | Multiple server organizing method for network game |
GB0915712D0 (en) * | 2008-11-03 | 2009-10-07 | Bridgeworks Ltd | Data transfer |
GB2508403B (en) * | 2012-11-30 | 2016-01-27 | Xyratex Tech Ltd | Data communication method and apparatus |
CN103905530A (en) * | 2014-03-11 | 2014-07-02 | 浪潮集团山东通用软件有限公司 | High-performance global load balance distributed database data routing method |
CN104113735A (en) * | 2014-07-30 | 2014-10-22 | 武汉烽火众智数字技术有限责任公司 | Distributed video monitoring storing system and method thereof |
CN105450964A (en) * | 2014-09-30 | 2016-03-30 | 杭州海康威视***技术有限公司 | Method, system and management node for carrying out cloud storage on picture recording data |
JP2017139634A (en) * | 2016-02-04 | 2017-08-10 | 京セラ株式会社 | Communication device, communication control method and program |
CN106506665A (en) * | 2016-11-18 | 2017-03-15 | 郑州云海信息技术有限公司 | A kind of load-balancing method of distributed video monitoring system and platform |
CN106790726A (en) * | 2017-03-30 | 2017-05-31 | 电子科技大学 | A kind of priority query's dynamic feedback of load equilibrium resource regulating method based on Docker cloud platforms |
CN107196869A (en) * | 2017-07-14 | 2017-09-22 | 北京知道创宇信息技术有限公司 | The adaptive load balancing method, apparatus and system of Intrusion Detection based on host actual loading |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111428266A (en) * | 2019-09-05 | 2020-07-17 | 广州知弘科技有限公司 | Storage node space capacity and security evaluation method based on big data |
CN113225506A (en) * | 2020-01-21 | 2021-08-06 | 杭州海康威视数字技术股份有限公司 | Video data analysis method and device |
CN113225506B (en) * | 2020-01-21 | 2022-09-30 | 杭州海康威视数字技术股份有限公司 | Video data analysis method and device |
CN111401170A (en) * | 2020-03-06 | 2020-07-10 | 西安奥卡云数据科技有限公司 | Face detection method and device |
CN111401170B (en) * | 2020-03-06 | 2023-06-06 | 西安奥卡云数据科技有限公司 | Face detection method and device |
CN111580755A (en) * | 2020-05-09 | 2020-08-25 | 杭州海康威视***技术有限公司 | Distributed data processing system and distributed data processing method |
CN111580755B (en) * | 2020-05-09 | 2022-07-05 | 杭州海康威视***技术有限公司 | Distributed data processing system and distributed data processing method |
CN116684664A (en) * | 2023-06-21 | 2023-09-01 | 杭州瑞网广通信息技术有限公司 | Scheduling method of streaming media cluster |
Also Published As
Publication number | Publication date |
---|---|
WO2019141247A1 (en) | 2019-07-25 |
CN110062199B (en) | 2020-07-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110062199A (en) | Load-balancing method, device and computer readable storage medium | |
EP4009187A1 (en) | Block processing method and apparatus, and data query method and apparatus based on blockchain | |
WO2020114266A1 (en) | Resource transfer method and apparatus, electronic device, and storage medium | |
CN111090687B (en) | Data processing method, device and system and computer readable storage medium | |
CN111245745B (en) | Message sending method, device, node equipment and storage medium | |
CN108805560B (en) | Numerical value integration method and device, electronic equipment and computer readable storage medium | |
CN110262947A (en) | Threshold alarm method, apparatus, computer equipment and storage medium | |
CN108710496A (en) | Configuration update method, device, equipment and the storage medium of application program | |
CN111340482B (en) | Conflict detection method, device, node equipment and storage medium | |
CN108762881A (en) | Interface method for drafting, device, terminal and storage medium | |
CN108304265A (en) | EMS memory management process, device and storage medium | |
CN110213153A (en) | Display methods, acquisition methods, device, terminal and the storage medium of unread message | |
CN110224870A (en) | Interface monitoring method, apparatus calculates equipment and storage medium | |
CN110147380A (en) | Data-updating method, device, server and storage medium | |
CN111092809A (en) | Method and device for pushing information in real time, computer equipment and storage medium | |
CN110517032A (en) | Resource transfers method, system, device, server and storage medium | |
CN112052096A (en) | Resource processing method and device, server and terminal | |
CN110769050A (en) | Data processing method, data processing system, computer device, and storage medium | |
CN110471614A (en) | A kind of method of storing data, the method and device for detecting terminal | |
CN111760296A (en) | Team forming processing method, team forming processing device, terminal, server and storage medium | |
CN110597840A (en) | Partner relationship establishing method, device, equipment and storage medium based on block chain | |
CN110381155A (en) | Task management method, device, storage medium and terminal | |
CN108829464A (en) | Serving starting method, device, computer equipment and storage medium | |
CN108132817A (en) | Method for managing object and device | |
CN107800720A (en) | Kidnap report method, device, storage medium and equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |