Video processing method and device, electronic equipment and storage medium

By extracting violation video clips and their preceding and following frames from the event video, generating video clips that comply with the rules, and adding prompts, the problem of viewers understanding the rules is solved, thus improving the user experience.

CN123185404APending Publication Date: 2026-11-27MIGU CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611226431.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-13
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

In video playback scenarios involving rules and regulations, such as sports videos, existing technologies struggle to effectively help viewers unfamiliar with the rules understand them, resulting in a poor user experience.

Method used

By extracting the first video segment that does not meet the set rules from the target video and its preceding and following video frames, a second video segment that meets the rules is generated using a text-to-image video generation model. In addition, prompt words are generated by combining user characteristics, and a demonstration video is dynamically generated to show the rules.

Benefits of technology

It enables efficient and dynamic rule display for viewers who are unfamiliar with the rules, improving the user's viewing experience and rule comprehension.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123185404A_ABST
    Figure CN123185404A_ABST
Patent Text Reader

Abstract

A video processing method and device, electronic equipment and storage medium are provided, wherein the method comprises: obtaining a first video segment in a target video; wherein the video content in the first video segment does not meet a set rule; obtaining a first video frame and a second video frame in the target video; wherein the first video frame is located before the first video segment, and the second video frame is located after the first video segment; generating a second video segment based on at least the first video frame and the second video frame; wherein the video content in the second video segment meets the set rule; generating a demonstration video according to the first video segment and the second video segment; wherein the demonstration video is used to dynamically demonstrate the set rule. By comparing and demonstrating the first video segment that does not meet the rule and the second video segment that meets the rule in the same video scene, the user can quickly understand the set rule, and the user viewing experience is optimized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of artificial intelligence and video processing technology, and in particular to a video processing method, apparatus, electronic device and storage medium. Background Technology

[0002] In video playback scenarios involving rule-based judgments, such as sports events, replays and commentary are often used to assist viewers in understanding the rules. However, these methods require a certain level of prior knowledge of the rules from the audience. For viewers unfamiliar with the rules, replays and commentary are insufficient to effectively help them understand, resulting in a poor user experience. Summary of the Invention

[0003] This application aims to at least partially address one of the technical problems in the related art.

[0004] Therefore, the first objective of this application is to propose a video processing method.

[0005] The second objective of this application is to provide a video processing apparatus.

[0006] The third objective of this application is to propose an electronic device.

[0007] The fourth objective of this application is to provide a computer-readable storage medium.

[0008] The fifth objective of this application is to provide a computer program product.

[0009] To achieve the above objectives, a first aspect of this application provides a video processing method, comprising: acquiring a first video segment from a target video; wherein the video content in the first video segment does not satisfy a set rule; acquiring a first video frame and a second video frame from the target video; wherein the first video frame is located before the first video segment, and the second video frame is located after the first video segment; generating a second video segment based at least on the first video frame and the second video frame; wherein the video content in the second video segment satisfies the set rule; and generating a demonstration video based on the first video segment and the second video segment; wherein the demonstration video is used to dynamically demonstrate the set rule.

[0010] To achieve the above objectives, a second aspect of this application provides a video processing apparatus, comprising: a first acquisition module, configured to acquire a first video segment from a target video; wherein the video content in the first video segment does not satisfy a set rule; a second acquisition module, configured to acquire a first video frame and a second video frame from the target video; wherein the first video frame is located before the first video segment, and the second video frame is located after the first video segment; a first generation module, configured to generate a second video segment based at least on the first video frame and the second video frame; wherein the video content in the second video segment satisfies the set rule; and a second generation module, configured to generate a demonstration video based on the first video segment and the second video segment; wherein the demonstration video is used to dynamically demonstrate the set rule.

[0011] To achieve the above objectives, a third aspect of this application provides an electronic device, including: a processor and a memory communicatively connected to the processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to implement a video processing method as described in the first aspect of this application.

[0012] To achieve the above objectives, a fourth aspect of this application provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, are used to implement a video processing method as described in the first aspect of this application.

[0013] To achieve the above objectives, a fifth aspect of this application provides a computer program product, including a computer program that, when executed by a processor, implements a video processing method as described in the first aspect of this application.

[0014] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this application, nor is it intended to limit the scope of this application. Other features of this application will become readily apparent from the following description. Attached Figure Description

[0015] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein: Figure 1 A schematic flowchart illustrating a video processing method provided in an embodiment of this application; Figure 2 A schematic flowchart illustrating a video processing method provided in another embodiment of this application; Figure 3 A schematic flowchart illustrating a video processing method provided in an embodiment of this application; Figure 4 This is a schematic diagram of the structure of a video processing apparatus provided in an embodiment of this application; Figure 5 This is a block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0016] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.

[0017] In related technologies, there are two main types of display methods that violate the set rules: 1. After identifying a foul / violation that does not meet the set rules, the video frames before and after the foul / violation are extracted and played back or slowed down. However, this method requires a certain level of understanding of the rules from the audience. Although there is commentary, the commentator mainly explains based on their understanding of the rules. For viewers who are not familiar with the rules, it cannot effectively help them understand the relevant rules.

[0018] 2. During video replays of violations / infractions, a pop-up window provides a link to display the rules. Users click the link to be redirected to a page where the rules are displayed in text. This method requires users to spend time understanding the literal meaning and is therefore not effective in helping them comprehend the relevant rules.

[0019] Of the two methods mentioned above, the first method is not effective in helping users with poor rule awareness to understand the rules, and the second method can only display static rule text content and cannot display it dynamically. In addition, neither of the two methods can provide users with a more efficient and immersive experience when watching videos.

[0020] To address the aforementioned problems, this application proposes a video processing method, apparatus, electronic device, and storage medium. The video processing method, apparatus, electronic device, and storage medium of this application are described below with reference to the accompanying drawings.

[0021] Figure 1This is a schematic flowchart illustrating a video processing method provided in an embodiment of this application. It should be noted that the video processing method of this disclosure can be applied to an electronic device, enabling the electronic device to perform video processing functions. The electronic device can be any device with computing capabilities, such as a personal computer, mobile terminal, or server. A mobile terminal can be, for example, an in-vehicle device, mobile phone, tablet computer, personal digital assistant, wearable device, smart speaker, server, server cluster, or other hardware device with various operating systems, touchscreens, and / or displays.

[0022] In the following embodiments, the backend server of the video playback software is used as an example for illustration.

[0023] like Figure 1 As shown, the video processing method includes the following steps: Step 101: Obtain the first video segment from the target video; wherein the video content in the first video segment does not meet the set rules.

[0024] The target video refers to a video that possesses the attributes required for rule-based judgment, such as sports event videos or traffic monitoring videos. The target video can be in a playing state or a non-playing state. For example, a sports event video could be a live broadcast of a football, basketball, sprint, or high jump event.

[0025] The first video segment refers to the video segment whose content does not meet the set rules after the video content in the target video has been detected. It should be noted that the video content in the first video segment does not meet the set rules, which can mean that the video content in the first video segment violates the set rules, that is, there is a violation or infraction in the first video segment.

[0026] For example, assuming the target video is a sports event video, the first video segment can refer to the video segment corresponding to a foul during the event; assuming the target video is a traffic monitoring video, the first video segment can refer to the video segment corresponding to a vehicle violation.

[0027] Step 102: Obtain the first video frame and the second video frame from the target video; wherein the first video frame is located before the first video segment and the second video frame is located after the first video segment.

[0028] The first video frame refers to one or more video frames that are played before the first video segment, and the second video frame refers to one or more video frames that are played after the first video segment.

[0029] For example, the first video frame may refer to an adjacent video frame that is in the playback sequence before the first video segment, or the first video frame may refer to an adjacent video frame that is in the playback sequence after the first video segment.

[0030] Step 103: Generate a second video segment based at least on the first video frame and the second video frame; wherein the video content in the second video segment satisfies the set rules.

[0031] The second video clip corresponds to the same scene and behavior as the first video clip. In other words, the first and second video clips are comparative content of the same scene and similar behavior. The first video clip is an example that does not conform to the rules, while the second video clip is an example that conforms to the rules. It should be noted that for the video content in the second video clip to meet the set rules, it can mean that the video content in the second video clip does not violate the set rules; that is, there are no violations or rule-breaking events in the second video clip.

[0032] One approach is to use a text-to-image video generation model to generate a second video clip. When generating the second video clip, the first video frame can be constrained as the starting frame and the second video frame as the ending frame. In other words, the first and second video frames provide a before-and-after comparison for the text-to-image video generation model, defining the trend of the video and preventing significant discrepancies between the generated second video clip and the first video clip.

[0033] In some alternative embodiments, the first and second video frames can be used as inputs to the text-to-video model to obtain the second video segment output by the text-to-video model.

[0034] In some alternative embodiments, a pre-set prompt word can be obtained, which is used to instruct the image-to-video generation model to generate video based on the first video frame and the second video frame; the first video frame, the second video frame and the prompt word are used as input to the image-to-video generation model to obtain the second video segment output by the image-to-video generation model.

[0035] Step 104: Generate a demonstration video based on the first video clip and the second video clip; wherein, the demonstration video is used to dynamically demonstrate the setting rules.

[0036] This involves combining the first and second video clips to create a demo video. After obtaining the demo video, playing it helps users understand the established rules.

[0037] For example, a demo video can be sent to video playback software so that the demo video can be played if the video played in the video playback software involves set rules.

[0038] In this embodiment, a first video segment is obtained from the target video; wherein the video content in the first video segment does not meet the set rules; a first video frame and a second video frame are obtained from the target video; wherein the first video frame is located before the first video segment and the second video frame is located after the first video segment; a second video segment is generated based at least on the first video frame and the second video frame; wherein the video content in the second video segment meets the set rules; a demonstration video is generated based on the first video segment and the second video segment; wherein the demonstration video is used to dynamically demonstrate the set rules; by comparing and demonstrating the first video segment that does not meet the rules and the second video segment that meets the rules in the same video scene, it is possible to help users quickly understand the set rules and optimize the user viewing experience.

[0039] This embodiment provides another video processing method. Figure 2 This is a schematic flowchart of a video processing method provided in an embodiment of this application.

[0040] like Figure 2 As shown, the video processing method may include the following steps: Step 201: Obtain the first video segment from the target video; the target video is in playback mode.

[0041] In one possible embodiment of this application, the content detection result corresponding to any video frame in the target video is obtained; wherein, the content detection result is used to indicate the probability that the content of the video frame does not meet the set rules; for any video frame, the probability indicated by the content detection result is compared with the set probability threshold to obtain the comparison result; based on the comparison result, a target video frame is selected in the target video; wherein, the probability indicated by the content detection result of the target video frame is greater than or equal to the probability threshold; and a first video segment is obtained based on the target video frame.

[0042] This involves using a predefined content detection model to perform content detection on any video frame in the target video, obtaining the corresponding content detection result. For example, the content detection result can be a violation probability or a rule-breaking probability, that is, the probability that the video frame content does not meet the predefined rules. It should be noted that, while outputting the content detection result, the content detection model can also output violation / rule-breaking regions within the video frame. These violation / rule-breaking regions are used for violation localization / rule-breaking positioning, that is, to determine the location information of the content elements associated with the violation / rule-breaking event.

[0043] For example, content detection models can be Transformer-based spatiotemporal models, such as the TimeSformer model, or they can be 3D convolutional networks, such as the SlowFast model. It should be noted that during the training process of content detection models, multi-label loss functions can be used to achieve multi-event type recognition tasks.

[0044] Specifically, if the probability indicated by the content detection result is greater than or equal to the set probability threshold, the video frame content of the corresponding video frame is determined to not meet the set rules; if the probability indicated by the content detection result is less than the set probability threshold, the video frame content of the corresponding video frame is determined to meet the set rules.

[0045] Specifically, based on the content detection results corresponding to any video frame in the target video, if the probability of N consecutive video frames in the target video is greater than or equal to a probability threshold, it can be determined that there is a violation or infraction in the target video. Thus, multiple consecutive video frames with a probability greater than or equal to the probability threshold can be identified as the target video frames. N is a pre-set positive integer.

[0046] After obtaining the target video frame, it can be cached for subsequent optimal frame selection by the user. The length of the cached target video frame is greater than a pre-set minimum frame sequence length T. min The minimum frame sequence length is the minimum length required to display a complete violation / foul video.

[0047] By quantifying the probability detection of frames that do not meet the set rules and combining probability thresholds to filter target video frames, the first video segment is automatically and objectively extracted, eliminating the reliance on manual recognition and improving the extraction efficiency and accuracy of the first video segment.

[0048] Step 202: Obtain the first video frame and the second video frame from the target video.

[0049] Among them, the probability indicated by the content detection result corresponding to the first video frame is less than the probability threshold, and the probability indicated by the content detection result corresponding to the second video frame is less than the probability threshold.

[0050] After determining the first and second video frames from the target video, the first and second video frames can be cached for the input parameters required by the image-to-video generation model.

[0051] It should be noted that the cache size T bfr This can be pre-set to prevent excessive caching from causing high resource consumption and leading to errors. The size of the cache space can refer to the length of the video frame sequence. Where T... min The length is less than or equal to T bfr When the length of the video frames that need to be cached exceeds T bfr In this case, previously cached video frames can be written to a file, and then new video frames can be written to ensure that the cached video frames do not exceed the maximum range.

[0052] The relevant content in step 202 can be found in the descriptions in the foregoing embodiments, and will not be repeated here.

[0053] Step 203: Obtain video-generated prompts that match the target user playing the target video.

[0054] The video-generated prompts are matched with the target users who are playing the target video. In other words, the corresponding video-generated prompts are different for different target users who are playing the target video.

[0055] In some optional embodiments, the corresponding video generation prompt words can be determined based on the target user's level of understanding of the set rules; alternatively, the corresponding video generation prompt words can also be determined based on the target user's video playback preferences. Specifically, the target user's feedback on their level of understanding of the set rules can be obtained, or the target video can be determined based on video playback preferences to determine whether it is a preferred video for the target user, thereby determining the target user's level of understanding of the set rules.

[0056] In one possible embodiment of this application, obtaining video generation prompts that match the target user playing the target video includes: obtaining the target user's user tag; wherein the user tag is obtained based on the target user's playback duration of similar videos to the target video; determining the event type of the target event included in the first video segment; and generating video generation prompts based on the user tag and the event type.

[0057] Specifically, the user level can be determined based on the viewing time of similar videos to the target video, and this user level can be used as a user tag. It should be noted that the user level indicates the target user's level of understanding of the established rules. For example, the longer the target user views similar videos to the target video, the higher the user level, and correspondingly, the higher the target user's level of understanding of the established rules, that is, the deeper the target user's comprehension of the established rules.

[0058] Here, a target event refers to a violation or foul that does not meet the set rules, and the event type of a target event refers to the type of violation or foul. For example, if the target video is a football match video, the event type of the target event could be offside, penalty kick, corner kick, etc.; if the target video is a traffic surveillance video, the event type of the target event could be running a red light, failing to yield to pedestrians, driving over the line, etc.

[0059] One approach is to use a large model to generate corresponding video prompts based on user tags and event types.

[0060] In some optional embodiments, the video generation prompt words can be determined solely based on the event type. Specifically, a target prompt word template matching the event type is queried from the set prompt word templates, and then the video generation prompt words are generated based on the target prompt word templates. It should be noted that the prompt word templates corresponding to different event types may be different.

[0061] By identifying user tags based on their historical playback duration, we can accurately depict their level of understanding of the set rules. Combining user tags with event types to determine video generation prompts allows the prompts to be tailored to the user's cognitive level and the current event scenario. This not only improves the accuracy and scenario fit of the second video clip generation but also enables personalized display of the set rules based on the cognitive differences of different users, further enhancing the explanation and demonstration of the rules.

[0062] In one possible embodiment of this application, generating video generation prompts based on user tags and event types includes: querying a target prompt template that matches the user tags and event types from a set prompt template; obtaining the location information of the content element associated with the target event; and filling the location information into the corresponding position in the target prompt template to obtain the video generation prompts.

[0063] The system includes multiple prompt word templates. Specifically, these templates include prompt word templates for different user tags under different event types. For example, assuming the event type is "offside," then: The prompt template for user tag L1 is: "The ball's coordinates are X, and the player with coordinates in Z passes the ball to another player with coordinates in Z, ensuring that the player is not offside." The prompt template for user tag L2 is: "The ball's coordinates are X. A player with coordinates Z passes the ball to another player with coordinates Z, ensuring that the player is not offside. Here is a detailed explanation of the offside rule."

[0064] In this context, the playback duration corresponding to user tag L2 is longer than that corresponding to user tag L1. This implies that users with tag L1 need to understand the rules as a whole, while users with tag L2, in addition to understanding the overall rules, can focus on showcasing specific details. X represents the coordinates of the ball's bounding box, and Z represents the coordinates of the human bounding box. The human bounding box contains at least two regions, i.e., two rectangles, meaning it contains at least two players (or at least one player for other event types), namely the passing player and the receiving player. Details can be displayed using highlighted blocks, lines, arrows, trajectory lines, etc.

[0065] The content elements associated with the target event refer to the content elements involved in the target event; these content elements can be people, footballs, basketballs, vehicles, etc. The location information of the content elements associated with the target event can be obtained based on the first video frame, the first frame of the first video segment, or the optimal frame of the first video segment; it should be noted that the location information can be coordinates or orientation description information.

[0066] It should be noted that, while outputting the content detection results, the content detection model can also output the location information of the content elements associated with the target event in any video frame.

[0067] By using prompt word templates and combining them with content element position information obtained from video frame parsing to complete template filling, the prompt word generation process can be standardized, reducing the complexity of the generation logic. In addition, incorporating content element position information into the prompt words ensures that the generated second video clip maintains consistency with the first video clip in terms of element layout and screen structure, enhancing the effect of comparison demonstration.

[0068] Step 204: Generate a second video segment based on the video generation prompt, the first video frame, and the second video frame.

[0069] The first video frame, the second video frame, and the video generation prompt can be used as input to the image-to-text video generation model to obtain the second video segment output by the image-to-text video generation model.

[0070] Step 205: Generate a demonstration video based on the first video clip and the second video clip; wherein, the demonstration video is used to dynamically demonstrate the setting rules.

[0071] In one possible embodiment of this application, a first video segment and a second video segment are spliced ​​together according to a set splicing order to obtain a demonstration video; wherein the second video segment is played before the first video segment in the demonstration video.

[0072] When playing the demonstration video, the second video clip can be played first, followed by the first video clip.

[0073] Creating demonstration videos by splicing compliant segments first and non-compliant segments later allows users to first understand the compliance requirements and then compare them with the non-compliant content, making it easier to understand the rules.

[0074] In this embodiment, a first video segment is obtained from the target video; the target video is in playback mode; a first video frame and a second video frame are obtained from the target video; a video generation prompt word matching the target user playing the target video is obtained; a second video segment is generated based on the video generation prompt word, the first video frame, and the second video frame; a demonstration video is generated based on the first video segment and the second video segment; wherein, the demonstration video is used to dynamically demonstrate the setting rules; in the target video playback scenario, the second video segment is generated by linking the preceding and following video frames with the user-matched exclusive prompt word, which can make the compliant second video segment more in line with the user's cognitive level, realize the personalized generation of video content, and further improve the adaptability and reception effect of the rule demonstration.

[0075] This embodiment provides a video processing method. Figure 3 This is a schematic flowchart of a video processing method provided in an embodiment of this application.

[0076] like Figure 3 As shown, the video processing method may include the following steps: Step 301: In response to detecting a target event in the target video, obtain the target prompt selected by the target user in the set prompt.

[0077] Among them, the setting prompts are used to guide users to provide feedback on their understanding of the set rules. For example, the setting prompts can be displayed on the target video playback interface, so that users can select the target prompts on the playback interface.

[0078] In one possible embodiment of this application, in response to detecting a target event in a target video, the event type of the target event is filled into the corresponding position in any set guide template to obtain the corresponding set guide; the set guide is displayed on the playback interface of the target video; and the target guide selected by the target user in the set guide is determined according to the selection operation of the target user on the playback interface.

[0079] Setting a prompt template can include "What is..." "and why is it?" ",in," "This is the content that needs to be replaced, used to indicate the filling position for the event type. For example, assuming the target event is "offside", the setting prompts obtained based on the setting prompt template include "What is offside" and "Why is it offside".

[0080] To enhance user engagement and improve the interactive experience, pre-defined prompts can be displayed on the target video playback screen in the form of pop-ups or on-screen notifications.

[0081] If the target user selects "What is A?" as the guiding text, it indicates that the target user is unfamiliar with the setting rules and requires a detailed demonstration. If the target user selects "Why is it A?", it indicates that the target user has doubts about whether the video content in the first video clip meets the criteria of the setting rules. In this case, the target user has some basic understanding of the setting rules. It should be noted that after the user clicks on any setting guiding text on the target video playback interface, the electronic device can determine the target user's user identifier based on the selected guiding text. The target identifier is used to determine whether to execute step 302 or step 306. For example, if the target user selects "What is A?", the user identifier is W; if the target user selects "Why is it A?", the user identifier is Y.

[0082] By using target event detection as a trigger condition and combining the user's choice of guidance to determine the user's understanding of the rules, the system can extract the first video segment only when the user does not understand the rules. This enables on-demand triggering of the video processing flow, accurately targeting users with weak rule awareness to demonstrate the rules, and improving the intelligence and targeting of the overall solution.

[0083] Step 302: If the target user is unaware of the set rules, the first video segment is obtained from the target video; wherein the first video segment includes the target event.

[0084] Step 303: Obtain the first video frame and the second video frame from the target video.

[0085] Step 304: Generate a second video segment based at least on the first video frame and the second video frame.

[0086] Step 305: Generate a demonstration video based on the first video clip and the second video clip.

[0087] The relevant content in steps 302-305 can be found in the descriptions in the foregoing embodiments, and will not be repeated here.

[0088] Step 306: If the target user has doubts about the determination that the video content in the first video segment does not meet the set rules, the third video frame in the first video segment is obtained.

[0089] If the target user has doubts about the judgment that the video content in the first video segment does not meet the set rules, it means that the target user understands the set rules, but only has doubts about the judgment. In this case, it is only necessary to provide an explanation of the violation / infraction.

[0090] The third video frame can be any frame in the first video segment. To provide accurate criteria for determining violations / fouls, the best frame in the first video segment can be selected as the third video frame, that is, the frame that best illustrates the occurrence of a violation / foul.

[0091] In one possible embodiment of this application, a content detection result corresponding to any video frame in a first video segment is obtained; wherein, the content detection result is used to indicate the probability that the content of the video frame does not meet the set rules; based on the content detection result corresponding to any video frame, a third video frame is obtained in the first video segment; wherein, the probability indicated by the content detection result of the third video frame is greater than the probability indicated by the content detection results of the other video frames in the first video segment.

[0092] The content detection result is the output of the content detection model, which is used to perform content detection on any video frame in the target video.

[0093] The third video frame refers to the best frame in the first video segment; the remaining video frames refer to any video frame in the first video segment other than the third video frame.

[0094] For example, the maximum probability can be determined from the probabilities corresponding to each video frame of the first video segment; the video frame corresponding to the maximum probability can be determined as the third video frame.

[0095] By selecting the video frames with the most significant violations / misconduct characteristics from the content detection results as the third video frame, and prioritizing the selection of typical scenes for annotation, the evidentiary value of a single frame can be maximized, making the presentation of the judgment basis more prominent and convincing.

[0096] Step 307: Content annotation is performed on the video frame content in the third video frame that does not meet the set rules to obtain an annotated video frame; wherein, the annotated video frame is used to display the judgment criteria for the video content in the first video segment not meeting the set rules.

[0097] Content annotation is used to display areas that violate regulations or rules; for example, content annotation refers to annotation using lines, highlighted blocks, arrows, trajectory lines, text descriptions, detection boxes, etc.

[0098] It should be noted that the relevant content in this embodiment can be found in the relevant descriptions in the foregoing embodiments, and will not be repeated here.

[0099] In this embodiment, in response to detecting a target event in a target video, the target guidance text selected by the target user in the set guidance text is obtained; if the target guidance text indicates that the target user does not understand the set rules, a first video segment is obtained from the target video; wherein the first video segment includes the target event; a first video frame and a second video frame are obtained from the target video; a second video segment is generated based at least on the first video frame and the second video frame; a demonstration video is generated based on the first video segment and the second video segment; if the target guidance text indicates that the target user has doubts about the determination that the video content in the first video segment does not meet the set rules, a third video frame in the first video segment is obtained; the video frame content in the third video frame that does not meet the set rules is annotated to obtain an annotated video frame; wherein the annotated video frame is used to display the determination basis for the determination that the video content in the first video segment does not meet the set rules. For scenarios where users are unfamiliar with the rules, comparing and contrasting the first and second video clips helps users quickly understand the rules and optimizes their viewing experience. For scenarios where users have questions about the violation determination, actively extracting video frames and annotating them visually demonstrates the basis for the violation determination, intuitively explaining why the video content does not comply with the rules and answering user doubts. Through these two methods, we can meet users' personalized rule display needs and ensure that different users can understand the rules.

[0100] To implement the above embodiments, this application also proposes a video processing apparatus.

[0101] Figure 4 This is a schematic diagram of the structure of a video processing device provided in an embodiment of this application.

[0102] like Figure 4 As shown, the video processing apparatus 400 includes: The first acquisition module 410 is used to acquire a first video segment from the target video; wherein the video content in the first video segment does not meet the set rules; The second acquisition module 420 is used to acquire a first video frame and a second video frame from the target video; wherein the first video frame is located before the first video segment and the second video frame is located after the first video segment; The first generation module 430 is used to generate a second video segment based at least on the first video frame and the second video frame; wherein the video content in the second video segment satisfies the set rules; The second generation module 440 is used to generate a demonstration video based on the first video segment and the second video segment; wherein the demonstration video is used to dynamically demonstrate the setting rules.

[0103] Optionally, the target video is in playback mode; the first generation module 430 is specifically used to: obtain video generation prompt words that match the target user playing the target video; and generate a second video segment based on the video generation prompt words, the first video frame, and the second video frame.

[0104] Optionally, the first generation module 430 is specifically used to: obtain user tags of the target user; wherein the user tags are obtained based on the playback duration of similar videos of the target video by the target user; determine the event type of the target event included in the first video segment; and generate video generation prompts based on the user tags and event types.

[0105] Optionally, the first generation module 430 is specifically used to: query a target prompt word template that matches the user tag and event type in the set prompt word template; obtain the location information of the content element associated with the target event; and fill the location information into the corresponding position in the target prompt word template to obtain the video generated prompt word.

[0106] Optionally, the first acquisition module 410 is specifically used to: in response to detecting a target event in the target video, acquire the target guidance text selected by the target user in the setting guidance text; when the target guidance text indicates that the target user does not understand the setting rules, acquire a first video segment in the target video; wherein the first video segment includes the target event.

[0107] Optionally, the device further includes: The third acquisition module is used to acquire the third video frame in the first video segment when the target user has doubts about the determination that the video content in the first video segment does not meet the set rules, as indicated by the target prompt. The annotation module is used to annotate the content of video frames in the third video frame that do not meet the set rules, and obtain an annotated video frame; the annotated video frame is used to show the criteria for determining that the video content in the first video segment does not meet the set rules.

[0108] Optionally, the third acquisition module is specifically used to: acquire the content detection result corresponding to any video frame in the first video segment; wherein the content detection result is used to indicate the probability that the content of the video frame does not meet the set rules; and acquire a third video frame in the first video segment based on the content detection result corresponding to any video frame; wherein the probability indicated by the content detection result of the third video frame is greater than the probability indicated by the content detection results of the other video frames in the first video segment.

[0109] Optionally, the first acquisition module 410 is specifically used to: in response to detecting a target event in the target video, fill the event type of the target event into the corresponding position in any set guide template to obtain the corresponding set guide; display the set guide on the playback interface of the target video; and determine the target guide selected by the target user in the set guide based on the selection operation of the target user on the playback interface.

[0110] Optionally, the first acquisition module 410 is specifically used to: acquire the content detection result corresponding to any video frame in the target video; wherein the content detection result is used to indicate the probability that the content of the video frame does not meet the set rules; for any video frame, compare the probability indicated by the content detection result with the set probability threshold to obtain a comparison result; select a target video frame in the target video based on the comparison result; wherein the probability indicated by the content detection result of the target video frame is greater than or equal to the probability threshold; and obtain a first video segment based on the target video frame.

[0111] Optionally, the second generation module 440 is specifically used to: splice the first video segment and the second video segment according to the set splicing order to obtain a demonstration video; wherein the playback order of the second video segment in the demonstration video is before the playback order of the first video segment in the demonstration video.

[0112] It should be noted that the foregoing explanation of the video processing method embodiments also applies to the video processing apparatus of this embodiment, and will not be repeated here.

[0113] In this embodiment, a first video segment is obtained from the target video; wherein the video content in the first video segment does not meet the set rules; a first video frame and a second video frame are obtained from the target video; wherein the first video frame is located before the first video segment and the second video frame is located after the first video segment; a second video segment is generated based at least on the first video frame and the second video frame; wherein the video content in the second video segment meets the set rules; a demonstration video is generated based on the first video segment and the second video segment; wherein the demonstration video is used to dynamically demonstrate the set rules; by comparing and demonstrating the first video segment that does not meet the rules and the second video segment that meets the rules in the same video scene, it is possible to help users quickly understand the set rules and optimize the user viewing experience.

[0114] Figure 5This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device 500 in this embodiment is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0115] like Figure 5 As shown, the above-mentioned electronic device 500 includes: The memory 501 and the processor 502 are connected by a bus 503. The memory 501 stores a computer program, and when the processor 502 executes the program, it implements the video processing method of the present application embodiment.

[0116] Bus 503 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. For example, these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.

[0117] Electronic device 500 typically includes a variety of electronic device readable media. These media can be any available media that can be accessed by electronic device 500, including volatile and non-volatile media, removable and non-removable media.

[0118] Memory 501 may also include computer system readable media in the form of volatile memory, such as random access memory (RAM) 504 and / or cache memory 505. Electronic device 500 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 506 may be used to read and write non-removable, non-volatile magnetic media (… Figure 5 Not shown; usually referred to as a "hard drive"). Although Figure 5As not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 503 via one or more data media interfaces. Memory 501 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of this application.

[0119] A program / utility 508 having a set (at least one) of program modules 507 may be stored, for example, in memory 501. Such program modules 507 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 507 typically perform the functions and / or methods described in the embodiments of this application.

[0120] Electronic device 500 can also communicate with one or more external devices 509 (e.g., keyboard, pointing device, display 511, etc.), and with one or more devices that enable a user to interact with the electronic device 500, and / or with any device that enables the electronic device 500 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed through input / output (I / O) interface 512. Furthermore, electronic device 500 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 513. Figure 5 As shown, network adapter 513 communicates with other modules of electronic device 500 via bus 503. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with electronic device 500, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0121] The processor 502 executes various functional applications and data processing by running programs stored in the memory 501.

[0122] It should be noted that the implementation process and technical principles of the electronic device in this embodiment are explained in the foregoing description of the video processing method in the embodiments of this application, and will not be repeated here.

[0123] To implement the above embodiments, this application also proposes a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the methods provided in the foregoing embodiments.

[0124] To implement the above embodiments, this application also proposes a computer program product, including a computer program that, when executed by a processor, implements the methods provided in the foregoing embodiments.

[0125] The collection, storage, use, processing, transmission, provision, and disclosure of user personal information involved in this application comply with relevant laws and regulations and do not violate public order and good morals.

[0126] It should be noted that personal information collected from users should be used for legitimate and reasonable purposes and should not be shared or sold outside of these legitimate uses. Furthermore, such collection / sharing should only be conducted after receiving the user's informed consent, including but not limited to notifying the user to read the user agreement / user notice and sign an agreement / authorization that includes authorization of relevant user information before the user uses the function. In addition, any necessary steps must be taken to protect and safeguard access to such personal information data and ensure that others with access to personal information data comply with their privacy policies and procedures.

[0127] This application is intended to provide an implementation scheme for users to selectively prevent the use or access to their personal information data. Specifically, this disclosure is intended to provide hardware and / or software to prevent or block access to such personal information data. Once personal information data is no longer needed, risks can be minimized by restricting data collection and deleting data. Furthermore, where applicable, such personal information is de-identified to protect user privacy.

[0128] In the foregoing descriptions of the embodiments, the terms "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0129] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0130] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.

[0131] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.

[0132] It should be understood that various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0133] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.

[0134] Furthermore, the functional units in the various embodiments of this application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.

[0135] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of this application.

Claims

1. A video processing method, characterized in that, Includes the following steps: Obtain a first video segment from the target video; wherein the video content in the first video segment does not meet the set rules; A first video frame and a second video frame are obtained from the target video; wherein the first video frame is located before the first video segment, and the second video frame is located after the first video segment; A second video segment is generated based at least on the first video frame and the second video frame; wherein the video content in the second video segment satisfies the set rules. A demonstration video is generated based on the first video segment and the second video segment; wherein the demonstration video is used to dynamically demonstrate the set rules.

2. The method according to claim 1, characterized in that, The target video is in playback mode; the generation of the second video segment based at least on the first video frame and the second video frame includes: Obtain video-generated prompts that match the target user playing the target video; The second video segment is generated based on the video generation prompt, the first video frame, and the second video frame.

3. The method according to claim 2, characterized in that, The step of obtaining video-generated prompts that match the target user playing the target video includes: Obtain the user tags of the target user; wherein the user tags are obtained based on the playback duration of similar videos of the target user to the target video; Determine the event type of the target event included in the first video segment; The video generation prompt is generated based on the user tags and the event type.

4. The method according to claim 3, characterized in that, The step of generating the video generation prompt based on the user tags and the event type includes: In the set prompt word templates, query the target prompt word templates that match the user tag and the event type; Obtain the location information of the content element associated with the target event; The location information is filled into the corresponding position in the target prompt word template to obtain the video-generated prompt word.

5. The method according to claim 1, characterized in that, The step of obtaining the first video segment from the target video includes: In response to detecting a target event in the target video, the target user selects the target prompt from the set prompts; When the target prompt indicates that the target user is unaware of the set rules, a first video segment is obtained from the target video; wherein the first video segment includes the target event.

6. The method according to claim 5, characterized in that, The method further includes: If the target user has doubts about the determination that the video content in the first video segment does not meet the set rules, the third video frame in the first video segment is obtained. The video frame content that does not meet the set rules in the third video frame is annotated to obtain an annotated video frame; wherein, the annotated video frame is used to display the criteria for determining that the video content in the first video segment does not meet the set rules.

7. The method according to claim 6, characterized in that, The step of obtaining the third video frame from the first video segment includes: Obtain the content detection result corresponding to any video frame in the first video segment; wherein, the content detection result is used to indicate the probability that the content of the video frame does not meet the set rule; Based on the content detection result corresponding to any one of the video frames, the third video frame is obtained in the first video segment; wherein the probability indicated by the content detection result of the third video frame is greater than the probability indicated by the content detection results of the other video frames in the first video segment.

8. The method according to claim 5, characterized in that, The step of responding to the detection of a target event in the target video and obtaining the target prompt selected by the target user in the set prompt includes: In response to the detection of a target event in the target video, the event type of the target event is filled into the corresponding position in any set guide template to obtain the corresponding set guide; The set guidance message is displayed on the playback interface of the target video; Based on the selection operation of the target user on the playback interface, determine the target prompt selected by the target user in the set prompt.

9. The method according to claim 1 or 5, characterized in that, The step of obtaining the first video segment from the target video includes: Obtain the content detection result corresponding to any video frame in the target video; wherein, the content detection result is used to indicate the probability that the content of the video frame does not meet the set rule; For any video frame, the probability indicated by the content detection result is compared with a set probability threshold to obtain a comparison result; Based on the comparison results, a target video frame is selected from the target video; wherein the probability indicated by the content detection result of the target video frame is greater than or equal to the probability threshold. The first video segment is obtained based on the target video frame.

10. The method according to any one of claims 1-8, characterized in that, The step of generating a demonstration video based on the first video segment and the second video segment includes: According to the set splicing order, the first video segment and the second video segment are spliced ​​together to obtain the demonstration video; wherein, the second video segment is played before the first video segment in the demonstration video.

11. A video processing apparatus, characterized in that, include: The first acquisition module is used to acquire a first video segment from the target video; wherein the video content in the first video segment does not meet the set rules; The second acquisition module is used to acquire a first video frame and a second video frame from the target video; wherein the first video frame is located before the first video segment, and the second video frame is located after the first video segment; A first generation module is configured to generate a second video segment based at least on the first video frame and the second video frame; wherein the video content in the second video segment satisfies the set rules; The second generation module is used to generate a demonstration video based on the first video segment and the second video segment; wherein the demonstration video is used to dynamically demonstrate the set rules.

12. An electronic device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1-10.

13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-10.

14. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method of any one of claims 1-10.