CN114245052B - Video data storage method and device, storage medium and electronic device - Google Patents

Video data storage method and device, storage medium and electronic device Download PDF

Info

Publication number
CN114245052B
CN114245052B CN202111631057.8A CN202111631057A CN114245052B CN 114245052 B CN114245052 B CN 114245052B CN 202111631057 A CN202111631057 A CN 202111631057A CN 114245052 B CN114245052 B CN 114245052B
Authority
CN
China
Prior art keywords
image capturing
video data
sum
code stream
capturing apparatus
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.)
Active
Application number
CN202111631057.8A
Other languages
Chinese (zh)
Other versions
CN114245052A (en
Inventor
曾上雷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Priority to CN202111631057.8A priority Critical patent/CN114245052B/en
Publication of CN114245052A publication Critical patent/CN114245052A/en
Application granted granted Critical
Publication of CN114245052B publication Critical patent/CN114245052B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/76Television signal recording
    • H04N5/907Television signal recording using static stores, e.g. storage tubes or semiconductor memories
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Closed-Circuit Television Systems (AREA)
  • Television Signal Processing For Recording (AREA)

Abstract

The embodiment of the invention provides a storage method and device of video data, a storage medium and an electronic device, wherein the method comprises the following steps: configuring a first image pickup apparatus and a second image pickup apparatus; receiving first video data transmitted by the second image capturing apparatus in a case where communication is resumed between the gateway apparatus and the second image capturing apparatus; the first video data is stored. The invention solves the problem of video data loss in the related technology and achieves the effect of ensuring that the video data cannot be lost.

Description

Video data storage method and device, storage medium and electronic device
Technical Field
The embodiment of the invention relates to the field of communication, in particular to a storage method and device of video data, a storage medium and an electronic device.
Background
Currently, in a home or other monitoring device scenario, a home gateway or a hard disk video recorder and a plurality of front-end camera devices are generally deployed. Although the general operation of the prior equipment is stable, special conditions such as abnormal restarting of a home gateway or a hard disk video recorder are not excluded; in addition, the home gateway and the hard disk recorder may need to perform operations such as upgrading, and in this case, the video recording of the system may be lost during this period.
Disclosure of Invention
The embodiment of the invention provides a storage method and device of video data, a storage medium and an electronic device, which are used for at least solving the problem of video data loss in the related technology.
According to an embodiment of the present invention, there is provided a storage method of video data, including: configuring a first image capturing apparatus and a second image capturing apparatus, wherein a storage apparatus is provided in the second image capturing apparatus, the first image capturing apparatus is configured to acquire first video data, and the second image capturing apparatus is configured to store the first video data by using the storage apparatus in a case of abnormal communication between the first image capturing apparatus and a gateway apparatus; receiving the first video data transmitted by the second image capturing apparatus, with communication resumed between the gateway apparatus and the second image capturing apparatus; and storing the first video data.
According to an embodiment of the present invention, there is provided a storage method of video data, including: transmitting the acquired first video data to a second image capturing apparatus in the event that an abnormality in communication between the first image capturing apparatus and the gateway apparatus is detected, wherein a storage apparatus is provided in the second image capturing apparatus, the second image capturing apparatus is configured to store the first video data by using the storage apparatus, and the first video data is configured to represent video data acquired by the first image capturing apparatus during the communication abnormality between the first image capturing apparatus and the gateway apparatus; and transmitting the acquired second video data to the gateway device in the case that the communication is determined to be restored between the first image capturing device and the gateway device.
According to an embodiment of the present invention, there is provided a storage method of video data, including: receiving first video data transmitted by the second image capturing device when an abnormality in communication between the first image capturing device and the gateway device is detected, wherein a storage device is provided in the second image capturing device, the second image capturing device is configured to store the first video data by using the storage device, and the first video data is configured to represent video data acquired by the first image capturing device during the communication abnormality between the first image capturing device and the gateway device; and transmitting the first video data to the gateway device.
According to an embodiment of the present invention, there is provided a storage apparatus for video data, including: a first configuration module configured to configure a first image capturing apparatus and a second image capturing apparatus, wherein a storage apparatus is provided in the second image capturing apparatus, the first image capturing apparatus is configured to acquire first video data, and the second image capturing apparatus is configured to store the first video data using the storage apparatus in a case of abnormal communication between the first image capturing apparatus and a gateway apparatus; a first receiving module configured to receive the first video data transmitted by the second image capturing apparatus, in a case where communication is resumed between the gateway apparatus and the second image capturing apparatus; and the first storage module is used for storing the first video data.
In an exemplary embodiment, the above apparatus further includes: a first determining module configured to determine a sum of code streams of N first image capturing apparatuses before configuring the first image capturing apparatus and the second image capturing apparatus, where N is a natural number greater than or equal to 1; a second determining module configured to determine a sum of video recording performances of M second image capturing apparatuses, where M is a natural number greater than or equal to 1; and a third determining module, configured to determine whether the storage space of the second image capturing apparatus meets a preset threshold based on the code stream sum and the video recording performance sum.
In an exemplary embodiment, the third determining module includes: a first determining unit, configured to determine that the storage space of the second image capturing apparatus does not meet the preset threshold when the sum of video recording performances is smaller than the sum of code streams.
In an exemplary embodiment, the above apparatus further includes: a first obtaining module, configured to obtain K first image capturing apparatuses from N first image capturing apparatuses, where K is a natural number greater than or equal to 1, after determining that a storage space of the second image capturing apparatus does not satisfy the preset threshold when the sum of video recording performances is smaller than the sum of code streams; a first setting module configured to set the storage devices in the K image capturing devices to convert the K first image capturing devices into K second image capturing devices.
In an exemplary embodiment, the second determining module includes: a second determining unit configured to determine a writing capability of a storage device in each of the M second image capturing apparatuses, a code stream of each of the second image capturing apparatuses, and a capability of each of the second image capturing apparatuses to receive the code stream; a first calculation unit configured to calculate a difference between a writing capability of the storage device in each of the second image capturing devices and a code stream of each of the second image capturing devices; a third determining unit configured to determine, as a video recording performance of each of the second image capturing apparatuses, a minimum value between the difference value and an ability of each of the second image capturing apparatuses to receive a code stream; and a fourth determining unit configured to determine a sum of video recording performances of the M second image capturing apparatuses as the sum of video recording performances.
In an exemplary embodiment, the first configuration module includes: a first comparing unit configured to compare a code stream of the first image capturing apparatus with a video recording performance in the second image capturing apparatus; a fifth determining unit configured to determine a duration of storing video data in a storage space of the first image capturing apparatus in the second image capturing apparatus, in a case where the code stream of the first image capturing apparatus is smaller than the video recording performance in the second image capturing apparatus; a first association unit configured to associate the first image capturing apparatus and the second image capturing apparatus in a case where the duration satisfies a second preset threshold.
In an exemplary embodiment, the apparatus further comprises: the second configuration module is configured to configure an acquisition time length and an anomaly detection interval time length of the first image capturing device, wherein the anomaly detection interval time length is used for indicating whether the first image capturing device detects an abnormal time interval of communication with the gateway device, the acquisition time length is greater than or equal to a frame interval period of a preset multiple, and the acquisition time length is greater than the anomaly detection interval time length.
In an exemplary embodiment, the first receiving module includes: a first receiving unit configured to receive, after occurrence of an abnormality in communication between the second image capturing apparatus and the gateway apparatus, the first video data transmitted by the image capturing apparatus in a case where communication is resumed between the gateway apparatus and the second image capturing apparatus, wherein the first video data is used to represent video data acquired by the first image capturing apparatus during the abnormality in communication between the first image capturing apparatus and the gateway apparatus.
According to an embodiment of the present invention, there is provided a storage apparatus for video data, including: a first transmission module, configured to transmit acquired first video data to a second image capturing device when an abnormality in communication between the first image capturing device and a gateway device is detected, where a storage device is provided in the second image capturing device, the second image capturing device is configured to store the first video data by using the storage device, and the first video data is configured to represent video data acquired by the first image capturing device during a communication abnormality between the first image capturing device and the gateway device; and a second transmission module configured to transmit the acquired second video data to the gateway device, in a case where it is determined that communication is resumed between the first image capturing device and the gateway device.
In an exemplary embodiment, the above apparatus further includes: a first establishing module, configured to establish a communication connection with a gateway device before transmitting acquired first video data to a second image capturing device when an abnormality in communication between the first image capturing device and the gateway device is detected; and a third receiving module, configured to receive collocation information sent by the gateway device, where the collocation information includes an association relationship between the first image capturing device and the second image capturing device, an acquisition time of the first image capturing device, and a detection period for detecting whether communication with the gateway device is abnormal.
According to an embodiment of the present invention, there is provided a storage apparatus for video data, including: a second receiving module, configured to receive, when an abnormality is detected in communication between a first image capturing apparatus and a gateway apparatus, first video data transmitted by the second image capturing apparatus, where a storage apparatus is provided in the second image capturing apparatus, the second image capturing apparatus is configured to store the first video data by using the storage apparatus, and the first video data is configured to represent video data acquired by the first image capturing apparatus during a communication abnormality between the first image capturing apparatus and the gateway apparatus; and the third transmission module is used for transmitting the first video data to the gateway equipment.
According to a further embodiment of the invention, there is also provided a computer readable storage medium having stored therein a computer program, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
According to a further embodiment of the invention, there is also provided an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
According to the invention, by configuring the first image capturing device and the second image capturing device, wherein the second image capturing device is provided with a storage device, the first image capturing device is used for acquiring first video data, and the second image capturing device is used for storing the first video data by using the storage device under the condition of abnormal communication between the first image capturing device and the gateway device; receiving first video data transmitted by the second image capturing apparatus in a case where communication is resumed between the gateway apparatus and the second image capturing apparatus; the first video data is stored. The purpose of collocating the image pickup device without the storage device with the image pickup device with the storage device is achieved, so that when the communication abnormality with the gateway device is detected, the acquired video data is transmitted to the collocated image pickup device with the storage device, and the video data storage backup is carried out. Thereby ensuring that video data is not lost. Therefore, the problem of video data loss in the related art can be solved, and the effect of ensuring that the video data cannot be lost is achieved.
Drawings
Fig. 1 is a block diagram of a hardware structure of a mobile terminal of a video data storage method according to an embodiment of the present invention;
Fig. 2 is a flowchart (one) of a method of storing video data according to an embodiment of the present invention;
fig. 3 is a flowchart (two) of a method of storing video data according to an embodiment of the present invention;
fig. 4 is a flowchart (iii) of a method of storing video data according to an embodiment of the present invention;
FIG. 5 is a block diagram of a structure according to an embodiment of the present invention;
FIG. 6 is a flow chart according to an embodiment of the invention;
Fig. 7 is a block diagram (one) of a structure of a storage device for video data according to an embodiment of the present invention;
Fig. 8 is a block diagram (two) of a structure of a storage device for video data according to an embodiment of the present invention;
fig. 9 is a block diagram (iii) of a structure of a storage device for video data according to an embodiment of the present invention.
Detailed Description
Embodiments of the present invention will be described in detail below with reference to the accompanying drawings in conjunction with the embodiments.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order.
The method embodiments provided in the embodiments of the present application may be performed in a mobile terminal, a computer terminal or similar computing device. Taking the mobile terminal as an example, fig. 1 is a block diagram of a hardware structure of the mobile terminal according to an embodiment of the present application. As shown in fig. 1, a mobile terminal may include one or more (only one is shown in fig. 1) processors 102 (the processor 102 may include, but is not limited to, a microprocessor MCU or a processing device such as a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 for communication functions and an input-output device 108. It will be appreciated by those skilled in the art that the structure shown in fig. 1 is merely illustrative and not limiting of the structure of the mobile terminal described above. For example, the mobile terminal may also include more or fewer components than shown in fig. 1, or have a different configuration than shown in fig. 1.
The memory 104 may be used to store a computer program, for example, a software program of application software and a module, such as a computer program corresponding to a method for storing video data in an embodiment of the present invention, and the processor 102 executes the computer program stored in the memory 104 to perform various functional applications and data processing, that is, to implement the above-mentioned method. Memory 104 may include high-speed random access memory, and may also include 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 memory remotely located relative to the processor 102, which may be connected to the mobile terminal via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission means 106 is arranged to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, simply referred to as a NIC) that can connect to other network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used to communicate with the internet wirelessly.
In this embodiment, a method for storing video data is provided, fig. 2 is a flowchart (a) of a method for storing video data according to an embodiment of the present invention, and as shown in fig. 2, the flowchart includes the following steps:
Step S202, configuring a first image capturing apparatus and a second image capturing apparatus, wherein the second image capturing apparatus is provided with a storage apparatus, the first image capturing apparatus is used for acquiring first video data, and the second image capturing apparatus is used for storing the first video data by using the storage apparatus under the condition of abnormal communication between the first image capturing apparatus and the gateway apparatus; the first camera equipment acquires first video data and then caches the first video data;
Step S204 of receiving the first video data transmitted by the second image capturing apparatus in the case where communication is resumed between the gateway apparatus and the second image capturing apparatus;
step S206, storing the first video data.
The main body of execution of the above steps may be a gateway device or the like, but is not limited thereto.
In the present embodiment, the first image capturing apparatus and the second image capturing apparatus include, but are not limited to, cameras.
The present embodiment includes, but is not limited to, application in a home device monitoring scenario in which a home gateway or a hard disk video recorder (i.e., gateway device) is deployed, and a number of front-end cameras (i.e., image capturing devices). For example, when a camera is added to the home gateway, the camera is communicated with the home gateway, the home gateway confirms the camera with the storage device (for example, a memory card) already configured, matches the camera without the memory card with the camera with the memory card configured, and transmits the matching information to the corresponding camera with the memory card and the camera without the memory card, so that when the camera without the memory card detects that the communication with the home gateway is abnormal, video data in a prerecording buffer in the camera without the memory card is transmitted to the matched camera with the memory card for video storage backup. When the home gateway (or the hard disk video recorder) is restored, the camera is reconnected to the home gateway, normal video data transmission is restored, and meanwhile, the camera with the memory card transmits video data of the camera and the matched front-end camera during an abnormal period to the home gateway, so that video cannot be lost.
Through the steps, the first image capturing device and the second image capturing device are configured, wherein the second image capturing device is provided with a storage device, the first image capturing device is used for acquiring first video data, and the second image capturing device is used for storing the first video data by the storage device under the condition that communication between the first image capturing device and the gateway device is abnormal; receiving first video data transmitted by the second image capturing apparatus in a case where communication is resumed between the gateway apparatus and the second image capturing apparatus; the first video data is stored. The purpose of collocating the image pickup device without the storage device with the image pickup device with the storage device is achieved, so that when the communication abnormality with the gateway device is detected, the acquired video data is transmitted to the collocated image pickup device with the storage device, and the video data storage backup is carried out. Thereby ensuring that video data is not lost. Therefore, the problem of video data loss in the related art can be solved, and the effect of ensuring that the video data cannot be lost is achieved.
In one exemplary embodiment, before configuring the first image capturing apparatus and the second image capturing apparatus, the method further includes:
S1, determining the sum of code streams of N first image capturing devices, wherein N is a natural number greater than or equal to 1;
s2, determining the sum of video recording performances of M second image pickup devices, wherein M is a natural number greater than or equal to 1;
s3, determining whether the storage space of the second image capturing device meets a preset threshold or not based on the code stream sum and the video recording performance sum.
In the present embodiment, the sum of the code streams of the N first image capturing apparatuses is determined as the code stream sum.
In one exemplary embodiment, determining that the storage space of the second image capturing apparatus does not satisfy the preset threshold based on the code stream sum and the video recording performance sum includes:
S1, determining that the storage space of the second image capturing device does not meet a preset threshold value under the condition that the sum of video recording performances is smaller than the sum of code streams.
In this embodiment, when the sum of video performance is smaller than the sum of code streams, the gateway device sends out alarm information to prompt the user that the current storage device configuration performance is insufficient, and more image capturing devices need to be configured.
In an exemplary embodiment, after determining that the storage space of the second image capturing apparatus does not meet the preset threshold in the case where the sum of video recording performances is smaller than the sum of code streams, the method further includes:
S1, acquiring K first image capturing apparatuses from N first image capturing apparatuses, wherein K is a natural number greater than or equal to 1;
S2, setting storage devices in the K image capturing devices to convert the K first image capturing devices into K second image capturing devices.
In the present embodiment, a storage device is provided in part of the first image pickup device to increase the storage space.
In one exemplary embodiment, determining a sum of video recording performances of M second image capturing apparatuses includes:
S1, determining the writing capability of a storage device in each of M second image capturing devices, the code stream of each second image capturing device and the capability of each second image capturing device to receive the code stream;
S2, calculating a difference value between the writing capacity of the storage device in each second image capturing device and the code stream of each second image capturing device;
S3, determining the minimum value between the difference value and the capacity of each second image capturing device for receiving the code stream as the video recording performance of each second image capturing device;
s4, determining the sum of the video recording performances of the M second image capturing devices as a sum of the video recording performances.
In the present embodiment, the recording performance of the second image capturing apparatuses is determined by acquiring the writing capability of the storage apparatus in each of the M second image capturing apparatuses, the code stream of each of the second image capturing apparatuses, and the capability of each of the second image capturing apparatuses to receive the code stream. For example, let the writing capability of the storage device in the second image capturing apparatus be S, the code stream of the second image capturing apparatus itself be Mself, the capability of the second image capturing apparatus to receive the code stream be R, take the small values of S-Mself and R, and use them as the recording performance Srecord of the second image capturing apparatus. Let s=24 Mb/S, mself =2 Mb/S, r=10 Mb/S, then S-Mself =24 Mb/S-2 Mb/s=22 Mb/S, taking the small values of S-Mself and R, i.e. Srecord, as 10Mb/S.
In one exemplary embodiment, configuring a first image capturing apparatus and a second image capturing apparatus includes:
s1, comparing a code stream of a first image pickup device with video recording performance in a second image pickup device;
S2, determining the duration of storing video data in a storage space of the second image capturing device by the code stream of the first image capturing device under the condition that the code stream of the first image capturing device is smaller than the video recording performance of the second image capturing device;
and S3, associating the first image capturing device and the second image capturing device under the condition that the duration meets a second preset threshold value.
In this embodiment, for example, the code stream Mn of the second image capturing apparatus is compared with the recording performance in the second image capturing apparatus, and if the code stream of the first image capturing apparatus is smaller than the recording performance in the second image capturing apparatus, the recording time length Ln that the code stream can stay in the storage space is calculated.
In one exemplary embodiment, the method further comprises: s1, configuring the acquisition time length and the abnormality detection interval time length of the first image pickup equipment, wherein the abnormality detection interval time length is used for indicating whether the first image pickup equipment detects abnormal time intervals of communication with the gateway equipment, the acquisition time length is greater than or equal to a frame interval period of a preset multiple, and the acquisition time length is greater than the abnormality detection interval time length.
In this embodiment, for example, the anomaly detection interval duration T1 and the buffer duration T2, T2> = 2*I frame interval period (GOP), T1 is determined by the T2 configuration of the first image capturing apparatus itself, and t2> t1+n×i frame interval period duration (N is an integer of > =1) is used to ensure that when an anomaly is found in the T1 detection process, the prerecorded data of the first image capturing apparatus is overlaid on the video data during the anomaly and contains the key I frame data.
In one exemplary embodiment, in a case where communication is resumed between the gateway device and the second image capturing device, receiving the first video data transmitted by the second image capturing device includes:
S1, after communication between the second image capturing device and the gateway device is abnormal, and in the case that communication is restored between the gateway device and the second image capturing device, receiving first video data transmitted by the image capturing device, wherein the first video data is used for representing video data acquired by the first image capturing device during abnormal communication between the first image capturing device and the gateway device.
In the present embodiment, the gateway apparatus receives the first video data stored with the storage apparatus transmitted by the second image capturing apparatus, and at the same time receives the video data stored by the second image capturing apparatus itself, after resuming the communication with the second image capturing apparatus. The gateway apparatus receives video data transmitted by the first image capturing apparatus after resuming communication with the first image capturing apparatus.
In this embodiment, a method for storing video data is provided, fig. 3 is a flowchart (two) of a method for storing video data according to an embodiment of the present invention, and as shown in fig. 3, the flowchart includes the following steps:
Step S302, in the case where an abnormality in communication between the first image capturing apparatus and the gateway apparatus is detected, transmitting the acquired first video data to a second image capturing apparatus, wherein a storage apparatus is provided in the second image capturing apparatus, the second image capturing apparatus is configured to store the first video data by using the storage apparatus, and the first video data is configured to represent video data acquired by the first image capturing apparatus during the abnormality in communication between the first image capturing apparatus and the gateway apparatus;
Step S304, in the case where it is determined that communication is resumed between the first image capturing apparatus and the gateway apparatus, transmits the acquired second video data to the gateway apparatus.
Wherein the execution subject of the above steps may be an image capturing apparatus, for example, a first image capturing apparatus or the like, but is not limited thereto.
In the present embodiment, the first image capturing apparatus and the second image capturing apparatus include, but are not limited to, cameras.
The present embodiment includes, but is not limited to, application in a home device monitoring scenario in which a home gateway or a hard disk video recorder (i.e., gateway device) is deployed, and a number of front-end cameras (i.e., image capturing devices). For example, when a camera is added to the home gateway, the camera is communicated with the home gateway, the home gateway confirms the camera with the storage device (for example, a memory card) already configured, matches the camera without the memory card with the camera with the memory card configured, and transmits the matching information to the corresponding camera with the memory card and the camera without the memory card, so that when the camera without the memory card detects that the communication with the home gateway is abnormal, video data in a prerecording buffer in the camera without the memory card is transmitted to the matched camera with the memory card for video storage backup. When the home gateway (or the hard disk video recorder) is restored, the camera is reconnected to the home gateway, normal video data transmission is restored, and meanwhile, the camera with the memory card transmits video data of the camera and the matched front-end camera during an abnormal period to the home gateway, so that video cannot be lost.
Through the steps, the acquired first video data is transmitted to the second image capturing device under the condition that the communication between the first image capturing device and the gateway device is detected to be abnormal, wherein the second image capturing device is provided with a storage device, the second image capturing device is used for storing the first video data by using the storage device, and the first video data is used for representing the video data acquired by the first image capturing device during the abnormal communication period of the first image capturing device and the gateway device; in the case where it is determined that communication is resumed between the first image capturing apparatus and the gateway apparatus, the acquired second video data is transmitted to the gateway apparatus. The purpose of collocating the image pickup device without the storage device with the image pickup device with the storage device is achieved, so that when the communication abnormality with the gateway device is detected, the acquired video data is transmitted to the collocated image pickup device with the storage device, and the video data storage backup is carried out. Thereby ensuring that video data is not lost. Therefore, the problem of video data loss in the related art can be solved, and the effect of ensuring that the video data cannot be lost is achieved.
In one exemplary embodiment, in a case where an abnormality in communication between the first image capturing apparatus and the gateway apparatus is detected, before transmitting the acquired first video data to the second image capturing apparatus, the method further includes:
s1, establishing communication connection with gateway equipment;
s2, collocation information sent by the gateway equipment is received, wherein the collocation information comprises an association relation between the first image pickup equipment and the second image pickup equipment, acquisition time of the first image pickup equipment and a detection period for detecting whether communication between the first image pickup equipment and the gateway equipment is abnormal or not.
In this embodiment, the gateway apparatus is configured to configure the number of the first image capturing apparatus and the second image capturing apparatus, and establish an association relationship between the two.
In this embodiment, a method for storing video data is provided, fig. 4 is a flowchart (iii) of a method for storing video data according to an embodiment of the present invention, and as shown in fig. 4, the flowchart includes the following steps:
Step S402, receiving first video data transmitted by a second camera device under the condition that communication abnormality between the first camera device and a gateway device is detected, wherein a storage device is arranged in the second camera device, the second camera device is used for storing the first video data by using the storage device, and the first video data is used for representing the video data acquired by the first camera device during the communication abnormality between the first camera device and the gateway device;
step S404, the first video data is transmitted to the gateway device.
Wherein the execution subject of the above steps may be an image capturing apparatus, for example, a second image capturing apparatus, or the like, but is not limited thereto.
In the present embodiment, the first image capturing apparatus and the second image capturing apparatus include, but are not limited to, cameras.
The present embodiment includes, but is not limited to, application in a home device monitoring scenario in which a home gateway or a hard disk video recorder (i.e., gateway device) is deployed, and a number of front-end cameras (i.e., image capturing devices). For example, when a camera is added to the home gateway, the camera is communicated with the home gateway, the home gateway confirms the camera with the storage device (for example, a memory card) already configured, matches the camera without the memory card with the camera with the memory card configured, and transmits the matching information to the corresponding camera with the memory card and the camera without the memory card, so that when the camera without the memory card detects that the communication with the home gateway is abnormal, video data in a prerecording buffer in the camera without the memory card is transmitted to the matched camera with the memory card for video storage backup. When the home gateway (or the hard disk video recorder) is restored, the camera is reconnected to the home gateway, normal video data transmission is restored, and meanwhile, the camera with the memory card transmits video data of the camera and the matched front-end camera during an abnormal period to the home gateway, so that video cannot be lost.
By the above steps, by receiving the first video data transmitted by the second image capturing apparatus in the case where the communication between the first image capturing apparatus and the gateway apparatus is detected to be abnormal, wherein the second image capturing apparatus is provided with a storage apparatus therein, the second image capturing apparatus is configured to store the first video data by using the storage apparatus, the first video data is configured to represent the video data acquired by the first image capturing apparatus during the communication abnormality between the first image capturing apparatus and the gateway apparatus; the first video data is transmitted to the gateway device. The purpose of collocating the image pickup device without the storage device with the image pickup device with the storage device is achieved, so that when the communication abnormality with the gateway device is detected, the acquired video data is transmitted to the collocated image pickup device with the storage device, and the video data storage backup is carried out. Thereby ensuring that video data is not lost. Therefore, the problem of video data loss in the related art can be solved, and the effect of ensuring that the video data cannot be lost is achieved.
The application is illustrated below with reference to specific examples:
The gateway device in this embodiment uses a home monitoring gateway (or a hard disk video recorder) and the camera device as examples, and specifically includes the following steps:
The user prepares the memory card for a plurality of front-end cameras according to the self requirement; the front-end devices are thus classified into cameras with memory cards and cameras without memory cards.
The front-end equipment and the home gateway (or the hard disk video recorder) keep video data transmission, and continuously detect whether the communication with the audio home gateway is abnormal or not; the detection interval is denoted as T1. When an abnormality is detected, the camera without the memory card transmits video data in the prerecording buffer to the camera with the memory card matched before to record video; the length of time that the camera without memory card prerecords the buffered data itself is denoted as T2. The camera with the memory card records and stores the video code stream of the camera, and receives the matched video code stream of the front-end camera without the memory card to record and store.
In this embodiment, the home monitoring gateway (or the hard disk recorder) is responsible for communicating with the front-end device, acquiring a monitoring video of the front-end device, and recording and storing the monitoring video; the method can acquire the storage capacity of the front-end camera, and match the camera without the storage card with the camera with the storage card, and specifically comprises the following steps:
1. Determining the video recording performance of the camera with the memory card by acquiring the pre-estimated memory card writing capability and the code stream receiving capability of the camera with the memory card; setting the writing capability of the memory card as S, setting the code stream of the camera with the memory card as Mself, setting the capability R of the camera for receiving the code stream as the small values of S-Mself and R, and taking the small values as the video recording performance Srecord of the camera with the memory card; for example, if the writing capability of the memory card is s=24 Mb/S, the code stream of the camera is Mself =2 Mb/S, and the capability of the camera with the memory card to receive the code stream is r=10 Mb/S, then S-Mself =24 Mb/S-2 Mb/s=22 Mb/S, and the video recording performance Srecord of the camera with the memory card, which is the small value of S-Mself and R, is 10Mb/S;
2. Recording a camera video recording performance record queue provided with a memory card as Srecord < 1 >, srecord < 2 > - … … Srecordn; the sum of the video recording performances of all cameras with memory cards is recorded as Srecordall;
3. the code streams of cameras without memory cards are ordered from big to small and marked as M1, M2 … … Mn; the sum of the code streams of all cameras without the memory card is recorded as Mal;
4. the method comprises the steps of obtaining the size of a storage space of a camera with a storage card, and sequencing from large to small, wherein the storage space is recorded as space1 and space2 … … Spacen;
5. if Srecordall < Mal, the home monitoring gateway sends an alarm to prompt the user, and the current memory card is insufficient in configuration performance and needs to configure the memory card for more cameras;
6. Taking out the code stream Mn from the code stream queue one by one, comparing the code stream Mn with Srecordn corresponding to the element Spacen in the memory space size queue, if Mn < Srecordn, calculating the video recording time length Ln that the code stream can stay in the memory space, wherein Ln= Spacen/(Mx+My+ … +Mn), (Mx, my are the code streams already matched with the front-end camera with memory);
7. After obtaining all Ln values meeting the conditions, comparing the front-end camera with the memory card corresponding to the maximum value Ln, namely the front-end camera with the memory card corresponding to the camera without the memory card; meanwhile, the Srecordn = Srecordn-Mn corresponding to the camera with the memory card is updated, and the Srecord queue is reordered; removing Mn from the M queue;
8. If the Mn is not successfully matched after traversing the matched Space queue, the home monitoring gateway sends an alarm to prompt a user, and the current memory card is insufficient in configuration performance and needs to configure the memory card for more cameras.
The embodiment can also obtain the maximum prerecorded time configuration of the front-end camera without the memory card, and configure T1 and T2 of the front-end camera, and the specific method is as follows:
T2> = 2*I frame interval period (GOP), T1 is determined by the T2 configuration of the front-end camera itself, and T2> t1+n×i frame interval period (N is an integer of > =1) to ensure that when an anomaly is found during T1 detection, prerecorded data of the front-end camera is overlaid to video data during the anomaly and contains critical I frame data.
The rule of collocation between the cameras is shown in fig. 5, and the configuration information of the front-end camera T1/T2 is synchronized to the front-end camera device; when the video recording device is abnormal and recovered, the video recording device can communicate with a front-end camera with a memory card to acquire video recording data in an abnormal period.
As shown in fig. 6, the business process of the present embodiment includes the following steps:
S601, a front-end camera (comprising a camera with a memory card and a camera without a memory card) establishes connection with home gateway equipment and transmits video code stream data;
s602, the home gateway acquires the memory card capability of the front-end camera, and confirms the cameras with and without the memory card;
s603, the home gateway matches the camera without the memory card with the camera with the memory card, and determines the prerecorded time of the front-end camera and the abnormal interval time of detection; and transmitting the relevant information to the front-end camera;
S604, the front-end camera continuously detects whether the communication with the home gateway is abnormal;
s605, when a front-end camera with a memory card detects abnormal communication with a home gateway, determining whether the front-end camera carries the memory card or not;
S606, the camera with the memory card transmits video data in an abnormal period to the home gateway, so that video is ensured not to be lost.
S607, when the camera without the memory card detects abnormal communication with the home gateway, the code stream data in the prerecording buffer is transmitted to the matched camera with the memory card for video recording;
s608, judging whether the front-end camera continuously detects and whether the home gateway recovers the function;
S609, when the home gateway recovers the function, the front-end equipment recovers the communication with the home gateway and the video code stream transmission;
S610, the front-end equipment of the to-be-stored card transmits video data in an abnormal period to the home gateway, so that video is ensured not to be lost.
In summary, the present embodiment reduces the security risk that the IPC is directly connected to the external network platform, and the risk that the external network is unstable and the video is lost.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The embodiment also provides a storage device for video data, which is used for implementing the foregoing embodiments and preferred embodiments, and is not described in detail. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
Fig. 7 is a block diagram (one) of a structure of a storage device for video data according to an embodiment of the present invention, and as shown in fig. 7, the device includes:
a first configuration module 72, configured to configure a first image capturing apparatus and a second image capturing apparatus, where the second image capturing apparatus is provided with a storage apparatus, the first image capturing apparatus is configured to acquire first video data, and the second image capturing apparatus is configured to store the first video data with the storage apparatus in a case of abnormal communication between the first image capturing apparatus and the gateway apparatus;
A first receiving module 74 for receiving the first video data transmitted by the second image capturing apparatus in the case where communication is resumed between the gateway apparatus and the second image capturing apparatus;
The first storage module 76 is used for storing the first video data.
In an exemplary embodiment, the above apparatus further includes:
a first determining module configured to determine a code stream sum of N first image capturing apparatuses before configuring the first image capturing apparatus and the second image capturing apparatus, where N is a natural number greater than or equal to 1;
A second determining module configured to determine a sum of video recording performances of M second image capturing apparatuses, where M is a natural number greater than or equal to 1;
And a third determining module, configured to determine whether the storage space of the second image capturing apparatus meets a preset threshold based on the code stream sum and the video recording performance sum.
In an exemplary embodiment, the third determining module includes:
And a first determining unit configured to determine that the storage space of the second image capturing apparatus does not satisfy the preset threshold in a case where the sum of video recording performances is smaller than the sum of code streams.
In an exemplary embodiment, the above apparatus further includes:
A first obtaining module, configured to obtain K first image capturing apparatuses from N first image capturing apparatuses after determining that a storage space of the second image capturing apparatus does not meet a preset threshold under a condition that a sum of video recording performances is smaller than a sum of code streams, where K is a natural number greater than or equal to 1;
and a first setting module for setting a storage device in the K image capturing devices to convert the K first image capturing devices into K second image capturing devices.
In an exemplary embodiment, the second determining module includes:
A second determination unit configured to determine a writing capability of a storage device in each of the M second image capturing apparatuses, a code stream of each of the second image capturing apparatuses, and a capability of each of the second image capturing apparatuses to receive the code stream;
a first calculation unit configured to calculate a difference between a writing capability of a storage device in each of the second image capturing apparatuses and a code stream of each of the second image capturing apparatuses;
a third determination unit configured to determine, as a video recording performance of each of the second image capturing apparatuses, a minimum value between the difference value and an ability of each of the second image capturing apparatuses to receive the code stream;
and a fourth determining unit configured to determine a sum of recording performances of the M second image capturing apparatuses as a sum of recording performances.
In an exemplary embodiment, the first configuration module includes:
a first comparing unit configured to compare a code stream of the first image capturing apparatus with a video recording performance in the second image capturing apparatus;
a fifth determining unit configured to determine a duration of storing video data in a storage space of the second image capturing apparatus in the code stream of the first image capturing apparatus in a case where the code stream of the first image capturing apparatus is smaller than the video recording performance in the second image capturing apparatus;
A first association unit configured to associate the first image capturing apparatus and the second image capturing apparatus in a case where the duration satisfies a second preset threshold.
In an exemplary embodiment, the apparatus further comprises:
The second configuration module is configured to configure an acquisition time length and an anomaly detection interval time length of the first image capturing device, wherein the anomaly detection interval time length is used for indicating whether the first image capturing device detects an abnormal time interval of communication with the gateway device, the acquisition time length is greater than or equal to a frame interval period of a preset multiple, and the acquisition time length is greater than the anomaly detection interval time length.
In an exemplary embodiment, the first receiving module includes:
And a first receiving unit configured to receive, after occurrence of an abnormality in communication between the second image capturing apparatus and the gateway apparatus, and in a case where communication is resumed between the gateway apparatus and the second image capturing apparatus, first video data transmitted by the image capturing apparatus, wherein the first video data is used to represent video data acquired by the first image capturing apparatus during the abnormality in communication between the first image capturing apparatus and the gateway apparatus.
Fig. 8 is a block diagram (two) of a structure of a storage device for video data according to an embodiment of the present invention, as shown in fig. 8, the device includes:
a first transmission module 82, configured to transmit, when an abnormality in communication between the first image capturing apparatus and the gateway apparatus is detected, acquired first video data to a second image capturing apparatus, where a storage apparatus is provided in the second image capturing apparatus, the second image capturing apparatus being configured to store the first video data using the storage apparatus, the first video data being configured to represent video data acquired by the first image capturing apparatus during the abnormality in communication between the first image capturing apparatus and the gateway apparatus;
And a second transmission module 84 for transmitting the acquired second video data to the gateway device in the case where it is determined that communication is restored between the first image capturing device and the gateway device.
In an exemplary embodiment, the above apparatus further includes:
a first establishing module, configured to establish a communication connection with a gateway device before transmitting acquired first video data to a second image capturing device when an abnormality in communication between the first image capturing device and the gateway device is detected;
And a third receiving module, configured to receive collocation information sent by the gateway device, where the collocation information includes an association relationship between the first image capturing device and the second image capturing device, an acquisition time of the first image capturing device, and a detection period for detecting whether communication with the gateway device is abnormal.
Fig. 9 is a block diagram (iii) of a structure of a storage device for video data according to an embodiment of the present invention, as shown in fig. 9, the device including:
a second receiving module 92, configured to receive, when an abnormality is detected in communication between the first image capturing apparatus and the gateway apparatus, first video data transmitted by the second image capturing apparatus, where a storage apparatus is provided in the second image capturing apparatus, the second image capturing apparatus being configured to store the first video data by using the storage apparatus, the first video data being configured to represent video data acquired by the first image capturing apparatus during the abnormality in communication between the first image capturing apparatus and the gateway apparatus;
a third transmission module 94 is configured to transmit the first video data to the gateway device.
It should be noted that each of the above modules may be implemented by software or hardware, and for the latter, it may be implemented by, but not limited to: the modules are all located in the same processor; or the above modules may be located in different processors in any combination.
Embodiments of the present invention also provide a computer readable storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
In the present embodiment, the above-described computer-readable storage medium may be configured to store a computer program for executing the above steps.
In one exemplary embodiment, the computer readable storage medium may include, but is not limited to: a usb disk, a read-only memory (ROM), a random access memory (Random Access Memory RAM), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing a computer program.
An embodiment of the invention also provides an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
In an exemplary embodiment, the electronic apparatus may further include a transmission device connected to the processor, and an input/output device connected to the processor.
In an exemplary embodiment, the above processor may be arranged to perform the above steps by means of a computer program.
Specific examples in this embodiment may refer to the examples described in the foregoing embodiments and the exemplary implementation, and this embodiment is not described herein.
It will be appreciated by those skilled in the art that the modules or steps of the invention described above may be implemented in a general purpose computing device, they may be concentrated on a single computing device, or distributed across a network of computing devices, they may be implemented in program code executable by computing devices, so that they may be stored in a storage device for execution by computing devices, and in some cases, the steps shown or described may be performed in a different order than that shown or described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple modules or steps of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the present invention, but various modifications and variations can be made to the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (14)

1. A method of storing video data, comprising:
configuring a first image capturing apparatus and a second image capturing apparatus, wherein a storage apparatus is provided in the second image capturing apparatus, the first image capturing apparatus is used for acquiring first video data, and the second image capturing apparatus is used for storing the first video data by using the storage apparatus under the condition of abnormal communication between the first image capturing apparatus and a gateway apparatus;
Receiving the first video data transmitted by the second image capturing apparatus, with communication resumed between the gateway apparatus and the second image capturing apparatus;
Storing the first video data;
Before configuring the first image capturing apparatus and the second image capturing apparatus, the method further includes: determining the sum of code streams of N pieces of first image capturing equipment, wherein N is a natural number greater than or equal to 1; determining the sum of video recording performances of M pieces of the second image capturing apparatuses, wherein M is a natural number greater than or equal to 1; determining whether a storage space of the second image capturing apparatus meets a preset threshold based on the code stream sum and the video recording performance sum;
wherein determining the sum of video recording performances of the M second image capturing apparatuses includes:
Determining a writing capability of a storage device in each of the M second image capturing devices, a code stream of each of the second image capturing devices, and a capability of each of the second image capturing devices to receive the code stream;
calculating a difference between a writing capability of the storage device in each of the second image capturing devices and a code stream of each of the second image capturing devices;
Determining a minimum value between the difference value and the capacity of each second image capturing apparatus to receive a code stream as the recording performance of each second image capturing apparatus;
And determining the sum of the video recording performances of the M second image capturing apparatuses as the sum of the video recording performances.
2. The method according to claim 1, wherein determining that the storage space of the second image capturing apparatus does not satisfy a preset threshold based on the code stream sum and the recording performance sum, comprises:
and under the condition that the sum of the video recording performances is smaller than the sum of the code streams, determining that the storage space of the second image capturing device does not meet the preset threshold.
3. The method according to claim 2, wherein, in the case where the video recording performance sum is smaller than the code stream sum, after determining that the storage space of the second image capturing apparatus does not satisfy the preset threshold, the method further comprises:
Obtaining K first image capturing apparatuses from the N first image capturing apparatuses, wherein K is a natural number greater than or equal to 1;
The storage device is provided in the K image pickup devices to convert the K first image pickup devices into the K second image pickup devices.
4. The method according to claim 1, wherein configuring the first image capturing apparatus and the second image capturing apparatus includes:
comparing the code stream of the first image capturing apparatus with the video recording performance in the second image capturing apparatus;
Determining a duration of storing video data in a storage space of the first image capturing apparatus in the second image capturing apparatus in a case where the code stream of the first image capturing apparatus is smaller than the video recording performance in the second image capturing apparatus;
and associating the first image capturing apparatus and the second image capturing apparatus in a case where the duration satisfies a second preset threshold.
5. The method according to claim 1, wherein the method further comprises:
configuring an acquisition time length and an anomaly detection interval time length of the first image capturing device, wherein the anomaly detection interval time length is used for indicating a time interval for detecting whether communication between the first image capturing device and the gateway device is abnormal, the acquisition time length is greater than or equal to a frame interval period of a preset multiple, and the acquisition time length is greater than the anomaly detection interval time length.
6. The method according to claim 1, wherein receiving the first video data transmitted by the second image capturing apparatus in a case where communication is restored between the gateway apparatus and the second image capturing apparatus, comprises:
And receiving the first video data transmitted by the image capturing device after the communication between the second image capturing device and the gateway device is abnormal and in the condition that the communication between the gateway device and the second image capturing device is restored, wherein the first video data is used for representing the video data acquired by the first image capturing device during the abnormal communication period of the first image capturing device and the gateway device.
7. A method of storing video data, comprising:
Transmitting the acquired first video data to a second image capturing apparatus in the case that an abnormality in communication between the first image capturing apparatus and a gateway apparatus is detected, wherein a storage apparatus is provided in the second image capturing apparatus, the second image capturing apparatus is configured to store the first video data by using the storage apparatus, and the first video data is configured to represent video data acquired by the first image capturing apparatus during the communication abnormality between the first image capturing apparatus and the gateway apparatus;
transmitting the acquired second video data to the gateway device in the case where it is determined that communication is resumed between the first image capturing device and the gateway device;
The gateway device is further configured to determine a code stream sum of N pieces of the first image capturing devices, where N is a natural number greater than or equal to 1; determining the sum of video recording performances of M pieces of the second image capturing apparatuses, wherein M is a natural number greater than or equal to 1; determining whether a storage space of the second image capturing apparatus meets a preset threshold based on the code stream sum and the video recording performance sum; wherein the gateway device is further configured to determine a sum of video recording performances of the M second image capturing devices by: determining a writing capability of a storage device in each of the M second image capturing devices, a code stream of each of the second image capturing devices, and a capability of each of the second image capturing devices to receive the code stream; calculating a difference between a writing capability of the storage device in each of the second image capturing devices and a code stream of each of the second image capturing devices; determining a minimum value between the difference value and the capacity of each second image capturing apparatus to receive a code stream as the recording performance of each second image capturing apparatus; and determining the sum of the video recording performances of the M second image capturing apparatuses as the sum of the video recording performances.
8. The method according to claim 7, wherein, in the case where an abnormality in communication between the first image capturing apparatus and the gateway apparatus is detected, before transmitting the acquired first video data to the second image capturing apparatus, the method further comprises:
establishing a communication connection with the gateway device;
and receiving collocation information sent by the gateway equipment, wherein the collocation information comprises an association relation between the first camera equipment and the second camera equipment, acquisition time of the first camera equipment and a detection period for detecting whether communication between the first camera equipment and the gateway equipment is abnormal.
9. A method of storing video data, comprising:
Receiving first video data transmitted by a second image capturing device in the case that an abnormality is detected in communication between the first image capturing device and a gateway device, wherein a storage device is arranged in the second image capturing device, the second image capturing device is used for storing the first video data by using the storage device, and the first video data is used for representing video data acquired by the first image capturing device during the communication abnormality between the first image capturing device and the gateway device;
transmitting the first video data to the gateway device;
The gateway device is further configured to determine a code stream sum of N pieces of the first image capturing devices, where N is a natural number greater than or equal to 1; determining the sum of video recording performances of M pieces of the second image capturing apparatuses, wherein M is a natural number greater than or equal to 1; determining whether a storage space of the second image capturing apparatus meets a preset threshold based on the code stream sum and the video recording performance sum; wherein the gateway device is further configured to determine a sum of video recording performances of the M second image capturing devices by: determining a writing capability of a storage device in each of the M second image capturing devices, a code stream of each of the second image capturing devices, and a capability of each of the second image capturing devices to receive the code stream; calculating a difference between a writing capability of the storage device in each of the second image capturing devices and a code stream of each of the second image capturing devices; determining a minimum value between the difference value and the capacity of each second image capturing apparatus to receive a code stream as the recording performance of each second image capturing apparatus; and determining the sum of the video recording performances of the M second image capturing apparatuses as the sum of the video recording performances.
10. A storage device for video data, comprising:
a first configuration module, configured to configure a first image capturing device and a second image capturing device, where the second image capturing device is provided with a storage device, the first image capturing device is configured to acquire first video data, and the second image capturing device is configured to store the first video data with the storage device in a case of abnormal communication between the first image capturing device and a gateway device;
a first receiving module configured to receive the first video data transmitted by the second image capturing apparatus, in a case where communication is resumed between the gateway apparatus and the second image capturing apparatus;
a first storage module for storing the first video data;
the device is further used for determining the sum of code streams of N pieces of first image capturing equipment before configuring the first image capturing equipment and the second image capturing equipment, wherein N is a natural number which is greater than or equal to 1; determining the sum of video recording performances of M pieces of the second image capturing apparatuses, wherein M is a natural number greater than or equal to 1; determining whether a storage space of the second image capturing apparatus meets a preset threshold based on the code stream sum and the video recording performance sum;
Wherein the apparatus is further configured to determine a sum of video recording performances of the M second image capturing apparatuses by: determining a writing capability of a storage device in each of the M second image capturing devices, a code stream of each of the second image capturing devices, and a capability of each of the second image capturing devices to receive the code stream; calculating a difference between a writing capability of the storage device in each of the second image capturing devices and a code stream of each of the second image capturing devices; determining a minimum value between the difference value and the capacity of each second image capturing apparatus to receive a code stream as the recording performance of each second image capturing apparatus; and determining the sum of the video recording performances of the M second image capturing apparatuses as the sum of the video recording performances.
11. A storage device for video data, comprising:
a first transmission module, configured to transmit acquired first video data to a second image capturing device when an abnormality in communication between the first image capturing device and a gateway device is detected, where a storage device is provided in the second image capturing device, the second image capturing device is configured to store the first video data with the storage device, and the first video data is configured to represent video data acquired by the first image capturing device during a communication abnormality between the first image capturing device and the gateway device;
a second transmission module configured to transmit the acquired second video data to the gateway device, in a case where it is determined that communication is restored between the first image capturing device and the gateway device;
The gateway device is further configured to determine a code stream sum of N pieces of the first image capturing devices, where N is a natural number greater than or equal to 1; determining the sum of video recording performances of M pieces of the second image capturing apparatuses, wherein M is a natural number greater than or equal to 1; determining whether a storage space of the second image capturing apparatus meets a preset threshold based on the code stream sum and the video recording performance sum; wherein the gateway device is further configured to determine a sum of video recording performances of the M second image capturing devices by: determining a writing capability of a storage device in each of the M second image capturing devices, a code stream of each of the second image capturing devices, and a capability of each of the second image capturing devices to receive the code stream; calculating a difference between a writing capability of the storage device in each of the second image capturing devices and a code stream of each of the second image capturing devices; determining a minimum value between the difference value and the capacity of each second image capturing apparatus to receive a code stream as the recording performance of each second image capturing apparatus; and determining the sum of the video recording performances of the M second image capturing apparatuses as the sum of the video recording performances.
12. A storage device for video data, comprising:
A second receiving module, configured to receive first video data transmitted by a second image capturing device when an abnormality in communication between the first image capturing device and a gateway device is detected, where a storage device is provided in the second image capturing device, the second image capturing device is configured to store the first video data by using the storage device, and the first video data is configured to represent video data acquired by the first image capturing device during the communication abnormality between the first image capturing device and the gateway device;
A third transmission module, configured to transmit the first video data to the gateway device;
The gateway device is further configured to determine a code stream sum of N pieces of the first image capturing devices, where N is a natural number greater than or equal to 1; determining the sum of video recording performances of M pieces of the second image capturing apparatuses, wherein M is a natural number greater than or equal to 1; determining whether a storage space of the second image capturing apparatus meets a preset threshold based on the code stream sum and the video recording performance sum; wherein the gateway device is further configured to determine a sum of video recording performances of the M second image capturing devices by: determining a writing capability of a storage device in each of the M second image capturing devices, a code stream of each of the second image capturing devices, and a capability of each of the second image capturing devices to receive the code stream; calculating a difference between a writing capability of the storage device in each of the second image capturing devices and a code stream of each of the second image capturing devices; determining a minimum value between the difference value and the capacity of each second image capturing apparatus to receive a code stream as the recording performance of each second image capturing apparatus; and determining the sum of the video recording performances of the M second image capturing apparatuses as the sum of the video recording performances.
13. A computer readable storage medium, characterized in that a computer program is stored in the computer readable storage medium, wherein the computer program, when being executed by a processor, implements the method of any one of claims 1 to 6, or implements the method of claim 7 or 8, or implements the method of claim 9.
14. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to run the computer program to perform the method of any of the claims 1 to 6, or to perform the method of claim 7 or 8, or to perform the method of any of the claims 9.
CN202111631057.8A 2021-12-28 2021-12-28 Video data storage method and device, storage medium and electronic device Active CN114245052B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111631057.8A CN114245052B (en) 2021-12-28 2021-12-28 Video data storage method and device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111631057.8A CN114245052B (en) 2021-12-28 2021-12-28 Video data storage method and device, storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN114245052A CN114245052A (en) 2022-03-25
CN114245052B true CN114245052B (en) 2024-04-16

Family

ID=80743897

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111631057.8A Active CN114245052B (en) 2021-12-28 2021-12-28 Video data storage method and device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN114245052B (en)

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004328037A (en) * 2003-04-21 2004-11-18 Canon Inc Imaging and image recording apparatus
JP2012004643A (en) * 2010-06-14 2012-01-05 Canon Inc Video recording device, video recording system and video recording method
CN104243988A (en) * 2013-06-14 2014-12-24 浙江大学 Video encoding and decoding method and device, method for transferring video bitstream and video bitstream
CN105430423A (en) * 2015-11-12 2016-03-23 小米科技有限责任公司 Video backup method, device and system
WO2017201646A1 (en) * 2016-05-23 2017-11-30 深圳市大疆创新科技有限公司 Data storage method and device
CN107562766A (en) * 2016-07-01 2018-01-09 杭州海康威视数字技术股份有限公司 A kind of data file wiring method, apparatus and system
CN107888636A (en) * 2016-09-30 2018-04-06 杭州海康威视数字技术股份有限公司 Data processing method and system based on cloud storage
CN107959812A (en) * 2016-10-18 2018-04-24 杭州萤石网络有限公司 Storage method, device, system and the routing device of monitoring data
CN109963100A (en) * 2017-12-14 2019-07-02 浙江宇视科技有限公司 A kind of caching amended record method and device shared based on multicast
CN110620889A (en) * 2018-06-20 2019-12-27 杭州海康威视数字技术股份有限公司 Video monitoring system, network hard disk video recorder and data transmission method
CN110753198A (en) * 2018-07-24 2020-02-04 杭州海康威视数字技术股份有限公司 Method and apparatus for storing image data
CN111432151A (en) * 2020-01-20 2020-07-17 杭州海康威视数字技术股份有限公司 Video data storage method, device, equipment and storage medium
CN113051428A (en) * 2019-12-28 2021-06-29 浙江宇视科技有限公司 Method and device for storing and backing up front end of camera

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9035768B2 (en) * 2008-05-23 2015-05-19 Leverage Information Systems Peer to peer surveillance architecture

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004328037A (en) * 2003-04-21 2004-11-18 Canon Inc Imaging and image recording apparatus
JP2012004643A (en) * 2010-06-14 2012-01-05 Canon Inc Video recording device, video recording system and video recording method
CN104243988A (en) * 2013-06-14 2014-12-24 浙江大学 Video encoding and decoding method and device, method for transferring video bitstream and video bitstream
CN105430423A (en) * 2015-11-12 2016-03-23 小米科技有限责任公司 Video backup method, device and system
WO2017201646A1 (en) * 2016-05-23 2017-11-30 深圳市大疆创新科技有限公司 Data storage method and device
CN107562766A (en) * 2016-07-01 2018-01-09 杭州海康威视数字技术股份有限公司 A kind of data file wiring method, apparatus and system
CN107888636A (en) * 2016-09-30 2018-04-06 杭州海康威视数字技术股份有限公司 Data processing method and system based on cloud storage
CN107959812A (en) * 2016-10-18 2018-04-24 杭州萤石网络有限公司 Storage method, device, system and the routing device of monitoring data
CN109963100A (en) * 2017-12-14 2019-07-02 浙江宇视科技有限公司 A kind of caching amended record method and device shared based on multicast
CN110620889A (en) * 2018-06-20 2019-12-27 杭州海康威视数字技术股份有限公司 Video monitoring system, network hard disk video recorder and data transmission method
CN110753198A (en) * 2018-07-24 2020-02-04 杭州海康威视数字技术股份有限公司 Method and apparatus for storing image data
CN113051428A (en) * 2019-12-28 2021-06-29 浙江宇视科技有限公司 Method and device for storing and backing up front end of camera
CN111432151A (en) * 2020-01-20 2020-07-17 杭州海康威视数字技术股份有限公司 Video data storage method, device, equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
监控视频恢复技术研究;夏荣;吴彬;袁文勤;;网络安全技术与应用;20170215(02);全文 *
视频存储热备份控制技术在城市治安动态视频监控系统中的应用;叶利芳;;中国安防;20121001(10);全文 *

Also Published As

Publication number Publication date
CN114245052A (en) 2022-03-25

Similar Documents

Publication Publication Date Title
CN105553740B (en) Data-interface monitoring method and device
CN110475124B (en) Video jamming detection method and device
CN108337333B (en) IP address management method, management device, network video recorder and storage medium
EP3321880B9 (en) Monitoring system, photography-side device, and verification-side device
CN110996056B (en) Video storage method and device of cascade monitoring system
US9706170B2 (en) Communication apparatus, communication system, and communication management system
US11582706B2 (en) Determine abnormal clock
CN111193664A (en) Link backup method and device for computer network
CN113794597A (en) Alarm information processing method, system, electronic device and storage medium
CN111770309A (en) Video uploading method and device, electronic equipment and storage medium
CN114245052B (en) Video data storage method and device, storage medium and electronic device
CN112422369B (en) Method and device for determining offline time, storage medium and electronic device
CN111984582A (en) PCIE link training method, equipment and medium
CN109120896B (en) Security video monitoring guard system
CN113645103B (en) Method and device for detecting communication link abnormity between video monitoring platform and front-end equipment
US6941347B2 (en) Network administration system and method of re-arranging network resources
CN108696855B (en) Information management method, session management function and mobility management function
CN112053707B (en) Recording method and device for multimedia equipment, storage medium and electronic device
CN114093047A (en) Intelligent attendance checking method and device, electronic equipment and readable storage medium
CN110674016A (en) Method for processing log and positioning error information in mobile terminal, mobile terminal and monitoring device thereof and storage medium
CN115883466B (en) Switch control method and device, storage medium and electronic device
CN112769889B (en) Service data pushing method and device, storage medium and electronic device
CN112383686B (en) Video processing method, video processing device, storage medium and electronic device
CN116541313B (en) Face checking method and device and terminal equipment
CN113839800B (en) Abnormal network element prompting method and device, electronic equipment and storage medium

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