CN109756708B - Continuous transmission method and device of audio and video data - Google Patents

Continuous transmission method and device of audio and video data Download PDF

Info

Publication number
CN109756708B
CN109756708B CN201811621119.5A CN201811621119A CN109756708B CN 109756708 B CN109756708 B CN 109756708B CN 201811621119 A CN201811621119 A CN 201811621119A CN 109756708 B CN109756708 B CN 109756708B
Authority
CN
China
Prior art keywords
gap
video
time
unit
information
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
CN201811621119.5A
Other languages
Chinese (zh)
Other versions
CN109756708A (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.)
Shenzhen Infineon Information Co ltd
Original Assignee
Shenzhen Infinova Intelligent 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 Shenzhen Infinova Intelligent Technology Co Ltd filed Critical Shenzhen Infinova Intelligent Technology Co Ltd
Priority to CN201811621119.5A priority Critical patent/CN109756708B/en
Publication of CN109756708A publication Critical patent/CN109756708A/en
Application granted granted Critical
Publication of CN109756708B publication Critical patent/CN109756708B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention provides a method and a device for continuously transmitting audio and video data. And in the data continuous transmission process, the data continuous transmission of the corresponding gap is carried out by reading the gap statistics stored in the database, and a verification process is further arranged after the data continuous transmission, so that the complete failure and the partial failure are respectively processed. Therefore, even if the single continuous transmission fails completely or partially, the corresponding continuous transmission can still be restarted by self.

Description

Continuous transmission method and device of audio and video data
Technical Field
The present invention relates to a data processing method, and more particularly, to a method and an apparatus for continuously transmitting audio/video data.
Background
The basic video monitoring system generally comprises a management platform and a plurality of front-end devices. The management platform is responsible for equipment management, and the front-end equipment is responsible for information acquisition such as audio and video. After the platform is connected to the video of the front-end device, the local storage module stores streams such as audio and video, if the front-end device is disconnected due to network and other reasons, the front-end device has own temporary storage, such as storage of an SD card, and after the device is on-line again, the platform needs to acquire audio and video data of the front end during the disconnection period and store the data in the local storage module.
However, in the conventional retransmission scheme, only the last interrupted transmission can be retransmitted. If the interruption occurs again during the continuous transmission process, the data will be lost and cannot be continuously transmitted.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: a method and a device for continuously transmitting audio and video data are provided.
In order to solve the technical problems, the invention adopts the technical scheme that: a method for continuously transmitting audio and video data comprises a gap statistic flow and a data continuous transmission flow;
the gap statistics flow includes the steps of,
A1) judging whether the statistical gap time t exists, if so, acquiring the statistical gap time t, otherwise, newly establishing the statistical gap time t, and initializing the statistical gap time t to be the current time c;
A2) judging whether the difference value obtained by subtracting the statistical clearance time t from the current time c is greater than a preset value or not, if not, returning to the step A1, and if so, continuing the step;
A3) updating the current time c to the statistical gap time t;
A4) all videos for inquiring time t to c stored locally
A5) Judging whether only one video segment exists and the time of the video segment is the same as the time from t to c, if not, continuing the step, if so, returning to the step A1;
A6) acquiring the start time st and the end time et of each video segment;
A7) sequencing the video segments from early to late according to the start time st;
A8) counting the information of each video interval among all the video segments according to the t, the c and each video segment; the video recording gap information comprises a start time gst and an end time get of a gap;
A9) storing all the video interval information to a video interval database;
A10) updating the current time c to the statistical gap time t, and returning to the step A1;
the data resuming process includes the steps of,
B1) loading all video interval information stored in a video interval database;
B2) acquiring a video stream of a corresponding time period from front-end equipment according to the start time gst and the end time get of each piece of video gap information in the video gap database;
B3) storing all video streams in a video stream;
B4) inquiring all videos from the start time gst to the end time get of each piece of gap information in the video stream;
B5) judging whether the inquired video from the start time gst to the end time get is completely free of video, if so, turning to the step B1, otherwise, executing the step B6;
B6) judging whether the inquired video only has one video segment and the time of the video segment is the same as the time from the start time gst to the end time get, if so, deleting the corresponding video gap information stored in the video gap database, returning to the step B1, otherwise, executing B7;
B7) acquiring the start time st and the end time et of each video segment;
B8) sequencing the video segments from early to late according to the start time st;
B9) counting the information of each video interval among all the video segments according to the start time gst, the end time get and each video segment; the video recording gap information comprises a start time gst and an end time get of a gap;
B10) storing all the video interval information to a video interval database;
B11) return to step B1.
Further, the step B0) of triggering judgment is further included before the step B1 of the data continuous transmission flow, and specifically includes the steps,
B01) setting the maximum concurrent number of the data continuous transmission flow;
setting operation time;
B02) judging whether the operation time is reached, if so, continuing the step;
B03) and judging whether the current concurrent data continuous transmission flow does not exceed the maximum concurrent number or not, and continuing the steps.
In the above, step a9 of the gap statistics flow further includes initializing a flag bit of "whether the gap is ready for data stream" corresponding to all the video gap information in the video gap database;
the triggering judgment B03 of the data resuming process further includes steps,
B04) modifying the flag bit of 'whether the gap is ready for data stream' corresponding to all the video gap information in the video gap database to be ready, and then turning to the step B1;
the step B1 specifically includes:
B1) and loading the zone bit of the gap ready data stream in the video gap database into all the prepared video gap information.
In the above, step a9 of the gap statistical process further includes initializing gap processing failure times corresponding to all video gap information in the video gap database;
the data retransmission flow comprises steps between steps B1 and B2,
B12) judging whether the gap processing failure times corresponding to the loaded video gap information exceed the preset times, if so, deleting the video gap information from the video gap database, outputting error information, and then turning to the step B2, otherwise, turning to the step B2;
step B5 of the data resuming process includes:
B5) and judging whether no video is recorded completely, if so, adding 1 to the gap processing failure times corresponding to the video gap information, and then turning to the step B1, otherwise, executing the step B6.
In the above, step a9 of the gap statistics flow further includes initializing gap interval processing time corresponding to all video gap information in the video gap database;
the data retransmission flow between steps B4 and B5 further includes step B45,
B45) judging whether the gap interval processing time corresponding to the video gap information is met, if not, turning to the step B5 after waiting to meet the requirement, and if so, directly turning to the step B5;
step B5 of the data resuming process includes:
B5) and B, judging whether no video is recorded completely, if so, setting the processing time of the gap interval corresponding to the video recording gap information, and then turning to the step B1, otherwise, executing the step B6.
The invention also relates to a continuous transmission device of the audio and video data, which comprises a gap statistic module and a data continuous transmission module;
the gap statistic module comprises a module for counting the gaps,
the time judgment unit is used for judging whether the statistical gap time t exists or not, if so, the statistical gap time t is obtained, otherwise, the statistical gap time t is newly established, and the statistical gap time t is initialized to the current time c;
the difference value judging unit is used for judging whether the difference value obtained by subtracting the statistical clearance time t from the current time c is larger than a preset value or not, if not, the time judging unit returns, and if yes, the first updating unit is returned;
the first updating unit is used for updating the current time c to the statistical gap time t;
a video query unit for querying all videos stored locally at time t to c
The complete judgment unit is used for judging whether only one video segment exists and the time of the video segment is the same as the time from t to c, otherwise, the time acquisition unit is switched to, and if so, the time judgment unit is switched back;
a time acquisition unit for acquiring a start time st and an end time et of each video segment;
the sorting unit is used for sorting the video segments from early to late according to the start time st;
the statistical gap unit is used for counting each video gap information among all the video segments according to the t, the c and each video segment; the video recording gap information comprises a start time gst and an end time get of a gap;
the interval storage unit is used for storing all video interval information into a video interval database;
the second updating unit is used for updating the current time c to the statistical gap time t and transferring the current time c back to the time judging unit;
the data continuous transmission module comprises a data transmission module,
the interval loading unit is used for loading all video interval information stored in the video interval database;
the recording supplementing unit is used for acquiring a video stream of a corresponding time period from the front-end equipment according to the start time gst and the end time get of each piece of video gap information in the video gap database;
the recording supplementing and inquiring unit is used for inquiring all the videos from the start time gst to the end time get of each piece of gap information in the video stream;
the additional recording failure judgment unit is used for judging whether the inquired video from the start time gst to the end time get is not recorded completely, if yes, the interval loading unit is switched to, and if not, the interval loading unit is switched to the additional recording completeness judgment unit;
the complementary recording integrity judging unit is used for judging whether the inquired video only has one video segment, the time of the video segment is the same as the time from the start time gst to the end time get, if so, deleting the corresponding video gap information stored in the video gap database, and turning to the gap loading unit, otherwise, turning to the secondary time obtaining unit;
a secondary time acquisition unit for acquiring a start time st and an end time et of each video segment;
the secondary sorting unit is used for sorting the video segments from early to late according to the start time st;
the secondary gap counting unit is used for counting each video gap information among all the video segments according to the start time gst, the end time get and each video segment; the video recording gap information comprises a start time gst and an end time get of a gap;
and the secondary gap storage unit is used for storing all the video gap information into the video gap database and then transferring the video gap information back to the gap loading unit.
In the above, the data retransmission module further includes a trigger determination unit, which specifically includes,
the setting subunit is used for setting the maximum concurrency number of the data continuous transmission module and setting the operation time;
the time judging subunit is used for judging whether the operation time is reached, and if the operation time is reached, the time is transferred to the concurrency judging subunit;
and the concurrency judging subunit is used for judging whether the current concurrent data continuous transmission module does not exceed the maximum concurrency number or not, and then transferring to the gap loading subunit.
In the foregoing, the gap storage unit of the gap statistics module is further configured to initialize a flag bit for setting "whether a gap is ready for a data stream" corresponding to all video gap information in the video gap database;
the trigger judging unit of the data continuous transmission module also comprises a preparation marking subunit, which is used for modifying the flag bit of 'whether the gap is ready for the data stream' corresponding to all the video gap information in the video gap database to be prepared and then turning to the time judging unit;
the time judgment unit is specifically used for loading all the video interval information with the flag bit of 'whether the interval is ready for data stream' in the video interval database as ready.
In the above, the gap storage unit of the gap statistics module is further configured to initialize and set the number of gap processing failures corresponding to all video gap information in the video gap database;
the gap loading unit of the data continuous transmission module is switched to the additional recording unit through the failure judgment unit, the failure judgment unit is used for judging whether the gap processing failure times corresponding to the loaded video gap information exceed the preset times, if so, the video gap information is deleted from the video gap database, error information is output, and then the data continuous transmission module is switched to the additional recording unit, otherwise, the data continuous transmission module is switched to the additional recording unit;
and the additional recording failure judging unit of the data continuous transmission module is specifically used for judging whether no video is recorded completely, if so, adding 1 to the gap processing failure times corresponding to the video gap information, and then, turning to the gap loading unit, otherwise, turning to the additional recording complete judging unit.
In the foregoing, the gap storage unit of the gap statistics module is further configured to initialize and set gap interval processing time corresponding to all video gap information in the video gap database;
the dubbing failure judgment unit of the data continuous transmission module is switched to a dubbing integrity judgment unit through an interval judgment unit, the interval judgment unit is used for judging whether the processing time of the interval corresponding to the video interval information is met, if not, the dubbing integrity judgment unit is switched to after the processing time is met, and if so, the dubbing integrity judgment unit is directly switched to;
and the supplementary recording integrity judgment unit of the data continuous transmission module is specifically used for judging whether video is not recorded completely, if so, setting the gap interval processing time corresponding to the video gap information, and then transferring to the gap loading unit, otherwise, transferring to the secondary time acquisition unit.
The invention has the beneficial effects that: and acquiring a video segment which is possibly interrupted at any time through a repeatedly executed gap counting process, and storing the video segment into a database after gap counting. And in the data continuous transmission process, the data continuous transmission of the corresponding gap is carried out by reading the gap statistics stored in the database, and a verification process is further arranged after the data continuous transmission, so that the complete failure and the partial failure are respectively processed. Therefore, even if the single continuous transmission fails completely or partially, the corresponding continuous transmission can still be restarted by self.
Drawings
The detailed structure of the invention is described in detail below with reference to the accompanying drawings
FIG. 1 is a flow chart of a gap statistics process of the present invention;
FIG. 2 is a flow chart of a data resume process of the present invention;
fig. 3 is a flowchart of a data resuming process according to an embodiment of the invention.
Detailed Description
In order to explain technical contents, structural features, and objects and effects of the present invention in detail, the following detailed description is given with reference to the accompanying drawings in conjunction with the embodiments.
A method for continuously transmitting audio and video data comprisesGap statistics flowAnddata continuous transmission process
As shown in FIG. 1, theGap statistics flowThe method comprises the following steps of,
A1) judging whether the statistical gap time t exists, if so, acquiring the statistical gap time t, otherwise, newly establishing the statistical gap time t, and initializing the statistical gap time t to be the current time c;
A2) judging whether the difference value obtained by subtracting the statistical clearance time t from the current time c is greater than a preset value or not, if not, returning to the step A1, and if so, continuing the step;
A3) updating the current time c to the statistical gap time t;
A4) all videos for inquiring time t to c stored locally
A5) Judging whether only one video segment exists and the time of the video segment is the same as the time from t to c, if not, continuing the step, if so, returning to the step A1;
A6) acquiring the start time st and the end time et of each video segment;
in this step, the start time st and the end time et of all the video segments in the time period from t to c are obtained. Since there is a case that there is only one recorded segment in the time t to c when the a5 judges, but the recorded segment does not cover the time t to c, this means that the recorded segment is also incomplete and needs to be transmitted continuously. Therefore, the step a5 is recognized and the step a6 is performed, and the step a6 is performed in correspondence with the one recorded segment acquisition start time st and end time et.
A7) Sequencing the video segments from early to late according to the start time st;
A8) counting the information of each video interval among all the video segments according to the t, the c and each video segment; the video recording gap information comprises a start time gst and an end time get of a gap;
A9) storing all the video interval information to a video interval database;
A10) updating the current time c to the statistical gap time t, and returning to the step A1;
the above-mentionedData continuous transmission processComprises the steps of (a) carrying out,
B1) loading all video interval information stored in a video interval database;
B2) acquiring a video stream of a corresponding time period from front-end equipment according to the start time gst and the end time get of each piece of video gap information in the video gap database;
B3) storing all video streams in a video stream;
B4) inquiring all videos from the start time gst to the end time get of each piece of gap information in the video stream;
B5) judging whether the inquired video from the start time gst to the end time get is completely free of video, if so, turning to the step B1, otherwise, executing the step B6;
the video stream is verified to see whether the continuous transmission is started or not, if the video is recorded from the start time gst to the end time get of the original gap, if the video is responsible, the continuous transmission is started, and if the video is judged to be not successful, the continuous transmission is carried out again corresponding to the video gap information, wherein the judgment of B6 is further carried out, otherwise, the continuous transmission is completely unsuccessful.
B6) Judging whether the inquired video only has one video segment and the time of the video segment is the same as the time from the start time gst to the end time get, if so, deleting the corresponding video gap information stored in the video gap database, returning to the step B1, otherwise, executing B7;
if the verification fails, the following new gap information determination process B7-B10 for the time period is further performed to avoid repeatedly rewriting the data in the gap.
B7) Acquiring the start time st and the end time et of each video segment;
B8) sequencing the video segments from early to late according to the start time st;
B9) counting the information of each video interval among all the video segments according to the start time gst, the end time get and each video segment;
the video recording gap information comprises a start time gst and an end time get of a gap;
the start time gst and the end time get of the beginning of the current week are the start time gst and the end time get of the gap of the successful next transmission, and the counted information of each recording gap between all the recording segments is the gap in the video stream after the subsequent transmission.
B10) Storing all the video interval information to a video interval database;
B11) return to step B1.
From the above description, the beneficial effects of the present invention are: and acquiring a video segment which is possibly interrupted at any time through a repeatedly executed gap counting process, and storing the video segment into a database after gap counting. And in the data continuous transmission process, the data continuous transmission of the corresponding gap is carried out by reading the gap statistics stored in the database, and a verification process is further arranged after the data continuous transmission, so that the complete failure and the partial failure are respectively processed. Therefore, even if the single continuous transmission fails completely or partially, the corresponding continuous transmission can still be restarted by self.
Example 1
Further, the step B0) of triggering judgment is further included before the step B1 of the data continuous transmission flow, and specifically includes the steps,
B01) setting the maximum concurrent number of the data continuous transmission flow;
setting operation time;
B02) judging whether the operation time is reached, if so, continuing the step;
B03) and judging whether the current concurrent data continuous transmission flow does not exceed the maximum concurrent number or not, and continuing the steps.
Because the data stream acquisition needs to acquire the stream to the front-end equipment, the network and disk bandwidth is relatively consumed, so that a user can set the maximum concurrency number maxCount according to the actual situation, and therefore before starting the data transmission, the maximum concurrency number is judged whether to exceed, if so, the maximum concurrency number is not processed, and the next cycle is waited, so that the resource consumption can be avoided.
In addition, in practical applications, there is a time problem in addition to the maximum concurrency number, and some users expect to start off-line transmission at a specified time. Therefore, the operation time is set as a trigger condition of the continuous transmission process.
Example 2
In the above, step a9 of the gap statistics flow further includes initializing a flag bit of "whether the gap is ready for data stream" corresponding to all the video gap information in the video gap database;
the triggering judgment B03 of the data resuming process further includes steps,
B04) modifying the flag bit of 'whether the gap is ready for data stream' corresponding to all the video gap information in the video gap database to be ready, and then turning to the step B1;
the step B1 specifically includes:
B1) and loading the zone bit of the gap ready data stream in the video gap database into all the prepared video gap information.
In this embodiment, a flag bit indicating whether a gap is ready for data stream is set for each piece of video gap information, so that in the data resuming process, when time and concurrency conditions are met, the flag bit is modified, and thus, the video gap information meeting ready can be loaded correspondingly and subsequently and correspondingly resumed.
Example 3
In the above, step a9 of the gap statistical process further includes initializing gap processing failure times corresponding to all video gap information in the video gap database;
the data retransmission flow comprises steps between steps B1 and B2,
B12) judging whether the gap processing failure times corresponding to the loaded video gap information exceed the preset times, if so, deleting the video gap information from the video gap database, outputting error information, and then turning to the step B2, otherwise, turning to the step B2;
step B5 of the data resuming process includes:
B5) and judging whether no video is recorded completely, if so, adding 1 to the gap processing failure times corresponding to the video gap information, and then turning to the step B1, otherwise, executing the step B6.
In this embodiment, by increasing the condition of the number of gap processing failures corresponding to each piece of video interval data, when the number of "gap processing failures" exceeds a certain number, for example >10 times, during the data transmission process, the video gap is regarded as an invalid gap and deleted from the database, and if necessary, error information may be output, and the error information may be used for alarm or log recording for query. Therefore, repeated endless transmission aiming at the same problem is avoided.
Example 4
In the above, step a9 of the gap statistics flow further includes initializing gap interval processing time corresponding to all video gap information in the video gap database;
the data retransmission flow between steps B4 and B5 further includes step B45,
B45) judging whether the gap interval processing time corresponding to the video gap information is met, if not, turning to the step B5 after waiting to meet the requirement, and if so, directly turning to the step B5;
step B5 of the data resuming process includes:
B5) and B, judging whether no video is recorded completely, if so, setting the processing time of the gap interval corresponding to the video recording gap information, and then turning to the step B1, otherwise, executing the step B6.
In this embodiment, by increasing the condition of the processing time of the gap interval corresponding to each video interval data, a delay mechanism is introduced during the data resuming process, so that if the previous additional recording fails, the processing is delayed for 5min or 10min, for example, and an invalid frequent request is avoided.
The implementation example is as follows:
in one embodiment of the present invention, the substrate is,
a method for continuously transmitting audio and video data comprisesGap statistics flowAnddata continuous transmission process
The above-mentionedGap statistics flowThe method comprises the following steps of,
s101) judging whether the statistical gap time t exists, if so, acquiring the statistical gap time t, otherwise, newly establishing the statistical gap time t, and initializing the statistical gap time t to be the current time c;
s102) judging whether the difference value of the current time c minus the statistical clearance time t is larger than a preset value or not, if not, returning to the step S101, and if so, continuing the step;
s103) updating the current time c to the statistical gap time t;
s104) inquiring all videos stored locally from t to c time
S105) judging whether only one video segment exists and the time of the video segment is the same as the time from t to c, if not, continuing the step, and if so, returning to the step S101;
s106) acquiring the start time st and the end time et of each video segment;
s107) sequencing the video segments from early to late according to the start time st;
s108) counting each video interval information among all video segments according to t, c and each video segment; the video recording gap information comprises a start time gst and an end time get of a gap;
s109) storing all the video interval information into a video interval database;
initializing and setting the gap processing failure times corresponding to all video gap information in a video gap database;
initializing and setting gap interval processing time corresponding to all video gap information in a video gap database;
s110) updating the current time c to the statistical gap time t, and returning to the step S101;
as shown in fig. 3, saidData continuous transmission processComprises the steps of (a) carrying out,
s201) setting the maximum concurrency number of the data continuous transmission process;
setting operation time;
s202) judging whether the operation time is reached, if so, continuing the step;
s203) judging whether the current concurrent data continuous transmission flow does not exceed the maximum concurrent number or not, continuing the step
S204) modifying the flag bit of 'whether the gap is ready for data stream' corresponding to all the video gap information in the video gap database to be ready, and then turning to the step S205;
s205) loading all the video interval information with the flag bit of 'whether the interval is ready for data stream' in the video interval database as ready;
s206) judging whether the gap processing failure times corresponding to the loaded video gap information exceed the preset times, if so, deleting the video gap information from the video gap database, outputting error information, and then turning to the step S207, otherwise, turning to the step S207;
s207) acquiring a video stream of a corresponding time period from the start time gst and the end time get of each piece of video gap information in the video gap database to the front-end equipment;
at this time, the recording gap database deletes the invalid recording gap information at S206, and thus continues to transmit (additionally records) the valid recording gap information.
S208) additionally recording all the video streams and storing the video streams into the video streams;
s209) inquiring all videos from the start time gst to the end time get of each piece of gap information in the video stream;
s210) judging whether the gap interval processing time corresponding to the video gap information is met, if not, turning to the step S211 after waiting until the gap interval processing time is met, and if so, directly turning to the step S211;
s211) judging whether the inquired start time gst to the end time get of the video is not recorded completely, if so, adding 1 to the gap processing failure times corresponding to the video gap information, setting the gap interval processing time corresponding to the video gap information, and then turning to the step S202, otherwise, executing the step S212;
s212) judging whether the inquired video only has one video segment, wherein the time of the video segment is the same as the time from the start time gst to the end time get, if so, deleting the corresponding video gap information stored in the video gap database, returning to the step S202, otherwise, executing S213;
s213) acquiring the start time st and the end time et of each video segment;
s214) sequencing the video segments from early to late according to the start time st;
s215) counting the information of each video interval among all the video segments according to the start time gst, the end time get and each video segment; the video recording gap information comprises a start time gst and an end time get of a gap;
s216) storing all the video interval information to a video interval database;
s217) returns to step S202.
The invention also relates to a continuous transmission device of the audio and video data, which comprises a gap statistic module and a data continuous transmission module;
the above-mentionedGap statistic moduleThe method comprises the following steps:
the time judging unit is used for judging whether the statistical gap time t exists or not, if so, the statistical gap time t is obtained, otherwise, the statistical gap time t is newly established, the statistical gap time t is initialized to the current time c, and then the difference value judging unit is switched to;
the difference value judging unit is used for judging whether the difference value obtained by subtracting the statistical clearance time t from the current time c is larger than a preset value or not, if not, the time judging unit returns, and if yes, the first updating unit is returned;
the first updating unit is used for updating the current time c to the statistical gap time t and then switching to the video recording inquiring unit;
a video inquiry unit for inquiring all the videos stored locally at time t to c and then switching to the complete judgment unit
The complete judgment unit is used for judging whether only one video segment exists and the time of the video segment is the same as the time from t to c, otherwise, the time acquisition unit is switched to, and if so, the time judgment unit is switched back;
the time acquisition unit is used for acquiring the start time st and the end time et of each video segment and then transmitting the video segments to the sequencing unit;
the sorting unit is used for sorting the video segments from early to late according to the start time st and then switching to the statistical gap unit;
the statistical gap unit is used for counting the information of each video gap among all the video segments according to the t, the c and each video segment and then transferring to the gap storage unit; the video recording gap information comprises a start time gst and an end time get of a gap;
the gap storage unit is used for storing all video gap information to a video gap database and then transferring the video gap information to the second updating unit;
and the second updating unit is used for updating the current time c to the statistical gap time t and transferring the current time c back to the time judging unit.
The above-mentionedData continuous transmission moduleThe method comprises the following steps:
the gap loading unit is used for loading all video gap information stored in the video gap database and then transferring the video gap information to the additional recording unit;
the recording supplementing unit is used for acquiring a video stream of a corresponding time period from the front-end equipment according to the start time gst and the end time get of each piece of video gap information in the video gap database, and then transferring the video stream to the recording supplementing query unit;
the system comprises an additional recording query unit, a failure judgment unit and a recording processing unit, wherein the additional recording query unit is used for querying all videos from the start time gst to the end time get of each piece of gap information in a video stream and then transferring to the additional recording failure judgment unit;
the additional recording failure judgment unit is used for judging whether the inquired video from the start time gst to the end time get is not recorded completely, if yes, the interval loading unit is switched to, and if not, the interval loading unit is switched to the additional recording completeness judgment unit;
the complementary recording integrity judging unit is used for judging whether the inquired video only has one video segment, the time of the video segment is the same as the time from the start time gst to the end time get, if so, deleting the corresponding video gap information stored in the video gap database, and turning to the gap loading unit, otherwise, turning to the secondary time obtaining unit;
the secondary time acquisition unit is used for acquiring the start time st and the end time et of each video segment and then switching to the secondary sorting unit;
the secondary sorting unit is used for sorting the video segments from early to late according to the start time st and then switching to the secondary gap statistical unit;
the secondary gap counting unit is used for counting the information of each video gap among all the video segments according to the start time gst, the end time get and each video segment, and then transferring to the secondary gap storage unit; the video recording gap information comprises a start time gst and an end time get of a gap;
and the secondary gap storage unit is used for storing all the video gap information into the video gap database and then transferring the video gap information back to the gap loading unit.
From the above description, the beneficial effects of the present invention are: the video recording section which is possibly interrupted is obtained at any time through the repeatedly executed gap counting module, and the video recording section is stored in the database after gap counting is carried out on the video recording section. And then in the data continuous transmission module, data continuous transmission of corresponding gaps is carried out by reading the gap statistics stored in the database, and a verification flow is further arranged after the data continuous transmission, so that complete failure and partial failure are respectively processed. Therefore, even if the single continuous transmission fails completely or partially, the corresponding continuous transmission can still be restarted by self.
Example 5
In the above, the data retransmission module further includes a trigger determination unit, which specifically includes,
the setting subunit is used for setting the maximum concurrency number of the data continuous transmission module and setting the operation time;
the time judging subunit is used for judging whether the operation time is reached, and if the operation time is reached, the time is transferred to the concurrency judging subunit;
and the concurrency judging subunit is used for judging whether the current concurrent data continuous transmission module does not exceed the maximum concurrency number or not, and then transferring to the gap loading subunit.
Because the data stream acquisition needs to acquire the stream to the front-end equipment, the network and disk bandwidth is relatively consumed, so that a user can set the maximum concurrency number maxCount according to the actual situation, and therefore before starting the data transmission, the maximum concurrency number is judged whether to exceed, if so, the maximum concurrency number is not processed, and the next cycle is waited, so that the resource consumption can be avoided.
In addition, in practical applications, there is a time problem in addition to the maximum concurrency number, and some users expect to start off-line transmission at a specified time. Therefore, the operation time is set as a trigger condition of the continuous transmission process.
Example 6
In the foregoing, the gap storage unit of the gap statistics module is further configured to initialize a flag bit for setting "whether a gap is ready for a data stream" corresponding to all video gap information in the video gap database;
the trigger judging unit of the data continuous transmission module also comprises a preparation marking subunit, which is used for modifying the flag bit of 'whether the gap is ready for the data stream' corresponding to all the video gap information in the video gap database to be prepared and then turning to the time judging unit;
the time judgment unit is specifically used for loading all the video interval information with the flag bit of 'whether the interval is ready for data stream' in the video interval database as ready.
In this embodiment, a flag bit indicating whether a gap is ready for data stream is set for each piece of video gap information, so that in the data resuming process, when time and concurrency conditions are met, the flag bit is modified, and thus, the video gap information meeting ready can be loaded correspondingly and subsequently and correspondingly resumed.
Example 7
In the above, the gap storage unit of the gap statistics module is further configured to initialize and set the number of gap processing failures corresponding to all video gap information in the video gap database;
the gap loading unit of the data continuous transmission module is switched to the additional recording unit through the failure judgment unit, the failure judgment unit is used for judging whether the gap processing failure times corresponding to the loaded video gap information exceed the preset times, if so, the video gap information is deleted from the video gap database, error information is output, and then the data continuous transmission module is switched to the additional recording unit, otherwise, the data continuous transmission module is switched to the additional recording unit;
and the additional recording failure judging unit of the data continuous transmission module is specifically used for judging whether no video is recorded completely, if so, adding 1 to the gap processing failure times corresponding to the video gap information, and then, turning to the gap loading unit, otherwise, turning to the additional recording complete judging unit.
In this embodiment, by increasing the condition of the number of gap processing failures corresponding to each piece of video interval data, when the number of "gap processing failures" exceeds a certain number, for example >10 times, during the data transmission process, the video gap is regarded as an invalid gap and deleted from the database, and if necessary, error information may be output, and the error information may be used for alarm or log recording for query. Therefore, repeated endless transmission aiming at the same problem is avoided.
Example 8
In the foregoing, the gap storage unit of the gap statistics module is further configured to initialize and set gap interval processing time corresponding to all video gap information in the video gap database;
the dubbing failure judgment unit of the data continuous transmission module is switched to a dubbing integrity judgment unit through an interval judgment unit, the interval judgment unit is used for judging whether the processing time of the interval corresponding to the video interval information is met, if not, the dubbing integrity judgment unit is switched to after the processing time is met, and if so, the dubbing integrity judgment unit is directly switched to;
and the supplementary recording integrity judgment unit of the data continuous transmission module is specifically used for judging whether video is not recorded completely, if so, setting the gap interval processing time corresponding to the video gap information, and then transferring to the gap loading unit, otherwise, transferring to the secondary time acquisition unit.
In this embodiment, by increasing the condition of the processing time of the gap interval corresponding to each video interval data, a delay mechanism is introduced during the data resuming process, so that if the previous additional recording fails, the processing is delayed for 5min or 10min, for example, and an invalid frequent request is avoided.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes performed by the present specification and drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (6)

1. A method for continuously transmitting audio and video data is characterized in that: the method comprises a gap statistical process and a data continuous transmission process;
the gap statistics flow includes the steps of,
A1) judging whether the statistical gap time t exists or not, if so, acquiring the statistical gap time t, otherwise, newly establishing the statistical gap time t and initializing the statistical gap time t to the current time c;
A2) judging whether the difference value obtained by subtracting the statistical clearance time t from the current time c is greater than a preset value or not, if not, returning to the step A1, and if so, continuing the step;
A3) acquiring a difference value between the current time c and the statistical gap time t to obtain a time period from t to c;
A4) inquiring all videos stored locally in the time period from t to c;
A5) judging whether only one video segment exists and the time of the video segment is the same as the time period from t to c, otherwise, continuing the step, if so, returning to the step A1;
A6) acquiring the start time st and the end time et of each video segment;
A7) sequencing the video segments from early to late according to the start time st;
A8) counting each video interval information among all video segments according to the counted interval time t, the current time c and each video segment; the video recording gap information comprises a start time gst and an end time get of a gap;
A9) storing all the video gap information into a video gap database, initializing and setting a flag bit of 'whether gaps are ready for data flow' corresponding to all the video gap information in the video gap database, and initializing and setting the number of gap processing failures corresponding to all the video gap information in the video gap database;
A10) updating the current time c to the statistical gap time t, and returning to the step A1;
the data resuming process includes the steps of,
B0) the triggering judgment specifically comprises the steps of,
B01) setting the maximum concurrent number of the data continuous transmission flow;
setting operation time;
B02) judging whether the operation time is reached, if so, continuing the step;
B03) judging whether the current concurrent data continuous transmission flow does not exceed the maximum concurrent number, if so, continuing the step;
B04) modifying the flag bit of 'whether the gap is ready for data stream' corresponding to all the video gap information in the video gap database to be ready, and then turning to the step B1;
B1) loading all the video interval information which is prepared by the flag bit of 'whether the interval is ready for data stream' in the video interval database;
B2) acquiring a video stream of a corresponding time period from front-end equipment according to the start time gst and the end time get of each piece of video gap information in the video gap database;
B3) storing all video streams in a video stream;
B4) inquiring all videos from the start time gst to the end time get of each piece of gap information in the video stream;
B5) judging whether the searched gap information is completely recorded from the start time gst to the end time get, if so, turning to the step B1, otherwise, executing the step B6;
B6) judging whether the inquired video only has one video segment and the time of the video segment is the same as the time from the start time gst to the end time get, if so, deleting the corresponding video gap information stored in the video gap database, returning to the step B1, otherwise, executing B7;
B7) acquiring the start time st and the end time et of each video segment;
B8) sequencing the video segments from early to late according to the start time st;
B9) counting the information of each video interval among all the video segments according to the start time gst, the end time get and each video segment; the video recording gap information comprises a start time gst and an end time get of a gap;
B10) storing all the video interval information to a video interval database;
B11) return to step B1.
2. A method of resuming the audio-visual data according to claim 1, wherein: step a9 of the gap statistical process further includes initializing gap processing failure times corresponding to all video gap information in a video gap database;
the data retransmission flow comprises steps between steps B1 and B2,
B12) judging whether the gap processing failure times corresponding to the loaded video gap information exceed the preset times, if so, deleting the video gap information from the video gap database, outputting error information, and then turning to the step B2, otherwise, turning to the step B2;
step B5 of the data resuming process includes:
B5) and judging whether no video is recorded completely, if so, adding 1 to the gap processing failure times corresponding to the video gap information, and then turning to the step B1, otherwise, executing the step B6.
3. A method of resuming the audio-visual data according to claim 1, wherein: step a9 of the gap statistical process further includes initializing gap interval processing time corresponding to all video gap information in a video gap database;
the data retransmission flow between steps B4 and B5 further includes step B45,
B45) judging whether the gap interval processing time corresponding to the video gap information is met, if not, turning to the step B5 after waiting to meet the requirement, and if so, directly turning to the step B5;
B5) and B, judging whether no video is recorded completely, if so, setting the processing time of the gap interval corresponding to the video recording gap information, and then turning to the step B1, otherwise, executing the step B6.
4. A continuous transmission device of audio and video data is characterized in that: the system comprises a gap statistic module and a data continuous transmission module;
the gap statistic module comprises a module for counting the gaps,
the time judging unit is used for judging whether the statistical gap time t exists or not, if so, the statistical gap time t is obtained, otherwise, the statistical gap time t is newly established and initialized to the current time c, and the flag bits of 'whether the gap is ready for data stream' in the video gap database are loaded as all prepared video gap information;
the difference value judging unit is used for judging whether the difference value obtained by subtracting the statistical clearance time t from the current time c is greater than a preset value or not, if not, the difference value is returned to the time judging unit, and if so, the difference value is returned to the video recording inquiring unit;
the video inquiry unit is used for inquiring all videos in the time period from t to c stored locally;
the complete judgment unit is used for judging whether only one video segment exists and the time of the video segment is the same as the time period from t to c, otherwise, the time acquisition unit is switched to, and if so, the time judgment unit is switched back;
a time acquisition unit for acquiring a start time st and an end time et of each video segment;
the sorting unit is used for sorting the video segments from early to late according to the start time st;
the statistical gap unit is used for counting each video gap information among all the video segments according to the statistical gap time t, the current time c and each video segment; the video recording gap information comprises a start time gst and an end time get of a gap;
the gap storage unit is used for storing all the video gap information into a video gap database and initializing and setting a flag bit of 'whether gaps are ready for data streams' corresponding to all the video gap information in the video gap database;
the second updating unit is used for updating the current time c to the statistical gap time t and transferring the current time c back to the time judging unit;
the data continuous transmission module comprises a data transmission module,
the interval loading unit is used for loading all video interval information stored in the video interval database;
the recording supplementing unit is used for acquiring a video stream of a corresponding time period from the front-end equipment according to the start time gst and the end time get of each piece of video gap information in the video gap database;
the recording supplementing and inquiring unit is used for inquiring all the videos from the start time gst to the end time get of each piece of gap information in the video stream;
the system comprises a supplement and record failure judging unit, a supplement and record complete judging unit and a query unit, wherein the supplement and record failure judging unit is used for judging whether the searched gap information is completely not recorded from the start time gst to the end time get, if yes, the gap information is transferred to the gap loading unit, and if not, the gap information is transferred to the supplement and record complete judging unit;
the complementary recording integrity judging unit is used for judging whether the inquired video only has one video segment, the time of the video segment is the same as the time from the start time gst to the end time get, if so, deleting the corresponding video gap information stored in the video gap database, and turning to the gap loading unit, otherwise, turning to the secondary time obtaining unit;
a secondary time acquisition unit for acquiring a start time st and an end time et of each video segment;
the secondary sorting unit is used for sorting the video segments from early to late according to the start time st;
the secondary gap counting unit is used for counting each video gap information among all the video segments according to the start time gst, the end time get and each video segment; the video recording gap information comprises a start time gst and an end time get of a gap;
the secondary gap storage unit is used for storing all the video gap information into a video gap database and then transferring the video gap information back to the gap loading unit;
the trigger judging unit specifically comprises a trigger judging unit,
the setting subunit is used for setting the maximum concurrency number of the data continuous transmission module and setting the operation time;
the time judging subunit is used for judging whether the operation time is reached, and if the operation time is reached, the time is transferred to the concurrency judging subunit;
the concurrency judging subunit is used for judging whether the current concurrent data continuous transmission module does not exceed the maximum concurrency number or not, and if so, the data continuous transmission module is transferred to the gap loading subunit;
and the preparation marking subunit is used for modifying the flag bit of 'whether the gap is ready for the data stream' corresponding to all the video gap information in the video gap database to be prepared and then turning to the time judging unit.
5. A device for resuming the transmission of audio-visual data according to claim 4, wherein: the gap storage unit of the gap statistical module is also used for initializing and setting the number of gap processing failures corresponding to all video gap information in the video gap database;
the gap loading unit of the data continuous transmission module is switched to the additional recording unit through the failure judgment unit, the failure judgment unit is used for judging whether the gap processing failure times corresponding to the loaded video gap information exceed the preset times, if so, the video gap information is deleted from the video gap database, error information is output, and then the data continuous transmission module is switched to the additional recording unit, otherwise, the data continuous transmission module is switched to the additional recording unit;
and the additional recording failure judging unit of the data continuous transmission module is specifically used for judging whether no video is recorded completely, if so, adding 1 to the gap processing failure times corresponding to the video gap information, and then, turning to the gap loading unit, otherwise, turning to the additional recording complete judging unit.
6. A device for resuming the transmission of audio-visual data according to claim 4, wherein: the gap storage unit of the gap statistical module is also used for initializing and setting gap interval processing time corresponding to all video gap information in a video gap database;
the dubbing failure judgment unit of the data continuous transmission module is switched to a dubbing integrity judgment unit through an interval judgment unit, the interval judgment unit is used for judging whether the processing time of the interval corresponding to the video interval information is met, if not, the dubbing integrity judgment unit is switched to after the processing time is met, and if so, the dubbing integrity judgment unit is directly switched to;
and the supplementary recording integrity judgment unit of the data continuous transmission module is specifically used for judging whether video is not recorded completely, if so, setting the gap interval processing time corresponding to the video gap information, and then transferring to the gap loading unit, otherwise, transferring to the secondary time acquisition unit.
CN201811621119.5A 2018-12-28 2018-12-28 Continuous transmission method and device of audio and video data Active CN109756708B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811621119.5A CN109756708B (en) 2018-12-28 2018-12-28 Continuous transmission method and device of audio and video data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811621119.5A CN109756708B (en) 2018-12-28 2018-12-28 Continuous transmission method and device of audio and video data

Publications (2)

Publication Number Publication Date
CN109756708A CN109756708A (en) 2019-05-14
CN109756708B true CN109756708B (en) 2021-05-14

Family

ID=66404050

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811621119.5A Active CN109756708B (en) 2018-12-28 2018-12-28 Continuous transmission method and device of audio and video data

Country Status (1)

Country Link
CN (1) CN109756708B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112203050B (en) * 2020-09-30 2022-09-06 普联技术有限公司 Method and device for continuously transmitting video

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101202908A (en) * 2007-07-18 2008-06-18 深圳市同洲电子股份有限公司 Method, system for complementing lose data and network system
CN101938527A (en) * 2009-06-29 2011-01-05 佳能株式会社 Communication apparatus and method of controlling the same
CN103634083A (en) * 2013-12-20 2014-03-12 哈尔滨工业大学 Dynamic network coded packet loss retransmission method suitable for sensor network
CN104104480A (en) * 2014-07-31 2014-10-15 北京蓝汛通信技术有限责任公司 Method and device for detecting retransmission packet loss of TCP (transmission control protocol)
CN105187754A (en) * 2015-08-31 2015-12-23 浙江宇视科技有限公司 Cache replenishment method and device
CN107181773A (en) * 2016-03-09 2017-09-19 阿里巴巴集团控股有限公司 Data storage and data managing method, the equipment of distributed memory system
CN107491264A (en) * 2016-06-12 2017-12-19 阿里巴巴集团控股有限公司 Method for writing data and device in a kind of distributed system
CN108023906A (en) * 2016-10-31 2018-05-11 杭州海康威视系统技术有限公司 The breaker point continuous transmission method and device of monitoring video
CN108173707A (en) * 2017-11-29 2018-06-15 北京百悟科技有限公司 The control method and device that media resource uses

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101202908A (en) * 2007-07-18 2008-06-18 深圳市同洲电子股份有限公司 Method, system for complementing lose data and network system
CN101938527A (en) * 2009-06-29 2011-01-05 佳能株式会社 Communication apparatus and method of controlling the same
CN103634083A (en) * 2013-12-20 2014-03-12 哈尔滨工业大学 Dynamic network coded packet loss retransmission method suitable for sensor network
CN104104480A (en) * 2014-07-31 2014-10-15 北京蓝汛通信技术有限责任公司 Method and device for detecting retransmission packet loss of TCP (transmission control protocol)
CN105187754A (en) * 2015-08-31 2015-12-23 浙江宇视科技有限公司 Cache replenishment method and device
CN107181773A (en) * 2016-03-09 2017-09-19 阿里巴巴集团控股有限公司 Data storage and data managing method, the equipment of distributed memory system
CN107491264A (en) * 2016-06-12 2017-12-19 阿里巴巴集团控股有限公司 Method for writing data and device in a kind of distributed system
CN108023906A (en) * 2016-10-31 2018-05-11 杭州海康威视系统技术有限公司 The breaker point continuous transmission method and device of monitoring video
CN108173707A (en) * 2017-11-29 2018-06-15 北京百悟科技有限公司 The control method and device that media resource uses

Also Published As

Publication number Publication date
CN109756708A (en) 2019-05-14

Similar Documents

Publication Publication Date Title
US7827299B2 (en) Transitioning between historical and real time data streams in the processing of data change messages
US6256634B1 (en) Method and system for purging tombstones for deleted data items in a replicated database
US11032584B2 (en) Picture storage method, apparatus and video monitoring system
US8751444B2 (en) Synchronization of database changes among multiple devices
AU2005203359B2 (en) Communication system
US20020059279A1 (en) Apparatus and method for database synchronization in a duplex system
CN108197270B (en) Distributed file system data recovery method
RU2545999C2 (en) Method, apparatus and mobile broadcast business management system for transmitting information in data form
CN107231435B (en) Data synchronization monitoring method and system
CN112367149B (en) Message acquisition method, device, equipment and storage medium
US20160321443A1 (en) Authentication system, synchronization method, and authentication apparatus
CN113656511B (en) Heterogeneous database increment synchronization method and system based on source database non-outage
WO2019024910A1 (en) Storage resource recovery method, apparatus and system
CN107517110A (en) Veneer configuration self-recovery method and device in a kind of distributed system
CN110633168A (en) Data backup method and system for distributed storage system
CN113542402A (en) File transmission method, device, system, electronic equipment and storage medium
US8244670B2 (en) System and method for reliable symmetric data synchronization
CN109756708B (en) Continuous transmission method and device of audio and video data
US7461372B2 (en) System for optimizing distribution of information employing a universal dictionary
CN103034632A (en) Information transmitting method and a system
CN109189813B (en) Data sharing method and device
CN101442458B (en) System and method for sending sequence type data
CN114500128B (en) Flow control charging method, device, system, electronic equipment, medium and product
US20060117076A1 (en) Method for replication tracing
EP1484859B1 (en) Control method with opaque user identifier administration for complete delivering of a multi-server service

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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20230320

Address after: 518000 Yingfei Haocheng Science Park, Guansheng 5th Road, Luhu Community, Guanhu Street, Longhua District, Shenzhen, Guangdong 1515

Patentee after: Shenzhen Infineon Information Co.,Ltd.

Address before: 518000 Room 301, Infineon Technology Co., Ltd., No. 12, Guanbao Road, Luhu community, Guanhu street, Longhua District, Shenzhen City, Guangdong Province

Patentee before: SHENZHEN INFINOVA INTELLIGENT TECHNOLOGY Co.,Ltd.