Video processing method and device based on artificial intelligence, equipment and medium

Through the video processing method based on artificial intelligence, feature information in the monitoring video is extracted and video clips are synthesized, which solves the problems of low video data processing efficiency and large storage space, and realizes more efficient video data management and storage.

CN119172590APending Publication Date: 2024-12-20CHINA TELECOM ARTIFICIAL INTELLIGENCE TECHNOLOGY (BEIJING) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411117132.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-14
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

Existing storage systems are inefficient and consume a lot of storage space when processing and saving large amounts of video data, especially the video data generated by surveillance cameras, resulting in wasted computing and storage resources.

Method used

Using a video processing method based on artificial intelligence, the video data is extracted by detecting changes in video content, and the video clips are intercepted and synthesized to reduce the amount of stored video data. The method includes obtaining video data, performing feature extraction and dynamic detection rate judgment, dividing video clips according to changes and time periods, and synthesizing them into videos for saving.

Benefits of technology

It improves video processing efficiency, reduces the amount of stored video data, saves storage space and computing resources, and realizes more efficient video data management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119172590A_ABST
    Figure CN119172590A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a video processing method and device based on artificial intelligence, equipment and a medium, and belongs to the technical field of artificial intelligence and machine vision. The method comprises the following steps: acquiring video data sent by each video acquisition device, and calling a preset recognition algorithm to perform feature extraction processing on the video data when detecting that video content changes according to the video data, and obtaining video feature information; acquiring an image acquired by each video acquisition device in a preset time period to obtain a plurality of videos to be processed; performing video interception processing on each to-be-processed video based on a mapping relationship between the video feature information and the to-be-processed videos to obtain a plurality of video clip sets; and performing video synthesis processing on the video clips in each video clip set to obtain a plurality of synthesized videos, and storing each synthesized video. According to the embodiment of the invention, a large amount of video data can be processed and stored, the processing efficiency is improved, and the storage amount of the video data is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence and machine vision technology, and in particular to a video processing method and apparatus, device and medium based on artificial intelligence. Background Art

[0002] At present, a large number of video cameras have been widely deployed in cities and home environments, providing great convenience for recording events. Although the video coding standards used by video cameras can greatly compress the amount of video data, the huge amount of video data still puts great pressure on the existing storage system. Summary of the invention

[0003] The main purpose of the embodiments of the present application is to propose a video processing method and device, equipment and medium based on artificial intelligence, which can process and save a large amount of video data, improve processing efficiency and reduce the storage amount of video data.

[0004] To achieve the above purpose, one aspect of an embodiment of the present application proposes a video processing method based on artificial intelligence, the method comprising: Acquire video data sent by each video acquisition device, and when a change in video content is detected according to the video data, call a preset recognition algorithm to perform feature extraction processing on the video data to obtain video feature information corresponding to the video data; Acquire the images acquired by each of the video acquisition devices within a preset time period to obtain the to-be-processed video corresponding to each of the video acquisition devices; Based on the mapping relationship between the video feature information and the video to be processed, performing video interception processing on each of the videos to be processed to obtain a video segment set corresponding to each of the videos to be processed; Video synthesis processing is performed on the video segments in each of the video segment sets to obtain a synthesized video corresponding to each of the video segment sets, and each of the synthesized videos is saved.

[0005] In some embodiments, the acquiring of video data sent by each video acquisition device, when detecting a change in video content according to the video data, calling a preset recognition algorithm to perform feature extraction processing on the video data to obtain video feature information corresponding to the video data, includes: Extracting and processing the video to be identified acquired by the video acquisition device to obtain multiple video frames; By comparing the images of each of the video frames, it is determined whether the content of the video to be identified has changed. If so, a preset recognition algorithm is called to identify the video to be identified, and the video feature information corresponding to the video acquisition device is obtained. If not, the recognition of the video to be identified is stopped.

[0006] In some embodiments, the method of comparing the images of each of the video frames to determine whether the content of the video to be identified has changed, and if so, calling the preset recognition algorithm to identify the video to be identified, and obtaining the video feature information corresponding to the video acquisition device, and if not, stopping the recognition of the video to be identified, includes: Determining a motion detection rate of the second video frame by comparing an image of the first video frame with an image of the second video frame; When the motion detection rate of the second video frame is greater than or equal to a preset motion detection rate, determining the second video frame as a key video frame, and determining that the content of the video to be identified has changed; Based on the preset recognition algorithm, the image of the key video frame is recognized to obtain the video feature information corresponding to the video acquisition device.

[0007] In some embodiments, determining the motion detection rate of the second video frame by comparing the image of the first video frame with the image of the second video frame includes: Calculating a pixel difference value for each pixel between an image of the first video frame and an image of the second video frame; Performing statistics based on each pixel difference value to obtain a total pixel difference value; The motion detection rate of the second video frame is determined according to the total value of the pixel difference and the total pixel value of the image of the second video frame.

[0008] In some embodiments, the step of acquiring the images acquired by each of the video acquisition devices within a preset time period to obtain the to-be-processed video corresponding to each of the video acquisition devices includes: When a request sent by a user is obtained within the preset time period, determining a target time period based on a time point specified by the user in the request; Based on the video acquisition device information specified by the user, the images acquired by the target video acquisition device within the target time period are acquired to obtain the specified video to be processed; A video queue including the designated video to be processed and the video to be processed is generated, wherein the videos in the video queue are processed in a preset order, and in the video queue, the priority of the designated video to be processed is higher than the priority of the video to be processed.

[0009] In some embodiments, based on the mapping relationship between the video feature information and the video to be processed, performing video interception processing on each of the videos to be processed to obtain a set of video segments corresponding to each of the videos to be processed includes: Obtaining device information and time information corresponding to the video to be processed; Based on the device information, determine video feature information corresponding to the target video acquisition device; Based on the time information, the video feature information is parsed to obtain a target object within a target time range; Dividing the video to be processed into a plurality of video segments, and determining a target video segment based on the target object; The target video segment is classified into a video segment set corresponding to the video to be processed.

[0010] In some embodiments, dividing the to-be-processed video into a plurality of video segments and determining a target video segment based on the target object includes: When it is detected that the target object exists in the images of multiple video frames in the video to be processed, multiple target video frames are determined, wherein the target object exists in the image of each of the target video frames; According to the time point of each target video frame and the preset video segment duration, a plurality of target video segments are determined.

[0011] To achieve the above-mentioned purpose, another aspect of the embodiment of the present application provides a video processing device based on artificial intelligence, the device comprising: The recognition module is used to obtain the video data sent by each video acquisition device, and when a change in video content is detected according to the video data, a preset recognition algorithm is called to perform feature extraction processing on the video data to obtain video feature information corresponding to the video data; An acquisition module, used to acquire images acquired by each of the video acquisition devices within a preset time period, so as to obtain a to-be-processed video corresponding to each of the video acquisition devices; An interception module, configured to perform video interception processing on each of the videos to be processed based on a mapping relationship between the video feature information and the videos to be processed, so as to obtain a set of video segments corresponding to each of the videos to be processed; The synthesis module is used to perform video synthesis processing on the video segments in each of the video segment sets to obtain a synthesized video corresponding to each of the video segment sets, and save each of the synthesized videos.

[0012] To achieve the above-mentioned purpose, another aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the above-mentioned artificial intelligence-based video processing method when executing the computer program.

[0013] To achieve the above objectives, another aspect of an embodiment of the present application proposes a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the above-mentioned artificial intelligence-based video processing method is implemented.

[0014] The embodiments of the present application include at least the following beneficial effects: The present application provides a video processing method and apparatus, equipment and medium based on artificial intelligence. The scheme realizes analysis and processing of images in the video by performing feature extraction processing on the video data sent by each video acquisition device, and extracts the video feature information corresponding to each video acquisition device to obtain the required feature information. Compared with manually identifying feature information, it improves work efficiency and saves labor costs. In this embodiment, the algorithm is called for feature extraction processing only when a change in the video content is detected, so that feature extraction processing is performed more targeted and more flexibly. By acquiring a large number of videos to be processed captured by different video acquisition devices within a preset time period, the video data is disassembled to obtain a video to be processed with a smaller data volume, which is conducive to improving efficiency when processing a video to be processed with a smaller data volume. For the video feature information and the video to be processed corresponding to each video acquisition device, according to the video feature information, a video clip with more storage value is further extracted from the video to be processed, and these video clips are synthesized into a synthesized video and then saved, thereby greatly reducing the amount of video data to be saved compared to the video to be processed, saving storage space of the storage system. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 is a flow chart of a video processing method based on artificial intelligence provided by an embodiment of the present application; Figure 2 yes Figure 1 Flow chart of step S102 in FIG. Figure 3 yes Figure 1 Flow chart of step S103 in FIG. Figure 4 yes Figure 1 Flow chart of step S104 in FIG. Figure 5 It is a structural diagram of an application platform when an artificial intelligence-based video processing method is applied in a specific scenario; Figure 6 It is a process architecture timing diagram of the application of artificial intelligence-based video processing methods in specific scenarios; Figure 7 It is a flow chart of the analysis service when the video processing method based on artificial intelligence is applied in a specific scenario; Figure 8It is a synthetic service flow chart of the artificial intelligence-based video processing method when applied in a specific scenario; Fig. 9 It is a structural schematic diagram of a video processing device based on artificial intelligence provided by an embodiment of the present application; Fig.10 It is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0016] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below in conjunction with the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the embodiments of the present application. They are only examples of devices and methods consistent with some aspects of the embodiments of the present application as detailed in the attached claims.

[0017] Before describing the embodiments of the present application in detail, some nouns and terms involved in the embodiments of the present application are first described. The nouns and terms involved in the embodiments of the present application are subject to the following explanations.

[0018] Video analysis is a technical means to analyze, process and understand video content. It covers many aspects from basic video encoding and decoding, format conversion to complex video content analysis, behavior recognition, etc.

[0019] Video synthesis refers to the technical means of combining multiple video clips and image elements into a complete video work.

[0020] The animation inspection rate is used to evaluate animation inspection in the field of animation production, that is, to indicate the correctness of the animation and to control the quality of the animation. Animation inspectors need to have good drawing skills and experience in drawing animations to check whether the character movements in the animation are coherent, whether there are missing or extra frames, and thus determine the animation inspection rate.

[0021] High-definition surveillance cameras have been widely deployed throughout the city, greatly facilitating urban management and ensuring social stability. Although these surveillance cameras use video coding standards to significantly compress the amount of video data, their huge amount of data still puts tremendous pressure on the existing storage system. Surveillance cameras are usually installed in specific locations and maintain a fixed shooting angle to monitor target objects or abnormal events that appear in the scene. Since the target event occurs infrequently and the target object appears repeatedly in continuous video frames, there is a large amount of irrelevant and redundant information in the video stream. Frame-by-frame analysis and storage is inefficient and wastes a lot of computing and storage resources. In addition, in recent years, automatic video analysis technology based on deep learning has developed rapidly, but its complex network model structure leads to high computing overhead, making the system processing speed insufficient to support real-time analysis of massive surveillance videos.

[0022] The main purpose of the embodiments of the present application is to propose a video processing method and device, equipment and medium based on artificial intelligence, which can process and save a large amount of video data, improve processing efficiency and reduce the storage amount of video data.

[0023] Figure 1 is a flowchart of a video processing method based on artificial intelligence provided by an embodiment of the present application. Figure 1 The method may include but is not limited to steps S101 to S104.

[0024] Step S101, obtaining video data sent by each video acquisition device, and when detecting a change in video content based on the video data, calling a preset recognition algorithm to perform feature extraction processing on the video data to obtain video feature information corresponding to the video data.

[0025] Step S102, acquiring images acquired by each video acquisition device within a preset time period to obtain a to-be-processed video corresponding to each video acquisition device.

[0026] Step S103: Based on the mapping relationship between the video feature information and the video to be processed, video interception processing is performed on each video to be processed to obtain a video segment set corresponding to each video to be processed.

[0027] Step S104: Perform video synthesis processing on the video segments in each video segment set to obtain a synthesized video corresponding to each video segment set, and save each synthesized video.

[0028] Steps S101 to S104 shown in the embodiment of the present application can receive and process video data from a large number of video acquisition devices, which is conducive to building a regional video data analysis and synthesis platform to meet the needs of diversified algorithm analysis and ensure the load capacity for processing large amounts of video data.

[0029] In step S101 of some embodiments, the specific method of obtaining the video data sent by each video acquisition device may be: using a third-party application to call an API service interface to obtain the video file stored by each video acquisition device and the device code of the video acquisition device as video data.

[0030] In step S101 of some embodiments, when feature extraction processing is performed on the video data sent by each video acquisition device, image recognition can be performed on the picture of each video frame in the video acquired by each video acquisition device through an image recognition model, so as to extract image features, and organize the image features of the picture of each video frame in the video into video feature information.

[0031] In step S101 of some embodiments, the method for detecting whether the video content has changed can be to detect the change value of the video content to determine the degree of change of the video content, and compare the detected change value with a preset change value, or to determine whether the detected change value is within a preset change value range.

[0032] In step S101 of some embodiments, when performing feature extraction processing on the video data sent by each video acquisition device, the following steps may be performed: When the degree of change of the video content is within the first change value range, the first preset recognition algorithm is called to perform feature extraction processing; when the degree of change of the video content is within the second change value range, the second preset recognition algorithm is called to perform feature extraction processing; when the degree of change of the video content is within the third change value range, the third preset recognition algorithm is called to perform feature extraction processing; similarly, multiple change value ranges can be set according to multiple different preset recognition algorithms, which are not listed here one by one.

[0033] This embodiment can provide more ways to perform feature extraction processing using different recognition algorithms, which is conducive to performing feature extraction processing for different scenarios and different needs, thereby improving the efficiency of feature extraction processing.

[0034] In step S101 of some embodiments, when performing feature extraction processing on the video data sent by each video acquisition device, the following steps may be performed: The video to be identified obtained by the video acquisition device is extracted and processed to obtain multiple video frames; by comparing the image of each video frame, it is determined whether the content of the video to be identified has changed. If so, a preset recognition algorithm is called to identify the video to be identified, and the video feature information corresponding to the video acquisition device is obtained. If not, the recognition of the video to be identified is stopped.

[0035] It is understandable that when a video to be identified is obtained, each video frame in the video to be identified can be extracted, or key frames can be extracted through video decoding, and the actual time when the key frames are displayed in the video can be recorded based on the key frame information frame.pts*frame.time_base.

[0036] It can be understood that this embodiment calls the preset recognition algorithm only when the content of the video to be recognized changes, avoiding frequent calls to the recognition algorithm for parsing and reasoning, and can save about 70% of GPU resources.

[0037] In step S102 of some embodiments, the user can set a preset time period, and then call a video with a length of the preset time period from the video data captured and stored by one or more designated video acquisition devices as the video to be processed; the user can also set a time point (for example, 10 o'clock every night), and then use this time point as the starting point of the cycle, and each 24 hours is a cycle. Every time the time point is reached, the images acquired within 24 hours (that is, within the preset time period) are automatically used as the video to be processed.

[0038] It can be understood that in step S103, the mapping relationship between the video feature information and the video to be processed refers to finding the corresponding video to be processed according to any video feature information, and finding the video to be processed with the same device code according to the device code in the video feature information, and then performing video interception processing on the found video to be processed according to the video feature information. After the video to be processed is intercepted into multiple video clips, these video clips are grouped into a video clip set corresponding to the video to be processed. Next, in step S104, after the video to be processed is intercepted into one or more video clips, these video clips are resynthesized into a synthetic clip, and the synthetic video has less video length and video content than the video to be processed, so the data volume is less. If only one video clip is intercepted from the video to be processed, the video clip set corresponding to the video to be processed has only one video clip, and when performing video synthesis processing, the video clip is used as a synthetic video. If multiple video clips are intercepted from the video to be processed, these video clips are all grouped into the video clip set corresponding to the video to be processed, and when performing video synthesis processing, these video clips are fused to obtain a synthetic video.

[0039] In order to determine whether the content of the video to be identified has changed, the present application also provides an optimized embodiment as follows: See also Figure 2 In some embodiments, step S101 may include but is not limited to steps S201 to S203: Step S201 : Determine the motion detection rate of the second video frame by comparing the image of the first video frame with the image of the second video frame.

[0040] Step S202: when the motion detection rate of the second video frame is greater than or equal to a preset motion detection rate, the second video frame is determined as a key video frame, and it is determined whether the content of the video to be identified has changed.

[0041] Step S203: Based on a preset recognition algorithm, the image of the key video frame is recognized to obtain video feature information corresponding to the video acquisition device.

[0042] In steps S201 to S203 shown in the embodiment of the present application, the present embodiment uses the motion detection rate as a basis for determining whether the content of the video to be identified has changed, which is conducive to reducing errors in subjective judgment and more objectively and accurately determining whether the content of the video to be identified has changed.

[0043] In step S201 of some embodiments, the pixel difference value of each pixel between the image of the first video frame and the image of the second video frame is calculated; statistics are performed based on each pixel difference value to obtain a total pixel difference value; and the motion detection rate of the second video frame is determined based on the total pixel difference value and the total pixel value of the image of the second video frame.

[0044] Taking a specific embodiment as an example, in the order of time in the video, the video frame of the previous second in the video is the first video frame, and the video frame of the next second in the video is the second video frame. The pixel difference of each pixel between the image of the first video frame and the image of the second video frame is expressed as: diff=cv2.absdiff(prev_framen,current_frame); The total pixel difference value is expressed as: diff_sum = np.sum(diff); The motion detection rate of the second video frame is expressed as: Diff_sum_mean=diff_sum / (diff.shape[0]*diff.shape[1]) Among them, the pixel difference is diff, prev_framen is the pixel value in the image of the first video frame, current_frame is the pixel value in the image of the second video frame, the total pixel difference is diff_sum, the motion detection rate is Diff_sum_mean, and diff.shape[0]*diff.shape[1] represents the total pixel difference in the image.

[0045] In some embodiments, the motion detection rate can be calculated by using an inter-frame difference algorithm to calculate the difference between consecutive frames. Specifically, the difference in grayscale values ​​between adjacent frames or three frames can be calculated and its absolute value can be obtained. Stationary objects appear completely black on the difference image, while moving objects have obvious white areas on the difference image. The difference image is segmented to extract significant motion areas. This step can be achieved using an image segmentation algorithm. Based on the segmented motion area, the motion detection rate is calculated. The motion detection rate can be calculated using the following formula: Motion detection rate = motion area / total frame area The motion region area refers to the number of pixels in the significant motion region after segmentation, and the total frame area refers to the number of pixels in the entire video frame.

[0046] In step S202 of some embodiments, illustratively, the preset dynamic detection rate is 20.

[0047] See also Figure 3 In some embodiments, step S102 may include but is not limited to steps S301 to S303: Step S301, when a request sent by a user is obtained within a preset time period, a target time period is determined based on a time point specified by the user in the request.

[0048] Step S302: based on the video acquisition device information specified by the user, the images acquired by the target video acquisition device within the target time period are acquired to obtain the specified video to be processed.

[0049] Step S303, generating a video queue including designated videos to be processed and videos to be processed, wherein the videos in the video queue are processed in a preset order, and in the video queue, the priority of the designated videos to be processed is higher than the priority of the videos to be processed.

[0050] Exemplarily, in this embodiment, within a preset time period, for example, the preset time period is from 12 midnight to 12 midnight of the next day, if the to-be-processed videos acquired within the original preset time period have formed a video queue, the to-be-processed videos from 12 midnight to 12 midnight of the next day can be processed at 12 midnight of the next day in the order of the original video queue. When the user actively operates and requires that the videos within the user-specified time period be processed, for example, the user-specified time period is from 3 to 4 o'clock of the next day, the videos within the time period from 3 to 4 o'clock of the next day are designated to be processed. In the video queue, the priority of the videos within the time period from 3 to 4 o'clock of the next day is higher than the priority of the to-be-processed videos from 12 midnight to 12 midnight of the next day, and the designated to-be-processed videos within the time period from 3 to 4 o'clock of the next day are processed first.

[0051] In steps S301 to S303 shown in the embodiment of the present application, according to the request sent by the user, the videos to be processed in the video queue are classified according to different priorities, and the videos to be processed in the video queue are processed preferentially according to the priority, thereby increasing the priority of the user's active parsing and synthesis request, which is beneficial to avoid thread blocking when there are too many videos to be processed in the video queue.

[0052] See also Figure 4 In some embodiments, step S103 may include but is not limited to steps S401 to S405: Step S401, obtaining device information and time information corresponding to the video to be processed.

[0053] Step S402: Determine video feature information corresponding to the target video acquisition device based on the device information.

[0054] Step S403: parsing the video feature information based on the time information to obtain the target object within the target time range.

[0055] Step S404: divide the video to be processed into multiple video segments, and determine the target video segment based on the target object.

[0056] Step S405: classify the target video segment into a video segment set corresponding to the video to be processed.

[0057] It can be understood that in step S403, after determining the time information, for example, the time information records the target time range as 15:00 to 17:00, when parsing the video feature information, only the target objects appearing during the period from 15:00 to 17:00 are screened out. The target objects may be markers, marking boxes, etc. identified by a preset recognition model.

[0058] In step S404 of some embodiments, when it is detected that a target object exists in the images of multiple video frames in the video to be processed, multiple target video frames are determined, wherein the target object exists in the image of each target video frame; and multiple target video segments are determined based on the time point of each target video frame and the preset video segment length.

[0059] Specifically, after screening each target video frame and the image of the target object therein, a target video frame is selected, and then all frames within a period of time before the target video frame (for example, video frames one second before the target video frame) and all frames within a period of time before the target video frame (for example, video frames one second after the target video frame) are selected as target video segments together with the target video frame. If there are multiple target video frames, multiple target video segments are selected.

[0060] It can be understood that this embodiment aggregates videos in the form of files according to devices and time ranges, and concurrently captures video clips according to video files, which is conducive to improving the efficiency of recognition and synthesis through distributed parallel computing.

[0061] The following is a detailed description and explanation of the solution of the embodiment of the present invention in conjunction with specific application examples: Please note that Figure 5 , an artificial intelligence-based video processing method of an embodiment of the present application can be implemented through a platform with regional offline video processing functions. The platform includes an application layer, a core layer and a PaaS layer. The components of the PaaS layer include: MongoDB, ClickHouse, object storage, and Kafka. The core layer of the platform includes calling algorithm services, parsing services, and synthesis services, which can provide Docker images and helm resource files, which can be directly uploaded to the image warehouse and then started with one click through helm install. The application layer includes a time-lapse service, which is used to cooperate with the core layer to implement the artificial intelligence-based video processing method of the present application, that is, to implement functions such as video parsing, fragment interception and synthesis.

[0062] See also Figure 6 , Figure 7 as well as Figure 8 First, after obtaining the video data transmitted by a video acquisition device in the form of a video file, the video file is decoded and multiple video frames are extracted. Then, the video content is judged whether it has changed according to the motion detection rate of these video frames. When the motion detection rate of one of the video frames is greater than or equal to 20, it is determined that the video content has changed, and the preset algorithm is called to identify the image of the key video frame. The algorithm service is deployed by one-click delivery through the algorithm warehouse. If the preset recognition algorithm recognizes the target object from the image, the target object is saved. Then, the video before the preset time point or the video within the user-specified time period is used as the video to be processed. At the preset time point or the user-specified time point, the video to be processed is subjected to video interception processing and video synthesis processing according to the priority in the video queue. When performing video interception processing, the video feature information corresponding to the device information and the target object within the target time range are queried according to the device information and time information, and the video clips of 1 second before and after the video frame where the target object is located are intercepted according to the target object as the target video clip. When performing video interception processing, multiple target video clips are synthesized to obtain a synthesized video. Finally, the composite video is obtained and saved.

[0063] See also Fig. 9 The embodiment of the present application further provides a video processing device based on artificial intelligence, which can implement the above-mentioned video processing method based on artificial intelligence, and the device includes: The recognition module 501 is used to obtain the video data sent by each video acquisition device, and when the video content is detected to change according to the video data, a preset recognition algorithm is called to perform feature extraction processing on the video data to obtain video feature information corresponding to the video data.

[0064] The acquisition module 502 is used to acquire the images acquired by each video acquisition device within a preset time period to obtain the to-be-processed video corresponding to each video acquisition device; The interception module 503 is used to perform video interception processing on each video to be processed based on the mapping relationship between the video feature information and the video to be processed, so as to obtain a video segment set corresponding to each video to be processed; The synthesis module 504 is used to perform video synthesis processing on the video segments in each video segment set to obtain a synthesized video corresponding to each video segment set, and save each synthesized video.

[0065] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0066] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above-mentioned video processing method based on artificial intelligence when executing the computer program. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.

[0067] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0068] See also Fig.10 , Fig.10 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes: The processor 601 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application; The memory 602 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 602 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 602, and the processor 601 calls and executes the video processing method based on artificial intelligence in the embodiment of this application; Input / output interface 603, used to implement information input and output; Communication interface 604, used to realize communication interaction between the device and other devices, which can be realized through wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.); A bus 605 that transmits information between various components of the device (e.g., processor 601, memory 602, input / output interface 603, and communication interface 604); The processor 601 , the memory 602 , the input / output interface 603 and the communication interface 604 are connected to each other in communication within the device via a bus 605 .

[0069] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned artificial intelligence-based video processing method is implemented.

[0070] It can be understood that the contents of the above method embodiments are all applicable to the present storage medium embodiments, the functions specifically implemented by the present storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0071] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0072] The video processing method, device, equipment and medium based on artificial intelligence provided by the embodiment of the present application, by performing feature extraction processing on the video data sent by each video acquisition device, realizes analysis and processing of the image in the video, and extracts the video feature information corresponding to each video acquisition device, obtains the required feature information, and improves work efficiency and saves labor costs compared with manual recognition of feature information. This embodiment performs feature extraction processing on the video data more targetedly by flexibly calling the preset recognition algorithm for feature extraction processing. For example, when the degree of change of the video content is high, calling the preset recognition algorithm is conducive to improving processing efficiency. When the degree of change of the video content is low, the preset recognition algorithm is not called to avoid the loss of computing resources caused by each algorithm call. By obtaining a large number of different videos to be processed taken by different video acquisition devices within a preset time period, the video data is disassembled to obtain a video to be processed with a smaller data volume, which is conducive to improving efficiency when processing a video to be processed with a smaller data volume. For the video acquisition device, based on the video feature information, video segments with more storage value are further extracted from the video to be processed, and these video segments are synthesized into a synthetic video and then saved. Compared with the video to be processed, this greatly reduces the amount of video data that needs to be saved and saves storage space of the storage system.

[0073] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0074] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.

[0075] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0076] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.

[0077] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0078] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0079] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0080] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0081] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0082] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.

[0083] The preferred embodiments of the present application are described above with reference to the accompanying drawings, but the scope of the rights of the present application is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present application should be within the scope of the rights of the present application.

Claims

1. A video processing method based on artificial intelligence, It is characterized in that The method comprises: Acquire video data sent by each video acquisition device, and when a change in video content is detected according to the video data, call a preset recognition algorithm to perform feature extraction processing on the video data to obtain video feature information corresponding to the video data; Acquire the images acquired by each of the video acquisition devices within a preset time period to obtain the to-be-processed video corresponding to each of the video acquisition devices; Based on the mapping relationship between the video feature information and the video to be processed, performing video interception processing on each of the videos to be processed to obtain a video segment set corresponding to each of the videos to be processed; Video synthesis processing is performed on the video segments in each of the video segment sets to obtain a synthesized video corresponding to each of the video segment sets, and each of the synthesized videos is saved.

2. The video processing method based on artificial intelligence according to claim 1, It is characterized in that The acquiring of video data sent by each video acquisition device, and when detecting a change in video content according to the video data, calling a preset recognition algorithm to perform feature extraction processing on the video data to obtain video feature information corresponding to the video data, include: Extracting and processing the video to be identified acquired by the video acquisition device to obtain multiple video frames; By comparing the images of each of the video frames, it is determined whether the content of the video to be identified has changed. If so, the preset recognition algorithm is called to identify the video to be identified, and the video feature information corresponding to the video acquisition device is obtained. If not, the recognition of the video to be identified is stopped.

3. The video processing method based on artificial intelligence according to claim 2, It is characterized in that The method compares the images of each of the video frames to determine whether the content of the video to be identified has changed. If so, a preset recognition algorithm is called to identify the video to be identified, and video feature information corresponding to the video acquisition device is obtained. If not, the recognition of the video to be identified is stopped, including: Determining a motion detection rate of the second video frame by comparing an image of the first video frame with an image of the second video frame; When the motion detection rate of the second video frame is greater than or equal to a preset motion detection rate, determining the second video frame as a key video frame, and determining that the content of the video to be identified has changed; Based on the preset recognition algorithm, the image of the key video frame is recognized to obtain the video feature information corresponding to the video acquisition device.

4. The video processing method based on artificial intelligence according to claim 3, It is characterized in that The determining the motion detection rate of the second video frame by comparing the image of the first video frame with the image of the second video frame includes: Calculating a pixel difference value for each pixel between an image of the first video frame and an image of the second video frame; Performing statistics based on each pixel difference value to obtain a total pixel difference value; The motion detection rate of the second video frame is determined according to the total value of the pixel difference and the total pixel value of the image of the second video frame.

5. The video processing method based on artificial intelligence according to claim 1, It is characterized in that The acquiring of the images acquired by each of the video acquisition devices within a preset time period to obtain the to-be-processed video corresponding to each of the video acquisition devices includes: When a request sent by a user is obtained within the preset time period, determining a target time period based on a time point specified by the user in the request; Based on the video acquisition device information specified by the user in the request, the images acquired by the target video acquisition device within the target time period are acquired to obtain the specified video to be processed; A video queue including the designated video to be processed and the video to be processed is generated, wherein the videos in the video queue are processed in a preset order, and in the video queue, the priority of the designated video to be processed is higher than the priority of the video to be processed.

6. The video processing method based on artificial intelligence according to claim 1, It is characterized in that The step of performing video interception processing on each of the videos to be processed based on the mapping relationship between the video feature information and the videos to be processed to obtain a set of video segments corresponding to each of the videos to be processed includes: Obtaining device information and time information corresponding to the video to be processed; Based on the device information, determine video feature information corresponding to the target video acquisition device; Based on the time information, the video feature information is parsed to obtain a target object within a target time range; Dividing the video to be processed into a plurality of video segments, and determining a target video segment based on the target object; The target video segment is classified into a video segment set corresponding to the video to be processed.

7. The video processing method based on artificial intelligence according to claim 6, It is characterized in that The step of dividing the video to be processed into a plurality of video segments and determining a target video segment based on the target object includes: When it is detected that the target object exists in the images of multiple video frames in the video to be processed, multiple target video frames are determined, wherein the target object exists in the image of each of the target video frames; According to the time point of each target video frame and the preset video segment duration, a plurality of target video segments are determined.

8. A video processing device based on artificial intelligence, It is characterized in that The device comprises: The recognition module is used to obtain the video data sent by each video acquisition device, and when a change in video content is detected according to the video data, a preset recognition algorithm is called to perform feature extraction processing on the video data to obtain video feature information corresponding to the video data; An acquisition module, used to acquire images acquired by each of the video acquisition devices within a preset time period, so as to obtain a to-be-processed video corresponding to each of the video acquisition devices; An interception module, configured to perform video interception processing on each of the videos to be processed based on a mapping relationship between the video feature information and the videos to be processed, so as to obtain a set of video segments corresponding to each of the videos to be processed; The synthesis module is used to perform video synthesis processing on the video segments in each of the video segment sets to obtain a synthesized video corresponding to each of the video segment sets, and save each of the synthesized videos.

9. An electronic device, It is characterized in that The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the artificial intelligence-based video processing method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium storing a computer program. It is characterized in that When the computer program is executed by a processor, the artificial intelligence-based video processing method according to any one of claims 1 to 7 is implemented.