CN115665369B - Video processing method, device, electronic equipment and storage medium - Google Patents

Video processing method, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115665369B
CN115665369B CN202211107308.7A CN202211107308A CN115665369B CN 115665369 B CN115665369 B CN 115665369B CN 202211107308 A CN202211107308 A CN 202211107308A CN 115665369 B CN115665369 B CN 115665369B
Authority
CN
China
Prior art keywords
task
target
time
initial
video stream
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
CN202211107308.7A
Other languages
Chinese (zh)
Other versions
CN115665369A (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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and 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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202211107308.7A priority Critical patent/CN115665369B/en
Priority to CN202311117329.1A priority patent/CN117041497A/en
Publication of CN115665369A publication Critical patent/CN115665369A/en
Application granted granted Critical
Publication of CN115665369B publication Critical patent/CN115665369B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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
    • H04N7/181Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast for receiving images from a plurality of remote sources
    • GPHYSICS
    • G08SIGNALLING
    • G08BSIGNALLING OR CALLING SYSTEMS; ORDER TELEGRAPHS; ALARM SYSTEMS
    • G08B25/00Alarm systems in which the location of the alarm condition is signalled to a central station, e.g. fire or police telegraphic systems
    • G08B25/01Alarm systems in which the location of the alarm condition is signalled to a central station, e.g. fire or police telegraphic systems characterised by the transmission medium
    • G08B25/08Alarm systems in which the location of the alarm condition is signalled to a central station, e.g. fire or police telegraphic systems characterised by the transmission medium using communication transmission lines
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Business, Economics & Management (AREA)
  • Emergency Management (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The disclosure provides a video processing method, relates to the technical field of artificial intelligence, and particularly relates to the technical field of computer vision and the technical field of multitasking. The specific implementation scheme is as follows: generating an initial task according to the event data; determining at least one duration to be executed according to the initial time and at least one target historical time; updating a target task set by using the initial task according to at least one time length to be executed and a first preset time length to obtain an updated task set, wherein the updated task set comprises a first updated task corresponding to the initial time; and obtaining video stream data from the video stream address of the first updating task to obtain a target video corresponding to the first updating task, wherein the duration of the target video corresponding to the first updating task after the initial time is greater than or equal to a first preset duration. The disclosure also provides a video processing device, an electronic device and a storage medium.

Description

Video processing method, device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of artificial intelligence, and in particular, to the field of computer vision and multitasking. More particularly, the present disclosure provides a video processing method, apparatus, electronic device, and storage medium.
Background
With the development of artificial intelligence technology, data may be collected using various sensors deployed in a related scene in order to detect whether a preset event has occurred to an object in the scene. Upon detecting that an object in a scene has occurred a preset event, an image or recorded video may be acquired using an image acquisition device disposed in proximity to the object.
Disclosure of Invention
The present disclosure provides a video processing method, apparatus, device, and storage medium.
According to an aspect of the present disclosure, there is provided a video processing method, the method including: generating an initial task according to the event data; determining at least one time length to be executed according to an initial time and at least one target historical time, wherein the initial time is determined according to the time of generating an initial task, and the target historical time is determined according to the time of generating a target task in a target task set; updating a target task set by using the initial task according to at least one time length to be executed and a first preset time length to obtain an updated task set, wherein the updated task set comprises a first updated task corresponding to the initial time; and obtaining video stream data from the video stream address of the first updating task to obtain a target video corresponding to the first updating task, wherein the duration of the target video corresponding to the first updating task after the initial time is greater than or equal to a first preset duration.
According to another aspect of the present disclosure, there is provided a video processing apparatus including: the generating module is used for generating an initial task according to the event data; the determining module is used for determining at least one duration to be executed according to an initial time and at least one target historical time, wherein the initial time is determined according to the time for generating the initial task, and the target historical time is determined according to the time for generating the target task in the target task set; the updating module is used for updating the target task set by utilizing the initial task according to at least one time length to be executed and a first preset time length to obtain an updated task set, wherein the updated task set comprises a first updated task corresponding to the initial time; and the obtaining module is used for obtaining video stream data from the video stream address of the first updating task to obtain a target video corresponding to the first updating task, wherein the duration of the target video corresponding to the first updating task after the initial time is greater than or equal to a first preset duration.
According to another aspect of the present disclosure, there is provided an electronic device including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform a method provided in accordance with the present disclosure.
According to another aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform a method provided according to the present disclosure.
According to another aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements a method provided according to the present disclosure.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
The drawings are for a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 is a schematic diagram of an exemplary system architecture to which video processing methods and apparatus may be applied, according to one embodiment of the present disclosure;
FIG. 2 is a flow chart of a video processing method according to one embodiment of the present disclosure;
FIG. 3 is a flow chart of a video processing method according to another embodiment of the present disclosure;
FIG. 4 is a task sequence diagram according to another embodiment of the present disclosure;
fig. 5 is a block diagram of a video processing apparatus according to one embodiment of the present disclosure; and
Fig. 6 is a block diagram of an electronic device to which a video processing method may be applied according to one embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
In related application scenarios (e.g., factory floor of manufacturing), various sensors may be deployed. The various sensors may include, for example, cameras, temperature sensors, smoke sensors, and the like. These sensors can collect data. After analysis of the collected data, the relevant alarm (pre-alarm) product may send an alarm signal. The software programs or hardware devices of these products may be updated to enhance the product experience.
For example, after a lot of changes are made to the alarm product, a video analysis module may be added to the alarm product, and the video analysis module and the alarm product are implemented as a fusion product. However, modification of the alarm product can result in product upgrade costs that are difficult to control. In addition, in order to add the same video analysis module, different alarm products can be changed in different modes, so that the deployment cost of the video analysis module is high. In addition, the data processing process between the video analysis module and the original alarm product is mutually independent, and the newly added video analysis module cannot fully utilize the alarm signal.
Fig. 1 is a schematic diagram of an exemplary system architecture to which video generation methods and apparatus may be applied, according to one embodiment of the present disclosure.
It should be noted that fig. 1 is only an example of a system architecture to which embodiments of the present disclosure may be applied to assist those skilled in the art in understanding the technical content of the present disclosure, but does not mean that embodiments of the present disclosure may not be used in other devices, systems, environments, or scenarios.
As shown in fig. 1, the system architecture 100 according to this embodiment may include an alerting device 110, a video processing device 120, and a server 130. The alerting device 110 may obtain raw data from the detector or processed data from the detector and generate raw data related to the alert signal based on these outputs. The video processing device 120 may obtain raw data from the alert device 110, process the raw data, and generate a target video. The server 130 may obtain raw data from the alerting device 110 or may obtain a target video from the video processing device 120.
In embodiments of the present disclosure, the alerting device 110 may acquire data from a plurality of detectors. For example, the plurality of detectors may include the temperature sensor, smoke sensor, camera, and the like described above. For another example, the alarm device 110 may acquire data detected by the detector, or may acquire data processed by the detector. In one example, the alerting device 110 may acquire temperature data detected by a temperature sensor. In one example, the temperature sensor may determine whether the detected temperature value is greater than a preset temperature threshold, and may provide processed temperature data to the alert device 110.
In an embodiment of the present disclosure, the video processing apparatus 120 may include a data acquisition module 121, a buffer module 122, a task generation module 123, a video generation module 124, and a storage module 125. For example, the data acquisition module 121 may acquire raw data from the alerting device 110, and may convert the raw event data into a target data format. For another example, the caching module 122 may obtain event data. The event data may include a plurality of event sub-data, each of which may correspond to an alarm signal, and the buffer module 122 may implement the plurality of event sub-data as a data queue. For another example, the task generating module 123 may obtain event sub-data from the buffering module 122, and determine whether to generate the video recording task according to a preset rule. The video recording task may instruct the correlation module to obtain video stream data from one or more video stream addresses to obtain the target video. For another example, the video generation module 124 may obtain video stream data from a video stream address. The video stream address may correspond to a camera. The camera may be deployed at the time of constructing the warning device 110 or may be deployed at the time of constructing the video processing device 120. Upon receiving the video recording task, video generation module 124 may obtain video stream data from the video stream address of the video recording task to generate a target video and send the target video to caching module 122 and/or storage module 125. For another example, the storage module 125 may store the target video. By the embodiment of the disclosure, the buffer module is arranged, so that the change of the alarm device 110 is reduced, and the cost required by product upgrading is reduced.
It is understood that the video stream address may be an address based on the real-time video stream protocol (Real Time Streaming Protocol, RTSP).
In the disclosed embodiment, the video generation module 124 may include a video acquisition unit, a video analysis unit, an image rendering unit, and a video synthesis unit. For example, depending on the video recording task, the video acquisition unit may acquire video stream data for a relevant period from the video stream address and extract a plurality of video frame data from the video stream data. The video analysis unit may process the video frame data using various deep learning models to obtain an analysis result. The various deep learning models may include, for example, an object detection model, and the analysis results may include, for example, a detection box for an object in a video frame. The image rendering unit may render the analysis result onto the video frame, resulting in a rendered video frame. The video compositing unit may composite the target video from one or more rendered video frames. Through the embodiment of the disclosure, the performance of the alarm device 110 can be improved and the user experience can be improved by using the camera and the deep learning model. In addition, the video of the time period related to the alarm signal can be automatically recorded, so that the labor cost is reduced.
The alarm device 110, the video processing device 120, and the server 130 may be connected via a network. The network is used as a medium to provide a communication link between the alerting device 110, the video processing device 120, and the server 130. The network 104 may include various connection types, such as wired and/or wireless communication links, and the like.
The server 130 may be a server providing various services.
It should be noted that, the video processing method provided by the embodiments of the present disclosure may be generally implemented by a video processing apparatus.
Fig. 2 is a flow chart of a video processing method according to one embodiment of the present disclosure.
As shown in fig. 2, the method 200 may include operations S210 to S240.
In operation S210, an initial task is generated according to event data.
For example, the raw data may be obtained from the alert device 110 described above and then processed to obtain event data.
For another example, the event data may include a plurality of event sub-data. The event sub-data may correspond to an alert signal. In one example, an initial task may be generated if one of the event sub-data in the event data indicates that a temperature of a pre-set object (e.g., a production machine) exceeds a pre-set temperature threshold.
In operation S220, at least one duration to be executed is determined according to the initial time and at least one target history time.
In the disclosed embodiment, the initial time is determined based on the time at which the initial task was generated. For example, the initial Task task_ini is generated at the time t_ini, and the time t_ini may be used as the initial time.
In the disclosed embodiment, the target historical time is determined from the time of generating the target task in the target task set. For example, at least one target task may be included in the set of target tasks. For another example, at the time t_past1, the target Task task_past1 is generated, and the time t_past1 may be set as the target history time of the target Task task_past1.
In one example, the time t_ini may be 3 rd seconds, the time t_past1 may be 1 st second, and the duration dur_ini1 to be performed between the initial Task task_ini and the target Task task_past1 may be 2 seconds.
In an embodiment of the present disclosure, a comparison relationship between at least one time period to be executed and a first preset time period may be determined. For example, the comparison relationship may include that the duration to be performed is less than or equal to a first preset duration. For another example, the comparison relationship may further include that the duration to be executed is greater than or equal to a first preset duration.
In operation S230, the target task set is updated with the initial task according to the at least one to-be-executed time length and the first preset time length, and an updated task set is obtained.
In the embodiment of the disclosure, a manner of updating the target task set may be determined according to a comparison relationship between the duration to be executed and the first preset duration.
In an embodiment of the present disclosure, the update task set includes a first update task corresponding to an initial time.
In the disclosed embodiments, the target task set may be updated in various ways.
For example, when the duration to be executed is less than the first preset duration, a corresponding relationship between the target Task task_past1 and the time before the initial time t_ini may be established, so as to update the target Task task_past1 by using the initial Task task_ini, and obtain the first update Task. For example, after the first update task is performed, the start time of the generated target video may be the target history time t_past1.
In operation S240, video stream data is acquired from the video stream address of the first update task, and a target video corresponding to the first update task is obtained.
In the embodiment of the disclosure, a duration of the target video corresponding to the first update task after the initial time is greater than or equal to a first preset duration.
For example, the target video v_1 may be obtained from video stream data obtained from the video stream address according to the first update task. In one example, the duration of the target video v_1 may be 10 seconds, and the start time of the target video v_1 may be the target history time t_past1 (1 st second). The duration (7 seconds) after the initial time t_ini (3 rd seconds) is greater than the first preset duration (5 seconds).
According to the embodiment of the disclosure, the data of the original alarm analysis platform is fully utilized, the data linkage is realized, the data value is mined, and the video corresponding to each moment is ensured to contain enough effective duration.
The target task set will be described in detail below in connection with related embodiments.
In some embodiments, the set of target tasks may include a first subset of target tasks. The at least one target history time comprises a first target history time.
In the embodiment of the disclosure, the first target task subset includes N first target tasks, the first target tasks are executing target tasks, and the first target history time is determined according to the time when the first target tasks are generated. N is an integer greater than or equal to 1. For example, the target Task task_past1 may be a target Task being executed, and may be a first target Task.
In some embodiments, the set of target tasks may include a second subset of target tasks. The at least one target history time comprises a second target history time.
In the embodiment of the disclosure, the second target task subset includes M second target tasks, the second target tasks are target tasks to be executed, and the second target history time is determined according to the time when the second target tasks are generated. M is an integer greater than or equal to 1. For example, the target Task task_past2 may be a target Task to be executed, and may be a second target Task.
Some implementations of obtaining an updated task set are described in detail below in connection with related embodiments.
Fig. 3 is a flowchart of a video generation method according to another embodiment of the present disclosure.
As shown in fig. 3, the method 300 may generate an initial task from event data, which will be described in detail below in connection with operation S310.
In operation S310, an initial task is generated according to event data.
In the embodiment of the disclosure, it may be determined whether the event data indicates that a preset event has occurred at an initial time for one preset object. For example, an initial task may be generated in response to determining that one of the event sub-data in the event data indicates that one of the preset objects has a preset event at an initial time. For another example, in response to determining that one of the event sub-data indicates that a preset event has not occurred at an initial time, determining whether the next event sub-data indicates that a preset event has occurred at the initial time, taking the time of the next event sub-data as the initial time.
For example, at time T1, task task_1 is generated. At time T2, task task_2 is generated. At time T7, task task_7 is generated. At time T8, task task_8 is generated. At time T12, task task_12 is generated. At time T13, task task_13 is generated. For another example, the video stream addresses of Task task_1, task task_8, task task_12, and Task task_13 may be video stream address R1. The video stream address of Task task_7 may be video stream address R3. In one example, time T1 may be 1 st second, time T5 may be 5 th second, time T7 may be 7 th second, time T8 may be 8 th second, time T12 may be 12 th second, and time T13 may be 13 th second. It will be appreciated that, for example, at time T4, no task is generated.
Next, at least one time length to be executed may be determined according to the initial time and the at least one target historical time, and a comparison relationship between the time length to be executed and the first preset time length may be determined so as to perform a subsequent operation. The following will describe in detail the operations S321 to S325.
In operation S321, it is determined whether or not the first target task exists.
In the disclosed embodiment, in response to determining that the first target task does not exist, operation S331 may be performed. In operation S331, an initial task is added to the first target task subset. For example, at time T1, task task_1 is generated. Task task_1 may be referred to as an initial Task. If there is no target Task being executed, task task_1 may be added as a first target Task to the first target Task subset to execute Task task_1.
In the disclosed embodiment, in response to determining that the first target task exists, operation S322 may be performed. For example, as described above, the first target task may be a target task being executed. At time T2 to time T13, task task_2, task task_7, task task_8, task task_12, and Task task_13 are generated, respectively. At a time subsequent to time T1, it may be determined that a first target task is present for the other initial tasks. In one example, task task_2 may be considered as an initial Task. At this time, there is a Task task_1 being executed. For Task task_2, operation S322 may be performed.
In operation S322, it is determined whether the video stream address information of the initial task is identical to the video stream address information of the first target task.
In the embodiment of the present disclosure, the first target tasks may be N. It may be determined whether the video stream address of the initial task is consistent with the video stream address of one of the N first target tasks. For example, as described above, the video stream address may be an address based on a real-time video stream protocol.
In an embodiment of the disclosure, in response to determining that the video stream address information of the initial task is consistent with the video stream address information of the nth first target task, a first duration to be executed between the nth first target historical time and the initial time may be determined. Next, operation S323 is performed. For example, N is an integer greater than or equal to 1 and less than or equal to N. For example, the video stream addresses of Task task_1 and Task task_2 are each video stream address R1. It may be determined that the video stream addresses of both are consistent. For Task task_2, in the first target Task subset, task task_1 is present as the 1 st first target Task. The first duration to be executed between time T1 and time T2 may be determined to be 1 second. Next, operation S323 may be performed on the Task task_2.
In the embodiment of the present disclosure, in response to determining that the video path address information of the initial task is inconsistent with the video stream address information of the N first target tasks, operation S324 may be performed. For example, at time T7, task task_7 is generated, and Task task_7 may be taken as an initial Task. The video stream address R3 of the Task task_7 is inconsistent with the video stream addresses R1 of the Task task_1 and Task task_2, and operation S324 may be performed on the Task task_7.
In operation S323, it is determined whether the first duration to be executed is less than a first preset duration.
In the embodiment of the present disclosure, in response to determining that the first duration to be executed is less than the first preset duration, operation S332 may be executed. In operation S332, the nth first target task is updated with the initial task. For example, the first preset duration may be 5 seconds. For another example, for Task task_2, the first duration to be executed may be 1 second. And establishing a corresponding relation between the time T2 and the Task task_1 so as to update the Task task_1 being executed by using the Task task_2 to obtain a Task' _12. Task' _12 may be a first update Task. The Task task_12 is obtained by updating the task_1, and the Task task_12 also corresponds to the time T1. Further, the first update Task' _12 may be a Task being executed and may be a first target Task in the first target Task subset. The target historical time of Task' _12 may be time T1. According to the embodiment of the disclosure, according to the comparison relation between the first duration to be executed and the first preset duration, the generated task and the task being executed can be combined or used as the task to be executed, so that the resource consumption is reduced. In addition, for at least one time corresponding to a task, after each time, the video still has a certain duration, such that each task corresponds to a video clip having a certain effective duration.
In the disclosed embodiment, in response to determining that the first time length to be executed is greater than or equal to the first preset time length, operation S324 may be executed. For example, for Task task_8, in the first target Task subset, there is Task task_12, which is the 1 st first target Task. The first duration to be executed between time T1 and time T8 may be determined to be 7 seconds. Next, operation S324 may be performed on the Task task_8.
In the disclosed embodiments, after one target task is completed, a target task from the second target task subset may be executed. For example, after time T11, task task_7 from the second subset of target tasks may be executed. It will be appreciated that for Task task_12 and Task task_13, the first target Task is Task task_7. The video stream addresses R1 of the Task task_12 and the Task task_13 are not identical to the video stream address R3 of the Task task_7, and the operation S324 may be performed on the Task task_12 and the Task task_13.
In operation S324, it is determined whether the video stream address information of the initial task is identical to the video stream address information of the second target task. For example, as described above, operation S324 may be performed on Task task_7. It will be appreciated that for Task task_7, the second target Task subset is an empty set, in which case Task task_7 may be added to the second target Task subset.
In the embodiment of the disclosure, the second target tasks may be M. It may be determined whether the video stream address of the initial task corresponds to the video stream address of one of the M second target tasks.
In the embodiment of the present disclosure, in response to determining that the video stream address information of the initial task is inconsistent with the video stream address information of the second target task, operation S334 may be performed. In operation S334, the initial task is added to the second target task subset. For example, as described above, operation S324 may be performed on Task task_8. It will be appreciated that for Task task_8, there is Task task_7 as the second target Task. The video stream address R1 of Task task_8 does not coincide with the video stream address R3 of Task task_7, task task_8 may be added to the second target Task subset.
In the embodiment of the disclosure, in response to determining that the video stream address information of the initial task is consistent with the video stream address information of the mth second target task, a second duration to be executed between the mth second target historical time and the initial time may be determined. Next, operation S325 may be performed. For example, M is an integer greater than or equal to 1 and less than or equal to M. For example, for Task task_12, there is Task task_8, which is the 1 st second target Task. The video stream address R1 of the Task task_12 coincides with the video stream address of the Task task_8, and operation S325 may be performed on the Task task_12.
In operation S325, it is determined whether the second waiting time is less than the first preset duration.
In the presently disclosed embodiment, in response to determining that the second time to be executed is less than the first preset duration, operation S333 is executed. In operation S333, the mth second target task is updated with the initial task. For example, for Task task_12, the second duration to be executed may be 4 seconds. The corresponding relation between the time T12 and the Task task_8 is established so as to update the Task task_8 being executed by using the Task task_12 to obtain a Task' _812. Task' _812 can be a first update Task. While Task '_812 is obtained by updating Task task_8, task' _12 also corresponds to time T8. Further, task' _812 may be a Task to be performed, and may be the 1 st second target Task in the second target Task subset. The target historical time of Task' _812 may be time T8.
In the embodiment of the present disclosure, in response to determining that the second time to be executed is greater than or equal to the first preset duration, operation S334 is performed. In operation S334, the initial task is added to the second target task subset. For example, for Task task_13, at time T13, there is Task task_7 being executed, and there is Task' _812 to be executed. As described above, the video stream address of Task task_13 is inconsistent with the video stream address of Task task_7, and the video stream address of Task task_13 is consistent with the video stream address of task_812. After the operations S321, S322, and S324 are performed on the Task task_13, it may be determined that the time period to be performed between the time T13 and the time T8, which is the 1 st second target time, is 5 seconds. The operation S325 is performed on the Task task_13, it may be determined that the second time to be performed is equal to the first preset duration, the operation S334 may be performed on the Task task_13, and the Task task_13 may be added to the second target Task subset as the 2 nd second target Task. According to the embodiment of the disclosure, according to the comparison relation between the second time length to be executed and the first preset time length, the generated task and the task to be executed can be combined or used as other tasks to be executed, so that resource consumption is reduced. In addition, for at least one time corresponding to a task, after each time, the video still has a certain duration, such that each task corresponds to a video clip having a certain effective duration.
In operation S340, video stream data is acquired from the video stream address of the first update task, and the target video corresponding to the first update task is obtained.
For example, for Task ' _12, video stream data may be obtained from Video stream address R1, resulting in target Video ' _12 corresponding to Task ' _12. The target Video' _12 corresponds to the time T1 and the time T2. The duration of the target Video '_12 may be 10 seconds, and the duration of the target Video' _12 after the time T2 is 9 seconds, which is greater than the first preset duration (5 seconds).
For another example, for Task task_7, after execution of Task task_12 is completed, video stream data may be obtained from Video stream address R3, resulting in target video_7 corresponding to Task task_7. The target Video video_7 corresponds to the time T7.
For another example, for Task ' _812, after execution of Task task_7 is completed, video stream data may be obtained from Video stream address R1, resulting in target Video ' _812 corresponding to Task ' _812. The duration of the target Video '_812 may be 10 seconds, and the duration of the target Video' _812 after the time T12 is 6 seconds, which is greater than the first preset duration (5 seconds).
For another example, for Task task_13, after execution of Task task_812 is completed, video stream data may be obtained from Video stream address R1, resulting in target video_13 corresponding to Task task_13. The target Video video_13 corresponds to the time T13.
By the embodiment of the disclosure, the total amount of tasks to be executed can be reduced, so that the resource overhead is effectively reduced. Each task can also correspond to a video of a certain effective duration.
It will be appreciated that the method of the present disclosure is described in detail above in connection with fig. 3, and that the method of the present disclosure will be described in further detail below in connection with fig. 4.
Fig. 4 is a task sequence diagram according to one embodiment of the present disclosure.
As shown in fig. 4, at time T1, in response to determining that one of the event sub-data in the event data indicates that one of the preset objects has a preset event at time T1, task task_1 may be generated. Task task_1 may be the 1 st initial Task, and time t1 may be the 1 st initial time. If it is determined that there is no Task being executed, task task_1 may be added to the first target Task subset as the first target Task. In addition, the related hardware resource may be called to execute Task task_1, and from time T1, video stream data with a duration of 10 seconds is obtained from video stream address R1 of Task task_1. The target historical time of Task task_1 may be time T1.
As shown in fig. 4, at time T2, in response to determining that one of the event sub-data in the event data indicates that one of the preset objects has a preset event at time T2, task task_2 may be generated. Task task_2 may be the 2 nd initial Task, and time T2 may be the 2 nd initial time. As described above, at time T2, task task_1 is executing. The video stream address of Task task_2 may also be video stream address R1, which corresponds to the video stream address of Task task_1. In the case where it is determined that the video stream addresses of the Task task_2 and the Task task_1 agree, it may be determined that the first duration to be executed between the time T2 and the time T1 is 1 second. Under the condition that the first preset duration is 5 seconds, it may be determined that the first duration to be executed of the Task task_2 is smaller than the first preset duration. The corresponding relationship between the time T2 and the Task task_1 may be established, so that the Task task_1 being executed is updated by using the Task task_2, and the Task task_12 is obtained. Task' _12 may be a first update Task. The video stream address R1 may be the video stream address of the Task' _12. Task task_12 is obtained by updating task_1, and task_12 also corresponds to time T1. Further, as described above, from the time T1, the Task task_1 is the Task being executed. The identification of the executing Task may be updated to Task' _12, continuing to execute the executing Task.
As shown in fig. 4, at time T3, in response to determining that one of the event sub-data in the event data indicates that one of the preset objects has a preset event at time T3, task task_3 may be generated. Task task_3 may be the 3 rd initial Task and time T3 may be the 3 rd initial time. As described above, task' _12 is executing. The video stream address of Task task_3 may also be video stream address R1, consistent with the video stream address of Task' _12. In the case where it is determined that the video stream addresses of the Task task_3 and the Task task_12 agree, the first duration to be executed between the time T3 and the time T1 may be determined to be 2 seconds. Under the condition that the first preset duration is 5 seconds, it may be determined that the first duration to be executed of the Task task_3 is smaller than the first preset duration. The correspondence between the time T3 and the Task ' _12 may be established so as to update the Task ' _12 being executed with the Task task_3, resulting in the Task ' _123. Task' _123 may be a first update Task. Task ' _123 is obtained by updating Task ' _12, and Task ' _123 also corresponds to time T1 and time T2. The video stream address R1 may be the video stream address of the Task' _123. Further, as described above, from the time T1, the Task task_1 is the Task being executed. At time T2, the identity of the executing Task is updated to Task' _12. At time T3, the identification of the executing Task may be updated to Task' _123, continuing to execute the executing Task.
At time T4, no task is generated from the event data.
As shown in fig. 4, at time T5, in response to determining that one of the event sub-data in the event data indicates that one of the preset objects has a preset event at time T5, task task_5 may be generated. Task task_5 may be the 4 th initial Task, and time T5 may be the 4 th initial time. It may be determined that Task' _123 is executing. The video stream address of Task task_5 may also be video stream address R1, consistent with the video stream address of Task' _123. In the case where it is determined that the video stream addresses of the Task task_5 and the Task task_123 agree, the first duration to be executed between the time T5 and the time T1 may be determined to be 4 seconds. Under the condition that the first preset duration is 5 seconds, it may be determined that the first duration to be executed of the Task task_5 is smaller than the first preset duration. The corresponding relation between the time T5 and the Task ' _123 is established so as to update the Task ' _123 being executed by using the Task task_5, and obtain a Task ' _1235. Task' _1235 can be a first update Task. The video stream address R1 may be the video stream address of Task' _1235. Task ' _1235 is obtained by updating Task ' _123, and Task ' _1235 may correspond to time T1, time T2, and time T3. Further, as described above, from the time T1, the Task task_1 is the Task being executed. At time T2, the identity of the executing Task is updated to Task' _12. At time T3, the identification of the executing Task is updated to Task' 123. At time T5, the identification of the executing Task may be updated to Task' _1235, continuing to execute the executing Task.
At time T6, no task is generated from the event data.
At time T7, in response to determining that one event sub-data in the event data indicates that another preset object has a preset event at time T7, task task_7 may be generated. Task task_7 may be the 5 th initial Task and time T7 may be the 5 th initial time. Task' _1235 may be determined to be executing. For Task 7, there is no Task to be executed. The video stream address of Task task_7 may be video stream address R3, which is inconsistent with the video stream address of Task' _1235. In this case, task task_7 may be added as a Task to be executed to the second target Task subset. Time T7 may be the second target historical time of Task task_7.
As shown in fig. 4, at time T8, in response to determining that one of the event sub-data in the event data indicates that one of the preset objects has a preset event at time T8, task task_8 may be generated. Task task_8 may be the 6 th initial Task and time T8 may be the 6 th initial time. Task' _1235 may be determined to be executing. The video stream address of Task task_8 may also be video stream address R1, consistent with the video stream address of Task' _1235. In the case where it is determined that the video stream addresses of the Task task_8 and the Task task_1235 agree, the first duration to be executed between the time T8 and the time T1 may be determined to be 7 seconds. Under the condition that the first preset duration is 5 seconds, it can be determined that the first time to be executed of the Task task_8 is longer than the first preset duration. For Task task_8, there is Task task_7 to be executed. The video stream address of the Task task_8 is inconsistent with the video stream address of the Task task_7, and the Task task_8 can be used as another first update Task and added to the second target Task subset. Time T8 may be the second target historical time of Task task_8.
At time T9, no task is generated from the event data.
As shown in fig. 4, at time T10, in response to determining that one event sub-data in the event data indicates that other preset objects have a preset event at time T10, task task_10 may be generated. Task task_10 may be the 7 th initial Task and time T10 may be the 7 th initial time. Task' _1235 may be determined to be executing. The video stream address of Task task_10 may be video stream address R2, which is inconsistent with the video stream address of Task' _1235, and which is inconsistent with the video stream address of Task task_7 or Task task_8. Task task_10 may be added as another first update Task to the second subset of target tasks.
At time T11, no task is generated from the event data. Further, at time T11, task '_1235 is completed, and target Video' _1235 is obtained. The target Video' _1235 duration may be 10 seconds. In the target video_1235, the duration after the time T2 may be 9 seconds, the duration after the time T3 may be 8 seconds, the duration after the time T5 is 6 seconds, which are all greater than the first preset duration. At time T11, task task_7 may be executed using the relevant hardware resources, and video stream data having a duration of 10 seconds may be acquired from video stream address R3 of Task task_7.
As shown in fig. 4, at time T12, in response to determining that one of the event sub-data in the event data indicates that one of the preset objects has a preset event at time T12, task task_12 may be generated. Task task_12 may be referred to as the 8 th initial Task, and time T12 may be referred to as the 8 th initial time. It may be determined that Task 7 is executing. The video stream address of Task task_12 may be video stream address R1, which is inconsistent with the video stream addresses of Task task_7 and Task task_10, and consistent with the video stream address of Task task_8. In the case where it is determined that the video stream addresses of the Task task_12 and the Task task_8 are identical, it may be determined that the second to-be-executed duration between the time T12 and the time T8 is 4 seconds. Under the condition that the first preset duration is 5 seconds, it can be determined that the second duration to be executed of the Task task_12 is smaller than the first preset duration. A correspondence between the time T12 and the Task task_8 may be established, so that the Task task_8 is updated with the Task task_12, to obtain the Task' _812. Task' _812 can be a first update Task. The Task '_812 is obtained by updating the Task task_8, and the Task' _812 also corresponds to the time T8. The video stream address R1 may be the video stream address of Task' _812. In addition, as described above, task task_8 is used as a Task to be executed, and the identifier of the executed Task may be updated to Task' _812.
As shown in fig. 4, at time T13, in response to determining that one of the event sub-data in the event data indicates that one of the preset objects has a preset event at time T13, task task_13 may be generated. Task task_13 may be referred to as the 9 th initial Task, and time T12 may be referred to as the 9 th initial time. It may be determined that Task 7 is executing. The video stream address of Task task_13 may be a video stream address R1, which is inconsistent with the video stream addresses of Task task_7 and Task task_10, and consistent with the video stream address of Task' _812. In the case where it is determined that the video stream addresses of the Task task_13 and the Task task_812 coincide, it may be determined that the second duration to be executed between the time T13 and the time T8 is 5 seconds. In the case that the first preset duration is 5 seconds, it may be determined that the second duration to be executed of the Task task_12 is equal to the first preset duration. Task 13 may be added as another Task to be performed to the second subset of target tasks.
In some embodiments, taking the time T8 described above as an example, at time T8, the target task set may include a first target task subset and a second target task subset. At this time, the first target Task subset includes Task' _1235 as the first target Task. The second target Task subset includes Task task_7 as a second target Task. As described above, after Task task_8 is added as a first updated Task to the second subset of target tasks. The update task set may include a first target task subset and a second target task subset. The first target Task subset includes Task' _1235 as a first target Task. The second target Task subset includes Task task_7 as a second target Task and Task task_8 as a first update Task. In some embodiments, taking the time T10 described above as an example, at time T10, the target task set may include a first target task subset and a second target task subset. At this time, the first target Task subset includes Task' _1235 as the first target Task. The second target Task subset includes Task task_7 as a second target Task and Task task_8 as a second target Task. As described above, after Task task_10 is added as a first updated Task to the second subset of target tasks. The update task set may include a first target task subset and a second target task subset. The first target Task subset includes Task' _1235 as a first target Task. The second target Task subset includes Task task_7 as a second target Task, task task_8 as a second target Task, and Task task_10 as a first update Task.
In some embodiments, the duration of the target video is a second preset duration, the second preset duration being greater than the first preset duration. For example, the second preset duration may be 10 seconds and the first preset duration may be 5 seconds.
It will be appreciated that the method of the present disclosure is described in detail above with n=1 as an example. In other embodiments, multiple different threads may be utilized to simultaneously perform different first target tasks, in which case N is an integer greater than 1.
It will be appreciated that some tasks may be set manually to join the target task set, and the manually set task may be the second update task.
Fig. 5 is a block diagram of a video processing apparatus according to one embodiment of the present disclosure.
As shown in fig. 5, the apparatus 500 may include a generation module 510, a determination module 520, an update module 530, and an acquisition module 540.
The generating module 510 is configured to generate an initial task according to the event data.
The determining module 520 is configured to determine at least one duration to be executed according to the initial time and at least one target historical time. For example, the initial time is determined based on the time at which the initial task was generated, and the target historical time is determined based on the time at which the target task in the target task set was generated.
The updating module 530 is configured to update the target task set with the initial task according to at least one to-be-executed duration and the first preset duration, and obtain an updated task set. For example, the update task set includes a first update task corresponding to an initial time.
And the obtaining module 540 is configured to obtain video stream data from the video stream address of the first update task, and obtain a target video corresponding to the first update task. For example, a duration of the target video corresponding to the first update task after the initial time is greater than or equal to a first preset duration.
In some embodiments, the set of target tasks includes at least one of a first subset of target tasks and a second subset of target tasks, the at least one target historical moment includes at least one of a first target historical moment and a second target historical moment, the first subset of target tasks includes N first target tasks, the first target tasks are executing target tasks, the first target historical moment is determined according to a moment when the first target tasks are generated, N is an integer greater than or equal to 1, the second subset of target tasks includes M second target tasks, the second target tasks are target tasks to be executed, the second target historical moment is determined according to a moment when the second target tasks are generated, and M is an integer greater than or equal to 1.
In some embodiments, the determining module comprises: the first determining submodule is used for determining a first duration to be executed between the nth first target historical moment and the initial moment in response to the fact that the video stream address information of the initial task is consistent with the video stream address information of the nth first target task, wherein N is an integer which is larger than 1 and smaller than or equal to N.
In some embodiments, the nth first target task corresponds to at least one historical moment including the nth first target historical moment, and the update module includes: and the first updating sub-module is used for updating the nth first target task by using the initial task to obtain a first updating task in response to the fact that the first duration to be executed is smaller than or equal to the first preset duration.
In some embodiments, the determining module comprises: and the second determining submodule is used for determining a second time length to be executed between the mth second target historical moment and the initial moment in response to the fact that the first time length to be executed is larger than or equal to the first preset time length and the video stream address information of the initial task is consistent with the video stream address information of the mth second target task, wherein M is an integer which is larger than 1 and smaller than or equal to M.
In some embodiments, the determining module comprises: and the third determining submodule is used for determining a second duration to be executed between the mth second target historical moment and the initial moment in response to the fact that the video stream address information of the initial task is inconsistent with the video stream address information of the N first target tasks and the video stream address information of the initial task is consistent with the video stream address information of the mth second target task, wherein M is an integer which is more than 1 and less than or equal to M.
In some embodiments, the mth second target task corresponds to at least one historical moment including the mth second target historical moment, and the update module includes: and the second updating sub-module is used for updating the mth second target task by using the initial task to obtain a first updating task in response to the fact that the second to-be-executed time length is smaller than the first preset time length.
In some embodiments, the update module includes: the first obtaining submodule is used for responding to the fact that the second time length to be executed is greater than or equal to the first preset time length, and taking the initial task as a first updating task; and the first adding sub-module is used for adding the first updating task to the target task set to obtain an updating task set.
In some embodiments, the determining module comprises: the second obtaining sub-module is used for responding to the fact that the video stream address information of the initial task is inconsistent with the video stream address information of the N first target tasks and inconsistent with the video stream address information of the M second target tasks, and taking the initial task as a first updating task; and the second adding sub-module is used for adding the first updating task to the target task set to obtain an updating task set.
In some embodiments, the generating module comprises: and the generation sub-module is used for generating an initial task in response to determining that the event data indicates that at least one preset object has a preset event at the initial moment.
In some embodiments, the generating module comprises: the acquisition sub-module is used for acquiring original detection data; and a conversion sub-module for converting the original detection data into event data in a target data format.
In some embodiments, the duration of the target video is a second preset duration, the second preset duration being greater than the first preset duration.
In the technical scheme of the disclosure, the related processes of collecting, storing, using, processing, transmitting, providing, disclosing and the like of the personal information of the user accord with the regulations of related laws and regulations, and the public order colloquial is not violated.
According to embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
Fig. 6 illustrates a schematic block diagram of an example electronic device 600 that may be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 6, the apparatus 600 includes a computing unit 601 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 602 or a computer program loaded from a storage unit 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the device 600 may also be stored. The computing unit 601, ROM 602, and RAM 603 are connected to each other by a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Various components in the device 600 are connected to the I/O interface 605, including: an input unit 606 such as a keyboard, mouse, etc.; an output unit 607 such as various types of displays, speakers, and the like; a storage unit 608, such as a magnetic disk, optical disk, or the like; and a communication unit 609 such as a network card, modem, wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The computing unit 601 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 601 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 601 performs the respective methods and processes described above, for example, a video processing method. For example, in some embodiments, the video processing method may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as storage unit 608. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 600 via the ROM 602 and/or the communication unit 609. When a computer program is loaded into RAM 603 and executed by computing unit 601, one or more steps of the video processing method described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to perform the video processing method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), complex Programmable Logic Devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) display or an LCD (liquid crystal display)) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel, sequentially, or in a different order, provided that the desired results of the disclosed aspects are achieved, and are not limited herein.
The above detailed description should not be taken as limiting the scope of the present disclosure. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present disclosure are intended to be included within the scope of the present disclosure.

Claims (24)

1. A video processing method, comprising:
generating an initial task according to the event data;
determining at least one duration to be executed according to an initial time and at least one target historical time, wherein the initial time is determined according to the time for generating the initial task, the target historical time is determined according to the time for generating target tasks in a target task set, the initial time is after any one target historical time, the target task set comprises a first target task subset, at least one target historical time comprises a first target historical time, the first target task subset comprises N first target tasks, the first target tasks are target tasks which are being executed, the first target historical time is determined according to the time for generating the first target tasks, and N is an integer greater than or equal to 1;
Updating the target task set by using the initial task according to at least one to-be-executed time length and a first preset time length to obtain an updated task set, wherein the updated task set comprises a first updated task corresponding to the initial time; and
obtaining video stream data from the video stream address of the first update task to obtain a target video corresponding to the first update task, wherein the duration of the target video corresponding to the first update task after the initial time is greater than or equal to the first preset duration,
wherein, the determining at least one duration to be executed according to the initial time and at least one target historical time includes:
in response to determining that the video stream address information of the initial task is consistent with the video stream address information of the nth first target task, determining a first duration to be executed between the nth first target historical moment and the initial moment, wherein N is an integer greater than 1 and less than or equal to N;
wherein updating the target task set with the initial task to obtain an updated task set includes:
and in response to determining that the first duration to be executed is smaller than the first preset duration, updating the nth first target task by using the initial task to obtain the first updated task.
2. The method of claim 1, wherein the set of target tasks further comprises a second subset of target tasks, at least one of the target historical moments further comprising a second target historical moment,
the second target task subset includes M second target tasks, the second target tasks are target tasks to be executed, the second target history time is determined according to the time of generating the second target tasks, and M is an integer greater than or equal to 1.
3. The method of claim 1, wherein an nth one of the first target tasks corresponds to at least one historical moment comprising an nth one of the first target historical moments.
4. The method of claim 2, wherein the determining at least one time to execute from the initial time and at least one target historical time further comprises:
and in response to determining that the first time length to be executed is greater than or equal to the first preset time length and the video stream address information of the initial task is consistent with the video stream address information of the mth second target task, determining a second time length to be executed between the mth second target historical time and the initial time, wherein M is an integer greater than 1 and less than or equal to M.
5. The method of claim 2, wherein the determining at least one duration to be performed based on the initial time and at least one target historical time comprises:
and determining a second duration to be executed between the mth second target historical moment and the initial moment in response to determining that the video stream address information of the initial task is inconsistent with the video stream address information of the N first target tasks and the video stream address information of the initial task is consistent with the video stream address information of the mth second target task, wherein M is an integer which is more than 1 and less than or equal to M.
6. The method of claim 4 or 5, wherein an mth of the second target tasks corresponds to at least one historical moment comprising an mth of the second target historical moments,
the step of updating the target task set by using the initial task according to at least one time length to be executed and a first preset time length, and the step of obtaining an updated task set comprises the following steps:
and in response to determining that the second to-be-executed time length is smaller than the first preset time length, updating the mth second target task by using the initial task to obtain the first updated task.
7. The method according to claim 4 or 5, wherein the updating the target task set with the initial task according to at least one of the duration to be executed and a first preset duration, to obtain an updated task set includes:
in response to determining that the second time period to be executed is greater than or equal to the first preset time period, taking the initial task as the first updating task; and
and adding the first updating task to the target task set to obtain the updating task set.
8. The method of claim 2, wherein the determining at least one duration to be performed based on the initial time and at least one target historical time comprises:
responding to the fact that the video stream address information of the initial task is inconsistent with the video stream address information of the N first target tasks and the video stream address information of the initial task is inconsistent with the video stream address information of the M second target tasks, and taking the initial task as the first updating task; and
and adding the first updating task to the target task set to obtain the updating task set.
9. The method of claim 1, wherein the generating an initial task from event data comprises:
And generating the initial task in response to determining that the event data indicates that at least one preset object has a preset event at the initial moment.
10. The method of claim 1, wherein the generating an initial task from event data comprises:
acquiring original detection data; and
and converting the original detection data into event data in a target data format.
11. The method of claim 1, wherein the target video has a second predetermined duration, the second predetermined duration being greater than the first predetermined duration.
12. A video processing apparatus comprising:
the generating module is used for generating an initial task according to the event data;
the system comprises a determining module, a first task processing module and a second task processing module, wherein the determining module is used for determining at least one duration to be executed according to an initial time and at least one target historical time, the initial time is determined according to the time for generating the initial task, the target historical time is determined according to the time for generating target tasks in a target task set, the initial time is after any target historical time, the target task set comprises a first target task subset, at least one target historical time comprises a first target historical time, the first target task subset comprises N first target tasks, the first target tasks are executing target tasks, the first target historical time is determined according to the time for generating the first target tasks, and N is an integer greater than or equal to 1;
The updating module is used for updating the target task set by utilizing the initial task according to at least one to-be-executed time length and a first preset time length to obtain an updated task set, wherein the updated task set comprises a first updated task corresponding to the initial time; and
an obtaining module, configured to obtain video stream data from a video stream address of the first update task, to obtain a target video corresponding to the first update task, where a duration of the target video corresponding to the first update task after the initial time is greater than or equal to the first preset duration,
wherein the determining module comprises:
the first determining submodule is used for determining a first duration to be executed between the nth first target historical moment and the initial moment in response to the fact that the video stream address information of the initial task is consistent with the video stream address information of the nth first target task, wherein N is an integer which is more than 1 and less than or equal to N;
wherein the update module comprises:
and the first updating sub-module is used for updating the nth first target task by using the initial task to obtain the first updating task in response to the fact that the first duration to be executed is smaller than the first preset duration.
13. The apparatus of claim 12, wherein the set of target tasks further comprises a second subset of target tasks, at least one of the target historical moments further comprises a second target historical moment,
the second target task subset includes M second target tasks, the second target tasks are target tasks to be executed, the second target history time is determined according to the time of generating the second target tasks, and M is an integer greater than or equal to 1.
14. The apparatus of claim 12, wherein an nth one of the first target tasks corresponds to at least one historical moment comprising an nth one of the first target historical moments.
15. The apparatus of claim 13, wherein the means for determining comprises:
and the second determining submodule is used for determining a second time length to be executed between the mth second target historical moment and the initial moment in response to the fact that the first time length to be executed is larger than or equal to the first preset time length and the video stream address information of the initial task is consistent with the video stream address information of the mth second target task, wherein M is an integer which is larger than 1 and smaller than or equal to M.
16. The apparatus of claim 13, wherein the means for determining comprises:
and a third determining submodule, configured to determine a second duration to be executed between an mth second target historical moment and the initial moment in response to determining that the video stream address information of the initial task is inconsistent with the video stream address information of the N first target tasks and the video stream address information of the initial task is consistent with the video stream address information of an mth second target task, where M is an integer greater than 1 and less than or equal to M.
17. The apparatus of claim 15 or 16, wherein an mth of the second target tasks corresponds to at least one historical moment comprising an mth of the second target historical moments,
the updating module comprises:
and the second updating sub-module is used for updating the mth second target task by using the initial task to obtain the first updating task in response to the fact that the second duration to be executed is smaller than the first preset duration.
18. The apparatus of claim 15 or 16, wherein the update module comprises:
the first obtaining submodule is used for responding to the fact that the second time length to be executed is larger than or equal to the first preset time length, and the initial task is used as the first updating task; and
And the first adding sub-module is used for adding the first updating task to the target task set to obtain the updating task set.
19. The apparatus of claim 13, wherein the means for determining comprises:
the second obtaining sub-module is used for responding to the fact that the video stream address information of the initial task is inconsistent with the video stream address information of the N first target tasks and inconsistent with the video stream address information of the M second target tasks, and taking the initial task as the first updating task; and
and the second adding sub-module is used for adding the first updating task to the target task set to obtain the updating task set.
20. The apparatus of claim 12, wherein the generating means comprises:
and the generation sub-module is used for generating the initial task in response to determining that the event data indicates that at least one preset object has a preset event at the initial moment.
21. The apparatus of claim 12, wherein the generating means comprises:
the acquisition sub-module is used for acquiring original detection data; and
And the conversion sub-module is used for converting the original detection data into event data in a target data format.
22. The apparatus of claim 12, wherein the target video has a second predetermined duration, the second predetermined duration being greater than the first predetermined duration.
23. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1 to 11.
24. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1 to 11.
CN202211107308.7A 2022-09-09 2022-09-09 Video processing method, device, electronic equipment and storage medium Active CN115665369B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202211107308.7A CN115665369B (en) 2022-09-09 2022-09-09 Video processing method, device, electronic equipment and storage medium
CN202311117329.1A CN117041497A (en) 2022-09-09 2022-09-09 Video processing method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211107308.7A CN115665369B (en) 2022-09-09 2022-09-09 Video processing method, device, electronic equipment and storage medium

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN202311117329.1A Division CN117041497A (en) 2022-09-09 2022-09-09 Video processing method, device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115665369A CN115665369A (en) 2023-01-31
CN115665369B true CN115665369B (en) 2023-11-03

Family

ID=84983687

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202311117329.1A Pending CN117041497A (en) 2022-09-09 2022-09-09 Video processing method, device, electronic equipment and storage medium
CN202211107308.7A Active CN115665369B (en) 2022-09-09 2022-09-09 Video processing method, device, electronic equipment and storage medium

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN202311117329.1A Pending CN117041497A (en) 2022-09-09 2022-09-09 Video processing method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (2) CN117041497A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105740345A (en) * 2016-01-25 2016-07-06 浪潮通用软件有限公司 Information pushing method and server apparatus
CN111831420A (en) * 2020-07-20 2020-10-27 北京百度网讯科技有限公司 Method and device for task scheduling, electronic equipment and computer-readable storage medium
CN112527474A (en) * 2020-12-10 2021-03-19 北京百度网讯科技有限公司 Task processing method and device, equipment, readable medium and computer program product
CN112925623A (en) * 2021-02-26 2021-06-08 北京百度网讯科技有限公司 Task processing method and device, electronic equipment and medium
CN113656423A (en) * 2021-08-18 2021-11-16 北京百度网讯科技有限公司 Method and device for updating data, electronic equipment and storage medium
CN114554110A (en) * 2022-01-25 2022-05-27 北京百度网讯科技有限公司 Video generation method and device, electronic equipment and storage medium
CN115022585A (en) * 2022-05-25 2022-09-06 京东城市(北京)数字科技有限公司 Method and device for capturing alarm video

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002055966A (en) * 2000-08-04 2002-02-20 Internatl Business Mach Corp <Ibm> Multiprocessor system, processor module used for multiprocessor system, and method for allocating task in multiprocessing
US10747554B2 (en) * 2016-03-24 2020-08-18 Google Llc Contextual task shortcuts
CN112540727A (en) * 2020-12-04 2021-03-23 北京百度网讯科技有限公司 Data management method and device, computing equipment, storage medium and cloud platform

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105740345A (en) * 2016-01-25 2016-07-06 浪潮通用软件有限公司 Information pushing method and server apparatus
CN111831420A (en) * 2020-07-20 2020-10-27 北京百度网讯科技有限公司 Method and device for task scheduling, electronic equipment and computer-readable storage medium
CN112527474A (en) * 2020-12-10 2021-03-19 北京百度网讯科技有限公司 Task processing method and device, equipment, readable medium and computer program product
CN112925623A (en) * 2021-02-26 2021-06-08 北京百度网讯科技有限公司 Task processing method and device, electronic equipment and medium
CN113656423A (en) * 2021-08-18 2021-11-16 北京百度网讯科技有限公司 Method and device for updating data, electronic equipment and storage medium
CN114554110A (en) * 2022-01-25 2022-05-27 北京百度网讯科技有限公司 Video generation method and device, electronic equipment and storage medium
CN115022585A (en) * 2022-05-25 2022-09-06 京东城市(北京)数字科技有限公司 Method and device for capturing alarm video

Also Published As

Publication number Publication date
CN117041497A (en) 2023-11-10
CN115665369A (en) 2023-01-31

Similar Documents

Publication Publication Date Title
CN113159091B (en) Data processing method, device, electronic equipment and storage medium
WO2022194147A1 (en) Target object monitoring method and monitoring device
CN114554110B (en) Video generation method, device, electronic equipment and storage medium
US11599974B2 (en) Joint rolling shutter correction and image deblurring
US10878272B2 (en) Information processing apparatus, information processing system, control method, and program
CN112994980A (en) Time delay testing method and device, electronic equipment and storage medium
JP2019091012A (en) Information recognition method and device
CN112651449B (en) Method, device, electronic equipment and storage medium for determining content characteristics of video
CN118053123A (en) Alarm information generation method, device, electronic equipment and computer medium
CN115665369B (en) Video processing method, device, electronic equipment and storage medium
CN114860426A (en) Data cooperation processing method, system, device, equipment and storage medium
CN111783591B (en) Abnormality detection method, abnormality detection device, abnormality detection apparatus, and recording medium
CN113836291B (en) Data processing method, device, equipment and storage medium
CN114051110B (en) Video generation method, device, electronic equipment and storage medium
CN111913942A (en) Data quality detection method and device
CN118152966B (en) Method, device, equipment and storage medium for processing vehicle information
CN114092874B (en) Training method of target detection model, target detection method and related equipment thereof
JP7408898B2 (en) Voice endpoint detection method, device, electronic device, and storage medium
CN110458009B (en) Processing method for picture information, face detection and picture searching by picture and related equipment
CN113760431B (en) Application control method and device, electronic equipment and readable storage medium
CN114501112B (en) Method, apparatus, device, medium, and article for generating video notes
CN113128302B (en) Image detection method and related product
CN113891038B (en) Information prompting method, device, intelligent equipment and computer readable storage medium
US20220219724A1 (en) Method and apparatus for correcting image data, electronic device and autonomous vehicle
CN115761412A (en) Detection frame processing method and device, electronic equipment and computer readable 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