A video recording storage method, a video recording storage system, and a video recording method
By dynamically adjusting the binding relationship between monitoring points and storage nodes in the video recording storage system, the problem that traditional load balancing methods cannot adapt to dynamic load changes is solved, thereby improving the stability and performance of the video recording storage system.
Patent Information
- Application Number
- CN202410528111.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-29
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2044-04-29
AI Technical Summary
Traditional load balancing methods cannot respond in time to sudden high load situations, leading to performance degradation or crashes of recording and playback systems. Furthermore, preset strategies cannot adapt to dynamic load changes, resulting in unbalanced load on storage devices.
Before issuing the video recording and storage command, the binding relationship between monitoring points and storage nodes is adjusted based on priority parameters by querying the load indicators of the database-bound storage nodes to ensure appropriate load. The binding relationship between monitoring points and storage nodes is adjusted in a timely manner by using load indicators and the number of newly added monitoring points to achieve flexible and efficient load balancing.
It achieves reasonable distribution of storage pressure during video recording and storage, ensuring system performance and data storage stability, with strong adaptability, avoiding system crashes, and improving system flexibility and availability.
Smart Images

Figure CN118502660B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of this disclosure relate to the field of storage technology, and more particularly to a video recording storage method, a video recording storage system, and a video recording method. Background Technology
[0002] In video recording and playback systems, the explosive growth in data volume due to the increasing number of surveillance cameras and higher recording resolution poses a significant challenge to system stability. Therefore, load migration and balancing methods are needed to alleviate storage pressure. Load migration and balancing, while ensuring system stability and availability, involves selecting appropriate storage servers for data storage to distribute and reduce storage pressure.
[0003] Traditional load balancing methods often fail to respond promptly to sudden surges in load due to excessive data volume, leading to system performance degradation or even crashes. Furthermore, pre-defined load balancing and migration strategies cannot adapt to dynamically changing loads, resulting in uneven storage device load and impacting system stability during recording and playback. Summary of the Invention
[0004] Embodiments of this disclosure provide a video recording storage method, a video recording storage system, and a recording method, aimed at solving one or more of the above-mentioned problems and other potential problems.
[0005] To achieve the above objectives, the following technical solution is provided:
[0006] According to a first aspect of the embodiments of this specification, a video recording storage method is provided, comprising:
[0007] Before issuing a recording and storage command to a monitoring point, the application manager queries the database to see if the monitoring point is bound to a storage node. If not, it checks the load index of each storage node according to the priority parameter of the storage node to see if it exceeds the load threshold. Once a storage node whose load index does not exceed the load threshold is found, it is bound to the monitoring point. After successful binding, the recording and storage command is issued so that the monitoring point records and stores the recording and storage on the storage node bound to the monitoring point. The binding relationship is also stored in the database.
[0008] If the monitoring point is bound to a storage node, first determine whether the load index of the storage node bound to the monitoring point exceeds the load threshold. If it exceeds the load threshold and the number of newly added monitoring points exceeds the threshold for newly added monitoring points, then unbind the storage node from the monitoring point. Then, based on the priority parameter of the storage node, determine whether the load index of other storage nodes exceeds the load threshold in turn, until a storage node whose load index does not exceed the load threshold is obtained. Then bind it to the monitoring point. After successful binding, issue a recording and storage instruction and store the new binding relationship in the database. Otherwise, issue a recording and storage instruction directly to the monitoring point.
[0009] The load index is calculated based on the load parameters of each storage node. The same storage node can be bound to at least one monitoring point at the same time, and the same monitoring point can be bound to at most one storage node at the same time.
[0010] The video recording storage method of this disclosure, before issuing a video recording storage instruction to the monitoring point, predicts the load status of the storage node in advance based on the judgment of the number of newly added monitoring points and the judgment of the storage node bound to the monitoring point, and adjusts the binding relationship between the monitoring point to be recorded and the storage node in a timely manner, so that the monitoring point to be recorded is bound to a storage node with a suitable storage status for recording and storage, thereby distributing the storage pressure, ensuring the performance of the storage system and the stability of data storage, and the adjustment process is flexible, efficient and highly applicable.
[0011] In some embodiments, the load metric is calculated based on the load parameters of each storage node, including:
[0012] When either the memory usage percentage or the processor usage percentage exceeds the usage threshold, the value exceeding the usage threshold is taken as the load metric.
[0013] When both the memory usage percentage and the processor usage percentage exceed the usage threshold, the load metric = 1 / 2 memory usage percentage + 1 / 2 processor usage percentage + 10%;
[0014] When both the memory usage percentage and the processor usage percentage do not exceed the usage threshold, the load metric = number of recording streams * bandwidth utilization / bandwidth limit parameter;
[0015] Among them, the memory usage percentage, the processor usage percentage, the number of recording streams, the bandwidth utilization rate, and the bandwidth limit parameter are the load parameters.
[0016] In some embodiments, if the load index of a storage node exceeds the load threshold and the number of newly added monitoring points exceeds the newly added monitoring point threshold, the application manager issues a warning message, causing the storage node to be excluded from the judgment process before issuing subsequent recording and storage instructions.
[0017] In some embodiments, if the load metrics of each storage node exceed the load threshold, the application manager issues a service expansion warning.
[0018] In some embodiments, when a new binding relationship is stored in the database, the binding relationship overrides the previous binding relationship of the monitoring point in the database.
[0019] In some embodiments, the application manager receives recording storage completion information from the storage node;
[0020] When multiple storage nodes report the same recording completion information, it is checked whether each of the reported storage nodes has a binding relationship with the monitoring point to which the recording instruction was issued. If no binding relationship is found, a recording data deletion instruction is issued to the storage node.
[0021] In some embodiments, when multiple storage nodes report the same recording storage completion information, the application manager compares the recording data recorded by each storage node. If there are differences between the recording data, the recording data is backed up and an error correction warning is issued. If the recording data is consistent, a recording data deletion command is issued to the storage nodes that are not bound to each other.
[0022] In some embodiments, the storage node acquires a distributed lock during the binding, unbinding, or recording process, and releases the distributed lock after the binding, unbinding, or recording process is completed.
[0023] According to a second aspect of the embodiments of this specification, a video recording storage system is provided, the system including an application manager, a monitoring module, a storage server, a migration module, and a computing module;
[0024] The application manager is used to issue recording and storage instructions to the monitoring points in the monitoring module, and control the monitoring points and the storage nodes to perform recording and storage based on the recording and storage instructions, the binding relationship between the monitoring points and the storage nodes in the storage server;
[0025] The migration module is used to determine whether the load index of the storage node bound to the monitoring point and the number of newly added monitoring points exceed the load threshold and the new monitoring point threshold, unbind the storage node that exceeds the load threshold and the new monitoring point threshold, and query the storage node that does not exceed the load threshold for the monitoring point and bind it.
[0026] The calculation module is used to detect the number of newly added monitoring points and calculate the load index.
[0027] According to a third aspect of the embodiments of this specification, a video recording method is provided, the method comprising:
[0028] The monitoring point receives the video recording and storage instruction and sends the video recording data to the storage node bound to it for storage;
[0029] Wherein, the load index of the storage node bound to the monitoring point does not exceed the load threshold, and the monitoring point and the storage node can communicate during binding; if the load index of the storage node bound to the monitoring point exceeds the load threshold, and the number of new monitoring points exceeds the new monitoring point threshold, then the binding relationship between the monitoring point and the storage node is unbound, the communication connection between the monitoring point and the storage node is disconnected after unbinding, and the monitoring point is newly bound to a storage node whose load index does not exceed the load threshold. Attached Figure Description
[0030] The above and other objects, features, and advantages of embodiments of the present disclosure will become readily apparent from the following detailed description taken in conjunction with the accompanying drawings. Several embodiments of the present disclosure are illustrated in the drawings by way of example and not limitation.
[0031] Figure 1 A flowchart of a video recording storage method according to an embodiment of the present disclosure is shown. Detailed Implementation
[0032] Preferred embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While preferred embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that the present disclosure will be thorough and complete, and will fully convey the scope of the present disclosure to those skilled in the art.
[0033] The term "comprising" and its variations as used herein signify an open-ended inclusion, i.e., "including but not limited to". Unless otherwise stated, the term "or" means "and / or". The term "based on" means "at least partially based on". The terms "one example embodiment" and "one embodiment" mean "at least one example embodiment". The term "another embodiment" means "at least one additional embodiment". Terms such as "upper", "lower", "front", and "rear", indicating placement or positional relationship, are based on the orientation or positional relationship shown in the accompanying drawings and are used only for the purpose of describing the principles of this disclosure, and are not intended to indicate or imply that the elements referred to must have a specific orientation, be constructed or operated in a specific orientation, and therefore should not be construed as limiting this disclosure.
[0034] The following description, in conjunction with the accompanying drawings, illustrates a video recording storage method disclosed in an embodiment of this specification. Figure 1 A flowchart illustrating a video recording storage method according to an embodiment of the present disclosure is shown. The video recording storage method according to an embodiment of the present disclosure includes:
[0035] S1. Before issuing a recording and storage instruction to a monitoring point, the application manager queries the database to see if the monitoring point is bound to a storage node. If it is, proceed to step S3; otherwise, proceed to step S5.
[0036] S3. Determine whether the load index of the storage node bound to the monitoring point exceeds the load threshold. If it exceeds the load threshold and the number of newly added monitoring points exceeds the threshold for newly added monitoring points, unbind the storage node from the monitoring point and then execute step S5; otherwise, directly issue a recording and storage instruction to the monitoring point so that the monitoring point records and stores the recording according to the recording and storage instruction to the storage node bound to the monitoring point.
[0037] S5. Based on the priority parameters of the storage nodes, determine whether the load index of each storage node exceeds the load threshold in turn. After obtaining a storage node whose load index does not exceed the load threshold, bind it to the monitoring point. After successful binding, issue a recording and storage instruction so that the monitoring point records and stores the recording and storage to the storage node bound to the monitoring point.
[0038] In this process, the same storage node can be bound to at least one monitoring point at the same time, and the same monitoring point can be bound to at most one storage node at the same time. The binding relationship between the monitoring point and the storage node is stored in the database. In step S5, after obtaining the storage node whose load index does not exceed the load threshold and binding it to the monitoring point, the binding relationship between the monitoring point and the storage node is updated and stored in the database, and the previous binding relationship of the monitoring point is overwritten.
[0039] In the storage system, the application management service, namely the application manager in this embodiment, is mainly responsible for data storage, scheduling, permission management, backup and recovery, etc. Therefore, in step S1, the application manager issues a recording storage command to a monitoring point to control the monitoring point to record. The recorded data is stored in the storage node bound to the monitoring point. Because the recording storage system stores a large amount of data, and the storage parameters such as memory usage and bandwidth utilization of each storage node in the storage system are different, it is necessary to select an appropriate storage node to allocate the recording data. In this embodiment, a suitable storage node is selected based on load indicators and bound to the monitoring point to be stored, so as to realize the targeted allocation of data storage and the rational utilization of storage resources. The recording storage command is mainly used to start the recording storage process, and also includes information such as recording format and recording time.
[0040] In steps S3 and S5, the load metric is calculated based on the load parameters of each storage node. These parameters include memory usage percentage, processor usage percentage, number of recording streams, bandwidth utilization, and bandwidth limit. When either the memory usage percentage or the processor usage percentage exceeds a threshold, the value exceeding the threshold is taken as the load metric. When both the memory usage percentage and the processor usage percentage exceed their respective thresholds, the load metric = 1 / 2 memory usage percentage + 1 / 2 processor usage percentage + 10%. When neither the memory usage percentage nor the processor usage percentage exceeds its threshold, the load metric = number of recording streams * bandwidth utilization / bandwidth limit. In addition to these parameters, the number of monitoring points bound to the same storage node and other parameters during disk operation can also be incorporated to calculate the load metric, providing a comprehensive evaluation of the storage node's data storage capacity. Both the priority parameter and the load metric calculation parameters can be optimized and adjusted based on user feedback and system logs to adapt to constantly changing load conditions and user needs.
[0041] In step S3, if the load index of a storage node exceeds the load threshold and the number of newly added monitoring points exceeds the newly added monitoring point threshold, the application manager issues a warning message, preventing the storage node from participating in the judgment process before issuing subsequent recording storage instructions, thus reducing the computational load of the subsequent judgment process. The number of newly added monitoring points is obtained by detecting the number of newly added recording interfaces. When the number of newly added recording interfaces is too high and the number of newly added monitoring points exceeds the newly added monitoring point threshold, a warning is issued to alert in advance of potential overload, allowing for timely scheduling of the storage process. Some data stored in the unbound storage node can also be migrated to storage nodes with lower load indexes based on the load index, achieving balanced load distribution.
[0042] In step S5, if the load indicators of each storage node exceed the load threshold, the application manager issues a service expansion warning, reminding staff to adjust and maintain the storage system.
[0043] In steps S3 and S5, after the monitoring point records and stores the video according to the recording and storage instruction to the storage node bound to the corresponding monitoring point, the following steps are also included:
[0044] S7. The application manager receives the video recording storage completion information fed back by the storage node;
[0045] S9. When multiple storage nodes report the same recording storage completion information, check whether the multiple storage nodes that reported the feedback have a binding relationship with the monitoring point to which the recording instruction was issued, and issue a recording data deletion instruction to the storage nodes that do not have a binding relationship.
[0046] Due to network or other reasons, multiple storage nodes may be recording and storing data for the same monitoring point, resulting in multiple similar video files. Therefore, it is necessary to promptly detect and delete the recording plans of storage service nodes that are not bound to the monitoring point. Steps S7 and S9 confirm, on the one hand, that the storage process of the storage node is normal through the recording storage completion information, and on the other hand, confirm that the storage node performing the storage is the storage node bound to the monitoring point. When multiple storage nodes report the same recording storage information, it indicates that multiple storage nodes have stored the recorded data of the same monitoring point. At this time, a recording data deletion command is issued to the storage nodes that are not bound to the monitoring point to avoid data redundancy. The recording storage completion information includes storage task status, storage timestamp, storage location information, and storage data information. The identical recording storage completion information mainly refers to the same storage timestamp and storage data information.
[0047] In step S9, when multiple storage nodes report the same recording completion information, the application manager compares the recording data recorded by each storage node. If there are differences between the recording data, the recording data is backed up and an error correction warning is issued. If the recording data is consistent, a recording data deletion command is issued to the storage nodes that are not bound to each other. Multiple sets of recording data are compared and verified. If they are completely consistent, the recording data of the storage service nodes that are not bound to each other is deleted to avoid occupying unnecessary memory. If they are inconsistent, it indicates that the recording data may have errors, and the data needs to be backed up for subsequent correction.
[0048] Additionally, the storage node acquires a distributed lock during the binding, unbinding, or recording process, and releases the distributed lock after the binding, unbinding, or recording process is completed. A distributed lock is a cross-process, cross-machine mutex lock used to ensure exclusive access to shared resources in a distributed environment, ensuring synchronized access to resources. In the embodiments of this specification, it mainly addresses the problem of data consistency during storage, prevents concurrent data access, and improves the availability and stability of the storage system.
[0049] This specification also discloses a video recording storage system, which includes an application manager, a monitoring module, a storage server, a migration module, and a computing module.
[0050] The application manager is used to issue recording and storage instructions to the monitoring points in the monitoring module, and control the monitoring points and the storage nodes to perform recording and storage based on the recording and storage instructions, the binding relationship between the monitoring points and the storage nodes in the storage server;
[0051] The migration module is used to determine whether the load index of the storage node bound to the monitoring point and the number of newly added monitoring points exceed the load threshold and the new monitoring point threshold, unbind the storage node that exceeds the load threshold and the new monitoring point threshold, and query the storage node that does not exceed the load threshold for the monitoring point and bind it.
[0052] The calculation module is used to detect the number of newly added monitoring points and calculate the load index.
[0053] This specification also provides a video recording method, the method including:
[0054] The monitoring point receives the video recording and storage instruction and sends the video recording data to the storage node bound to it for storage;
[0055] Wherein, the load index of the storage node bound to the monitoring point does not exceed the load threshold, and the monitoring point and the storage node can communicate during binding; if the load index of the storage node bound to the monitoring point exceeds the load threshold, and the number of new monitoring points exceeds the new monitoring point threshold, then the binding relationship between the monitoring point and the storage node is unbound, the communication connection between the monitoring point and the storage node is disconnected after unbinding, and the monitoring point is newly bound to a storage node whose load index does not exceed the load threshold.
[0056] The monitoring points are used to capture video or audio data and monitor the status of specific areas or objects in real time. They typically include devices such as cameras, sensors, and microphones. Each monitoring point can communicate with the storage node, sending the captured data to the storage node for storage and management via the communication channel. The storage node performs backup, encryption, and compression on the data to ensure its security and reliability. The communication connection between the monitoring points and the storage node typically uses a specific communication protocol, including information type identifiers, node address identifiers, and message function identifiers, to distinguish different types of information and nodes, enabling precise data transmission and control. An application management service controls the configuration and management of the monitoring points and the storage node. In this embodiment, the application management service specifically controls the binding and unbinding between the monitoring points and the storage node. Binding or unbinding signifies the establishment or termination of the communication connection between the monitoring points and the storage node. A good communication connection can improve the performance and reliability of the monitoring and storage systems, better meeting monitoring and storage needs.
[0057] While several specific implementation details are included in the foregoing discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single implementation. Conversely, various features described in the context of a single implementation may also be implemented individually or in any suitable sub-combination in multiple implementations.
[0058] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.
[0059] The various embodiments of this disclosure have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or technical improvements to the embodiments in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. A video recording storage method, characterized in that, include: Before issuing a recording and storage command to a monitoring point, the application manager queries the database to see if the monitoring point is bound to a storage node. If not, it checks the load index of each storage node according to the priority parameter of the storage node to see if it exceeds the load threshold. Once a storage node whose load index does not exceed the load threshold is found, it is bound to the monitoring point. After successful binding, the recording and storage command is issued so that the monitoring point records and stores the recording and storage on the storage node bound to the monitoring point. The binding relationship is also stored in the database. If the monitoring point is bound to a storage node, first determine whether the load index of the storage node bound to the monitoring point exceeds the load threshold. If it exceeds the load threshold and the number of newly added monitoring points exceeds the threshold for newly added monitoring points, then unbind the storage node from the monitoring point. Then, based on the priority parameter of the storage node, determine whether the load index of other storage nodes exceeds the load threshold in turn, until a storage node whose load index does not exceed the load threshold is obtained. Then bind it to the monitoring point. After successful binding, issue a recording and storage instruction and store the new binding relationship in the database. Otherwise, issue a recording and storage instruction directly to the monitoring point. The load index is calculated based on the load parameters of each storage node. The same storage node can be bound to at least one monitoring point at the same time, and the same monitoring point can be bound to at most one storage node at the same time.
2. The method according to claim 1, characterized in that, The load metrics are calculated based on the load parameters of each storage node, including: When either the memory usage percentage or the processor usage percentage exceeds the usage threshold, the value exceeding the usage threshold is taken as the load metric. When both the memory usage percentage and the processor usage percentage exceed the usage threshold, the load metric = 1 / 2 memory usage percentage + 1 / 2 processor usage percentage + 10%; When both the memory usage percentage and the processor usage percentage do not exceed the usage threshold, the load metric = number of recording streams * bandwidth utilization / bandwidth limit parameter; Among them, the memory usage percentage, the processor usage percentage, the number of recording streams, the bandwidth utilization rate, and the bandwidth limit parameter are the load parameters.
3. The method according to claim 2, characterized in that, Also includes: If the load index of a storage node exceeds the load threshold and the number of newly added monitoring points exceeds the threshold for newly added monitoring points, the application manager issues a warning message, preventing the storage node from participating in the judgment process before issuing subsequent recording and storage instructions.
4. The method according to claim 3, characterized in that, Also includes: If the load metrics of each storage node exceed the load threshold, the application manager issues a service expansion warning.
5. The method according to claim 1, characterized in that, Also includes: When a new binding relationship is stored in the database, the binding relationship overwrites and updates the previous binding relationship of the monitoring point in the database.
6. The method according to claim 5, characterized in that, Also includes: The application manager receives recording storage completion information from the storage node; When multiple storage nodes report the same recording completion information, it is checked whether each of the reported storage nodes has a binding relationship with the monitoring point to which the recording instruction was issued. If no binding relationship is found, a recording data deletion instruction is issued to the storage node.
7. The method according to claim 6, characterized in that, Also includes: When multiple storage nodes report the same recording completion information, the application manager compares the recording data recorded by each storage node. If there are differences between the recording data, the recording data is backed up and an error correction warning is issued. If the recording data is consistent, a recording data deletion command is issued to the storage nodes that are not bound to each other.
8. The method according to claim 1, characterized in that, Also includes: The storage node acquires a distributed lock during the binding, unbinding, or recording process, and releases the distributed lock after the binding, unbinding, or recording process is completed.
9. A video recording and storage system, comprising an application manager, a monitoring module, a storage server, a migration module, and a computing module; The application manager is used to issue recording and storage instructions to the monitoring points in the monitoring module, and control the monitoring points and the storage nodes to perform recording and storage based on the recording and storage instructions, the binding relationship between the monitoring points and the storage nodes in the storage server; The migration module is used to determine whether the load index of the storage node bound to the monitoring point and the number of newly added monitoring points exceed the load threshold and the new monitoring point threshold, unbind the storage node that exceeds the load threshold and the new monitoring point threshold, and query the storage node that does not exceed the load threshold for the monitoring point and bind it. The calculation module is used to detect the number of newly added monitoring points and calculate the load index.
10. A video recording method, the method comprising: The monitoring point receives the video recording and storage instruction and sends the video recording data to the storage node bound to it for storage; Wherein, the load index of the storage node bound to the monitoring point does not exceed the load threshold, and the monitoring point and the storage node can communicate during binding; if the load index of the storage node bound to the monitoring point exceeds the load threshold, and the number of new monitoring points exceeds the new monitoring point threshold, then the binding relationship between the monitoring point and the storage node is unbound, the communication connection between the monitoring point and the storage node is disconnected after unbinding, and the monitoring point is newly bound to a storage node whose load index does not exceed the load threshold.
Citation Information
Patent Citations
Load balancing method and device and computer readable storage medium
CN110062199A
Dynamic adaptive IO load balancing method for wide-area high-performance computing environment
CN110213351A