Data processing method and device, electronic device and storage medium

By dividing the hard disk working mode into video recording and archive disks in the monitoring storage device, the problems of limited storage capacity of the hard disk and long tape positioning time are solved, efficient data storage and query are achieved, and data storage time is extended and costs are reduced.

CN120469640APending Publication Date: 2025-08-12ZHEJIANG DAHUA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510560947.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-29
Publication Date
2025-08-12

AI Technical Summary

Technical Problem

In the prior art, hard disk storage in the video surveillance system has problems such as limited storage capacity, high cost, insufficient storage period and low data query efficiency. Especially when a large amount of video recording data is stored for a long time, the data positioning time of the tape storage affects the user experience, and when recording and querying at the same time, the system cache overflow or data loss is likely to occur.

Method used

By dividing the working mode of the hard disk into a video disk and an archive disk in the monitoring storage device, the video disk receives data and switches to the archive disk mode when the data amount threshold is reached, the data is received and archived to the tape is stopped, and the data is archived again after clearing, the data is recorded in combination with the metadata disk to optimize the data query path.

Benefits of technology

It improves the performance and duration of data storage, avoids performance degradation and data loss caused by simultaneously recording and querying of hard disks, extends data storage time, and reduces storage costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120469640A_ABST
    Figure CN120469640A_ABST
Patent Text Reader

Abstract

The invention relates to a data processing method and device, an electronic device and a storage medium, which are applied to a tape storage system in the security field, the storage system comprises a tape and a hard disk, and the data processing method comprises the following steps: receiving to-be-stored data by monitoring a first hard disk working in a video disk mode in the storage device; in the process that the first hard disk receives the to-be-stored data, when the data volume stored in the first hard disk reaches a preset data volume threshold value, the first hard disk is switched into an archiving disk mode to work, and the first hard disk is controlled to stop receiving the to-be-stored data; continuously receiving the to-be-stored data by monitoring a second hard disk working in a video disk mode in the storage device; controlling the first hard disk to perform archiving operation on the associated tape; after filing of the first hard disk is completed, data in the first hard disk is emptied, the working mode of the first hard disk is switched into the video disk mode again, and the data storage performance is improved through the data storage method and device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of video storage, and in particular to a data processing method, device, electronic device and storage medium. Background Art

[0002] In video surveillance systems for security, video data storage is a key issue. Currently, the mainstream storage medium is the hard drive. However, due to its inherent limitations, such as limited storage capacity, video data is typically stored periodically (e.g., every 30 days) without hard drive replacement, resulting in the loss of older data. Furthermore, hard drives are relatively expensive, significantly increasing customer costs, especially when large storage capacities are required. Long-term data preservation requires regular hard drive replacement, further increasing costs. Finally, hard drives typically only have a data retention period of around 10 years, which falls short of the long-term retention requirements (e.g., 30 years) required by some customers. For cold data like video surveillance footage (i.e., data that is infrequently accessed but requires long-term preservation), the hard drive's retention period is insufficient. In some scenarios, hard drives cannot fully meet customer needs, especially when large amounts of valuable video data need to be preserved for a long time. Tape storage, as an alternative, offers advantages such as low cost, large capacity, and long data retention. However, its limitations in data location and read / write performance also present new challenges.

[0003] Data positioning on tapes typically takes minutes, far longer than the milliseconds on hard disks. When searching for recorded data, the tape positioning time can lead to inefficient queries and negatively impact the user experience.

[0004] Secondly, in video surveillance scenarios, recording data writing and query operations may occur simultaneously. If the writing and query operations are on the same tape, the following two solutions are usually used to handle them:

[0005] Solution 1: Stop recording the current tape and wait for the query to complete before continuing. However, this solution may cause the system cache to overflow, leading to data loss.

[0006] Solution 2: Switch to another tape to continue recording. However, this solution will cause fragmentation of the recording data, affecting subsequent query performance, and may cause switch failure and data loss if there are insufficient tape controllers.

[0007] In addition, the number of tape controllers is limited. When multiple tapes need to be read and written at the same time, resource competition and operation failure may occur.

[0008] With respect to the problem of low video data storage performance in related technologies, no effective solution has been proposed so far. Summary of the Invention

[0009] In this embodiment, a data processing method, device, electronic device, and storage medium are provided to solve the problem of low video data storage performance in related technologies.

[0010] In a first aspect, a data processing method is provided in this embodiment, which is applied to a monitoring storage device in the security field, wherein the monitoring storage device includes a magnetic tape and a hard disk, and includes:

[0011] Receiving data to be stored by monitoring a first hard disk in a storage device operating in a video disk mode;

[0012] During the process of the first hard disk receiving the data to be stored, when the amount of data stored in the first hard disk reaches a preset data amount threshold, the first hard disk is switched to an archiving disk mode, and the first hard disk is controlled to stop receiving the data to be stored;

[0013] Continuing to receive the data to be stored via the second hard disk in the monitoring storage device operating in a video disk mode;

[0014] Controlling the first hard disk to perform an archiving operation on an associated magnetic tape;

[0015] After the first hard disk is archived, the data in the first hard disk is cleared, and the working mode of the first hard disk is switched back to the video disk mode.

[0016] In some embodiments, when the amount of data stored in the first hard disk reaches a preset data amount threshold, switching the first hard disk to operate in archive disk mode includes:

[0017] When the data volume of one channel video in the first hard disk reaches a preset data volume threshold, the first hard disk is switched to the archive disk mode.

[0018] In some embodiments, after the first hard disk in the monitoring storage device operating in the video disk mode receives the data to be stored, the method further includes:

[0019] Recording storage information of the data to be stored in the first hard disk through a metadata disk;

[0020] In the data query phase, the location of the data to be queried in the first hard disk is queried through the storage information in the metadata disk.

[0021] In some embodiments, after archiving the first hard disk to the associated magnetic tape, the method further includes:

[0022] Recording storage information of the data to be stored in the magnetic tape via a metadata disk;

[0023] In the data query phase, the location of the data to be queried in the tape is queried through the storage information in the metadata disk.

[0024] In some embodiments, when a data query request is received, the method further includes:

[0025] Detecting the location of the data to be queried through the metadata disk;

[0026] Determine whether the data to be queried is stored in the hard disk working in the archive disk mode; if so, obtain the data to be queried from the hard disk working in the archive disk mode; otherwise, obtain the data to be queried from the magnetic tape.

[0027] In some embodiments, obtaining the data to be queried from the magnetic tape includes:

[0028] Determining whether the tape is in the archiving stage;

[0029] If yes, stop archiving and record the storage information of the data to be stored in the tape via the metadata disk;

[0030] Obtaining the data to be queried from the magnetic tape;

[0031] After the acquisition is completed, the archiving operation is started again according to the storage information recorded in the metadata disk.

[0032] In some embodiments, the number of video disks and archive disks in the monitoring storage device is determined according to a data storage period; or

[0033] The number of the video disks and the number of the archive disks are determined according to the amount of data to be stored, the performance of the hard disk and the performance of the tape;

[0034] Among them, the number of video disks is greater than the number of archive disks; the number of video disks is the number of hard disks working in video disk mode; the number of archive disks is the number of hard disks working in archive disk mode.

[0035] In a second aspect, a data processing device is provided in this embodiment, including: a first data receiving module, a first switching module, a second data receiving module, an archiving module, and a second switching module, wherein:

[0036] The first data receiving module is used to receive the data to be stored through the first hard disk working in the video disk mode in the monitoring storage device;

[0037] The first switching module is configured to switch the first hard disk to an archive disk mode and control the first hard disk to stop receiving the data to be stored when the amount of data stored in the first hard disk reaches a preset data amount threshold during the process of the first hard disk receiving the data to be stored;

[0038] The second data receiving module is used to continue receiving the data to be stored through the second hard disk in the monitoring storage device working in the video disk mode;

[0039] The archiving module is used to control the first hard disk to perform an archiving operation on an associated magnetic tape;

[0040] The second switching module is used to clear the data in the first hard disk after the first hard disk is archived, and switch the working mode of the first hard disk back to the video disk mode.

[0041] In a third aspect, an electronic device is provided in this embodiment, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the data processing method described in the first aspect when executing the computer program.

[0042] In a fourth aspect, a storage medium is provided in this embodiment, on which a computer program is stored. When the program is executed by a processor, the data processing method described in the first aspect is implemented.

[0043] Compared with the related art, the data processing method provided in this embodiment receives the data to be stored by monitoring the first hard disk working in the video disk mode in the storage device; in the process of the first hard disk receiving the data to be stored, when the amount of data stored in the first hard disk reaches a preset data amount threshold, the first hard disk is switched to the archiving disk mode, and the first hard disk is controlled to stop receiving the data to be stored; the data to be stored continues to be received by the second hard disk working in the video disk mode in the monitoring storage device; the first hard disk is controlled to perform archiving operations on the associated magnetic tape; after the first hard disk is archived, the data in the first hard disk is cleared, and the working mode of the first hard disk is switched back to the video disk mode. By separately controlling the working mode of receiving video data and the working mode of archiving video data of the hard disk, the simultaneous reception and archiving of the hard disk, and even the query and reading operations are avoided, and the problem of data loss and performance degradation due to hard disk address jump is prevented. By archiving data to the magnetic tape for storage, the data storage time is increased and the data storage performance is improved.

[0044] The details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0046] Figure 1 This is a hardware structure block diagram of the terminal of the data processing method of this embodiment.

[0047] Figure 2 is a flow chart of the data processing method of this embodiment.

[0048] Figure 3 This is a flowchart of data receiving processing in the data processing method of this embodiment.

[0049] Figure 4 This is a flow chart of data archiving processing in the data processing method of this embodiment.

[0050] Figure 5 It is a structural block diagram of the data processing device of this embodiment. DETAILED DESCRIPTION

[0051] In order to more clearly understand the purpose, technical solutions and advantages of the present application, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments.

[0052] Unless otherwise defined, the technical terms or scientific terms involved in this application should have the general meaning understood by people with ordinary skills in the technical field to which this application belongs. The words "one", "an", "a", "the", "these" and the like in this application do not indicate quantitative restrictions, and they can be singular or plural. The terms "include", "comprise", "have" and any variants thereof involved in this application are intended to cover non-exclusive inclusions; for example, a process, method and system, product or device comprising a series of steps or modules (units) is not limited to the listed steps or modules (units), but may include unlisted steps or modules (units), or may include other steps or modules (units) inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "plurality" involved in this application refers to two or more. "And / or" describes the relationship between related objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A exists alone, A and B exist simultaneously, and B exists alone. Generally, the character " / " indicates that the related objects are in an "or" relationship. The terms "first," "second," "third," etc. used in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.

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

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

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

[0056] In this embodiment, a data processing method is provided, which is applied to a monitoring storage device in the security field. The monitoring storage device includes a magnetic tape and a hard disk. Figure 2 is a flow chart of the data processing method of this embodiment, such as Figure 2 As shown, the process includes the following steps:

[0057] Step S201: receiving data to be stored by monitoring a first hard disk in a storage device operating in a video disk mode.

[0058] Specifically, in the field of security video surveillance, the introduction of tape storage can reduce costs and extend data retention time. However, tape storage has a significant disadvantage: the data positioning (or addressing) time is too long. This characteristic makes tape storage unable to meet the timeliness requirements when surveillance video needs to be quickly retrieved. Therefore, to improve addressing speed, hard disk storage can be used. However, when using the same hard disk to simultaneously record video data (write operation) and tape archive (read operation), the hard disk needs to frequently jump between the address of the received data and the address of the archived data. This frequent jumping will cause the hard disk performance to drop sharply, and may eventually lead to the failure of receiving surveillance video data or even data loss. Therefore, in this embodiment, in the monitoring storage device, multiple hard disks are provided to store surveillance videos, and the operating modes of the hard disks are differentiated, namely the recording disk operating mode for receiving videos and the archiving disk operating mode for archiving videos. At the same time, a metadata disk is provided to record the transmission path, storage location, video size, and other information of the video information when the hard disk receives and archives surveillance videos. The hard disk operating in the recording disk mode is used as the first hard disk, and the video data required to be stored by the monitoring terminal is received through the first hard disk. The hard disk may be a mechanical hard disk or a solid-state hard disk, which is not specifically limited in this embodiment and can be selected according to actual conditions.

[0059] Step S202, during the process of the first hard disk receiving the data to be stored, when the amount of data stored in the first hard disk reaches a preset data amount threshold, the first hard disk is switched to the archiving disk mode, and the first hard disk is controlled to stop receiving the data to be stored; the data to be stored continues to be received by monitoring the second hard disk working in the video disk mode in the storage device.

[0060] Specifically, after the hard disks in the monitoring storage device are differentiated according to the working modes, a data volume threshold is set for the first hard disk in the process of receiving the monitored video through the first hard disk, such as the total amount of hard disk data reaches 1TB, etc., and detection and control are performed through the set software program. When it is detected that the number of monitoring videos received in the first hard disk reaches the set data volume threshold, the working mode of the first hard disk is switched to the archiving disk working mode, and the first hard disk is controlled to stop receiving the monitoring video. At this time, the second hard disk in the video disk working mode with other remaining storage space in the monitoring storage device is called through the set software program to continue receiving the monitoring video, and the task of receiving the monitoring video is transferred to other hard disks, avoiding the simultaneous operations of receiving and archiving on the same hard disk, thereby affecting the performance of the hard disk.

[0061] Step S203: Control the first hard disk to perform an archiving operation on the associated magnetic tape.

[0062] Specifically, due to the limited number of hard disk slots on a device, the storage period of the recording device is generally only 30 days without changing the disk. Only the recordings within the last 30 days can be stored. The recordings older than 30 days will be overwritten by the latest recordings and cannot be read. In addition, the storage life of the hard disk is generally about 10 years. The video surveillance recording data is important cold data. Generally, nothing happens and it is rarely read. However, it needs to be stored for a long time to prepare for later reading needs. Therefore, since magnetic tape can be stored for 30 years and is low in cost and high in capacity, it is suitable for long-term storage and archiving of infrequently accessed data. Therefore, this embodiment introduces magnetic tape for data storage. After the data volume reaches a preset data volume threshold, the first hard disk is archived to the magnetic tape. Based on conditions such as the access frequency, importance or timestamp of the data, the surveillance video in the first hard disk can be archived to the magnetic tape for further storage. After the archiving is completed, the metadata disk of the storage system is updated to record which data has been archived to the magnetic tape and information such as the storage location of the magnetic tape.

[0063] Step S204: After the first hard disk is archived, the data in the first hard disk is cleared and the working mode of the first hard disk is switched back to the video disk mode.

[0064] Specifically, after the surveillance video in the first hard disk is archived to the tape, the surveillance video in the first hard disk can be cleared, and the first hard disk can be readjusted to the video disk working mode through the set program, waiting for the program to be called and then receiving the video.

[0065] Through the above steps S201 to S204, the data to be stored is received by monitoring the first hard disk working in the video disk mode in the storage device; in the process of the first hard disk receiving the data to be stored, when the amount of data stored in the first hard disk reaches a preset data amount threshold, the first hard disk is switched to the archiving disk mode, and the first hard disk is controlled to stop receiving the data to be stored; the data to be stored continues to be received by monitoring the second hard disk working in the video disk mode in the storage device; the first hard disk is controlled to perform archiving operations on the associated magnetic tape; after the archiving of the first hard disk is completed, the data in the first hard disk is cleared, and the working mode of the first hard disk is switched back to the video disk mode. Compared to the prior art method of storing surveillance video using a fixed hard disk or a single magnetic tape, this embodiment divides the working mode of the hard disk into a video disk working mode and an archiving disk working mode. The hard disk operating in the video disk mode receives video data. When the amount of video data reaches a preset threshold data amount, the working mode of the hard disk is switched to the archiving disk working mode, and the reception of video data is stopped. The video data is continued to be received through other hard disks operating in the video disk mode. The data in the hard disk operating in the archiving disk mode is archived to the magnetic tape. After archiving is completed, the data in the hard disk is cleared, and the working mode of the hard disk is switched back to the video disk working mode to continue waiting for calls to receive video data. By separately controlling the working mode of receiving video data and the working mode of archiving video data of the hard disk, the simultaneous reception and archiving of the hard disk, and even query and read operations, are avoided, and the problem of data loss and performance degradation caused by hard disk address jumps is prevented. By archiving data to magnetic tape for storage, the data storage duration is increased, and the data storage performance is improved.

[0066] In some of the embodiments, when the amount of data stored in the first hard disk reaches a preset data volume threshold, the first hard disk is switched to archive disk mode, including: when the amount of data recorded in one of the channels in the first hard disk reaches a preset data volume threshold, the first hard disk is switched to archive disk mode.

[0067] Specifically, in this embodiment, a data volume threshold is preset to detect whether the data volume in the hard disk meets the archiving requirements, wherein the hard disk data volume is detected by detecting the video data volume in each channel. When the data volume of one of the channels reaches the preset data volume threshold, it is determined that the data volume of the current hard disk reaches the preset data volume threshold. At this time, the working mode of the first hard disk can be switched to the archiving disk working mode to prepare for the archiving operation.

[0068] In another embodiment, after receiving the data to be stored through the first hard disk working in the video disk mode in the monitoring storage device, it also includes: recording the storage information of the data to be stored in the first hard disk through the metadata disk; in the data query stage, querying the location of the data to be queried in the first hard disk through the storage information in the metadata disk.

[0069] Specifically, the metadata disk is used to store metadata related to recorded data. This metadata includes the data block's storage location, file name, timestamp, channel information, and more. When surveillance video data is written, the system simultaneously records the relevant storage information to the metadata disk. This information is typically stored in a structured format, such as using a B+ tree or other data structure to optimize query efficiency. During data queries, the metadata disk allows the system to quickly locate the specific location of recorded data on the primary hard drive.

[0070] In some embodiments, after archiving the first hard disk to the associated magnetic tape, the method further comprises:

[0071] The metadata disk records the storage information of the data to be stored in the tape; in the data query stage, the location of the data to be queried in the tape is queried through the storage information in the metadata disk, thereby improving query efficiency.

[0072] Specifically, as in the previous embodiment, after the first hard drive archives the associated tape, the system simultaneously records the relevant storage information from the tape to the metadata disk. Similarly, this information can also be stored in a structured format, such as using a B+ tree or other data structure to optimize query efficiency. During the data query phase, the metadata disk allows the system to quickly locate the specific location of the recorded data on the tape, improving query efficiency.

[0073] In another embodiment, when a data query request is received, it also includes: detecting the location of the data to be queried through the metadata disk; determining whether the data to be queried is stored in a hard disk working in archive disk mode; if so, obtaining the data to be queried from the hard disk working in archive disk mode; otherwise, obtaining the data to be queried from the tape.

[0074] Specifically, when a data query request is received, the storage location of the data to be queried is quickly located through the records in the source data disk. The metadata disk will record the storage medium (hard disk or tape) where the data is located and the specific path. Based on the information in the metadata disk, it is determined whether the data to be queried is stored in a hard disk working in archive disk mode. If the metadata disk shows that the data is stored in a hard disk working in archive mode, the data is read directly from the specified path of the hard disk without having to obtain it from the tape, thereby improving data extraction efficiency. If the metadata disk shows that the data is stored on the tape, the data to be queried is extracted from the tape.

[0075] In some embodiments, obtaining the data to be queried from the tape includes: determining whether the tape is in the archiving stage; if so, stopping archiving and recording the storage information of the current data to be stored in the tape through the metadata disk; obtaining the data to be queried from the tape; after the acquisition is completed, continuing to start the archiving operation according to the storage information recorded on the metadata disk.

[0076] Specifically, when the metadata disk shows that the data to be queried is on the tape, it is first determined whether the tape is performing an archiving operation. When the tape is performing an archiving operation, in order to avoid data reading conflicts, the current archiving operation on the tape is first stopped. At the same time, the storage information of the current data to be stored is recorded in the metadata disk, including the location of the data block, the tape number and the offset. After the archiving operation is paused, the specific location of the data to be queried in the tape is determined based on the records in the metadata disk and the data is read. During the reading process, the verification information in the metadata (such as CRC verification) can be used to verify the integrity of the data. After the data to be queried is obtained, a recovery instruction is sent to allow the tape to continue archiving from the position where it was last paused. After the archiving operation is completed, the records in the metadata disk are updated to ensure the accuracy of the data storage information.

[0077] In another embodiment, the number of video disks and the number of archive disks in the monitoring storage device are determined according to the data storage period; or, the number of video disks and the number of archive disks are determined according to the amount of data to be stored, the hard disk performance, and the tape performance; wherein, the number of video disks is greater than the number of archive disks; the number of video disks is the number of hard disks working in video disk mode; the number of archive disks is the number of hard disks working in archive disk mode.

[0078] Specifically, in the monitoring storage device, the hard disks are divided into video disks that work in video disk mode and archive disks that work in archive disk mode according to the working mode. The total number of hard disks is the sum of all video disks, all archive disks, and metadata disks. Among them, if the total number of hard disks has requirements for the storage period, it can be determined according to the period of the data to be stored. For example, the required hard disk capacity is calculated based on the video storage period, and is determined by calculating the size of a single day's video × the number of days that need to be stored. Alternatively, if there are no requirements for the storage period, it can also be determined based on a comprehensive calculation based on the bit rate size, hard disk read and write performance, and tape read and write performance. The calculation formula is as follows:

[0079] Total number of hard disks = number of recording hard disks + number of archiving hard disks + 1 (number of metadata hard disks);

[0080] Number of video disks ≥ total video bandwidth / single-disk video writing bandwidth;

[0081] Number of archive disks ≥ total tape archive bandwidth / single-disk video reading bandwidth;

[0082] The total bandwidth of tape archiving must be ≥ the total bandwidth of video recording. If video query operations are required during the archiving process, the bandwidth margin needs to be increased to avoid the problem of videos not being archived in time, which may cause the video disk to overflow and new videos to be unable to be written.

[0083] This embodiment also provides a data processing method. Figure 3 FIG. 1 is a flow chart of data receiving processing in the data processing method of this embodiment, as shown in FIG. Figure 3 As shown, the process includes the following steps:

[0084] Step S301, obtaining a request for receiving video data;

[0085] Step S302: Retrieve a first hard disk in the monitoring storage device that has free space and operates in a video disk mode;

[0086] Step S303, receiving video data via the first hard disk;

[0087] Step S304, recording the storage information of the video data in the first hard disk in the metadata disk;

[0088] Step S305, determining whether the amount of video data in the first hard disk operating in the video disk mode reaches a preset data amount threshold; if so, executing steps S306 and S307; otherwise, executing step S303;

[0089] Step S306: Switch the first hard disk to archiving disk mode and control the first hard disk to stop receiving data to be stored; control the first hard disk to perform archiving operations on the associated tape; after archiving is completed on the first hard disk, clear the data in the first hard disk, switch the working mode of the first hard disk back to recording disk mode, and return to step S301;

[0090] Step S307: retrieve the second hard disk in the monitoring storage device that works in the video disk mode, use the second hard disk to replace the first hard disk to continue receiving the data to be stored, and return to step S305.

[0091] Through the above steps S301 to S307, compared with the prior art of storing surveillance videos through a fixed mechanical hard disk or using a magnetic tape alone, this embodiment combines the hard disk and the magnetic tape to divide the working mode of the hard disk into recording and archiving, thereby preventing address jumps caused by simultaneous operations of recording and archiving on a hard disk, improving the performance of hard disk data storage, and then archiving the data received by the hard disk to the magnetic tape through the archiving disk, thereby extending the storage time of the data and further improving the performance of the overall system data storage.

[0092] Figure 4 Flowchart of data archiving process in the data processing method of this embodiment is as follows: Figure 3As shown, the process includes the following steps 4:

[0093] Step S401: When it is detected that data needs to be archived, the data to be archived is read from a hard disk operating in an archiving disk mode and written to a magnetic tape;

[0094] Step S402, determine whether archiving is completed, if so, execute step S403, otherwise execute step S401;

[0095] Step S403, switching the current hard disk's archiving disk working mode to a video disk working mode, so that the hard disk enters a state of waiting for data reception;

[0096] Step S404, recording the storage information of the video data in the magnetic tape in the metadata disk;

[0097] Step S405, archiving ends.

[0098] Through steps S401 to S405, compared to the prior art method of storing surveillance videos using a fixed hard disk or a separate magnetic tape, this embodiment divides the hard disk operating mode into recording and archiving. During archiving, the recording data is not received. After archiving is complete, the hard disk operating mode is switched to recording disk mode to receive data. This avoids the problem of address jumps and unstable performance caused by the hard disk processing both recording and archiving simultaneously. After archiving is complete, the hard disk resumes its recording reception function, improving the hard disk's performance. At the same time, by archiving data from the hard disk to magnetic tape, the data storage period is extended, improving the overall data storage performance of the system.

[0099] This embodiment also provides a data processing device for implementing the above-mentioned embodiments and preferred embodiments. Details already described will not be repeated. The terms "module," "unit," "subunit," etc. used below may refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented using software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.

[0100] Figure 5 is a structural block diagram of the data processing device of this embodiment, as shown in FIG. Figure 5 As shown, the device 50 includes: a first data receiving module 51, a first switching module 52, a second data receiving module 53, an archiving module 54 and a second switching module 55, wherein:

[0101] The first data receiving module 51 is used to receive data to be stored through the first hard disk in the monitoring storage device working in the video disk mode;

[0102] A first switching module 52 is configured to switch the first hard disk to an archiving disk mode and control the first hard disk to stop receiving data to be stored when the amount of data stored in the first hard disk reaches a preset data amount threshold during the process of the first hard disk receiving data to be stored;

[0103] The second data receiving module 53 is used to continue receiving the data to be stored through the second hard disk working in the video disk mode in the monitoring storage device;

[0104] The archiving module 54 is used to control the first hard disk to perform an archiving operation on the associated magnetic tape;

[0105] The second switching module 55 is used to clear the data in the first hard disk after the archiving is completed, and switch the working mode of the first hard disk back to the video disk mode.

[0106] It should be noted that the above modules can be functional modules or program modules, and can be implemented through software or hardware. For modules implemented through hardware, the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.

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

[0108] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0109] Optionally, in this embodiment, the processor may be configured to execute the following steps through a computer program:

[0110] S1, receiving data to be stored by monitoring a first hard disk in a storage device operating in a video disk mode;

[0111] S2, when the amount of data stored in the first hard disk reaches a preset data amount threshold during the process of the first hard disk receiving the data to be stored, switching the first hard disk to an archiving disk mode and controlling the first hard disk to stop receiving the data to be stored;

[0112] S3, continuing to receive the data to be stored through the second hard disk in the monitoring storage device operating in the video disk mode;

[0113] S4, controlling the first hard disk to perform an archiving operation on an associated magnetic tape;

[0114] S5, after the first hard disk is archived, the data in the first hard disk is cleared, and the working mode of the first hard disk is switched back to the video disk mode.

[0115] It should be noted that, for specific examples in this embodiment, reference may be made to the examples described in the above embodiments and optional implementation modes, and will not be repeated in this embodiment.

[0116] In addition, in combination with the data processing method provided in the above embodiments, a storage medium may be provided in this embodiment to implement the data processing method. The storage medium stores a computer program that, when executed by a processor, implements any of the data processing methods in the above embodiments.

[0117] It should be understood that the specific embodiments described herein are only used to explain this application and are not used to limit it. Based on the embodiments provided in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0118] Obviously, the accompanying drawings are merely examples or embodiments of the present application. A person skilled in the art can also apply the present application to other similar situations based on these drawings without inventive effort. Furthermore, it is understandable that, although the work involved in this development process may be complex and lengthy, certain design, manufacturing, or production changes based on the technical content disclosed in this application are merely routine technical means for a person skilled in the art and should not be considered to constitute a deficiency in the disclosure of the present application.

[0119] The term "embodiment" as used in this application refers to specific features, structures, or characteristics described in conjunction with the embodiment that can be included in at least one embodiment of this application. The appearance of this phrase in various places in the specification does not necessarily mean that the embodiment is the same, nor does it mean that it is mutually exclusive with other embodiments and is independent or optional. It is understood, either explicitly or implicitly, by those skilled in the art that the embodiments described in this application can be combined with other embodiments when there is no conflict.

[0120] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processor involved in the various embodiments provided herein may be, but are not limited to, a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, and the like.

[0121] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of patent protection. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.

Claims

1. A data processing method, characterized in that: In a monitoring storage device used in the security field, the monitoring storage device includes a magnetic tape and a hard disk, and the method includes: Receiving data to be stored via a first hard disk in the monitoring storage device operating in a video disk mode; During the process of the first hard disk receiving the data to be stored, when the amount of data stored in the first hard disk reaches a preset data amount threshold, the first hard disk is switched to an archiving disk mode, and the first hard disk is controlled to stop receiving the data to be stored; Continuing to receive the data to be stored via the second hard disk in the monitoring storage device operating in a video disk mode; Controlling the first hard disk to perform an archiving operation on an associated magnetic tape; After the first hard disk is archived, the data in the first hard disk is cleared, and the working mode of the first hard disk is switched back to the video disk mode.

2. The data processing method according to claim 1, wherein: When the amount of data stored in the first hard disk reaches a preset data amount threshold, switching the first hard disk to operate in an archive disk mode includes: When the data volume of one channel video in the first hard disk reaches a preset data volume threshold, the first hard disk is switched to the archive disk mode.

3. The data processing method according to claim 1, wherein: After the first hard disk in the monitoring storage device, which operates in a video disk mode, receives the data to be stored, the method further includes: Recording storage information of the data to be stored in the first hard disk through a metadata disk; In the data query phase, the location of the data to be queried in the first hard disk is queried through the storage information in the metadata disk.

4. The data processing method according to claim 1, wherein: After the first hard disk is archived to the associated magnetic tape, the method further includes: Recording storage information of the data to be stored in the magnetic tape via a metadata disk; In the data query phase, the location of the data to be queried in the tape is queried through the storage information in the metadata disk.

5. The data processing method according to claim 4, characterized in that: When a data query request is received, the method further includes: Detecting the location of the data to be queried through the metadata disk; Determine whether the data to be queried is stored in a hard disk operating in an archive disk mode; if so, obtain the data to be queried from the hard disk operating in the archive disk mode; otherwise, obtain the data to be queried from the magnetic tape.

6. The data processing method according to claim 5, characterized in that: The obtaining the data to be queried from the magnetic tape includes: Determining whether the tape is in the archiving stage; If yes, stop archiving and record the storage information of the data to be stored in the tape via the metadata disk; Obtaining the data to be queried from the magnetic tape; After the acquisition is completed, the archiving operation is started again according to the storage information recorded in the metadata disk.

7. The data processing method according to claim 1, wherein: The number of video disks and archive disks in the monitoring storage device is determined according to the data storage cycle; or The number of the video disks and the number of the archive disks are determined according to the amount of data to be stored, the performance of the hard disk and the performance of the tape; Among them, the number of video disks is greater than the number of archive disks; the number of video disks is the number of hard disks working in video disk mode; the number of archive disks is the number of hard disks working in archive disk mode.

8. A data processing device, characterized in that: include: A first data receiving module, a first switching module, a second data receiving module, an archiving module and a second switching module, wherein: The first data receiving module is used to receive the data to be stored through the first hard disk working in the video disk mode in the monitoring storage device; The first switching module is configured to switch the first hard disk to an archive disk mode and control the first hard disk to stop receiving the data to be stored when the amount of data stored in the first hard disk reaches a preset data amount threshold during the process of the first hard disk receiving the data to be stored; The second data receiving module is used to continue receiving the data to be stored through the second hard disk in the monitoring storage device working in the video disk mode; The archiving module is used to control the first hard disk to perform an archiving operation on an associated magnetic tape; The second switching module is used to clear the data in the first hard disk after the first hard disk is archived, and switch the working mode of the first hard disk back to the video disk mode.

9. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the data processing method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the data processing method according to any one of claims 1 to 7 are implemented.