A video image data processing method and system

By constructing character correlation relationships and using methods such as following coefficients, duplicate word screening coefficients and preservation indexes, the problem of low semantic accuracy caused by similar text in adjacent frames in advertising video content review is solved, achieving higher text data accuracy and Banned words versus accuracy.

CN118485953BActive Publication Date: 2024-10-11XIAMEN ZHONGLIAN CENTURY TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410948993.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-16
Publication Date
2024-10-11
Estimated Expiration
2044-07-16

AI Technical Summary

Technical Problem

When existing advertising video content review technology processes highly similar or completely consistent texts between adjacent frames, there are problems with word order reversal and low semantic accuracy, resulting in low accuracy in comparing prohibited words.

Method used

By analyzing the semantic information and frequency of occurrence between characters, constructing a degree of exclusion to determine the character association, using the following coefficient to reorder the text, eliminating word order confusion, and deduplicating the text through the duplicate word screening coefficient and preservation index to ensure that the text Semantic precision of the data.

Benefits of technology

It effectively reduces sentence order confusion errors, improves the semantic accuracy of advertising video text data, reduces redundant text superposition between adjacent frames, avoids semantic confusion problems, and improves the recognition accuracy of prohibited words.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118485953B_ABST
    Figure CN118485953B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of video image data processing, and specifically to a video image data processing method and system, the method comprising: collecting text strings of each frame image in an advertisement video to be reviewed on an intelligent risk control detection platform; obtaining a tone string in a tone word library; obtaining a close-following coefficient according to the distribution and number of occurrences of characters in the text string of each frame image, and rearranging the characters in the text string according to the close-following coefficient; obtaining a repeated word identification coefficient according to the correspondence between characters in the text strings of adjacent frame images and the close-following coefficient; obtaining a repeated word preservation coefficient and a preservation index of each character according to the number of occurrences of each character in the text strings of all frame images and the repeated word identification coefficient; and obtaining advertisement video text data according to the preservation index of characters in the text strings of all frame images. Thus, the advertisement video image data can be processed and the semantic accuracy of the data can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of video image data processing, and in particular to a video image data processing method and system. Background Art

[0002] In the digital age, as one of the main carriers of information dissemination, the safety supervision of advertising video content is becoming increasingly important. With the rapid development of Internet advertising video platforms, the number of advertising videos is increasing, which brings severe challenges to the review of advertising video content. Therefore, it is particularly important to conduct efficient and accurate review of advertising video content.

[0003] Most of the existing content review technologies for advertising videos rely on video frame extraction, image recognition, OCR optical character recognition and other technical means. After decomposing the advertising video into images frame by frame, the OCR technology is used to identify the text data in the image, and then the text data is spliced. Finally, the spliced ​​text data is compared with the banned word library. However, for advertising videos where the text information between adjacent frames is often highly similar or even completely identical, the existing technology does not process the text in adjacent frames. When using OCR technology to identify images containing a large amount of repeated text in different layouts and backgrounds, the word order will be reversed, resulting in the semantics of the text data of the advertising video being changed after the text is spliced, making the semantic accuracy of the text data of the advertising video not high, resulting in low comparison accuracy of banned words. Summary of the invention

[0004] In order to solve the above technical problems, the purpose of this application is to provide a video image data processing method and system, and the technical solutions adopted are as follows:

[0005] In a first aspect, an embodiment of the present application provides a method for processing video image data, the method comprising the following steps:

[0006] S1, collect each frame image in the advertising video to be reviewed on the intelligent risk control detection platform; obtain the tone character string in the tone word library; after segmenting each frame image, use the text recognition algorithm to obtain the text character string of each frame image;

[0007] S2, obtaining a close-up coefficient according to the distribution and the number of occurrences of the characters in the text string of each frame image, and rearranging the characters in the text string according to the close-up coefficient;

[0008] S3, obtaining a preservation index of each character according to the distribution and the number of occurrences of each character in the text strings of all frame images; the process of obtaining the preservation index includes:

[0009] S31, obtaining a repeated word discrimination coefficient of each character according to the correspondence relationship and the following coefficient of the characters in the text strings of adjacent frame images;

[0010] S32, obtaining a repeated word preservation coefficient of each character according to the number of times each character appears in the text string of all frame images and the repeated word identification coefficient;

[0011] S33, obtaining a preservation index for each character according to the number of times each character appears in the text string of all frame images and the repeated character preservation coefficient;

[0012] S4, according to the preservation index of the characters in the text strings of all the frame images, de-duplicate the text strings of each frame image to obtain the advertisement video text data.

[0013] Furthermore, after segmenting each frame of image, a text recognition algorithm is used to obtain a text string of each frame of image, including:

[0014] Performing preset equal division cutting on each frame image in order from top to bottom to obtain each segmented sub-frame image; performing text recognition on each segmented sub-frame image to obtain a text data string of each segmented sub-frame image;

[0015] The text data character strings of all the divided sub-frame images are arranged in order from top to bottom according to the divided sub-frame images to obtain the text character strings of each frame image.

[0016] Furthermore, the specific method of rearranging the characters in the text string according to the immediately following coefficients includes:

[0017] For any two characters in the text string of each frame image: character u and character v, if character v is located after character u, the weight of the position of character v immediately after character u is assigned to 0; otherwise, the weight of the position of character v immediately after character u is assigned to 2;

[0018] According to the distribution and occurrence times of characters in the text string of each frame image, the degree of repulsion between any two characters is obtained;

[0019] Arrange weights according to the degree of repulsion and position between any two characters in the text string of each frame image to obtain a close following coefficient;

[0020] For the text string of each frame image, the character with the largest following coefficient relative to each character in the text string is recorded as the following character of each character; starting from the first character of the text string, the following character of the current character is placed after the current character in sequence until all characters are sorted.

[0021] Furthermore, the specific method for obtaining the degree of repulsion between any two characters includes:

[0022] For the text string of each frame image, obtain the corresponding word vector of each character in the text string; obtain the number of times each character appears in the text string, recorded as the frequency of each character; calculate the cosine similarity between the word vectors of any two characters, recorded as the semantic similarity between the two characters; obtain the absolute value of the difference between the frequencies of any two characters;

[0023] The degree of repulsion between two characters is determined according to the Euclidean distance, the absolute value of the frequency difference and the semantic similarity between any two characters; the degree of repulsion between the two characters is positively correlated with the Euclidean distance and the absolute value of the frequency difference, and is negatively correlated with the semantic similarity.

[0024] Further, the obtaining of the following coefficient includes:

[0025] Count the number of times a phrase consisting of characters u and v appears in the text strings of all frame images, recorded as the first number; count the number of characters contained in the text strings of all frame images, recorded as the second number; calculate the ratio of the first number to the second number, recorded as the first ratio; calculate the ratio of the position arrangement weight of character v immediately after character u and the degree of repulsion between character u and character v, recorded as the second ratio; the first ratio and the second ratio are both positively correlated with the close following coefficient of character v relative to character u.

[0026] Further, the obtaining of the repeated word identification coefficient of each character includes:

[0027] For the text strings of two arbitrary adjacent frame images, the longest common subsequence algorithm is used to obtain the maximum common substring between the two text strings;

[0028] The text string of the previous frame image in two arbitrary adjacent frame images is recorded as the previous frame text string, and the text string of the next frame image is recorded as the next frame text string; in the previous frame text string, the characters that are consistent with the characters included in the next frame text string are obtained in sequence from front to back to form an intersection string;

[0029] Any character in the previous frame text string is recorded as the character to be analyzed. When the character to be analyzed does not belong to the largest common substring, the repeated word discrimination coefficient of the character to be analyzed is assigned to 0;

[0030] When the character to be analyzed belongs to the largest common substring, if the character to be analyzed belongs to the modal particle string, the repeated word recognition coefficient of the character to be analyzed is assigned a value of 1; if the character to be analyzed does not belong to the modal particle string, the sum of the following coefficient of the character to be analyzed for its previous character and the following coefficient of the character to be analyzed for the character to be analyzed is calculated, and the sum is used as the repeated word recognition coefficient of the character to be analyzed.

[0031] Further, the obtaining of the repeated word preservation coefficient of each character includes:

[0032] Count the number of times each character appears in the text string of all frame images, recorded as the third number; obtain the ratio of the second number to the third number, recorded as the third ratio; the third ratio is positively correlated with the repeated word preservation coefficient of each character; the repeated word identification coefficient of each character is negatively correlated with the repeated word preservation coefficient of each character.

[0033] Further, the obtaining of the preservation index of each character specifically includes:

[0034] Calculate the absolute value of the difference between the number of characters of the previous frame text string and the largest common substring, and record it as the first absolute value of the difference; calculate the absolute value of the difference between the number of characters of the next frame text string and the largest common substring, and record it as the second absolute value of the difference; obtain the sum of the first absolute value of the difference and the second absolute value of the difference, and record it as the first sum;

[0035] When the first sum is equal to 0, the storage index of the character to be analyzed is assigned to 0; otherwise, the repeated word storage coefficient of the character to be analyzed is used as the storage index of the character to be analyzed.

[0036] Further, the text string of each frame image is deduplicated according to the preservation index of the characters in the text string of all frame images to obtain the advertisement video text data, including:

[0037] The preservation indexes of all characters in the text strings of all frame images are threshold segmented to obtain the optimal threshold; the characters with a preservation index less than the optimal threshold in the text string of each frame image are removed to obtain the deduplicated text of each frame image; the deduplicated texts of all frame images are spliced ​​to obtain the advertising video text data.

[0038] In a second aspect, an embodiment of the present application further provides a video image data processing system, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor implements the steps of any one of the above-mentioned methods when executing the computer program.

[0039] This application has at least the following beneficial effects:

[0040] The present application analyzes the semantic information and frequency of occurrence between characters and constructs the degree of exclusion to judge the association between characters, which reflects the possibility of words being composed between characters from a global perspective and eliminates the interference of texts in different positions in the advertising video image; further, the closeness coefficient is constructed by the degree of exclusion, the position of the characters in the text and the frequency of the constituent words, and the universality of the phrases, which reduces the probability of erroneous phrases being extracted due to the confusion of the word order of the sentences; the text is reordered by the closeness coefficient to eliminate the semantic confusion and word order disorder caused by multiple sentences; by analyzing the high weight of texts in adjacent frames caused by the characteristics of the advertising video, To solve the problem of repeated words, a repeated word identification coefficient is constructed according to the following coefficient to determine whether the repeated words are modal particles; the repeated word preservation coefficient of each character is obtained according to the repeated word identification coefficient, which eliminates the interference of modal particles and more clearly identifies the repeated words that hinder the text semantics; according to the comparison of text strings in adjacent frames, the preservation index of each character is obtained, and the resident words in the repeated words are more accurately identified; finally, the text is deduplicated according to the preservation index and then spliced ​​to obtain the advertising video text data, which effectively reduces the superposition of redundant texts between adjacent frames, avoids the semantic confusion problem caused by repeated text, and improves the semantic accuracy of the text data of the advertising video. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present application or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0042] Figure 1 A flowchart of a method for processing video image data provided by an embodiment of the present application;

[0043] Figure 2 It is a schematic diagram of a video picture;

[0044] Figure 3 Get the block diagram for saving the index. DETAILED DESCRIPTION

[0045] In order to further explain the technical means and effects adopted by the present application to achieve the predetermined invention purpose, the following is a detailed description of a video image data processing method and system proposed in accordance with the present application, its specific implementation, structure, features and effects, in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

[0046] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.

[0047] The following is a detailed description of a video image data processing method and system provided by the present application in conjunction with the accompanying drawings.

[0048] See also Figure 1 , which shows a flowchart of a method for processing video image data provided by an embodiment of the present application, the method comprising the following steps:

[0049] Existing OCR detection technology is usually based on human reading habits, extracting text from images in a left-to-right and top-to-bottom order; however, due to the diversity of advertising video content, the text positions between multiple frames of an advertising video or even within a frame may be different, so the text data obtained by existing OCR recognition technology will have certain semantic confusion. Figure 2 The video image shown in the figure has the text data of "Three Kingdoms Liu, Guan and Zhang perform the oath of brotherhood in Taoyuan" after OCR recognition, which has semantic confusion. Therefore, when the text in an image is distributed in different positions, if only the existing OCR recognition technology is used to obtain the text data without semantic processing of the text, and the text data of a large number of repeated frames of the advertising video are directly spliced, the semantic information of the text content of the advertising video will be affected, resulting in low audit accuracy. Therefore, it is necessary to adjust the repeated text data in adjacent frames after OCR recognition according to the characteristics of the advertising video to improve the accuracy of the content audit of the advertising video.

[0050] S1, collect each frame image in the advertising video to be reviewed on the intelligent risk control detection platform; obtain the tone character string in the tone word library; after segmenting each frame image, use the text recognition algorithm to obtain the text character string of each frame image.

[0051] Obtain the advertising video to be reviewed and the tone character string YQ in the tone word library from the intelligent risk control detection platform. Then, the advertising video to be reviewed is disassembled frame by frame to obtain each frame image. Each frame image is divided into three equal parts from top to bottom to obtain each segmented sub-frame image. All segmented sub-frame images are subjected to OCR text recognition in order from top to bottom. The text data character strings of all segmented sub-frame images are arranged to obtain the text character string of each frame image, thereby completing the acquisition of the text character string in the advertising video. A regular matching algorithm is used to eliminate all meaningless characters in the text strings of all frame images, such as punctuation marks, and similarly, the regular matching algorithm is used to pre-process the tone word library. The regular matching algorithm is a well-known technology and will not be described in detail here.

[0052] At this point, the preliminary acquisition and preprocessing of the text string of each frame image in the advertising video is completed.

[0053] S2, obtaining a close-up coefficient according to the distribution and the number of occurrences of the characters in the text string of each frame image, and rearranging the characters in the text string according to the close-up coefficient.

[0054] Due to the diversity of advertising videos, the text in the advertising videos may be distributed in different locations, so multiple sentences recognized by OCR text recognition technology may be confused, causing the overall semantics of the sentence to change. It should be noted that even if the overall semantics of the sentence has changed, if two characters often appear together, it means that the two characters are more closely related, and the possibility that they can form a phrase is greater.

[0055] As an embodiment of the present application, obtaining the degree of repulsion between any two characters according to the distribution and the number of occurrences of the characters in the text string of each frame image includes:

[0056] Taking the characters u and v in the text string of the i-th frame image as an example, the Euclidean distance is calculated to indicate the closeness of the two characters appearing together. At the same time, since each character has certain semantic information, this embodiment uses the Word2Vec model to obtain the corresponding word vector of each character.

[0057] The specific implementation process of encoding each character through the Word2Vec model to obtain a word vector to reflect its semantic information is a well-known technology and will not be repeated here. It should be noted that the Word2Vec model is only an algorithm for obtaining the word vector of each character in a text string provided in this embodiment. Under the premise of achieving the purpose of obtaining the word vector, as other implementation methods, the implementer can also adopt other feasible word vector acquisition models in the prior art, and this application does not limit this.

[0058] Further, the cosine similarity between the word vectors of character u and character v is calculated, which is recorded as the semantic similarity between character u and character v. Cosine similarity is a well-known technology, and the specific process is not repeated here. The number of times each character appears in the text string is obtained, which is recorded as the frequency of each character; the absolute value of the difference between the frequency of character u and character v is calculated;

[0059] According to the Euclidean distance, the absolute value of the frequency difference and the semantic similarity between the characters u and v, the degree of repulsion between the characters u and v is determined. The degree of repulsion between the characters u and v is positively correlated with the Euclidean distance and the absolute value of the frequency difference; the degree of repulsion between the characters u and v is negatively correlated with the semantic similarity.

[0060] It should be understood that the positive correlation relationship can specifically be a multiplication relationship, an addition relationship, the power of an exponential function, etc.; the negative correlation relationship can specifically be a division relationship, a subtraction relationship, etc., which is determined by the actual application and is not specifically limited in this application. It should be noted that to ensure the meaningfulness of the calculation result of the exclusion degree, when the negative correlation relationship is a division relationship, a tuning parameter factor greater than 0 needs to be added to the denominator to prevent the denominator from being 0. The value of the tuning parameter factor is set by the implementer according to the actual situation and is not specifically limited in this application.

[0061] In this embodiment, the exclusion degree between character u and character v is the ratio of the sum of the Euclidean distance and the absolute value of the difference to the semantic similarity.

[0062] If character u and character v often appear together and their tightness is relatively large, the Euclidean distance between the two characters is relatively small. If the frequency of character u and character v appearing together is relatively high, it indicates that character u and character v often appear together in the advertising video text and their correlation is relatively large. Then the difference in the absolute value of the difference between their frequencies is relatively small, and the possibility that character u and character v are the same word is greater. If the semantic information of the two characters is completely the same or closely related, then their semantic similarity is relatively large, the semantic correlation is higher, and the possibility of mutual exclusion is smaller.

[0063] Since the OCR text recognition technology is designed based on human reading habits, although the word order of multiple sentences in the recognized text string is confused, the character positions in each individual sentence output still have a certain arrangement order; that is, although the semantics of the characters have changed, their arrangement order still has a pattern. For example, in "In the Three Kingdoms, Liu, Guan, and Zhang performed the Oath of the Peach Garden righteousness", although the semantics are chaotic, the positions of the characters "performed" and "righteousness" are still after "In the Three Kingdoms".

[0064] Still taking characters u and v as an example, through the positional relationship between characters u and v in the sentence and the frequency of the phrases they form in the text strings of all images, calculate the positional arrangement weight of character v immediately following character u, specifically: If character v is located after character u, the positional arrangement weight of character v immediately following character u is = 0; conversely, the positional arrangement weight of character v immediately following character u is .

[0065] As an embodiment of this application, according to the exclusion degree and positional arrangement weight between any two characters in the text strings of each frame of image, obtain the following coefficient, specifically including:

[0066] Count the number of times a phrase consisting of characters u and v appears in the text strings of all frame images, recorded as the first number; count the number of characters contained in the text strings of all frame images, recorded as the second number; calculate the ratio of the first number to the second number, recorded as the first ratio; calculate the ratio of the position arrangement weight of character v immediately after character u and the degree of repulsion between character u and character v, recorded as the second ratio; both the first ratio and the second ratio are positively correlated with the close following coefficient of character v relative to character u.

[0067] In this embodiment, the following coefficient of the character v relative to the character u is the product of the first ratio and the second ratio.

[0068] If the character v is located before the character u in the text string of the i-th frame image, the character phrase composed of the characters u and v is It may not conform to the basic semantic information of the text string output by OCR, so the position arrangement weight is small; if the character phrase composed of character u and character v If the text string appears multiple times in all images, it means that the phrase has a certain semantic relevance, and the first ratio is larger, and the larger the value, the more common the phrase is, which means that the character Immediately after the character The greater the possibility, the greater the character phrase If the text string does not appear once in all images, it means that the semantic relevance between the characters is low and the prevalence is low, then the first ratio is small; finally, the larger the coefficient, the more likely the characters are. Immediately after the character The more likely it is to happen later.

[0069] Finally, calculate the characters in the text string of the i-th frame image The character with the largest coefficient is recorded as character The character that follows it and puts it in the character Afterwards; starting from the first character of the text string in the i-th frame image, the character immediately following the current character is placed after the current character in sequence, and this operation is repeated until all the characters in the i-th frame image complete the new position sorting.

[0070] By calculating the close-up coefficient, the text in the i-th frame image can be newly semantically sorted to make the sentence more fluent and the semantics more accurate.

[0071] S3, obtaining a storage index of each character according to the distribution and the number of occurrences of each character in the text strings of all frame images.

[0072] Since the image is obtained by disassembling and converting the advertising video frame by frame, the image of the i-th frame image will be slightly different from the previous frame image and the next frame image, or even completely consistent; and since some texts may appear continuously in the advertising video, throughout the entire advertising video, the words that exist in all frame images are regarded as resident words. Because resident words appear in all frame images, when the text in the frame image is reordered, the resident words will affect the semantic information in the frame image, thereby affecting the matching of banned words. Taking the i-th frame and the i+1-th frame image as an example for analysis, the Chinese characters in the frame image are deduplicated to improve the semantic recognition effect after splicing. Therefore, in order to avoid the influence of the semantic information of the spliced ​​text due to the high similarity of the text in the adjacent frame images when the text in the image is spliced, taking the i-th frame image and the i+1-th frame image as an example, the text strings with similarity are deduplicated.

[0073] S31, obtaining a repeated word identification coefficient of each character according to the correspondence between characters in text strings of adjacent frame images and the following coefficients.

[0074] For two adjacent frames, the text string of the i-th frame and the i+1-th frame image, the text string of the i-th frame image is recorded as the text string of the previous frame , the text string of the i+1th frame image is recorded as the next frame text string ; n and m are the number of characters in string P and string Q respectively. Take the previous frame text string P and the next frame text string Q as input, and use the LCS longest common subsequence algorithm to obtain the largest common substring between the two strings. , w is the number of characters in the string Z. Then, in the previous frame text string P, in order from front to back, compare and extract the characters that are consistent with the characters in the next frame text string Q one by one to construct the intersection string , where s is the number of characters in the string J. The LCS algorithm is a well-known technique and will not be described in detail.

[0075] In order to determine whether the repeated words are modal particles, the characters in the text string of each frame image are compared with the maximum common substring And the affiliation of the modal particle string YQ, calculate the repeated word recognition coefficient of the character:

[0076] When the character b in the text string of the i-th frame image does not belong to the maximum common substring , it means that character b is not repeated, and the repeated word identification coefficient of character b is assigned a value of 0;

[0077] When the character b in the text string of the i-th frame image is in the largest common substring , determine whether character b belongs to the modal particle string YQ; if character b belongs to the modal particle string YQ, it has a weak effect in semantic distinction, and the repeated word discrimination coefficient of character b is assigned 1; if it does not belong to the modal particle string YQ, it has a greater degree of influence and plays a greater role in semantic distinction; then calculate the following coefficient JS of character b for the previous character a a,b The coefficient JS of character c for the previous character b b,c The sum of the values ​​is used as the character b repeated word identification coefficient. If the character b is the first character in the intersection string and the character a does not exist, then let JS a,b =2; if character b is the end and character c does not exist, let JS b,c =2.

[0078] S32, obtaining a repeated word preservation coefficient of each character according to the number of times each character appears in the text string of all frame images and the repeated word identification coefficient.

[0079] Count the number of times each character appears in the text string of all frame images, recorded as the third number; obtain the ratio of the second number to the third number, recorded as the third ratio; the third ratio is positively correlated with the repeated word preservation coefficient of each character; the repeated word identification coefficient of each character is negatively correlated with the repeated word preservation coefficient of each character.

[0080] Specifically, in this embodiment, taking the character b in the text string of the i-th frame image as an example, the repeated word recognition coefficient of the character b is and the product of the third ratio of character b; wherein, represents an exponential function with the natural constant e as the base, C b is the repeated word discrimination coefficient of character b.

[0081] The larger the value of the repeated word discrimination coefficient is, the greater the role of character b in semantic distinction and the closer it is to the two characters before and after it. The smaller the value of ; if character b appears multiple times in the text string of all images and the frequency of occurrence is high, the third ratio is relatively small, the repeated word preservation coefficient is small, and it is more likely to be a repeated word that hinders semantics and needs to be removed.

[0082] S33, obtaining a preservation index of each character according to the number of times each character appears in the text string of all frame images and the repeated character preservation coefficient.

[0083] The expression to save the exponent is:

[0084]

[0085] Where n, m, and w are the number of characters in string P, string Q, and string Z respectively; is the saved index of character b; Save the coefficients for repeated words of character b.

[0086] If the text strings in the i-th frame image and the i+1-th frame image are completely consistent, then the string Z obtained by the LCS algorithm is also completely consistent with the string P and the string Q. The value of is 0, then The value of is 0, then the character is not retained and the character b is removed; The smaller the value of , the greater the possibility that character b is a resident word, and the greater the possibility that it needs to be removed.

[0087] Save the index acquisition block diagram, such as Figure 3 shown.

[0088] The calculation of the above-mentioned preservation index takes into account the highly similar characteristics of text strings in adjacent frame images, and eliminates unnecessary repeated characters, such as resident words, through the calculation of the preservation index. It can significantly reduce the superposition of redundant information between adjacent frame images, ensure that the semantic information of the spliced ​​text is clear and coherent, avoid semantic confusion caused by excessive repetition, and improve the comparison accuracy of banned words.

[0089] S4, according to the preservation index of the characters in the text strings of all the frame images, de-duplicate the text strings of each frame image to obtain the advertisement video text data.

[0090] The preservation index of all characters in all frame images is calculated in sequence, and then the preservation index of all characters in all frame images is used as input, and the optimal threshold R is obtained by using the Otsu threshold method. Characters with a preservation index less than the optimal threshold R are removed. Characters with a preservation index less than the optimal threshold in the text string of each frame image are removed to obtain the deduplicated text of each frame image; the deduplicated text of all frame images is spliced ​​in sequence to obtain the advertising video text data, completing the data processing of the pictures in the advertising video, and improving the semantic accuracy of the data.

[0091] According to the multi-threaded data processing method of the intelligent risk control detection platform, each frame image in the advertising video is subjected to banned word detection processing, and the detection rules are as follows: after the elimination operation, multiple frame images are obtained simultaneously by asynchronous multi-threading, and the obtained frame images are numbered, and the same task uses different strings of the same thread ID; then, according to the close following coefficient, the Chinese characters in the multiple frame images are reordered at the same time; after the text in the multiple frame images is sorted, the processed advertising video text data and the banned word library are still used as inputs through multi-threading, and the kmp algorithm is used for matching. If a banned word is detected, the kmp algorithm will output the position of the banned word in the frame image text. If a banned word is not detected, the kmp algorithm will not output the result. The kmp algorithm is a well-known technology and will not be described here.

[0092] The intelligent risk control detection platform can sort the text and detect banned words in multiple frame images at the same time through asynchronous multi-threading and kmp algorithm; and during the multi-threaded operation, it will always check whether the thread with the same ID has completed the detection. If the detection is completed, the result will be updated to the material library and configuration file, and the process will end; if the detection is not completed, it will be transferred to the redis queue for sorting.

[0093] During the detection process, if banned words are detected, the advertising video will be immediately judged as an illegal video, and the banned words in the advertising video and the frame image number where the banned words are located will be output at the same time; the matching of banned words in the advertising video is completed, and the data processing method for video images is realized.

[0094] Among them, the specific implementation process of the Otsu threshold method and the kmp string matching algorithm is a well-known technology and will not be repeated here. It should be noted that the Otsu threshold method is only an algorithm for obtaining the optimal threshold of the character preservation index provided in this embodiment. Under the premise of achieving the purpose of obtaining the optimal threshold, as other implementation methods, the implementer can also adopt other feasible threshold segmentation methods in the prior art, and this application does not limit this.

[0095] Based on the same inventive concept as the above method, an embodiment of the present application also provides a video picture data processing system, including a memory, a processor, and a computer program stored in the memory and running on the processor, and when the processor executes the computer program, the steps of any one of the above-mentioned video picture data processing methods are implemented.

[0096] It should be noted that the above sequence of the embodiments of the present application is for description only and does not represent the advantages and disadvantages of the embodiments. The above is a description of a specific embodiment of this specification. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0097] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.

[0098] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present application should be included in the protection scope of the present application.

Claims

1. A video image data processing method, characterized in that: The method comprises the following steps: S1, collect each frame image in the advertising video to be reviewed on the intelligent risk control detection platform; obtain the tone character string in the tone word library; after segmenting each frame image, use the text recognition algorithm to obtain the text character string of each frame image; S2, obtaining a close-up coefficient according to the distribution and the number of occurrences of the characters in the text string of each frame image, and rearranging the characters in the text string according to the close-up coefficient; S3, obtaining a preservation index of each character according to the distribution and the number of occurrences of each character in the text strings of all frame images; the process of obtaining the preservation index includes: S31, obtaining a repeated word discrimination coefficient of each character according to the correspondence relationship and the following coefficient of the characters in the text strings of adjacent frame images; S32, obtaining a repeated word preservation coefficient of each character according to the number of times each character appears in the text string of all frame images and the repeated word identification coefficient; S33, obtaining a preservation index for each character according to the number of times each character appears in the text string of all frame images and the repeated character preservation coefficient; S4, according to the preservation index of the characters in the text strings of all the frame images, deduplication of the text strings of each frame image is performed to obtain the advertisement video text data; The specific method for rearranging characters in a text string according to the immediately following coefficients comprises: For any two characters in the text string of each frame image: character u and character v, if character v is located after character u, the weight of the position of character v immediately after character u is assigned to 0; otherwise, the weight of the position of character v immediately after character u is assigned to 2; According to the distribution and occurrence times of characters in the text string of each frame image, the degree of repulsion between any two characters is obtained; Arrange weights according to the degree of repulsion and position between any two characters in the text string of each frame image to obtain a close following coefficient; For the text string of each frame image, the character with the largest following coefficient relative to each character in the text string is recorded as the following character of each character; starting from the first character of the text string, the following character of the current character is placed after the current character in sequence until all characters are sorted; The obtaining of the following coefficient comprises: Count the number of times a phrase consisting of characters u and v appears in the text strings of all frame images, recorded as the first number; count the number of characters contained in the text strings of all frame images, recorded as the second number; calculate the ratio of the first number to the second number, recorded as the first ratio; calculate the ratio of the position arrangement weight of character v immediately after character u and the degree of repulsion between character u and character v, recorded as the second ratio; the first ratio and the second ratio are both positively correlated with the close following coefficient of character v relative to character u.

2. A video image data processing method as claimed in claim 1, characterized in that: After segmenting each frame image, a text recognition algorithm is used to obtain a text string of each frame image, including: Performing preset equal division cutting on each frame image in order from top to bottom to obtain each segmented sub-frame image; performing text recognition on each segmented sub-frame image to obtain a text data string of each segmented sub-frame image; The text data character strings of all the divided sub-frame images are arranged in order from top to bottom according to the divided sub-frame images to obtain the text character strings of each frame image.

3. A video image data processing method as claimed in claim 1, characterized in that: The specific method for obtaining the degree of repulsion between any two characters includes: For the text string of each frame image, obtain the corresponding word vector of each character in the text string; obtain the number of times each character appears in the text string, recorded as the frequency of each character; calculate the cosine similarity between the word vectors of any two characters, recorded as the semantic similarity between the two characters; obtain the absolute value of the difference between the frequencies of any two characters; The degree of repulsion between two characters is determined according to the Euclidean distance, the absolute value of the frequency difference and the semantic similarity between any two characters; the degree of repulsion between the two characters is positively correlated with the Euclidean distance and the absolute value of the frequency difference, and is negatively correlated with the semantic similarity.

4. A video image data processing method as claimed in claim 1, characterized in that: The step of obtaining the repeated word identification coefficient of each character includes: For the text strings of two arbitrary adjacent frame images, the longest common subsequence algorithm is used to obtain the maximum common substring between the two text strings; The text string of the previous frame image in two arbitrary adjacent frame images is recorded as the previous frame text string, and the text string of the next frame image is recorded as the next frame text string; in the previous frame text string, the characters that are consistent with the characters included in the next frame text string are obtained in sequence from front to back to form an intersection string; Any character in the previous frame text string is recorded as the character to be analyzed. When the character to be analyzed does not belong to the largest common substring, the repeated word discrimination coefficient of the character to be analyzed is assigned to 0; When the character to be analyzed belongs to the largest common substring, if the character to be analyzed belongs to the modal particle string, the repeated word recognition coefficient of the character to be analyzed is assigned a value of 1; if the character to be analyzed does not belong to the modal particle string, the sum of the following coefficient of the character to be analyzed for its previous character and the following coefficient of the character to be analyzed for the character to be analyzed is calculated, and the sum is used as the repeated word recognition coefficient of the character to be analyzed.

5. A video image data processing method as claimed in claim 1, characterized in that: The step of obtaining the repeated word preservation coefficient of each character includes: Count the number of times each character appears in the text string of all frame images, recorded as the third number; obtain the ratio of the second number to the third number, recorded as the third ratio; the third ratio is positively correlated with the repeated word preservation coefficient of each character; the repeated word identification coefficient of each character is negatively correlated with the repeated word preservation coefficient of each character.

6. A video image data processing method as claimed in claim 4, characterized in that: The obtaining of the storage index of each character specifically includes: Calculate the absolute value of the difference between the number of characters of the previous frame text string and the largest common substring, and record it as the first absolute value of the difference; calculate the absolute value of the difference between the number of characters of the next frame text string and the largest common substring, and record it as the second absolute value of the difference; obtain the sum of the first absolute value of the difference and the second absolute value of the difference, and record it as the first sum; When the first sum is equal to 0, the storage index of the character to be analyzed is assigned to 0; otherwise, the repeated word storage coefficient of the character to be analyzed is used as the storage index of the character to be analyzed.

7. A video image data processing method as claimed in claim 1, characterized in that: The method of removing duplicates from the text strings of each frame image according to the preservation index of the characters in the text strings of all the frame images to obtain the advertisement video text data includes: The preservation indexes of all characters in the text strings of all frame images are threshold segmented to obtain the optimal threshold; the characters with a preservation index less than the optimal threshold in the text string of each frame image are removed to obtain the deduplicated text of each frame image; the deduplicated texts of all frame images are spliced ​​to obtain the advertising video text data.

8. A video image data processing system, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.