Course video automatic editing method and device, computer equipment and medium
By applying video storyboard detection, keyframe sampling, OCR recognition and vectorized similarity calculation methods in online education, automatically editing course videos, solving the problems of inefficient and inability to deal with a large number of video updates in the existing technology, and achieving fast and unmanned video editing is achieved, improving students' learning efficiency.
Patent Information
- Application Number
- CN202411664842.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-20
- Publication Date
- 2025-04-25
AI Technical Summary
In the prior art, when editing course videos into explanation videos corresponding to each knowledge point in online education, a large amount of manual labeling data is required, which is inefficient and cannot cope with a large number of video updates in real time.
By obtaining the video to be edited, performing storyboard detection and keyframe sampling, using OCR to identify the video frame text, performing dense and sparse vectorization, calculating the similarity to combine video clips, and generating explanation videos for each knowledge point.
It realizes the rapid editing of course videos without manual labeling of data, improves students' online learning efficiency, and supports personalized and intelligent adaptation online education.
Smart Images

Figure CN119893234A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of online intelligent education technology, and in particular to a method, device, computer equipment and medium for automatic editing of course videos. Background Art
[0002] Nowadays, online education is very popular. Relying on online education, personalized education and intelligent adaptive education can be achieved. In the field of online education, teachers will record course videos according to textbooks, and textbooks are divided into subjects, chapters, and sections. The course videos recorded by teachers are generally one video for one section, and one section contains multiple knowledge points. When students are studying, they often have questions about a certain knowledge point, so sometimes they only need to check the explanation video corresponding to a certain knowledge point. In order to obtain the explanation video corresponding to a certain knowledge point, it can be obtained by manually editing the section course video, or by the teacher recording according to each knowledge point. No matter which method is used, it will waste a lot of human resources, and after a large number of course videos are updated in a short period of time, the above method is not feasible.
[0003] Based on this, the existing technology can be implemented using video editing algorithms. However, most existing video editing algorithms require the use of the CLIP model, or require supervised training image and video classification models, and require a large amount of manually labeled data. Summary of the invention
[0004] The purpose of the embodiments of the present invention is to provide a method, device, computer equipment and medium for automatically editing course videos, which can quickly edit course videos into explanation videos corresponding to various knowledge points, and can effectively improve the learning efficiency of students' online learning.
[0005] To achieve the above objectives, in a first aspect, an embodiment of the present invention provides a method for automatically editing a course video, comprising:
[0006] Obtain the video to be edited, and obtain the corresponding knowledge point list KP according to the subject, chapter and section in the video to be edited;
[0007] If the number of knowledge points corresponding to the knowledge point list KP is greater than 1, performing storyboard detection on the video to be edited to obtain multiple video clips;
[0008] Sampling each of the video clips to obtain a video frame;
[0009] Performing OCR recognition on each of the video frames to obtain text segments corresponding to each video frame, and removing duplicates from all text segments;
[0010] Dense vectorization and sparse vectorization are performed on the text segment and each knowledge point respectively to obtain the vectorization results;
[0011] Perform similarity calculation based on the vectorization result to obtain a classification label for each video clip;
[0012] The video clips are combined according to the classification labels to obtain explanation videos of various knowledge points.
[0013] As a preferred implementation method of the present application, a method based on frame differences is used to perform frame detection on the video to be edited; a key frame sampling method is used to sample each of the video clips; a multimodal large model is used to perform OCR recognition on each of the video frames, and a Minhash algorithm is used to deduplicate all clips.
[0014] Furthermore, after sampling each of the video clips, the method further includes:
[0015] Based on the difference value between two consecutive video frames, the video frames with high similarity are deleted.
[0016] As a specific implementation of the present application, dense vectorization and sparse vectorization are performed on the text segment and each knowledge point respectively to obtain vectorization results, which are specifically:
[0017] Dense and sparse vectorization is performed on the text fragments to obtain the dense vector dense_vector_doc of each text fragment. x and sparse vectors sparse_vector_doc x , perform dense vectorization and sparse vectorization on each knowledge point to obtain the dense vector of each knowledge point dense_vector_query y and sparse vectors sparse_vector_query y .
[0018] The specific steps of sparse vectorization for text segments and each knowledge point are as follows:
[0019] Segment X text segments and Y knowledge points;
[0020] Count the number of text segments in which each word after word segmentation of each knowledge point appears in X text segments, and calculate the weight w of each word i , which is the sparse vector representation of this knowledge point
[0021]
[0022] Among them, q i represents a word after the segmentation of each knowledge point, x(q i ) means it contains the word q iThe number of text fragments, so the y-th knowledge point kp y The sparse vector representation of is: sparse_vector_query y =w 1 , w 2 ,…,w g , g represents the knowledge point kp y The number of words after the participle;
[0023] Count the yth knowledge point kp y The frequency of each word in each text segment is calculated for each word in the text segment doc x The relevance of the text segment relative to the knowledge point kp y The sparse vector representation of is, and the specific correlation calculation formula is:
[0024]
[0025] where r xi ,R(q i ,doc x ) represents a participle q of a knowledge point i With the text snippet doc x The correlation of tf(q i ,doc x ) indicates word q i In the text snippet doc x The number of occurrences in L xd Represents a text fragment doc x Length, L avg represents the average length of X text fragments, so the text fragment doc x Sparse vector representation of: sparse_vector_doc x =r x1 , r x2 ,…,r xg .
[0026] As a specific implementation of the present application, similarity calculation is performed based on the vectorization result to obtain a classification label for each video clip, specifically:
[0027] Dense vectors for each text segment dense_vector_doc x and the dense vector dense_vector_query of each knowledge point y Calculate the cosine similarity cosine_similarity and the sparse vector sparse_vector_doc for each text segment xSparse vector sparse_vector_query for each knowledge point y Calculate the keyword similarity keyword_similarity, calculate the average of the two similarities as the final similarity similarity, and take the knowledge point with the largest final similarity as the classification label of the video clip.
[0028] In a second aspect, an embodiment of the present invention provides a device for automatically editing a course video, comprising:
[0029] The video acquisition module is used to acquire the course video to be edited, and obtain the corresponding knowledge point list KP according to the subject, chapter and section in the video to be edited;
[0030] A video segmentation module, configured to perform a split-frame detection on the video to be edited to obtain a plurality of video clips if the number of knowledge points corresponding to the knowledge point list KP is greater than 1;
[0031] The OCR module is used to sample each of the video segments to obtain video frames; perform OCR recognition on each of the video frames to obtain text segments corresponding to each video frame, and remove duplicates from all text segments;
[0032] The vectorization module is used to perform dense vectorization and sparse vectorization on the text segment and each knowledge point respectively to obtain the vectorization results;
[0033] A similarity calculation module, used to perform similarity calculation based on the vectorization result to obtain a classification label for each video clip;
[0034] The knowledge point video combination module is used to combine the various video clips according to the classification labels to obtain explanation videos of various knowledge points.
[0035] In a third aspect, an embodiment of the present invention provides a computer device, comprising a non-volatile memory, a processor, a memory bus, a system bus, and an input / output bus, as well as a USB adapter, a graphics adapter, etc. connected to the input / output bus, and a computer program stored in the non-volatile memory and executable on the processor, wherein the processor implements the method described in the first aspect above when executing the computer program.
[0036] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium storing a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor executes the method of the first aspect.
[0037] The embodiment of the present invention is implemented by segmenting the course video, sampling the key frames of each segmented video, and then using OCR to extract the text of the corresponding video frame. After deduplication, sparse vectorization and dense vectorization are performed respectively. Sparse vectorization pays more attention to keywords, while dense vectorization is more semantic. The knowledge points to which each video clip belongs are determined by calculating the similarity by combining the two. This application does not require manual annotation of data to train the video classification model, which is real-time and fast, can effectively improve students' learning efficiency, and promote personalized and intelligent adaptive online education. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the specific implementation of the present invention or the technical solution in the prior art, the drawings required for use in the specific implementation or the description of the prior art are briefly introduced below.
[0039] Figure 1 This is a schematic diagram of an application environment of a method for automatically editing a course video in one embodiment of the present invention;
[0040] Figure 2 This is an example diagram of a method for automatically editing a course video in one embodiment of the present invention;
[0041] Figure 3 This is an example diagram of a method for automatically editing a course video in one embodiment of the present invention;
[0042] Figure 4 This is a structural principle diagram of a course video automatic editing device in one embodiment of the present invention;
[0043] Figure 5 is a schematic diagram of a computer device in one embodiment of the present invention. DETAILED DESCRIPTION
[0044] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0045] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.
[0046] In order to enable those skilled in the art to better understand the technical solutions provided by the embodiments of the present application, some technical terms involved in the embodiments of the present application are briefly explained below.
[0047] 1. OCR: (Optical Character Recognition) is a technology used to recognize printed or handwritten text from images or document scans and convert it into machine-encoded text. OCR technology allows computers to read text information in images and convert it into editable and searchable data.
[0048] 2. Vectorization: Text vectorization refers to the process of converting natural language text into numerical vectors, so that a vector can be used to represent a piece of text, so that many vector similarity algorithms or matrix algorithms can be directly used in text semantic analysis, similarity calculation, etc.
[0049] 3. Object Storage System: A distributed storage architecture for storing unstructured data (such as text files, images, videos, etc.). Unlike traditional file storage and block storage, object storage is highly scalable and fault-tolerant, and is suitable for large-scale data management and cloud computing environments.
[0050] The technical solution of the present invention will be clearly and detailedly described below in conjunction with the embodiments of the present invention.
[0051] The automatic course video editing method provided by the embodiment of the present invention can be applied in the following aspects: Figure 1 In the application environment, the client can be a mobile phone, tablet, computer and other terminals, and the business middle platform and course management background can be applications deployed on local servers and cloud server clusters. When students listen to the class on the client and encounter knowledge points with questions, they can view the course explanation video of the corresponding knowledge point. The corresponding business middle platform is configured with the explanation video of the knowledge point, and the explanation video of the knowledge point is automatically edited by a course video automatic editing method deployed in the course management background.
[0052] In one embodiment, if Figure 2 As shown, a method for automatically editing a course video is provided, and the method is applied in Figure 1 The course management backend in is used as an example to illustrate the following steps:
[0053] S1, obtain the video to be edited, and obtain the corresponding knowledge point list KP according to the subject, chapter, and section to which the video to be edited belongs, KP = [kp 1 , kp 2 ,…,kp y ], kp 1 To kpy Represents Y knowledge points, which are sorted out by teaching and research personnel according to the structure of subjects, chapters, and sections, so as to obtain the corresponding knowledge points explained in the course video to be edited.
[0054] S2, determine whether the number of knowledge points corresponding to the knowledge point list KP is equal to 1. If so, the entire video belongs to the explanation of the knowledge point and does not need to be edited. If it is greater than 1, the course video needs to be edited.
[0055] S3, performing storyboard detection on the video to be edited and dividing it into multiple video clips.
[0056] The storyboard detection algorithm can be optionally based on methods such as frame difference, histogram, and machine learning. For course videos, when switching courseware, it is often regarded as a shot switch, and the content of the same courseware does not change much. Therefore, it is preferred to use a method based on frame difference to detect the storyboard. This method is mainly used to calculate the mean square error of two consecutive video frames. The specific calculation formula is:
[0057]
[0058] Among them I 1 and I 2 Represents two consecutive video frames, m, n represent the width and height of the frame, I1(i, j) represents the pixel value at position i, j. The above formula can accurately detect the difference between the two video frames. When MSE is greater than a certain threshold p, it can be regarded that the two video frames belong to different storyboards. After the split-screen detection, x video clips are obtained: v1, v2, …, vx.
[0059] S4, sampling the video frames in each video clip, and then deleting the video frames with high similarity.
[0060] The sampling method may be key frame sampling, random sampling, uniform sampling, etc. Since the difference between two consecutive frames has been calculated in step S3, in order to save calculation, the sampling method here adopts key frame sampling. In the same video clip, if the difference MSE of two consecutive frames is greater than or equal to p / 2, then the second frame is selected. If the MSE of two consecutive frames is less than p / 2, then neither video frame is selected.
[0061] S5, performing OCR recognition on the sampled video frames to obtain text information corresponding to each video frame, and performing deduplication processing on all text segments.
[0062] Among them, OCR is to identify text information in video frames. Optionally, OCR methods include paddle-paddle OCR, methods based on multimodal large models, such as Qwen-VL. Preferably, a multimodal large model is used for OCR recognition. For text deduplication, the Minhash algorithm is preferably used to quickly remove similar fragments in all text information. After this step, in this embodiment, each video segment obtains a corresponding text segment, so x video segments correspond to x text segments: t1, t2, ..., tx.
[0063] S6, densely vectorize and sparsely vectorize the text fragments to obtain the dense vector dense_vector_doc of each text fragment x and sparse vectors sparse_vector_doc x , perform dense vectorization and sparse vectorization on each knowledge point to obtain the dense vector of each knowledge point dense_vector_query y and sparse vectors sparse_vector_query y .
[0064] Among them, dense vectorization is implemented by using a vectorization model. Optionally, models such as OpenAI's text_embedding_v2 model and Alibaba Cloud's text-embedding-v3 can directly encode text information into 786-dimensional, 1024-dimensional, and 1536-dimensional vector representations. In this embodiment, the text-embedding-v3 vectorization model is used to densely vectorize x text segments and z knowledge points to obtain the dense vector representations of x text segments: dense_vector_doc 1 , dense_vector_doc 2 , …, dense_vector_doc x ; and the dense vector representation corresponding to Y knowledge points: dense_vector_query 1 , dense_vector_query 2 , …, dense_vector_query y .
[0065] Among them, Figure 3 As shown, sparse vectorization is implemented as follows:
[0066] S61, segmenting the X text segments and Y knowledge points. The segmentation method may be Jieba segmentation, Hanlp segmentation, or a tokenizer such as BERT or GPT. In order to retain the characteristics of Chinese words, Jieba segmentation is preferably used.
[0067] S62, counting the number of text segments in which each word after word segmentation of each knowledge point appears in X text segments, and calculating the weight of each word, which is used as the sparse vector representation of the knowledge point. Specifically,
[0068]
[0069] where q i represents a word after the segmentation of each knowledge point, x(q i ) means it contains the word q i Therefore, for the knowledge point kp y The sparse vector representation of is: sparse_vector_query y =w 1 , w 2 ,…,w g ,g represents the knowledge point kp y The number of words after tokenization.
[0070] S63, count the frequency of each word in each knowledge point in each text segment, and calculate the frequency of each word in the text segment doc x The correlation is used as the sparse vector representation of the text fragment, and the y-th knowledge point kp y For example, the specific correlation calculation formula is:
[0071]
[0072] where r xi ,R(q i ,doc x ) represents the knowledge point kp y A participle q i With the text snippet doc x The correlation of tf(q i ,doc x ) indicates word q i In the text snippet doc x The number of occurrences in L xd Represents a text fragment doc x Length, L avg represents the average length of X text fragments, so the text fragment doc x Relative to knowledge point kp ySparse vector representation of: sparse_vector_doc x =r x1 , r x2 ,…,r xg .
[0073] S7, dense vector dense_vector_doc for each text segment x and the dense vector dense_vector_query of each knowledge point y Calculate the cosine similarity cosine_similarity and the sparse vector sparse_vector_doc for each text segment x Sparse vector sparse_vector_query for each knowledge point y Calculate the dot product operation as the keyword similarity keyword_similarity, calculate the average of the two similarities as the final similarity similarity, and take the knowledge point with the largest final similarity as the classification label of the video clip.
[0074] in:
[0075]
[0076]
[0077] similarity=(cosine_similarity+keyword_similarity) / 2
[0078] The similarity above indicates the degree of association between a text segment and a knowledge point. The degree of association of the text segment with Y knowledge points is calculated, and the knowledge point with the greatest degree of association is taken as the label of the text segment. Then the video segment corresponding to the text segment is also the video segment explaining the knowledge point.
[0079] S8, combining the video clips according to the classification labels of the video clips to obtain the explanation videos of the knowledge points. After the above steps, the knowledge point labels of each video clip are obtained, and the video clips with the same labels are combined in chronological order to obtain the course explanation videos of the knowledge points.
[0080] The embodiment of the present invention is implemented by segmenting the course video, sampling the key frames of each segmented video, and then using OCR to extract the text of the corresponding video frame. After deduplication, sparse vectorization and dense vectorization are performed respectively. Sparse vectorization pays more attention to keywords, while dense vectorization is more semantic. The knowledge points to which each video clip belongs are determined by calculating the similarity by combining the two. This application does not require manual annotation of data to train the video classification model, which is real-time and fast, can effectively improve students' learning efficiency, and promote personalized and intelligent adaptive online education.
[0081] Based on the same inventive concept, the present invention also provides a course video automatic editing device, which corresponds one-to-one to a course video automatic editing method in the above embodiment. Figure 4 As shown, the course video automatic editing device includes a video acquisition module 100, a video segmentation module 200, an OCR module 300, a vectorization module 400, a similarity calculation module 500, and a knowledge point video combination module 600. The detailed description of each functional module is as follows:
[0082] Video acquisition module 100: used to obtain the course video to be edited and obtain the knowledge point list corresponding to the course video. Specifically, since many recorded course videos occupy a large amount of memory space, they are often stored in some object storage systems, such as Alibaba Cloud's OSS, Huawei Cloud's OBS, and Tencent Cloud's COS. The course management background can directly obtain the course video through the object storage system, and its corresponding knowledge point list is marked in advance by the teaching and research staff and placed in the database, which can be obtained through the database.
[0083] Video segmentation module 200: used to segment the course video into several video segments. Usually, whether two frames belong to the same video segment is determined based on the difference between consecutive video frames. If the difference is too large, it means that the camera has been switched, indicating that the two frames do not belong to the same video segment.
[0084] OCR module 300: used to extract text segments from several key video frames in several video segments. These key frames contain different courseware information and teacher's blackboard information. The OCR module can extract the text segments and then perform deduplication processing.
[0085] Vectorization module 400: used to perform dense vectorization and sparse vectorization on knowledge points and text segments.
[0086] Similarity calculation module 500: used to calculate the cosine similarity and keyword similarity between the knowledge point and the text segment, and take the average of the two as the final similarity between the knowledge point and the text segment, so as to determine the knowledge point corresponding to the text segment, and thus determine the knowledge point corresponding to the video segment.
[0087] The knowledge point video combination module 600 is used to combine video clips with the same knowledge point label in time sequence, so as to splice them into a course explanation video of a certain knowledge point.
[0088] It should be noted that for more specific work processes of each module, please refer to the aforementioned method embodiments, which will not be repeated here.
[0089] Optionally, in another embodiment, the present invention further provides a computer device, which may be a cloud server or a local server, and its internal structure is as follows: Figure 5 As shown. The computer device includes a processor, an I / O bridge, a memory bus, an input-output bus, a non-volatile storage medium, etc. The processor is connected to the I / O bridge through the system bus, the I / O bridge is connected to the memory bus and the input-output bus respectively, and the non-volatile storage medium is connected to the input-output bus through the memory bus. The USB adapter, the graphics adapter, and the network adapter are connected to the input-output bus. The USB adapter is connected to the keyboard and mouse, the graphics adapter is connected to the display, and the network adapter is connected to the network card.
[0090] The database of the computer device is used to store the data used in the above-mentioned large model-based intelligent teaching method, including training data, reasoning data, etc. The network card of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the automatic editing method of the course video is realized.
[0091] Accordingly, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the steps of the above-mentioned method for automatically editing course videos are implemented.
[0092] The computer-readable storage medium may be an internal storage unit of the system described in any of the foregoing embodiments, such as a hard disk or memory of the system. The computer-readable storage medium may also be an external storage device of the system, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the system. Furthermore, the computer-readable storage medium may also include both an internal storage unit of the system and an external storage device. The computer-readable storage medium is used to store the computer program and other programs and data required by the system. The computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.
[0093] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A method for automatically editing a course video, characterized in that: include: Obtain the video to be edited, and obtain the corresponding knowledge point list KP according to the subject, chapter and section in the video to be edited; If the number of knowledge points corresponding to the knowledge point list KP is greater than 1, performing storyboard detection on the video to be edited to obtain multiple video clips; Sampling each of the video clips to obtain a video frame; Performing OCR recognition on each of the video frames to obtain text segments corresponding to each video frame, and removing duplicates from all text segments; Dense vectorization and sparse vectorization are performed on the text segment and each knowledge point respectively to obtain the vectorization results; Perform similarity calculation based on the vectorization result to obtain a classification label for each video clip; The video clips are combined according to the classification labels to obtain explanation videos of various knowledge points.
2. The automatic course video editing method according to claim 1, characterized in that: A method based on inter-frame differences is used to perform frame detection on the video to be edited; and a key frame sampling method is used to sample each of the video clips.
3. The automatic course video editing method according to claim 2, characterized in that: After sampling each of the video clips, the method further includes: Based on the difference value between two consecutive video frames, the video frames with high similarity are deleted.
4. The automatic course video editing method according to claim 1, characterized in that: A multimodal large model is used to perform OCR recognition on each of the video frames, and a Minhash algorithm is used to deduplicate all the segments.
5. The automatic course video editing method according to claim 1, characterized in that: Dense vectorization and sparse vectorization are performed on the text segment and each knowledge point respectively to obtain the vectorization results, which are as follows: Dense and sparse vectorization is performed on the text fragments to obtain the dense vector dense_vector_doc of each text fragment. x and sparse vectors sparse_vector_doc x , perform dense vectorization and sparse vectorization on each knowledge point to obtain the dense vector of each knowledge point dense_vector_query y and sparse vectors sparse_vector_query y .
6. The automatic course video editing method according to claim 5, characterized in that: The specific steps for sparse vectorization of text segments and each knowledge point are as follows: Segment X text segments and Y knowledge points; Count the number of text segments in which each word after word segmentation of each knowledge point appears in X text segments, and calculate the weight w of each word i , which is the sparse vector representation of this knowledge point Among them, q i represents a word after the segmentation of each knowledge point, x(q i ) means it contains the word q i The number of text fragments, then the sparse vector representation of the y-th knowledge point is: sparse_vector_query y =w1,w2,…,w g , g represents the yth knowledge point kp y The number of words after segmentation, the value range of y is an integer between 1 and Y; Count the yth knowledge point kp y The frequency of each word in each text segment after word segmentation is calculated for each word about the xth text segment doc x The correlation is taken as the sparse vector representation of the text fragment. The specific correlation calculation formula is: where r xi ,R(q i ,doc x ) represents the knowledge point kp y The participle q i With text snippet doc x The correlation of tf(q i ,doc x ) indicates word q i In the text snippet doc x The number of occurrences in L xd Represents a text fragment doc x Length, L avg represents the average length of X text fragments, so the text fragment doc x Relative to knowledge point kp y Sparse vector representation of: sparse_vector_doc x =r x1 , r x2 ,…,r xg .
7. The automatic course video editing method according to claim 5, characterized in that: Based on the vectorization result, similarity calculation is performed to obtain the classification label of each video clip, which is specifically: Dense vector dense_vector_doc for each text segment x and the dense vector dense_vector_query of each knowledge point y Calculate the cosine similarity cosine_similarity and the sparse vector sparse_vector_doc for each text segment x And the sparse vector sparse_vector_query of each knowledge point y Calculate the keyword similarity keyword_similarity, calculate the average of the two similarities as the final similarity similarity, and take the knowledge point with the largest final similarity as the classification label of the video clip.
8. A course video automatic editing device, characterized in that: include: The video acquisition module is used to acquire the course video to be edited, and obtain the corresponding knowledge point list KP according to the subject, chapter and section in the video to be edited; A video segmentation module, configured to perform a split-frame detection on the video to be edited to obtain a plurality of video clips if the number of knowledge points corresponding to the knowledge point list KP is greater than 1; The OCR module is used to sample each of the video segments to obtain video frames; perform OCR recognition on each of the video frames to obtain text segments corresponding to each video frame, and remove duplicates from all text segments; The vectorization module is used to perform dense vectorization and sparse vectorization on the text segment and each knowledge point respectively to obtain the vectorization results; A similarity calculation module, used to perform similarity calculation based on the vectorization result to obtain a classification label for each video clip; The knowledge point video combination module is used to combine the various video clips according to the classification labels to obtain explanation videos of various knowledge points.
9. A computer device comprising a non-volatile memory, a processor, a memory bus, a system bus, and an input / output bus, and a USB adapter, a graphics adapter, etc. connected to the input / output bus, and a computer program stored in the non-volatile memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor is caused to perform the method according to any one of claims 1 to 7.