Application program detection method, device, electronic device and storage medium
By adding identification information to the video to be edited and using the target application to perform video editing processing, the edited video information is automatically detected, and the problem of manually judging the editing effect in the prior art is solved, and efficient video editing function detection is achieved.
Patent Information
- Application Number
- CN202110269997.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-12
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2041-03-12
AI Technical Summary
The prior art requires manual judgment of whether the edited video has correctly added the editing effect, which consumes a lot of manpower and material resources.
By adding identification information to the original video frame in the video to be edited, the target application performs video editing processing based on the video clip indication information, and then performs identification extraction and information restoration of the identification video frame in the edited video, and finally detects the video editing function of the application based on the video clip indication information and video clip information.
It realizes automatic detection of whether the video editing function of the application is normal, saves a lot of manpower and material resources, and improves the accuracy and reliability of detection.
Smart Images

Figure CN113704548B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a method, device, electronic device and storage medium for detecting an application. Background Art
[0002] With the rapid development of electronic communication technology and Internet technology, more and more ways of disseminating Internet content have emerged, and video is one of the ways people get all kinds of information through the Internet. Through various videos spread on the Internet, people can not only learn about national affairs, but also about interesting things in the neighborhood. In addition, people can also use applications with editing functions to edit videos and spread the edited videos to the Internet to achieve resource sharing. However, at present, it is manually judged whether the editing effect is correctly added to the edited video, which will consume a lot of manpower and material resources. Summary of the invention
[0003] The embodiments of the present application propose a detection method, device, electronic device and storage medium for an application program, which eliminates the need for manual judgment as to whether the editing effect has been correctly added to the edited video, thereby saving a large amount of manpower and material resources.
[0004] The present application embodiment provides a method for detecting an application program, including:
[0005] Obtain at least one video to be edited;
[0006] Performing identification processing on the original video frame in the at least one video to be edited to obtain at least one processed video to be edited, wherein the processed video to be edited includes an identified video frame having identification information;
[0007] Using a target application to perform video editing processing on the at least one processed video to be edited based on the video editing indication information to obtain an edited video;
[0008] Extracting identification information from identification video frames having identification information in the edited video to obtain identification restoration information of the identification video frames in the edited video;
[0009] Based on the identification restoration information of the identified video frame in the edited video, performing video editing information restoration processing on the edited video to obtain video editing information of the edited video;
[0010] The video clipping function of the target application is detected according to the video clipping indication information and the video clipping information, and a video clipping function detection result is obtained and output.
[0011] Accordingly, the embodiment of the present application further provides a detection device for an application program, including:
[0012] An acquisition unit, used for acquiring at least one video to be edited;
[0013] An identification processing unit, configured to perform identification processing on an original video frame in the at least one video to be edited, to obtain at least one processed video to be edited, wherein the processed video to be edited includes an identification video frame having identification information;
[0014] A video clip processing unit, configured to perform video clip processing on the at least one processed video to be clipped based on the video clip indication information using a target application to obtain a clipped video;
[0015] An identification extraction unit, used to extract identification information from identification video frames in the edited video to obtain identification restoration information of the identification video frames in the edited video;
[0016] An information restoration processing unit, configured to perform video clipping information restoration processing on the edited video based on the identification restoration information of the identified video frame in the edited video, so as to obtain the video clipping information of the edited video;
[0017] The detection unit is used to detect the video clipping function of the target application according to the video clipping indication information and the video clipping information, and obtain and output the video clipping function detection result.
[0018] In one embodiment, the identification processing unit includes:
[0019] An acquisition subunit is used to acquire the number of videos to be edited and the number of original video frames of each video to be edited;
[0020] The identification processing subunit is used to perform identification processing on the original video frames in each video to be edited based on the number of videos to be edited and the number of original video frames of each video to be edited, so as to obtain at least one processed video to be edited.
[0021] In one embodiment, the identification processing subunit includes:
[0022] A first generating module, used for generating video identification information of an original video frame in each video to be edited according to the number of videos to be edited;
[0023] A second generating module, configured to generate video frame identification information of the original video frames in each video to be edited according to the number of original video frames in each video to be edited;
[0024] The information fusion module is used to fuse the video identification information, the video frame identification information and the image information of the original video frame to generate an identification video frame, and obtain the processed video to be edited.
[0025] In one embodiment, the first generating module is used to:
[0026] Determining the video identification attribute of the original video frame in each video to be edited according to the number of videos to be edited;
[0027] Generate a video identification sequence of the original video frame in each video to be edited based on the video identification attributes of the original video frame and a preset video identification sequence generation function;
[0028] According to the first mapping rule, the video identification sequence of the original video frames in each video to be edited is mapped into corresponding video identification information.
[0029] In one embodiment, the second generating module is used to:
[0030] Determining the video frame identification attributes of the original video frames in each video to be edited according to the number of original video frames of each video to be edited;
[0031] Generate a video frame identification sequence of the original video frame in each video to be edited based on the video frame identification attributes of the original video frame and a preset video frame identification sequence generation function;
[0032] According to the second mapping rule, the video frame identification sequence of the original video in each video to be edited is mapped into corresponding video frame identification information.
[0033] In one embodiment, the information fusion module is used to:
[0034] The video identification information is fused with the image information of the video identification area in the original video frame, and the video frame identification information is fused with the image information of the video frame identification area in the initial processing video frame to generate an identification video frame, so as to obtain the processed video to be edited.
[0035] In one embodiment, the identification extraction unit includes:
[0036] A frame processing subunit, configured to perform frame processing on the edited video to obtain a plurality of identified video frames of the edited video;
[0037] A region restoration processing subunit, configured to perform region restoration processing on each identified video frame based on the video identification attribute and the video frame identification attribute of the identified video frame, so as to obtain a video identification region and a video frame identification region of each identified video frame;
[0038] The identifier extraction subunit is used to extract the identifier of each identified video frame based on the video identifier area and the video frame identifier area to obtain a video identifier restoration sequence and a video frame identifier restoration sequence of each identified video frame.
[0039] In one embodiment, the identification extraction subunit includes:
[0040] An extraction module, used for respectively extracting image information of the identified video frame in the video identification area and the video frame identification area;
[0041] A first information restoration processing module, configured to perform information restoration processing on the image information of the video identification area according to a preset video identification information restoration rule to obtain the video identification restoration sequence;
[0042] The second information restoration processing module is used to perform information restoration processing on the image information of the video frame identification area according to a preset video frame identification information restoration rule to obtain the video frame identification restoration sequence.
[0043] In one embodiment, the first information restoration processing module is used to:
[0044] Performing computational processing on the image information of the video identification area according to a preset video identification information restoration rule to obtain processed image information;
[0045] The processed image information is restored and mapped according to a preset video identification sequence restoration rule to obtain a video identification restoration sequence.
[0046] In one embodiment, the information restoration processing unit includes:
[0047] A determination subunit, configured to determine a target video frame in the identified video frame based on the identification restoration information of the identified video frame;
[0048] The information restoration processing subunit is used to perform video clipping information restoration processing on the identification restoration information of the target video frame to obtain video clipping information.
[0049] In one embodiment, the detection unit comprises:
[0050] A matching subunit, used for matching the video clip information with the video clip indication information;
[0051] A first output subunit, configured to obtain and output a result of a normal video clip function detection when the video clip information matches the video clip indication information;
[0052] The second output subunit is used to obtain and output a result of detecting an abnormality of the video editing function when the video editing information and the video editing indication information do not match.
[0053] The embodiment of the present application also provides a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device performs the method provided in various optional modes of the above-mentioned aspect.
[0054] Correspondingly, an embodiment of the present application further provides a storage medium, which stores instructions, and when the instructions are executed by a processor, implements a detection method for an application provided in any embodiment of the present application.
[0055] The embodiment of the present application can obtain at least one video to be edited, perform identification processing on the original video frame in at least one video to be edited, and obtain at least one processed video to be edited, and the processed video to be edited includes an identification video frame with identification information; then use the target application to perform video editing processing on at least one processed video to be edited based on the video editing indication information to obtain the edited video; perform identification extraction on the identification video frame with identification information in the edited video to obtain the identification restoration information of the identification video frame in the edited video; next, based on the identification restoration information of the identification video frame in the edited video, perform video editing information restoration processing on the edited video to obtain the video editing information of the edited video; finally, detect the video editing function of the target application according to the video editing indication information and the video editing information, and obtain and output the video editing function detection result. The embodiment of the present application proposes a method for detecting the video editing function of an application, which can automatically detect whether the video editing function of the application is normal, without the need to manually judge whether the editing effect is correctly added to the edited video, saving a lot of manpower and material resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0057] Figure 1 It is a scene schematic diagram of the detection method provided in the embodiment of the present application;
[0058] Figure 2is a flow chart of the detection method provided in the embodiment of the present application;
[0059] Figure 3 is a schematic diagram of a video identification area and a video frame identification area provided in an embodiment of the present application;
[0060] Figure 4 is another schematic diagram of a video identification area and a video frame identification area provided in an embodiment of the present application;
[0061] Figure 5 is another schematic diagram of a video identification area and a video frame identification area provided in an embodiment of the present application;
[0062] Figure 6 is another schematic diagram of a video identification area and a video frame identification area provided in an embodiment of the present application;
[0063] Figure 7 is another schematic diagram of a video identification area and a video frame identification area provided in an embodiment of the present application;
[0064] Figure 8 is another schematic diagram of a video identification area and a video frame identification area provided in an embodiment of the present application;
[0065] Fig. 9 is another schematic flow chart of the detection method provided in the embodiment of the present application;
[0066] Fig.10 It is a schematic diagram of identification information of the detection method provided in the embodiment of the present application;
[0067] Fig.11 is a schematic diagram of the structure of the detection device provided in the embodiment of the present application;
[0068] Fig.12 is another structural schematic diagram of the detection device provided in an embodiment of the present application;
[0069] Fig.13 It is a schematic diagram of the structure of the terminal provided in the embodiment of the present application. DETAILED DESCRIPTION
[0070] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. However, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0071] Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines, so that machines have the functions of perception, reasoning and decision-making.
[0072] With the research and advancement of artificial intelligence technology, artificial intelligence technology has been studied and applied in many fields, such as common smart homes, smart wearable devices, virtual assistants, smart speakers, smart marketing, unmanned driving, automatic driving, drones, robots, smart medical care, smart customer service, etc. I believe that with the development of technology, artificial intelligence technology will be applied in more fields and play an increasingly important role.
[0073] The embodiment of the present application proposes a detection device for an application, which can be integrated in a computer device, which can include at least one of a terminal and a server. The terminal can be a smart phone, a tablet computer, a laptop, a personal computer (PC), a smart home, a wearable electronic device, a VR / AR device, a car computer, etc. The server can be an intercommunication server between multiple heterogeneous systems or a background server of a content interaction system, or an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, and big data and artificial intelligence platforms, etc.
[0074] For example, Figure 1The detection device of the application can be integrated on a computer device such as a terminal or a server. The detection device of the application can be an automatic detection device, that is, it can automatically detect the application. Therefore, the computer device integrated with the detection device of the application can automatically detect the application. Specifically, the computer device can automatically obtain at least one video to be edited, perform identification processing on the original video frame in at least one video to be edited, and obtain at least one processed video to be edited, and the processed video to be edited includes an identification video frame with identification information; then, the target application is used to perform video editing processing on at least one processed video to be edited based on the video editing indication information to obtain the edited video; the identification video frame with identification information in the edited video is extracted to obtain the identification restoration information of the identification video frame in the edited video; next, based on the identification restoration information of the identification video frame in the edited video, the video editing information restoration processing is performed on the edited video to obtain the video editing information of the edited video; finally, the video editing function of the target application is detected according to the video editing indication information and the video editing information, and the video editing function detection result is obtained and output.
[0075] The following are detailed descriptions respectively. It should be noted that the description order of the following embodiments is not intended to limit the preferred order of the embodiments.
[0076] The embodiments of the present application will be described from the perspective of a detection device for an application program. The detection device for the application program may be integrated in a computer device, which may be a server or a terminal.
[0077] like Figure 2 A method for detecting an application is provided, and the specific process includes:
[0078] 101. Obtain at least one video to be edited.
[0079] The video to be edited includes the original video before being edited by an application program with a video editing function.
[0080] In one embodiment, the embodiment has no limit on the number of videos to be edited. For example, the embodiment may include only one video to be edited. For another example, the embodiment may include multiple videos to be edited, and so on.
[0081] In one embodiment, the video to be edited may also be in various formats. For example, the video to be edited may be in the format of Moving Picture Experts Group (MPEG). For another example, the video to be edited may be in the format of Audio Video Interleaved (AVI), etc. This embodiment has no limitation on this.
[0082] In addition, the present embodiment has no restrictions on the duration and content of the video to be edited, and the video to be edited can be a video of any duration and content. For example, the video to be edited can record a 10-minute cooking process, or a 10-second exercise process, and so on.
[0083] In one embodiment, the video to be edited can be captured by a device with a shooting function. For example, the video to be edited can be captured by a camera. For another example, the video to be edited can be captured by a mobile phone and a tablet computer with a shooting function, etc. After the video to be edited is captured, the video to be edited can be stored in a server, and when the application is detected, at least one video to be edited can be obtained from the server.
[0084] In addition, the videos to be edited can be downloaded from the Internet or an application and stored in a server. When the application is detected, at least one video to be edited can be obtained from the server, and so on.
[0085] 102. Perform identification processing on original video frames in at least one video to be edited to obtain at least one processed video to be edited, wherein the processed video to be edited includes an identified video frame having identification information.
[0086] The original video frames include the video frames that have not been marked in the video to be edited. For example, the video to be edited includes 300 video frames, and the original video frames may include the 300 video frames.
[0087] The marked video frames include original video frames that have been marked in the video to be edited.
[0088] The processed video to be edited includes the original video frames in the video and the video is obtained after the marking process. For example, the video to be edited includes 300 video frames, and the 300 video frames are marked. Then, the processed video to be edited still includes 300 video frames, and the 300 video frames are all marked.
[0089] The identification information may include a mark of a video frame in the video to be edited, and the identification information may be used to identify which frame of the video to be edited the video frame identified by the identification information is.
[0090] In one embodiment, the identification information may be determined by the number of videos to be edited.
[0091] For example, when there is only one video to be edited, when adding identification information to the video to be edited, it is only necessary to identify which frame of the video to be edited the video frame identified by the identification information is through the identification information.
[0092] When multiple videos to be edited are obtained and identification information is added to the videos to be edited, the identification information can be used to not only identify which frame of the video to be edited the video frame identified by the identification information is, but also to identify which frame of the video to be edited the video frame identified by the identification information is.
[0093] In one embodiment, after acquiring at least one video to be edited, the original video frames in the at least one video to be edited may be marked to obtain at least one processed video to be edited.
[0094] When there are multiple videos to be edited, the original video frames in the videos to be edited can be marked according to the number of videos to be edited and the number of video frames in the videos to be edited. Specifically, the step of "marking the original video frames in at least one video to be edited to obtain at least one processed video to be edited" includes:
[0095] Get the number of videos to be edited and the number of original video frames of each video to be edited;
[0096] Based on the number of videos to be edited and the number of original video frames of each video to be edited, identification processing is performed on the original video frames in each video to be edited to obtain at least one processed video to be edited.
[0097] In one embodiment, the number of videos to be edited can be obtained in multiple ways.
[0098] For example, the number of videos to be edited can be obtained through a number acquisition function. Specifically, at least one video to be edited can be input into the number acquisition function, thereby obtaining the number of videos to be edited output by the number acquisition function.
[0099] For another example, the videos to be edited may be input into a video editing application, and the number of videos to be edited may be determined by the video editing application.
[0100] The video editing application may include an application with a video editing function. For example, the video editing application may include video editing software Adobe Premiere Pro, Vegas, and FinalCut Pro, etc.
[0101] In one embodiment, the number of original video frames of the video to be edited can also be obtained in a variety of ways. When obtaining the number of original video frames of the video to be edited, the video to be edited can be firstly divided into frames to obtain multiple original video frames of the video to be edited, and then the number of original video frames of the video to be edited can be obtained.
[0102] When performing frame processing on the video to be edited, a video editing application may be used, and then the video to be edited is processed by the video editing application.
[0103] For example, when using Adobe Premiere Pro to perform frame processing on a video to be edited, the video to be edited can be uploaded to Adobe Premiere Pro, and then the video to be edited can be exported into multiple video frames through Adobe Premiere Pro. When exporting the video frames of the video to be edited, the video format of the video to be edited can be set to the "target" format, so that Adobe Premiere Pro exports the video to be edited into multiple video frames.
[0104] After the video to be edited is divided into frames, the number of original video frames of the video to be edited can be obtained according to the original video frames of the video to be edited.
[0105] For example, the video quantity of the video to be edited can also be determined by a quantity acquisition function. Specifically, the video frames of the video to be edited can be input into the quantity acquisition function, thereby obtaining the original video frame quantity of the video to be edited output by the quantity acquisition function.
[0106] For another example, the video frames of the video to be edited may be input into an image processing application, and the number of the video to be edited may be determined by the image processing application, and so on.
[0107] For example, the video frames of the video to be edited may be input into an image processing application program Adobe Photoshop, and the number of the video to be edited may be determined by Adobe Photoshop.
[0108] Next, based on the number of videos to be edited and the number of original video frames of each video to be edited, the original video frames in the videos to be edited are marked to obtain processed videos to be edited, which include marked video frames with identification information.
[0109] When there are multiple videos to be edited, the identification information of the video frame not only needs to identify which frame of the video to be edited the video frame is, but also needs to identify which frame of the video to be edited the video frame is.
[0110] In one embodiment, when there are multiple videos to be edited, video identification information of the videos to be edited can be generated according to the number of videos to be edited. Then, according to the number of original video frames of the videos to be edited, video frame identification information of the videos to be edited is generated. Finally, the video identification information, the video frame identification information and the image information of the video frames in the videos to be edited are fused to obtain the processed videos to be edited. Specifically, the step of "based on the number of videos to be edited and the number of original video frames of each video to be edited, the original video frames in each video to be edited are identified to obtain at least one processed video to be edited" includes:
[0111] Generate video identification information of the original video frame in each video to be edited according to the number of videos to be edited;
[0112] Generate video frame identification information of the original video frames in each video to be edited according to the number of original video frames in each video to be edited;
[0113] The video identification information, the video frame identification information and the image information of the original video frame are fused to generate an identification video frame, and the processed video to be edited is obtained.
[0114] The video identification information may include information for identifying which video the video frame belongs to, that is, the video identification information may be used to identify which video the video frame belongs to.
[0115] The video frame identification information may include information for identifying which frame of the video to be edited the video frame is, that is, the video frame identification information may be used to identify which frame of the video to be edited the video frame is.
[0116] The video identification information and the video frame identification information can be used to identify which frame of the video to be edited the video frame is.
[0117] In one embodiment, since each video frame is an image, the image information of the video frame may include the content constituting the image. For example, the image information may include at least one of pixel information, color information, and brightness information of the image.
[0118] For computers, images are stored in the form of pixels, which are the basic units of images. Each pixel can be regarded as a small area in the image, with clear location information and assigned color information in the area. Therefore, pixel information can include the color information and location information of the pixel in the image.
[0119] In one embodiment, the essence of color is a light wave. It exists because of three entities: the light, the object being observed, and the observer.
[0120] The human eye perceives color as light waves of different frequencies absorbed or reflected by the object being observed. For example, when we see an object in the sun appear red on a clear day, it is because the object absorbs light of other frequencies and reflects the red frequency light to our eyes. Of course, our eyes can only perceive light wave signals with frequencies within the visible light range. When light signals of different frequencies enter a certain point in our eyes together, our visual organs will mix them and accept them as a color. Similarly, when we process the color of an image, we also need to mix colors, but we must follow certain rules, that is, we process colors in different color modes.
[0121] The color mode can be a model that expresses a certain color in digital form, or a way to record the color of an image. In order to meet different needs, a variety of color modes have been developed, such as the three primary colors (Red, Green and Blue, RGB) color mode, the four primary colors (Cyan, Magenta, Yellow and Black, CMYK) color mode, etc.
[0122] Depending on the image color mode, the color information of pixels in the image can be expressed differently.
[0123] For example, when the color mode of the image is RGB color mode, the color information in the pixel can be represented by three color values, which respectively represent the color levels of red, green and blue in the pixel, and the value of each color value can be an integer between 0 and 255.
[0124] For example, when the color mode of an image is RGB color mode, the color information of a pixel in the image can be expressed as (100, 200, 255). 100 can represent the color degree of red, 200 can represent the color degree of green, and 255 can represent the color degree of blue. When the color information of a pixel in an image is expressed as (0, 0, 0), the color presented by the pixel is white. When the color information of a pixel in an image is expressed as (255, 255, 255), the color presented by the pixel is black.
[0125] For another example, when the image's color mode is the CMYK color mode, the color information in a pixel can be represented by four color values, which respectively represent the color levels of cyan, magenta, yellow, and black in the pixel, and each of these color values can be a value between 0 and 255.
[0126] In one embodiment, in order to make the original video frame carry the identification information, the identification information and the image information of the video frame may be merged, so the formats of the identification information and the image information of the original video frame are corresponding.
[0127] For example, when the image information of the original video frame refers to the color information of the pixels in the image, and the color mode of the video frame is the RGB color mode, the image information of the video frame can be expressed in the form of (x, y, z), where x can represent the form of red, y can represent the degree of green, z can represent the degree of blue, and the values of x, y, and z can be any integer from 0 to 255.
[0128] At this time, the identification information of the video frame can also be expressed in the form of (x, y, z), and the values of x, y, z are also any number between 0 and 255.
[0129] In one embodiment, when generating video identification information of the videos to be edited according to the number of videos to be edited, the video identification information can be generated according to the video identification attributes of the original video frames in the videos to be edited. Specifically, the step of "generating video identification information of the original video frames in each video to be edited according to the number of videos to be edited" includes:
[0130] According to the number of videos to be edited, determine the video identification attribute of the original video frame in each video to be edited;
[0131] Generate a video identification sequence of the original video frame in each video to be edited based on the video identification attributes of the original video frame and a preset video identification sequence generation function;
[0132] According to the first mapping rule, the video identification sequence of the original video frame in each video to be edited is mapped into corresponding video identification information.
[0133] The video identification attribute may include identification features of the video identification information of the original video frame in each video to be edited.
[0134] For example, the video identification attribute may include the identification form and identification size of the video identification information in the original video frame.
[0135] Among them, the identification form of the video identification information in the original video frame may include the form of video identification of the original video frame. For example, the identification form of the video identification information may include a video identification sequence, a video identification matrix, and the like. That is, the original video frame may be identified using a video identification sequence, or may be identified using a video identification matrix, and the like. Among them, the identification size includes the size corresponding to the identification form of the video identification information in the original video frame. For example, when the original video frame is identified using a video identification sequence, the identification size may refer to the sequence length of the video identification sequence. For another example, when the original video frame is identified using a video identification matrix, the identification size may refer to the dimension of the video identification matrix, and the like.
[0136] The video identification sequence may include a sequence that serves as an identifier for a video frame. Through the video identification sequence, it can be determined which video the video frame identified by the video identification sequence belongs to.
[0137] In one embodiment, when a video identification sequence is selected to identify the original video frame, the video identification sequence can be set to a binary sequence code with a fixed sequence length. The binary sequence code means that the sequence values in the video identification sequence must conform to the binary form. For example, when 0 and 1 represent binary, the sequence value in the video identification sequence is either "0" or "1". For another example, when "-1" and "1" represent binary, the sequence value in the video representation sequence is either "1" or "-1".
[0138] Each video identification sequence has a fixed sequence length. For example, when "0" and "1" are used to represent binary, a 5-bit video identification sequence can be represented in the form of [a1, a2, a3, a4, a5], where a1, a2, a3, a4, a5 are sequence values in the video representation sequence, and each sequence value can be "0" or "1".
[0139] In addition, the video identification sequence may also be set in the form of an octal sequence code or a hexadecimal sequence code, and so on.
[0140] The preset video identification sequence generation function may include a function for generating a video identification sequence.
[0141] In one embodiment, since the role of the video identification sequence is to indicate which video the identified video frame belongs to, the video identification sequences of different videos are generally different. At this time, the preset video identification sequence generation function can be a function that generates multiple different video identification sequences, such as a random sequence generation function, etc.
[0142] In addition, since the sequence length of the video identification sequence of the original video frame can be determined according to the number of videos to be edited, at this time, the preset video identification sequence generation function can generate multiple different video identification sequences with preset sequence lengths, and so on.
[0143] Among them, since the formats of the video identification information and image information of the original video frame correspond to each other, and the format of the video identification sequence is often not corresponding to the format of the image information, it is necessary to map the video identification sequence to obtain the video identification information. The mapping rule that needs to be followed in the mapping process is the first mapping rule.
[0144] For example, one of the generated video identification sequences is [a, b, c, d], where a, b, c, d are all in binary form. The color mode of the original video frame is the RGB color mode, that is, the image information of the original video frame can be expressed in the form of (x, y, z), and the values of x, y, z can be any integer from 0 to 255. Then the first mapping rule is the rule that needs to be followed when mapping "a", "b", "c" and "d" into the form of (x, y, z) respectively.
[0145] For example, one of the generated video identification sequences is [1, 1, -1, -1]. Then the first mapping rule can be to map "1" to (255, 255, 255) and to map "-1" to (0, 0, 0). Then the first mapping rule can be used to map the video identification sequence to video identification information [(255, 255, 255), (255, 255, 255), (0, 0, 0), (0, 0, 0)].
[0146] In one embodiment, when generating video identification information of the original video frame in each video to be edited according to the number of videos to be edited, the identification attribute of the video identification sequence of the original video frame can be first determined according to the number of videos to be edited.
[0147] For example, when the number of videos to be edited is small, the video identification sequence of the original video frame can be determined as a binary sequence code, and the sequence length of the binary sequence code is determined according to the number of videos to be edited. When the sequence length of the binary sequence code is determined according to the number of videos to be edited, the condition that the sequence length of the binary sequence code needs to meet is: the video identification sequence generated according to the sequence length of the binary sequence code needs to cover all videos to be edited.
[0148] For example, when there are 10 videos to be edited, a binary sequence code may be selected to identify the original video frame, and the sequence length of the binary sequence code may be at least 4 bits. That is, a 4-bit binary sequence code may be selected as the video identification sequence, or a 200-bit binary sequence code may be selected as the video identification sequence, and so on. As long as the sequence length of the binary sequence code satisfies the condition that the video identification sequence generated according to the sequence length of the binary sequence code needs to cover all the videos to be edited, it will be sufficient.
[0149] For another example, when the number of videos to be edited is large, the video identification sequence of the original video frame may also be determined as a quaternary sequence code, an octal sequence code, and the like.
[0150] In one embodiment, in order to improve the reliability of the detection method of the application program proposed in the embodiment of the present application, the video identification sequences of the videos to be edited may satisfy pseudo-orthogonality.
[0151] That is, for example, when there are N (N is a positive integer, and N is greater than 1) videos to be edited, the length of the video identification sequence of each video to be edited is L. Among these N videos to be edited, the value of the inner product between the video identification sequences of every two videos to be edited is close to 0. And among these N videos to be edited, the value of the inner product of the video identification sequence of each video to be edited is equal to L.
[0152] For example, among the N videos to be edited, the video identification sequences of two of them are S 1 and S 2 , then:
[0153]
[0154] Among them, s 1,i is the video identification sequence S 1 The sequence value in s 2,i is the video identification sequence S 2 The symbol “<>” represents the inner product operation.
[0155] In order to make the video identification sequences of the videos to be edited satisfy pseudo-orthogonality, the sequence length of the video identification sequences of the videos to be edited can be made as large as possible. When the sequence length of the video identification sequences of the videos to be edited is as large as possible, the video identification sequences of the videos to be edited can satisfy pseudo-orthogonality.
[0156] For example, when there are 10 videos to be edited and a binary sequence code is selected to identify the original video frames, the sequence length of the binary sequence code can be at least 4 bits, then the sequence length of the binary sequence code can be selected as 128 bits, so that the video identification sequences of the edited videos can satisfy pseudo-orthogonality.
[0157] By making the video identification sequences satisfy pseudo-orthogonality, the detection method of the application proposed in the embodiment of the present application can be made more reliable. For example, when a filter or noise is added to the video after editing, due to the pseudo-orthogonality between the video identification sequences, when a certain video identification sequence is restored incorrectly, it will not affect the restoration results of other video identification sequences, thereby improving the reliability of the detection method of the application proposed in the embodiment of the present application.
[0158] In one embodiment, after the video identification attributes of the original video frame are determined according to the number of videos to be edited, a video identification sequence consistent with the video identification attributes can be generated according to the video identification attributes of the original video frame and a preset video identification sequence generation function.
[0159] For example, when 10 videos to be edited are obtained and a binary sequence code with a sequence length of 128 bits is selected to identify the original video frames, a random binary sequence code generation function can be used to generate 10 random binary sequence codes with a sequence length of 128 bits, and then these 10 random and different binary sequence codes are respectively assigned to the 10 videos to be edited.
[0160] For another example, a preset sequential binary sequence code generation function may be used to generate 10 ordered binary sequence codes with a sequence length of 128 bits, and then the 10 ordered but different binary sequence codes may be respectively allocated to 10 videos to be edited.
[0161] Among them, in order to make the video identification sequences of the videos to be edited satisfy pseudo-orthogonality, a preset pseudo-orthogonality binary sequence code generation function can also be used to generate 10 binary sequence codes that satisfy pseudo-orthogonality and have a sequence length of 128 bits, and then these 10 binary sequence codes that satisfy pseudo-orthogonality are respectively assigned to the 10 videos to be edited.
[0162] The generation rule of the preset pseudo-orthogonality binary sequence code generation function may be as follows: 50% of the sequence values in the binary sequence code are set to one of the binary values, and the remaining 50% of the sequence values in the binary code are set to another binary value.
[0163] For example, when "-1" and "1" are used to represent binary, 50% of the sequence values in the binary sequence code can be set to "-1", and then the remaining 50% of the sequence values in the binary sequence code can be set to "1", so that the generated binary sequence code satisfies pseudo-orthogonality.
[0164] For another example, when "0" and "1" are used to represent binary, 50% of the sequence values in the binary sequence code can be set to "0", and then the remaining 50% of the sequence values in the binary sequence code can be set to "1", so that the generated binary sequence code satisfies pseudo-orthogonality.
[0165] In one embodiment, after the video identification sequence is generated, the video identification sequence may be mapped according to a first mapping rule to obtain video identification information.
[0166] Since the first mapping rule includes the rule to be followed when mapping the video identification sequence into the video identification information corresponding to the image information, the first mapping rule may include mapping the sequence value in the video identification sequence into a pattern corresponding to the image information.
[0167] For example, one of the video identification sequences generated by the preset pseudo-orthogonal binary sequence code generation function is [-1, -1, 1, 1]. The color mode of the video frame is the RGB color mode, that is, the image information of the video frame can be represented in the form of (x, y, z), and the values of x, y, z can be any integer from 0 to 255.
[0168] Then, the first mapping rule may include mapping "-1" in the video identification sequence to (0, 0, 0), and mapping "1" in the video identification sequence to (255, 255, 255).
[0169] At this time, according to the first mapping rule, the video identification sequence [-1, -1, 1, 1] can be mapped to [(0, 0, 0), (0, 0, 0), (255, 255, 255), (255, 255, 255)], so that the video identification information is [(0, 0, 0), (0, 0, 0), (255, 255, 255), (255, 255, 255)].
[0170] For another example, the first mapping rule may include mapping "-1" in the video identification sequence to (127, 127, 127), and mapping "1" in the video identification sequence to (255, 255, 255).
[0171] At this time, according to the first mapping rule, the video identification sequence [-1, -1, 1, 1] can be mapped to [(127, 127, 127), (127, 127, 127), (255, 255, 255), (255, 255, 255)], so that the video identification information is [(127, 127, 127), (127, 127, 127), (255, 255, 255), (255, 255, 255)].
[0172] In one embodiment, the method of generating the video frame identification information of the video to be edited is similar to the method of generating the video identification information. Specifically, the step of "generating the video frame identification information of each original video frame in the video to be edited according to the number of original video frames of each video to be edited" includes:
[0173] Determine the video frame identification attribute of the original video frame in each video to be edited according to the number of original video frames of each video to be edited;
[0174] Generate a video frame identification sequence of the original video frame in each video to be edited based on the video frame identification attribute of the original video frame and a preset video frame identification sequence generation function;
[0175] According to the second mapping rule, the video frame identification sequence of the original video in each video to be edited is mapped into corresponding video frame identification information.
[0176] Among them, similar to the video identification attribute, the video frame identification attribute can include the identification characteristics of the video frame identification information of the original video frame in each video to be edited. For example, the video frame identification attribute can also include the identification form and identification size of the video frame identification information of the original video frame in each video to be edited.
[0177] The identification form of the video frame identification information may include a video frame identification sequence, a video frame identification matrix, etc. The identification size of the video frame identification information may also include the sequence length of the video frame identification sequence and the dimension of the video frame identification matrix, etc.
[0178] The preset video frame identification sequence generation function includes a function for generating a video frame identification sequence.
[0179] The video frame identification sequence may include a sequence that identifies the video frame. Through the video frame identification sequence, it can be determined which frame in the video to be edited the video frame identified by the video frame identification sequence is.
[0180] Similarly, since the formats of the video frame identification information and the image information of the original video frame correspond to each other, and the format of the video frame identification sequence often does not correspond to the format of the image information, the video frame identification sequence needs to be mapped to obtain the video frame identification information. The mapping rule that needs to be followed in the mapping process is the second mapping rule.
[0181] In one embodiment, when the video frame identification sequence is selected to identify the original video, the video frame identification sequence may also be set to a binary sequence code with a fixed sequence length.
[0182] In one embodiment, when generating video frame identification information of the original video frames in each video to be edited according to the number of original video frames in each video to be edited, the video frame identification attributes of the original video frames in each video to be edited can be first determined according to the number of original video frames in each video to be edited.
[0183] For example, when there are 300 video frames in one of the videos to be edited, a binary sequence code may be selected to identify the original video frames, wherein the sequence length of the binary sequence code is at least 8 bits.
[0184] In one embodiment, after determining the video frame identification attributes of the original video frames according to the number of original video frames of the video to be edited, a video frame identification sequence consistent with the video frame identification attributes can be generated based on the video frame identification attributes of the original video frames and a preset video frame identification sequence generation function.
[0185] In order to make the video frame identification sequences of the video to be edited satisfy pseudo-orthogonality, a preset pseudo-orthogonality binary sequence code generation function can be used to generate several binary sequence codes, and these several binary sequence codes are respectively assigned to the video frames of the video to be edited.
[0186] For example, when there are 300 video frames in one of the videos to be edited, 300 binary sequence codes can be generated using a preset pseudo-orthogonal binary sequence code generation function, and the 300 binary sequence codes can be respectively allocated to the 300 video frames.
[0187] In order to ensure the reliability and effectiveness of the inspection method proposed in the embodiment of the present application, when generating the video frame identification sequence, an ordered video frame identification sequence is generally generated.
[0188] For example, when generating a binary sequence code with a sequence length of 5 bits, the video frame identification sequence of the first original video frame in the video to be edited can be generated as [0, 0, 0, 0, 0], and the video frame identification sequence of the second original video frame can be generated as [0, 0, 0, 0, 1].
[0189] In addition, in order to improve the reliability of the detection method of the application program proposed in the embodiment of the present application, the video frame identification sequences of the video to be edited can also satisfy pseudo-orthogonality.
[0190] In order to make the video frame identification sequences of the video to be edited meet pseudo-orthogonality, the binary sequence code generated by the video to be edited can be mapped once. For example, the "0" in the binary sequence code can be mapped into the sequence B 1 , mapping the "1" in the binary sequence code into sequence B 2 , where B 1 and B 2 The following relations are satisfied:
[0191]
[0192] Among them, b 1,j is the video frame identification sequence B 1 The sequence value in b 2,j is the video frame identification sequence B 2 The sequence value in B, j is the subscript of the current sequence value, and P is 1 and B 2 The length of the sequence.
[0193] For example, the binary sequence code "0" can be mapped to B 1 , and B 1 =[1,-1,1,-1,1,-1,1,-1]. For another example, the "1" in the binary sequence code can be mapped to B 2 , and B 2 =[-1,1,-1,1,-1,1,-1,1], and so on.
[0194] In one embodiment, after the video frame identification sequence is generated, the video frame identification sequence may be mapped according to a second mapping rule to obtain video frame identification information.
[0195] For example, a video frame identification sequence B of one of the video frames 1 =[1,0,1,0]. The color mode of the video frame is the RGB color mode, that is, the image information of the video frame can be expressed in the form of (x, y, z), and the values of x, y, z can be any integer from 0 to 255.
[0196] Then, the second mapping rule may include mapping "0" in the video frame identification sequence to (0, 0, 0), and mapping "1" in the video frame identification sequence to (255, 255, 255). At this time, according to the second mapping rule, the video identification sequence [1, 1, 0, 0] can be mapped to [(255, 255, 255), (255, 255, 255), (0, 0, 0), (0, 0, 0)], so that the video identification information obtained is [(255, 255, 255), (255, 255, 255), (0, 0, 0), (0, 0, 0)].
[0197] It should be noted that the generation of the video identification information and the video frame identification information is not affected by the time sequence, and the video identification information can be generated first and then the video frame identification information; the video identification information and the video frame identification information can also be generated at the same time.
[0198] After the video identification information and the video frame identification information are generated, the video identification information, the video frame identification information and the image information of the original video frame may be fused to generate an identification video frame, thereby obtaining a processed video to be edited.
[0199] In one embodiment, before fusing the video identification information, the video frame identification information, and the image information of the original video frame, the original video frame of the video to be edited may be evenly divided into a video identification area and a video frame identification area. Figure 3 As shown, video frame 001 is an original video frame, region 002 may be a video identification region, and region 003 may be a video frame identification region.
[0200] In one embodiment, before fusing the video identification information, the video frame identification information and the image information of the original video frame, the video identification area and the video frame identification area can be divided in the original video frame of the video to be edited according to the video identification attributes and the video frame identification attributes of the original video frame.
[0201] For example, 10 videos to be edited are obtained, and each video to be edited has 300 original video frames. The video identification attribute of the original video frame stipulates that the video identification sequence of each video to be edited is in the form of a binary sequence code, and the sequence length is 128 bits, while the video frame identification attribute stipulates that the video frame identification sequence of the original video frame in each video to be edited is in the form of a binary sequence code, and the sequence length is 10 bits. At this time, the video identification area and the video frame identification area can be divided in the original video frame of the video to be edited according to the sequence length of the video identification sequence and the sequence length of the video frame identification sequence.
[0202] For example, Figure 4 As shown, when the sequence length of the video identification sequence is 128 bits and the sequence length of the video frame identification sequence is 10 bits, the original video frame 001 of the video frame to be edited can be divided into region 004 and region 005 according to the ratio of the sequence length of the video identification sequence to the sequence length of the video frame identification sequence, wherein region 004 is the video identification region storing video identification information, and region 005 is the video frame identification region storing video frame identification information.
[0203] For example, you can also Figure 5 Area 006 and area 007 are divided, where area 006 is a video identification area storing video identification information, and area 007 is a video frame identification area storing video frame identification information.
[0204] Among them, since the sequence length of the video identification sequence and the information length of the video identification information are corresponding. For example, the sequence length of the video identification sequence [-1, -1, 1, 1] is 4 bits, and the corresponding information length of the video identification information [(0, 0, 0), (0, 0, 0), (255, 255, 255), (255, 255, 255)] is also 4 bits. Similarly, the sequence length of the video frame identification sequence and the information length of the video frame identification information are corresponding. Therefore, after dividing the video identification area and the video frame identification area, the video identification area and the video frame identification area can be further gridded according to the sequence length of the video identification sequence and the sequence length of the video frame identification sequence, respectively.
[0205] For example, if the sequence length of the video identification sequence is 25 bits, then the video identification information corresponding to the video identification sequence also has 25 bits. Figure 6 As shown, the video identification area 002 may be divided into 25 grids, so that the video identification information may be merged according to the divided grids and the image information in the grids.
[0206] For another example, if the sequence length of the video frame identification sequence is 36 bits, then the video frame identification information corresponding to the video frame identification sequence is also 36 bits. Figure 6 As shown, the video identification area 003 may be divided into 10 grids, so that the video frame identification information may be fused according to the divided grids and the image information in the grids.
[0207] It should be noted that the embodiments of the present application do not limit the division of grids in the video identification area and the video frame identification area, as long as grids corresponding to the sequence length of the video identification sequence and the sequence length of the video frame identification sequence can be divided.
[0208] After dividing the video identification area and the video frame identification area in the original video frame, the video identification information, the video frame identification information and the image information of the original video frame in the video to be edited can be fused to obtain the processed video to be edited. Specifically, the step of "fusion of the video identification information, the video frame identification information and the image information of the original video frame to generate an identification video frame to obtain the processed video to be edited" includes:
[0209] The video identification information is fused with the image information of the video identification area in the original video frame, and the video frame identification information is fused with the image information of the video frame identification area in the initial processing video frame to generate an identification video frame, so as to obtain the processed video to be edited.
[0210] In one embodiment, the video identification information may be fused with the image information of the video identification area in the original video frame in a variety of ways.
[0211] For example, the video identification information may be overwritten, added, subtracted, etc. from the image information of the central pixel point of the video identification area in the original video frame, so as to obtain the initial processed video frame.
[0212] For example, the video identification information may be overwritten, added to, or subtracted from the image information of the video identification area in the original video frame, thereby obtaining an initial processed video frame.
[0213] For another example, the video identification information and the average value of the image information of the video identification area in the original video frame may be overlaid, added, subtracted, etc., so as to obtain the initial processed video frame, and so on.
[0214] When the video identification area in the original video frame is gridded, the video identification information can be fused according to the divided grids and the image information in the grids.
[0215] For example, Figure 7 As shown, the image information of the center pixel of the grid and the information of the video identification information can be fused to obtain the initial processed video frame. For example, the video identification information is [(255, 255, 255), (0, 0, 0), (255, 255, 255), (255, 255, 255)], and the image information of the center pixel of the first grid 008 in the video identification area is (122, 222, 22). Then, the first bit of video information value (255, 255, 255) in the video identification information can be used to overwrite the image information of the center pixel of the first grid 006 in the video identification area to (255, 255, 255), thereby fusing the video identification information with the image information of the original video frame.
[0216] For example, Figure 8 As shown, the video identification information is [(255, 255, 255), (0, 0, 0), (255, 255, 255), (255, 255, 255)]. The image information of the first grid 009 in the video identification area is [(100, 200, 250), (122, 222, 22), (33, 133, 233), (44, 144, 244)]. Then, the first bit information value (255, 255, 255) in the video identification information and the image information of the first grid 005 in the video identification area can be overwritten to obtain the image information of the grid carrying the video identification information as [(255, 255, 255), (0, 0, 0), (255, 255, 255), (255, 255, 255)].
[0217] In one embodiment, the video frame identification information and the image information of the video frame identification area in the original video frame may be fused in a variety of ways. For example, the video frame identification information and the image information of the video frame identification area in the original video frame may be overlaid, added, or subtracted, etc. For another example, the video frame identification information and the average value of the image information of the video frame identification area in the original video frame may be added, etc.
[0218] When the video frame identification area in the original video frame is gridded, the video frame identification information can also be fused according to the divided grids and the image information in the grids. The information fusion process is the same as the process of fusing the video identification information with the image information in the grids, which will not be repeated here.
[0219] It should be noted that the embodiments of the present application have no time sequence restrictions on the process of fusing the video identification information with the image information of the video identification area in the original video frame and fusing the video frame identification information with the image information of the video frame identification area in the original video frame. The video identification information can be first fused with the image information of the video identification area in the original video frame, or the video frame identification information can be first fused with the image information of the video frame identification area in the original video frame, or the two processes can be performed simultaneously.
[0220] 103. Using a target application program to perform video editing on at least one processed video to be edited based on the video editing indication information to obtain an edited video.
[0221] Among them, the target application may include an application that is detected using the detection method proposed in the embodiment of the present application.
[0222] The video clipping indication information includes information based on which the target application performs video clipping on the processed video to be clipped, that is, the target application performs video clipping on the processed video to be clipped based on the video clipping indication information.
[0223] For example, the video editing indication information may include cutting and splicing between the processed videos to be edited, speed changing of the processed videos to be edited, adding animation and filter effects to the processed videos to be edited, etc.
[0224] For example, when there are 10 processed videos to be edited, the video editing indication information may include adding a filter to the first processed video to be edited, changing the speed of the second processed video to be edited, splicing the first processed video to be edited, the second processed video to be edited and the ninth processed video to be edited, etc.
[0225] For another example, when there are two processed videos to be edited, each of which has 20 seconds, the video editing indication information may include that the first processed video to be edited includes seconds 0 to 5, and the speed change rate is 1; the second processed video to be edited retains seconds 1 to 10, and the speed change rate is 2, and the two processed videos to be edited are spliced into one video. Then the target application can edit the first processed video to be edited and the second processed video to be edited according to the video editing indication information to obtain an edited video.
[0226] In one embodiment, video editing indication information can be set in advance. After obtaining the processed video to be edited, an automated tool can be used to input the video editing indication information and the processed video to be edited into a target application, so that the target application performs video editing processing on at least one processed video to be edited based on the video editing indication information, thereby obtaining an edited video.
[0227] 104. Extract the identification information from the identification video frame in the edited video to obtain identification restoration information of the identification video frame in the edited video.
[0228] After obtaining the edited video, identification extraction may be performed on identification video frames having identification information in the edited video to obtain identification restoration information of the video frames in the edited video.
[0229] When there are multiple videos to be edited, the identification restoration information of the identification video frame corresponds to the identification attribute of the identification video frame, and the identification attribute of the identification video frame is the same as the identification attribute of the original video frame.
[0230] For example, when the original video frame in the at least one video to be edited is marked, the original video frame is marked in the form of a binary sequence code, and the marking restoration information of the video frame may be a binary sequence code.
[0231] For another example, when the original video frame in the at least one video to be edited is marked, a matrix is selected to mark the original video frame, and the marking restoration information of the video frame may be a matrix.
[0232] In one embodiment, when the edited video is edited from multiple videos to be edited, and the identification attribute of the original video frame is a binary sequence code, the identification restoration information may include a video identification restoration sequence and a video frame identification restoration sequence. Then the step of "extracting identification from the video frame with identification information in the edited video to obtain identification restoration information of the edited video frame" includes:
[0233] Performing frame processing on the edited video to obtain a plurality of identified video frames of the edited video;
[0234] Based on the video identification attribute and the video frame identification attribute of the identification video frame, performing region restoration processing on each identification video frame to obtain a video identification region and a video frame identification region of each identification video frame;
[0235] Based on the video identification area and the video frame identification area, identification extraction is performed on each identification video frame to obtain a video identification restoration sequence and a video frame identification restoration sequence for each identification video frame.
[0236] The video clipping process can also be performed by a video clipping application program. For example, a video clipping application program such as Adobe Premiere Pro can be used to perform frame processing on the video clipping process, thereby obtaining multiple video frames of the video clipping process.
[0237] In one embodiment, after obtaining a plurality of identification video frames of the edited video, the video identification region and the video frame identification region may be restored in the identification video frames.
[0238] For example, the step of "performing identification processing on the original video frame in at least one video to be edited" evenly divides the original video frame into the video identification area and the video frame identification area. After obtaining the identified video frame, the video identification area and the video frame identification area can be evenly restored in the identified video frame.
[0239] For another example, the step of "performing identification processing on the original video frame in at least one video to be edited" is to divide the original video frame of the video to be edited into a video identification area and a video frame identification area according to the video identification attribute and the video frame identification attribute of the original video frame. After obtaining the identified video frame, each area can be restored based on the video identification attribute and the video frame identification attribute of the identified video frame to obtain the video identification area and the video frame identification area of each video frame.
[0240] For example, the video identification attribute of the identified video frame is to identify the video frame using a video identification sequence, and the sequence length of the video identification sequence is 128 bits. The video frame identification attribute of the identified video frame is to identify the video frame using a video frame identification sequence, and the sequence length of the video frame identification sequence is 10 bits. Then, the identified video frame can be subjected to region restoration processing according to the sequence length of the video identification sequence and the sequence length of the video frame identification sequence, thereby obtaining a video identification region and a video frame identification region of each video frame.
[0241] For example, the region of the identified video frame may be restored according to the ratio of the sequence length of the video identification sequence to the sequence length of the video frame identification sequence, thereby restoring the video identification region and the video frame identification region of the video frame.
[0242] In one embodiment, after dividing the video identification area and the video frame identification area in the step of "marking the original video frame in the at least one video to be edited", the video identification area and the video frame identification area are also gridded, and after restoring the video identification area and the video frame identification area in the marked video frame, the video identification area and the video frame identification area can also be grid restored to restore the previously divided grid. Specifically, the video identification area and the video frame identification area can also be grid restored according to the sequence length of the video identification sequence and the sequence length of the video frame identification sequence.
[0243] After restoring the video identification area and the video frame identification area, the identification of each video frame can be extracted, thereby obtaining a video identification restoration sequence and a video frame identification restoration sequence for each video frame. Specifically, the step of "based on the video identification area and the video frame identification area, extracting the identification of each identification video frame to obtain a video identification restoration sequence and a video frame identification restoration sequence for each identification video frame" may include:
[0244] Extracting image information of the identified video frame in the video identification area and the video frame identification area respectively;
[0245] Performing information restoration processing on the image information of the video identification area according to a preset video identification information restoration rule to obtain a video identification restoration sequence;
[0246] The image information of the video frame identification area is restored according to a preset video frame identification information restoration rule to obtain a video frame identification restoration sequence.
[0247] For example, after the video identification region and the video frame identification region are obtained and both the video identification region and the video frame identification region are gridded, image information of the video identification region and the video frame identification region can be extracted respectively.
[0248] In one embodiment, the method of extracting the image information of the video identification area corresponds to the method of fusing the video identification information with the image information of the video identification area in the original video frame.
[0249] For example, when the video identification information is fused with the image information of the central pixel point of the grid in the video identification area in the original video frame, the image information of the central information point of the grid in the video identification area in the identification video frame can be extracted.
[0250] For another example, when the frequency identification information is fused with the image information of the grid of the video identification area in the original video frame, the image information of the grid of the video identification area in the identification video frame can be extracted.
[0251] In one embodiment, the method of extracting image information of the video frame identification area and the method of extracting image information of the video identification area are similar in principle, and the embodiment of the present application is not elaborated here.
[0252] In one embodiment, after the image information of the video identification area is extracted, the image information of the video identification area may be restored according to a preset video identification information restoration rule to obtain a video identification restoration sequence.
[0253] The preset video identification information restoration rule includes rules to be followed when restoring the video identification information. The preset video identification information restoration rule also corresponds to the step of "performing identification processing on the original video frame in at least one video to be edited".
[0254] For example, in the step of "marking the original video frame in at least one video to be edited", a binary sequence code is used to generate a video identification sequence of the original video frame. The binary sequence code is in the form of "-1" and "1". And the first mapping rule is to map "-1" to (0, 0, 0), and to map "1" to (255, 255, 255). Then, when the video identification information is fused with the image information of the central pixel point of the video identification area in the original video frame, an overlay method is adopted, and the preset video identification information restoration rule can be a color-sequence restoration algorithm. Among them, the color-sequence restoration algorithm can be as follows:
[0255]
[0256] Among them, X refers to the restored sequence value, and R, G, and B are the values corresponding to the three primary colors in the pixel.
[0257] Then, when the video identification information is restored according to the color-sequence restoration algorithm, the image information of the video identification area can be restored according to the color-sequence restoration algorithm to obtain a video identification restoration sequence. Specifically, the step of "restore the image information of the video identification area according to the preset video identification information restoration rule to obtain a video identification restoration sequence" may include:
[0258] Performing computational processing on the image information of the video identification area according to a preset video identification information restoration rule to obtain processed image information;
[0259] The processed image information is restored and mapped according to a preset video identification sequence restoration rule to obtain a video identification restoration sequence.
[0260] For example, when the image information of the center pixel of the first grid in the video identification area of the identification video frame is (255, 255, 255), (255, 255, 255) can be substituted into the formula in the color-sequence restoration algorithm: Calculation is performed to obtain processed image information 255.
[0261] Then, the processed image information and the color-sequence restoration algorithm are combined For comparison, since 255 is greater than Therefore, the sequence value corresponding to the central pixel point can be mapped to 1, so that the first sequence value of the video identification restoration sequence is 1.
[0262] For another example, when the image information of the center pixel of the second grid in the video identification area in the identification video frame is (0, 0, 0), (0, 0, 0) can be substituted into the formula in the color-sequence restoration algorithm: Calculation is performed to obtain processed image information 0.
[0263] Then, the processed image information and the color-sequence restoration algorithm are combined Since 0 is less than Therefore, the sequence value corresponding to the central pixel point can be mapped to 0, so that the second sequence value of the video identification restoration sequence is 0.
[0264] And so on, thereby restoring the video identification restoration sequence of the identified video frame video in the processed clipped video.
[0265] In the embodiment of the present application, the color and value can be quickly converted through the color-sequence restoration algorithm, and because binary sequence codes that satisfy pseudo-orthogonality are used when generating video identification sequences and video frame identification sequences, the color-sequence restoration algorithm can accommodate a certain amount of noise and has high reliability.
[0266] In one embodiment, after extracting the image information of the video frame identification area, the image information of the video frame identification area may also be restored according to a preset video frame identification information restoration rule to obtain a video frame identification restoration sequence. Specifically, the step of "performing information restoration processing on the image information of the video frame identification area according to a preset video frame identification information restoration rule to obtain a video frame identification restoration sequence" may include:
[0267] Performing computational processing on the image information of the video frame identification area according to a preset video frame identification information restoration rule to obtain processed image information;
[0268] The processed image information is restored and mapped according to a preset video frame identification sequence restoration rule to obtain a video frame identification restoration sequence.
[0269] Among them, the steps of "restoring the image information of the video frame identification area according to the preset video frame identification information restoration rule" and "restoring the image information of the video identification area according to the preset video identification information restoration rule" have the same principles and will not be elaborated here.
[0270] 105. Perform video editing information restoration processing on the edited video based on the identification restoration information of the identified video frame in the edited video to obtain video editing information of the edited video.
[0271] The video clipping information includes the information that the restored target application uses to perform video clipping on the processed video to be clipped, and the video clipping information corresponds to the video clipping indication information.
[0272] For example, when there are two processed videos to be edited, each of which is 20 seconds long, the video editing indication information may include that the first processed video to be edited retains seconds 0 to 5 with a speed change rate of 1; the second processed video to be edited retains seconds 1 to 10 with a speed change rate of 2, and the two processed videos to be edited are spliced into one video.
[0273] Then, the video editing information also includes: the start second, end second and speed change rate of the video to be edited after the first processing; the start second, end second and speed change rate of the video to be edited after the second processing.
[0274] After obtaining the identification restoration information of the video frame in the edited video, the video editing information restoration process can be performed on the edited video based on the identification restoration information to obtain the video editing information of the edited video. Specifically, the step of "based on the identification restoration information of the video frame in the edited video, performing the video editing information restoration process on the edited video to obtain the video editing information of the edited video" may include:
[0275] Determine a target video frame in the identified video frame based on the identification restoration information of the identified video frame;
[0276] The identification restoration information of the target video frame is processed by video clipping information restoration to obtain video clipping information.
[0277] The target video frame includes a video frame that can restore the video clip information. For example, the target video frame may include a start video frame, a middle video frame, and an end video frame.
[0278] In one embodiment, when the identification restoration information of the identification video frame includes a video identification restoration sequence and a video frame identification restoration sequence, the target video frame may be determined in the identification video frame according to the video identification restoration sequence and the video frame identification restoration sequence.
[0279] For example, when the video identification restoration sequence and the video frame identification restoration sequence that identify the video frame are ordered sequences, the target video frame may be determined according to sequence values in the video identification restoration sequence and the video frame identification restoration sequence.
[0280] For example, there are 4 marker video frames in the edited video, and the video frame marker restoration sequences of the 4 marker video frames are [0, 0, 0], [0, 0, 1], [0, 1, 0], [0, 1, 1]. Then, according to the video frame marker restoration sequences of the marker video frames, it can be determined that the marker video frame corresponding to [0, 0, 0] and the marker video frame corresponding to [0, 1, 1] are the target video frames.
[0281] After the target video frame is determined, the identification restoration information of the target video frame may be restored by performing video clipping information restoration processing to obtain the video clipping information.
[0282] In one embodiment, if a certain segment of the edited video uses a variable speed editing effect during the editing process, the following variable speed restoration algorithm can be used to perform information restoration processing.
[0283] For example, in the same segment of continuous m frames with the same video ID restoration sequence, where the video frame ID restoration sequence of the starting video frame in the m frames is x, and the video frame ID restoration information of the ending video frame is y, if the following formula is satisfied:
[0284] yx=m-1
[0285] It is considered that there is no speed change. If the following formula is satisfied:
[0286] yx>m-1
[0287] It is considered that a slow operation is performed, and the rate is (yx) / (m-1) times the original. If the following formula is satisfied:
[0288] yx <m-1
[0289] It is considered that a fast operation is performed, with a rate of (yx) / (m-1) times the original rate.
[0290] The speed-changing restoration method can quickly calculate whether the video clips in the edited video have been added with a speed-changing editing effect according to the video frame identification restoration sequence. If a speed-changing editing effect has been added, the speed-changing rate can also be calculated, thereby improving the speed and efficiency of the automatic calculation.
[0291] In one embodiment, the number of video frames in each video to be edited can be determined by the duration and frame rate of the video to be edited, so the video frame identification restoration sequence can also be converted into time according to a time restoration algorithm. For example, the following formula can be used:
[0292]
[0293] Convert the video frame identification restoration sequence to time, where f is the video frame rate, z is the video frame identification restoration sequence that identifies the video frame, and t is time.
[0294] The video frame rate includes the number of video frames displayed per second when playing the video. For example, when the frame rate of the video to be edited is 30 frames / hour, it means that when the video to be edited is played, 30 video frames in the video to be edited will be displayed per second.
[0295] In one embodiment, the edited video can be restored according to the time restoration algorithm and the variable speed restoration algorithm, including the starting seconds and ending seconds in the video to be edited and whether the edited video has a variable speed editing effect added, thereby obtaining the video editing information of the edited video.
[0296] 106. Detect the video editing function of the target application according to the video editing indication information and the video editing information, and obtain and output the video editing function detection result.
[0297] After obtaining the video clipping information of the clipped video, the video clipping function of the target application can be detected according to the video clipping indication information and the video clipping information, and the video clipping function detection result can be obtained and output. Specifically, the step of "detecting the video clipping function of the target application according to the video clipping indication information and the video clipping information, and obtaining and outputting the video clipping function detection result" can include:
[0298] Matching the video clip information with the video clip indication information;
[0299] When the video clip information and the video clip indication information match, a result of normal video clip function detection is obtained and output;
[0300] When the video clip information and the video clip indication information do not match, a result of detecting an abnormality of the video clip function is obtained and output.
[0301] For example, when there are two processed videos to be edited, each of which is 20 seconds long, the video editing indication information may include that the first processed video to be edited retains seconds 0 to 5 with a speed change rate of 1; the second processed video to be edited retains seconds 1 to 10 with a speed change rate of 2, and the two processed videos to be edited are spliced into one video.
[0302] The video clipping information obtained after information restoration includes that after the first processing, the video to be edited retains the 0th to 5th seconds, and the speed change rate is 1; after the second processing, the video to be edited retains the 1st to 10th seconds, and the speed change rate is 2.
[0303] The video clip information and the video clip indication information are matched. Since the video clip information and the video clip indication information match, a result indicating that the video clip function detection is normal is output.
[0304] However, if the video editing information obtained after information restoration includes that after the first processing, the video to be edited retains the 0th to 10th seconds, and the speed change rate is 2; after the second processing, the video to be edited retains the 1st to 5th seconds, and the speed change rate is 1.
[0305] Since the video clip information and the video clip indication information do not match, a result indicating that the video clip function detects an abnormality is output.
[0306] The embodiment of the present application proposes a detection method for an application, which includes obtaining at least one video to be edited, performing identification processing on the original video frame in at least one video to be edited, and obtaining at least one processed video to be edited, wherein the processed video to be edited includes an identification video frame with identification information; then using the target application to perform video editing processing on at least one processed video to be edited based on video editing indication information to obtain an edited video; performing identification extraction on the identification video frame with identification information in the edited video to obtain identification restoration information of the identification video frame in the edited video; next, based on the identification restoration information of the identification video frame in the edited video, performing video editing information restoration processing on the edited video to obtain video editing information of the edited video; finally, detecting the video editing function of the target application according to the video editing indication information and the video editing information, and obtaining and outputting the video editing function detection result. The embodiment of the present application proposes a detection method for the video editing function of an application, which can automatically detect whether the video editing function of the application is normal, without the need to manually judge whether the editing effect is correctly added to the edited video, saving a lot of manpower and material resources.
[0307] In addition, in an embodiment of the present application, by adding video identification information to the original frames in the video to be edited, the detection method proposed in the present application can be accurately located to each frame, so that it can be determined whether each frame is correct and whether the added editing effect is normal, thereby improving the accuracy and reliability of the detection.
[0308] According to the method described in the above embodiment, the following is further described in detail with examples.
[0309] The embodiment of the present application will take the example of the detection device being integrated on the server to introduce the method of the embodiment of the present application.
[0310] like Fig. 9 As shown, a detection method for an application program, the specific process is as follows:
[0311] 201. The server obtains at least one video to be edited.
[0312] For example, the server obtains two videos to be edited, each of which includes 30 original video frames.
[0313] 202. The server performs identification processing on an original video frame in at least one video to be edited to obtain at least one processed video to be edited, where the processed video to be edited includes an identified video frame having identification information.
[0314] For example, the server generates a video identification sequence and a video frame identification sequence for two videos to be edited, respectively, wherein the video identification sequence and the video frame identification sequence are both binary sequence codes satisfying pseudo-orthogonality.
[0315] When generating the video identification sequence, the server may generate two binary sequence codes with a sequence length of 128 bits, and respectively assign the two binary sequence codes to the two videos to be edited, wherein the sequence value in the binary sequence code is "1" or "-1".
[0316] When generating the video frame identification sequence, the server may generate an ordered 5-bit binary sequence code for each original video frame of the video to be edited.
[0317] For example, when the server generates a binary sequence code with a sequence length of 5 bits, it can generate a video frame identification sequence of the first original video frame in the video to be edited as [0, 0, 0, 0, 0] and a video frame identification sequence of the second original video frame as [0, 0, 0, 0, 1].
[0318] Next, the server maps the video identification sequence and the video frame identification sequence into video identification information and video frame identification information.
[0319] In one embodiment, for the video identification sequence, the server may map "1" in the video identification sequence to (255, 255, 255) and map "-1" in the video identification sequence to (0, 0, 0), thereby obtaining the video identification information.
[0320] In one embodiment, for the video frame identification sequence, the "0" in the binary sequence code can be first mapped to B 1 , and B 1=[1,-1,1,-1,1,-1,1,-1], mapping the "1" in the binary sequence code to B 2 , and B 2 =[-1,1,-1,1,-1,1,-1,1].
[0321] Then, the server maps "1" in the video frame identification sequence to (255, 255, 255), and maps "-1" in the video frame identification sequence to (0, 0, 0), thereby obtaining a video identification sequence.
[0322] In one embodiment, after obtaining the video identification information and the video frame identification information, the server may fuse the video identification information, the video frame identification information and the image information of the original video frame to generate an identification video frame, thereby obtaining the processed video to be edited.
[0323] Before fusion, the server may divide the original video frame into a video identification area and a video frame identification area and grid them, thereby fusing the video identification information with the image information in the video identification area and fusing the video frame identification information with the image information in the video identification area.
[0324] For example, the server may overlay the video identification information and the image information in the video identification area, and overlay the video frame identification information and the image information in the video frame identification area, so as to obtain the processed video to be edited, for example, Fig.10 shown.
[0325] 203. The server uses the target application to perform video editing on at least one processed video to be edited based on the video editing indication information to obtain an edited video.
[0326] For example, if two videos to be edited are both 10 seconds long and the frame rate is fixed at 3 frames per second, the video editing indication information may include that the first processed video to be edited includes seconds 0 to 5, and the speed change rate is 1; the second processed video to be edited retains seconds 1 to 10, and the speed change rate is 2, and the two processed videos to be edited are spliced into one video.
[0327] Then the target application can edit the first processed video to be edited and the second processed video to be edited according to the video editing indication information, so as to obtain an edited video.
[0328] 204. The server extracts identification information from identification video frames having identification information in the edited video to obtain identification restoration information of the identification video frames in the edited video.
[0329] For example, the server may extract image information identifying the video frame in the video identification area and the video frame identification area.
[0330] Then, the server performs information restoration processing on the image information of the video identification area using a color-sequence restoration algorithm to obtain a video identification restoration sequence.
[0331] For example, when the server extracts the image information of the central pixel of the first grid in the video identification area of the identification video frame as (255, 255, 255), it can substitute (255, 255, 255) into the formula in the color-sequence restoration algorithm: Calculation is performed to obtain processed image information 255.
[0332] The server then processes the image information and the color-sequence restoration algorithm. For comparison, since 255 is greater than Therefore, the sequence value corresponding to the central pixel point can be mapped to 1, so that the first sequence value of the video identification restoration sequence is 1.
[0333] For another example, when the server extracts the image information of the central pixel of the second grid in the video identification area in the identification video frame as (0, 0, 0), it can substitute (0, 0, 0) into the formula in the color-sequence restoration algorithm: Calculation is performed to obtain processed image information 0.
[0334] The server then processes the image information and the color-sequence restoration algorithm. Since 0 is less than Therefore, the sequence value corresponding to the central pixel point can be mapped to 0, so that the second sequence value of the video identification restoration sequence is 0.
[0335] And so on, thereby restoring the video identification restoration sequence of the identified video frame video in the processed clipped video.
[0336] Similarly, the server may also use a color-sequence restoration algorithm to perform information restoration processing on the image information of the video frame identification area to obtain a video frame identification restoration sequence.
[0337] The video identification restoration sequence and the video frame identification restoration sequence are restored by the color-sequence restoration algorithm, so that the detection method proposed in the embodiment of the present application has high reliability and high robustness.
[0338] Therefore, for example, the video identification restoration sequence obtained is S ′ , and S ′ The following relationship is met:
[0339]
[0340] The k value represents that this frame is one of the frames in the kth video. Q is the number of video identification restoration sequences. For example, if there are 2 videos to be edited, the number of video identification restoration sequences is 2. i The color-sequence restoration algorithm proposed in the embodiment of the present application has a high error tolerance rate, that is, even if there are several color errors due to noise during the identification extraction process, it will not affect the result of the k value.
[0341] 205. The server performs video clipping information restoration processing on the edited video based on the identification restoration information of the video frames in the edited video to obtain video clipping information of the edited video.
[0342] In one embodiment, the server may determine the target video frame in the identified video frame based on the identification restoration information of the identified video frame, and then restore the video clipping information of the identification restoration information of the target video frame to obtain the video clipping information.
[0343] For example, there are 4 marker video frames in the edited video, and the video frame marker restoration sequences of the 4 marker video frames are [0, 0, 0], [0, 0, 1], [0, 1, 0], [0, 1, 1]. Then, according to the video frame marker restoration sequences of the marker video frames, it can be determined that the marker video frame corresponding to [0, 0, 0] and the marker video frame corresponding to [0, 1, 1] are the target video frames.
[0344] The server can then use the variable speed restoration algorithm and the time restoration algorithm to restore the edited video, including the starting seconds and ending seconds in the video to be edited, and whether the edited video has a variable speed editing effect added, thereby obtaining the video editing information of the edited video.
[0345] 206. The server detects the video clipping function of the target application according to the video clipping indication information and the video clipping information, and obtains and outputs a video clipping function detection result.
[0346] For example, when there are two processed videos to be edited, each of which is 20 seconds long, the video editing indication information may include that the first processed video to be edited retains seconds 0 to 5 with a speed change rate of 1; the second processed video to be edited retains seconds 1 to 10 with a speed change rate of 2, and the two processed videos to be edited are spliced into one video.
[0347] The video clipping information obtained after information restoration includes that after the first processing, the video to be edited retains the 0th to 5th seconds, and the speed change rate is 1; after the second processing, the video to be edited retains the 1st to 10th seconds, and the speed change rate is 2.
[0348] The video clip information and the video clip indication information are matched. Since the video clip information and the video clip indication information match, a result indicating that the video clip function detection is normal is output.
[0349] However, if the video editing information obtained after information restoration includes that after the first processing, the video to be edited retains the 0th to 10th seconds, and the speed change rate is 2; after the second processing, the video to be edited retains the 1st to 5th seconds, and the speed change rate is 1.
[0350] Since the video clip information and the video clip indication information do not match, a result indicating that the video clip function detects an abnormality is output.
[0351] The embodiment of the present application proposes a detection method for an application, which includes a server obtaining at least one video to be edited, performing identification processing on the original video frame in at least one video to be edited, and obtaining at least one processed video to be edited, wherein the processed video to be edited includes an identification video frame with identification information; then the server uses the target application to perform video editing processing on at least one processed video to be edited based on video editing indication information to obtain an edited video; the server extracts the identification of the identification video frame with identification information in the edited video, and obtains the identification restoration information of the identification video frame in the edited video; next, the server performs video editing information restoration processing on the edited video based on the identification restoration information of the identification video frame in the edited video, and obtains the video editing information of the edited video; finally, the server detects the video editing function of the target application according to the video editing indication information and the video editing information, and obtains and outputs the video editing function detection result. The embodiment of the present application proposes a method for detecting the video editing function of an application, which can automatically detect whether the video editing function of the application is normal, without the need to manually judge whether the edited video has correctly added the editing effect, saving a lot of manpower and material resources.
[0352] In order to better implement the detection method provided in the embodiment of the present application, a detection device is also provided in one embodiment, and the detection device can be integrated into a computer device. The meanings of the terms are the same as those in the above-mentioned image processing method, and the specific implementation details can refer to the description in the method embodiment.
[0353] In one embodiment, a detection device is provided, which can be integrated into a computer device such as a detection computer device. Fig.11 As shown, the image processing device includes: an acquisition unit 301, a mark processing unit 302, a video clip processing unit 303, a mark extraction unit 304, an information restoration processing unit 305 and a detection unit 306, which are specifically as follows:
[0354] An acquisition unit 301 is used to acquire at least one video to be edited;
[0355] The identification processing unit 302 is used to perform identification processing on the original video frame in at least one video to be edited to obtain at least one processed video to be edited, wherein the processed video to be edited includes an identification video frame having identification information;
[0356] The video clip processing unit 303 is used to perform video clip processing on at least one processed video to be clipped based on the video clip indication information using a target application to obtain a clipped video;
[0357] The identification extraction unit 304 is used to extract identification information from the identification video frame in the edited video to obtain identification restoration information of the identification video frame in the edited video;
[0358] The information restoration processing unit 305 is used to perform video clipping information restoration processing on the edited video based on the identification restoration information of the identified video frame in the edited video to obtain the video clipping information of the edited video;
[0359] The detection unit 306 is used to detect the video clipping function of the target application according to the video clipping indication information and the video clipping information, and obtain and output a video clipping function detection result.
[0360] In one embodiment, if Fig.12 As shown, the identification processing unit 302 includes:
[0361] An acquisition subunit 3021 is used to acquire the number of videos to be edited and the number of original video frames of each video to be edited;
[0362] The identification processing subunit 3022 is used to perform identification processing on the original video frames in each video to be edited based on the number of videos to be edited and the number of original video frames of each video to be edited, so as to obtain at least one processed video to be edited.
[0363] In one embodiment, if Fig.12 As shown, the identification extraction unit 304 includes:
[0364] The frame processing subunit 3041 is used to perform frame processing on the edited video to obtain multiple identification video frames of the edited video;
[0365] The region restoration processing subunit 3042 is used to perform region restoration processing on each identified video frame based on the video identification attribute and the video frame identification attribute of the identified video frame to obtain the video identification region and the video frame identification region of each identified video frame;
[0366] The identifier extraction subunit 3043 is used to extract identifiers from each identifier video frame based on the video identifier region and the video frame identifier region, and obtain a video identifier restoration sequence and a video frame identifier restoration sequence for each identifier video frame.
[0367] In one embodiment, if Fig.12 As shown, the information restoration processing unit 305 includes:
[0368] A determination subunit 3051 is used to determine a target video frame in the identified video frame based on the identification restoration information of the identified video frame;
[0369] The information restoration processing subunit 3052 is used to perform video clip information restoration processing on the identification restoration information of the target video frame to obtain video clip information.
[0370] In one embodiment, if Fig.12 As shown, the detection unit 306 includes:
[0371] A matching subunit 3061, configured to match the video clip information with the video clip indication information;
[0372] The first output subunit 3062 is used to obtain and output a result of normal video clip function detection when the video clip information matches the video clip indication information;
[0373] The second output subunit 3063 is used to obtain and output a result of detecting an abnormality of the video editing function when the video editing information and the video editing indication information do not match.
[0374] In specific implementation, the above units can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same or several entities. The specific implementation of the above units can refer to the previous method embodiments, which will not be repeated here.
[0375] The above detection device can realize automatic detection of the video editing function of the application program, thereby saving manpower and material resources.
[0376] The present application also provides a computer device, which may include a terminal or a server. For example, the computer device may be used as a detection terminal, which may be a mobile phone, a tablet computer, etc.; for another example, the computer device may be a server, such as a detection server, etc. Fig.13 As shown, it shows a schematic diagram of the structure of the terminal involved in the embodiment of the present application, specifically:
[0377] The computer device may include one or more processing core processors 401, one or more computer-readable storage media memories 402, a power supply 403, an input unit 404 and other components. Those skilled in the art will appreciate that Figure 4 The computer device structure shown in the figure does not constitute a limitation on the computer device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. Among them:
[0378] The processor 401 is the control center of the computer device. It uses various interfaces and lines to connect various parts of the entire computer device. By running or executing software programs and / or modules stored in the memory 402 and calling data stored in the memory 402, it executes various functions of the computer device and processes data, thereby performing overall detection of the computer device. Optionally, the processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user pages and application programs, etc., and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 401.
[0379] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications and data processing by running the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 402 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.
[0380] The computer device also includes a power supply 403 for supplying power to various components. Preferably, the power supply 403 can be logically connected to the processor 401 through a power management system, so as to manage charging, discharging, and power consumption through the power management system. The power supply 403 can also include any components such as one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators.
[0381] The computer device may further include an input unit 404, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
[0382] Although not shown, the computer device may further include a display unit, etc., which will not be described in detail herein. Specifically in this embodiment, the processor 401 in the computer device will load the executable files corresponding to the processes of one or more application programs into the memory 402 according to the following instructions, and the processor 401 will run the application programs stored in the memory 402, thereby realizing various functions, as follows:
[0383] Obtain at least one video to be edited;
[0384] Performing identification processing on the original video frame in the at least one video to be edited to obtain at least one processed video to be edited, wherein the processed video to be edited includes an identified video frame having identification information;
[0385] Using a target application to perform video editing processing on the at least one processed video to be edited based on the video editing indication information to obtain an edited video;
[0386] Extracting identification information from identification video frames having identification information in the edited video to obtain identification restoration information of the identification video frames in the edited video;
[0387] Based on the identification restoration information of the identified video frame in the edited video, performing video editing information restoration processing on the edited video to obtain video editing information of the edited video;
[0388] The video clipping function of the target application is detected according to the video clipping indication information and the video clipping information, and a video clipping function detection result is obtained and output.
[0389] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0390] According to one aspect of the present application, a computer program product or a computer program is provided, the computer program product or the computer program including computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in various optional implementations in the above-mentioned embodiments.
[0391] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by a computer program, or by controlling related hardware through a computer program. The computer program may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0392] To this end, an embodiment of the present application further provides a storage medium in which a computer program is stored, and the computer program can be loaded by a processor to execute the steps in any of the abnormal behavior-based alarm methods provided in the embodiments of the present application. For example, the computer program can execute the following steps:
[0393] Obtain at least one video to be edited;
[0394] Performing identification processing on the original video frame in the at least one video to be edited to obtain at least one processed video to be edited, wherein the processed video to be edited includes an identified video frame having identification information;
[0395] Using a target application to perform video editing processing on the at least one processed video to be edited based on the video editing indication information to obtain an edited video;
[0396] Extracting identification information from identification video frames having identification information in the edited video to obtain identification restoration information of the identification video frames in the edited video;
[0397] Based on the identification restoration information of the identified video frame in the edited video, performing video editing information restoration processing on the edited video to obtain video editing information of the edited video;
[0398] The video clipping function of the target application is detected according to the video clipping indication information and the video clipping information, and a video clipping function detection result is obtained and output.
[0399] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0400] Since the computer program stored in the storage medium can execute the steps in the detection method of any application provided in the embodiments of the present application, the beneficial effects that can be achieved by the detection method of any application provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.
[0401] The above is a detailed introduction to the detection method, device and electronic device of an application provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A method for detecting an application, characterized in that: include: Obtain at least one video to be edited; Performing identification processing on the original video frame in the at least one video to be edited to obtain at least one processed video to be edited, wherein the processed video to be edited includes an identified video frame having identification information; Using a target application to perform video editing processing on the at least one processed video to be edited based on the video editing indication information to obtain an edited video; Extracting identification information from identification video frames having identification information in the edited video to obtain identification restoration information of the identification video frames in the edited video; Based on the identification restoration information of the identified video frame in the edited video, performing video editing information restoration processing on the edited video to obtain video editing information of the edited video; The video clipping function of the target application is detected according to the video clipping indication information and the video clipping information, and a video clipping function detection result is obtained and output.
2. The method for detecting an application program according to claim 1, wherein: The step of performing identification processing on the original video frames in the at least one video to be edited to obtain at least one processed video to be edited includes: Obtain the number of videos to be edited and the number of original video frames of each video to be edited; Based on the number of videos to be edited and the number of original video frames of each video to be edited, identification processing is performed on the original video frames in each video to be edited to obtain at least one processed video to be edited.
3. The method for detecting an application program according to claim 2, wherein: The identification information includes video identification information and video frame identification information; The step of performing identification processing on the original video frames in each video to be edited based on the number of videos to be edited and the number of original video frames of each video to be edited to obtain at least one processed video to be edited includes: Generating video identification information of the original video frame in each video to be edited according to the number of videos to be edited; Generating video frame identification information of the original video frames in each video to be edited according to the number of original video frames of each video to be edited; The video identification information, the video frame identification information and the image information of the original video frame are fused to generate an identification video frame, thereby obtaining a processed video to be edited.
4. The method for detecting an application program according to claim 3, wherein: The step of generating video identification information of an original video frame in each video to be edited according to the number of videos to be edited includes: Determining the video identification attribute of the original video frame in each video to be edited according to the number of videos to be edited; Generate a video identification sequence of the original video frame in each video to be edited based on the video identification attributes of the original video frame and a preset video identification sequence generation function; According to the first mapping rule, the video identification sequence of the original video frames in each video to be edited is mapped into corresponding video identification information.
5. The method for detecting an application program according to claim 3, wherein: The step of generating video frame identification information of the original video frames in each video to be edited according to the number of original video frames in each video to be edited comprises: Determining the video frame identification attributes of the original video frames in each video to be edited according to the number of original video frames of each video to be edited; Generate a video frame identification sequence of the original video frame in each video to be edited based on the video frame identification attributes of the original video frame and a preset video frame identification sequence generation function; According to the second mapping rule, the video frame identification sequence of the original video in each video to be edited is mapped into corresponding video frame identification information.
6. The method for detecting an application program according to claim 3, wherein: The original video frame includes a video identification area and a video frame identification area; the video identification information, the video frame identification information and the image information of the original video frame are fused to generate an identification video frame to obtain a processed video to be edited, including: The video identification information is fused with the image information of the video identification area in the original video frame, and the video frame identification information is fused with the image information of the video frame identification area in the initial processing video frame to generate an identification video frame, so as to obtain the processed video to be edited.
7. The method for detecting an application program according to claim 1, wherein: The identification restoration information of the video frame includes a video identification restoration sequence and a video frame identification restoration sequence; the identification video frame includes a video identification attribute and a video frame identification attribute; The step of extracting the identification information of the video frame having the identification information in the edited video to obtain the identification restoration information of the edited video frame includes: Performing frame processing on the edited video to obtain a plurality of identified video frames of the edited video; Based on the video identification attribute and the video frame identification attribute of the identification video frame, performing region restoration processing on each identification video frame to obtain a video identification region and a video frame identification region of each identification video frame; Based on the video identification area and the video frame identification area, identification extraction is performed on each identification video frame to obtain a video identification restoration sequence and a video frame identification restoration sequence of each identification video frame.
8. The method for detecting an application program according to claim 7, wherein: The step of extracting the identification of each identified video frame based on the video identification area and the video frame identification area to obtain a video identification restoration sequence and a video frame identification restoration sequence for each identified video frame includes: Extracting image information of the identified video frame in the video identification area and the video frame identification area respectively; Performing information restoration processing on the image information of the video identification area according to a preset video identification information restoration rule to obtain the video identification restoration sequence; The image information of the video frame identification area is restored according to a preset video frame identification information restoration rule to obtain the video frame identification restoration sequence.
9. The method for detecting an application program according to claim 8, wherein: The performing information restoration processing on the image information of the video identification area according to the preset video identification information restoration rule to obtain the video identification restoration sequence includes: Performing computational processing on the image information of the video identification area according to a preset video identification information restoration rule to obtain processed image information; The processed image information is restored and mapped according to a preset video identification sequence restoration rule to obtain a video identification restoration sequence.
10. The method for detecting an application program according to claim 1, wherein: The performing video clipping information restoration processing on the clipped video based on the identification restoration information of the identified video frame in the clipped video to obtain the video clipping information of the clipped video includes: Determining a target video frame in the identified video frame based on the identification restoration information of the identified video frame; The identification restoration information of the target video frame is subjected to video clipping information restoration processing to obtain video clipping information.
11. The method for detecting an application program according to claim 1, wherein: The detecting the video clipping function of the target application according to the video clipping indication information and the video clipping information, and obtaining and outputting the video clipping function detection result, comprises: Matching the video clip information with the video clip indication information; When the video clip information and the video clip indication information match, obtaining and outputting a result that the video clip function detection is normal; When the video clip information and the video clip indication information do not match, a result of detecting an abnormality of the video clip function is obtained and output.
12. A detection device for an application, characterized in that: include: An acquisition unit, used for acquiring at least one video to be edited; An identification processing unit, configured to perform identification processing on an original video frame in the at least one video to be edited, to obtain at least one processed video to be edited, wherein the processed video to be edited includes an identification video frame having identification information; A video clip processing unit, configured to perform video clip processing on the at least one processed video to be clipped based on the video clip indication information using a target application to obtain a clipped video; An identification extraction unit, used to extract identification information from identification video frames in the edited video to obtain identification restoration information of the identification video frames in the edited video; An information restoration processing unit, configured to perform video clipping information restoration processing on the edited video based on the identification restoration information of the identified video frame in the edited video, so as to obtain the video clipping information of the edited video; The detection unit is used to detect the video clipping function of the target application according to the video clipping indication information and the video clipping information, and obtain and output the video clipping function detection result.
13. An electronic device, characterized in that: It comprises a memory and a processor; the memory stores an application program, and the processor is used to run the application program in the memory to execute the operations in the detection method of the application program according to any one of claims 1 to 11.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the steps in the detection method of an application program according to any one of claims 1 to 11.
15. A computer program product, characterized in that The computer program product includes computer instructions, which are stored in a computer-readable storage medium. The processor of the computer device reads and executes the computer instructions from the computer-readable storage medium, so that the computer device performs the steps in the detection method of the application program described in any one of claims 1 to 11.
Citation Information
Patent Citations
Video clip method and electronic device
CN107888988A
Video clip method and apparatus
CN108259990A