Network video identification matching method based on information entropy

By constructing an information entropy fingerprint library and real-time information entropy calculation, combined with improved LCS algorithm, error and interference problems in network video recognition are solved, efficient and accurate video and audio feature matching is achieved, and recognition accuracy and video service quality are improved.

CN119888570APending Publication Date: 2025-04-25CHINA ELECTRONICS IND ENG CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411949008.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

The prior art has large errors in network video recognition, making it difficult to fully utilize all data in video playback, and the changes in user behavior and network conditions are greatly disturbed, resulting in inaccurate identification.

Method used

Using the network video recognition and matching method based on information entropy, the target video information entropy fingerprint library is constructed offline, and the current video information entropy fingerprint is obtained online in real time, and the information entropy of the video and audio parts is calculated separately. Based on the improved LCS algorithm, the similarity between video and audio is calculated, and the matching video list is returned.

Benefits of technology

It realizes efficient and accurate video and audio feature matching, eliminates errors caused by complex network environments, improves the accuracy of specific video recognition matching, and optimizes network video services and video link quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119888570A_ABST
    Figure CN119888570A_ABST
Patent Text Reader

Abstract

The invention discloses a network video identification matching method based on information entropy. The matching method comprises the following steps: S1, constructing a target video information entropy fingerprint database offline; s2, acquiring a current video information entropy fingerprint online in real time, and respectively calculating information entropy of a video part and an audio part; s3, calculating the similarity of video and audio combination based on an information entropy improved LCS algorithm; and S4, returning a matched video list to complete matching identification. According to the method, video and audio features can be fully matched, an efficient and accurate peer analysis method is realized, hidden similar information is found among different sequences, errors caused by a complex network environment are eliminated, the accuracy of specific video recognition matching is improved, network video services can be better optimized, and the quality of video links is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of video transmission, and in particular to a network video recognition and matching method based on information entropy. Background Art

[0002] With the continuous development of the Internet, the demand for video services among netizens around the world is growing rapidly. In order to further improve the user's video service experience and meet the needs of Internet information security, the recognition of specific videos by operators and related network management departments is one of the current research hotspots.

[0003] Since the data transmitted by video is usually encrypted, it is difficult to simply and directly identify the traffic of a specific video. At the same time, network video is generally transmitted in the form of slices, with audio and video slices separated, and different video resolutions correspond to different video slices, which makes identification more difficult.

[0004] The methods for network video recognition in the currently published literature are mainly based on the address, protocol, response time, video sequence number length, etc. of the video message response as features for recognition.

[0005] The problems of the existing technology are: (1) the address, protocol, response time and other features of the message response do not directly rely on the features of the video itself, resulting in large errors in the recognition process and being easily disturbed by changes in address changes, network conditions, etc. (2) the data is often simply identified by relying on the features of the data packet in the handshake phase, resulting in large errors and failing to fully utilize all the data in the video playback (3) the user's dragging, skipping and playback of the video or packet retransmission caused by network reasons has a significant impact on the recognition. In summary, the current method cannot perfectly and accurately identify the network video recognition matching problem. Summary of the invention

[0006] In view of the above problems, the present invention is proposed to provide a network video recognition and matching method based on information entropy that overcomes the above problems or at least partially solves the above problems.

[0007] According to one aspect of the present invention, a network video recognition and matching method based on information entropy is provided, and the matching method comprises:

[0008] Step S1: Offline construction of target video information entropy fingerprint library;

[0009] Step S2: Obtain the current video information entropy fingerprint online in real time, and calculate the information entropy of the video and audio parts respectively;

[0010] Step S3: Calculate the similarity of the video and audio combination based on the LCS algorithm improved by information entropy;

[0011] Step S4: Return the matching video list to complete the matching identification.

[0012] Optionally, the step S1: offline construction of the target video information entropy fingerprint library specifically includes:

[0013] Step S1.1: Build a server that can access online videos;

[0014] Step S1.2: Prepare a playlist of target videos;

[0015] Step S1.3: Play all the videos in step S1.2 one by one, and for each video, play them separately using all resolutions;

[0016] Step S1.4: Record the data length sequence of each video and classify it according to the parameter L;

[0017] Step S1.5: For each video and each resolution, sort the length of the video and audio feature data in descending order (V n,f ,A n,f ) is added to the fingerprint library as the fingerprint of video n.

[0018] Optionally, the step S1.4: recording the data length sequence of each video and classifying according to the parameter L specifically includes:

[0019] For a video with number n, resolution f, and length greater than L, data i is denoted as V n,f,i , as the video feature; for the data j with the length less than or equal to L in the video number n, it is recorded as A n,f,j , as audio features.

[0020] Optionally, the step S2: obtaining the current video information entropy fingerprint online in real time, and calculating the information entropy of the video and audio parts respectively specifically includes:

[0021] Step S2.1: For real-time network video traffic, record the data length sequence in real time, and the sequence length does not exceed the parameter L max ;

[0022] Step S2.2: Classification according to parameter L;

[0023] Step S2.3: For the information entropy calculation of the video, firstly, the video transmission chunk is restored to a video clip, then the frame is converted into a grayscale image using openCV, and the histogram is calculated and normalized to calculate the information entropy of each frame; finally, the information entropy of all frames is averaged;

[0024] Step S2.4: For the calculation of audio information entropy, first calculate the probability distribution of the audio signal, remove the zero probability, and calculate the information entropy.

[0025] Optionally, the step S2.2: classifying according to the parameter L specifically includes:

[0026] Sort the data that is greater than L, and the array is recorded as V x , sort the data less than or equal to L, recorded as A x , get the fingerprint of the currently playing video number x (V x ,A x ).

[0027] Optionally, the step S3: calculating the similarity of the video and audio combination based on the LCS algorithm improved by information entropy specifically includes:

[0028] For each video fingerprint in the video fingerprint library (V n,f ,A n,v ), and the current matching video fingerprint (V x ,A x ) to calculate the similarity.

[0029] Optionally, the fingerprint of each video in the video fingerprint library (V n,f ,A n,v ), and the current matching video fingerprint (V x ,A x ) Calculating similarity specifically includes:

[0030] Calculate V n,f and V x The improved longest common descending subsequence, whose length is recorded as L common_v , and V n,f The length is recorded as Lv n,f , the current matching video length is recorded as Lv x ;

[0031] Then the video similarity Sv between video x and video n is n,x For L common_v / (Lv n,f +Lv x -L common_v );

[0032] Find A n,f and A x The improved longest common descending subsequence, whose length is recorded as L common_a , and A n,f The length is recorded as La n,f , the current matching video length is recorded as La x ;

[0033] Then the audio similarity Sa of video x and video n is n,x For L common_a / (Lan,f +La x -L common_a );

[0034] The similarity S of the audio and video of video x and video n n,x The value is Wa*Sa n,x +Wv*Sv n,x , where Wa and Wv are the similarity weights of audio and video.

[0035] Optionally, the improved longest common descending subsequence is defined as:

[0036] For string A = [A 1 ,A 2 …A m ] and B=[B 1 ,B 2 …B n ], which improves the longest common descending subsequence A' = [A' 1 ,A' 2 …A' k ] is defined as the longest sequence that satisfies the following conditions at the same time:

[0037] A' is a new string formed by deleting some characters from string A without changing the relative order of the characters;

[0038] There exists B'=[B' 1 ,B' 2 …B' k ], and for any 1≤i≤k, |A' i -B' i |≤Delta and video information entropy (A' i )-Video Information Entropy (B' i )|≤DeltaVor|A' i -B' i |≤Delta and audio information entropy (A' i )-audio information entropy (B' i )|≤DeltaA, where Delta is the error range value constant, DeltaV is the video information entropy error constant, and DeltaA is the audio information entropy error constant.

[0039] Optionally, the improved longest common descending subsequence length is calculated as follows:

[0040] For strings A and B of length m and n, create a two-dimensional array D with m+1 rows and n+1 columns, where D[i][j] represents A 1 ,A 2 ,..A i+1 and B 1,B 2 ,..B j+1 Improved longest common subsequence length;

[0041] For all i and j, let D[i][0] and D[0][j] be 0;

[0042] For all i and j greater than 0, calculate according to the state transition equation:

[0043] If A i-1 -B j-1 ≤ Delta, then compare the information entropy. If the absolute value of the video information entropy difference is less than DeltaV, and the absolute value of the audio information entropy difference is less than DeltaA, then D[i][j] = D[i-1][j-1] + 1; otherwise, D[i][j] = max(D[i-1][j], D[i][j-1]);

[0044] Finally, D[m][n] is the length of the improved longest common subsequence.

[0045] Optionally, the step S4: returning the matching video list, completing the matching identification specifically includes:

[0046] Step S4.1: Based on the similarity S of audio and video n,x Sort in descending order and get the corresponding set V n1,f1, V n2,f2 …, the matching is completed;

[0047] Step S4.2: The most likely matching real-time video is video numbered n1 with a resolution of f1, followed by video numbered n2 with a resolution of f2, and so on.

[0048] The present invention provides a network video recognition and matching method based on information entropy, and the matching method includes: step S1: offline construction of a target video information entropy fingerprint library; step S2: online real-time acquisition of the current video information entropy fingerprint, and calculation of the information entropy of the video and audio parts respectively; step S3: calculation of the similarity of the video and audio combination based on the improved LCS algorithm of information entropy; step S4: return the matching video list to complete the matching recognition. It can fully match the video and audio features, realize an efficient and accurate peer analysis method, find hidden similar information between different sequences, eliminate errors caused by complex network environments, improve the accuracy of specific video recognition matching, and can better optimize network video services and improve the quality of video links.

[0049] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0051] Figure 1 A flowchart of a network video recognition and matching method based on information entropy is provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0052] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0053] The terms "comprises" and "having" and any variations thereof in the description embodiments, claims and drawings of the present invention are intended to cover non-exclusive inclusions, for example, including a series of steps or units.

[0054] The technical solution of the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments.

[0055] Example 1

[0056] The present invention discloses a network video recognition method and device based on information entropy, which realizes the recognition of specific network videos by constructing a target video set fingerprint library offline, calculating the current video fingerprint online in real time, and calculating the similarity of information entropy sequences based on an improved LCS algorithm.

[0057] A network video recognition and matching method based on information entropy, comprising:

[0058] 1) Offline construction of target video information entropy fingerprint library;

[0059] 2) Obtain the current video information entropy fingerprint online in real time, where the information entropy of the video and audio parts is calculated separately.

[0060] 3) Calculate video combination similarity based on LCS algorithm improved by information entropy

[0061] 4) Return a list of possible matching videos to complete the matching identification.

[0062] Step 1) includes:

[0063] 1.1) Build a server that can access online videos

[0064] 1.2) Prepare the playlist of target videos

[0065] 1.3) Play all the videos in step 1.2) one by one, and for each video, play them separately using all resolutions.

[0066] 1.4) Record the data length sequence of each video and classify it according to the parameter L. For a video with number n, resolution f, and length greater than L, data i is recorded as V n,f,i , as video features;

[0067] For the data j with video number n and length less than or equal to L, it is recorded as A n,f,j , as audio features.

[0068] 1.5) For each video and each resolution, sort the length of the video and audio feature data in descending order (V n,f ,A n,f ) is added to the fingerprint library as the fingerprint of video n.

[0069] Step 2) includes:

[0070] 2.1) For real-time network video traffic, the data length sequence is recorded in real time, and the sequence length does not exceed the parameter L max .

[0071] 2.2) Classify according to parameter L. Sort the data that is larger than L, and the array is recorded as V x , sort the data less than or equal to L, recorded as A x , get the fingerprint of the currently playing video number x (V x ,A x ).

[0072] 2.3) For the information entropy calculation of the video, firstly, the video transmission chunk is restored to the video clip, then the frame is converted into grayscale image using openCV, and the histogram is calculated and normalized to calculate the information entropy of each frame. Finally, the information entropy of all frames is averaged.

[0073] 2.4) For the information entropy calculation of audio, first calculate the probability distribution of the audio signal, then remove the zero probability, and finally calculate the information entropy.

[0074] Step 3) includes:

[0075] 3.1) For each video fingerprint in the video fingerprint library (V n,f ,A n,v ), and the current matching video fingerprint (V x ,A x ) to calculate the similarity. For specific calculation steps, see 3.2)-3.5)

[0076] 3.2) Find V n,f and V x The improved longest common descending subsequence, whose length is recorded as L common_v , and V n,f The length is recorded as Lv n,f , the current matching video length is recorded as Lv x Then the video similarity Sv between video x and video n is n,x For L common_v / (Lv n,f +Lv x -L common_v ).

[0077] 3.3) Find A n,f and A x The improved longest common descending subsequence, whose length is recorded as L common_a , and A n,f The length is recorded as La n,f , the current matching video length is recorded as La x Then the audio similarity Sa between video x and video n is n,x For L common_a / (La n,f +La x -L common_a ).

[0078] 3.4) The audio and video similarity S of video x and video n n,x The value is Wa*Sa n,x +Wv*Sv n,x , where Wa and Wv are the similarity weights of audio and video.

[0079] The improved longest common descending subsequence in steps 3.2) and 3.3) is defined as:

[0080] 3.5), for string A = [A 1 ,A 2 …A m ] and B=[B 1 ,B 2 …B n ], which improves the longest common descending subsequence A' = [A' 1 ,A'2 …A' k ] is defined as the longest sequence that satisfies the following conditions at the same time: 1. A' is a new string formed by deleting some characters (or not deleting any characters) from the string A without changing the relative order of the characters; 2. There exists B' = [B' 1 ,B' 2 …B' k ], and for any 1≤i≤k, |A' i -B' i |≤Delta and video information entropy (A' i )-Video Information Entropy (B' i )|≤DeltaVor|A' i -B' i |≤Delta and audio information entropy (A' i )-audio information entropy (B' i )|≤DeltaA, where Delta is the error range value constant, DeltaV is the video information entropy error constant, and DeltaA is the audio information entropy error constant.

[0081] The calculation method of improving the longest common descending subsequence length is:

[0082] 3.6) For strings A and B of length m and n, create a two-dimensional array D with m+1 rows and n+1 columns, where D[i][j] represents A 1 ,A 2 ,..A i+1 and B 1 ,B 2 ,..B j+1 Improved longest common subsequence length.

[0083] 3.7) For all i and j, let D[i][0] and D[0][j] be 0;

[0084] 3.8) For all i and j greater than 0, calculate according to the following state transition equation:

[0085] If A i-1 -B j-1 ≤ Delta, then compare the information entropy. If the absolute value of the video information entropy difference is less than DeltaV, and the absolute value of the audio information entropy difference is less than DeltaA, then D[i][j] = D[i-1][j-1] + 1; otherwise, D[i][j] = max(D[i-1][j], D[i][j-1]);

[0086] 3.9) Finally, D[m][n] is the length of the improved longest common subsequence.

[0087] Step 4) includes:

[0088] 4.1) Based on the similarity S of audio and video n,x Sort from high to low and get the corresponding set V n1,f1, V n2,f2 …, the matching is completed.

[0089] 4.2) The most likely matching real-time video is n1, with a resolution of f1, followed by n2, with a resolution of f2, and so on.

[0090] Compared with the prior art, the network video recognition method based on information entropy of the present invention can fully match video and audio features, realize an efficient and accurate peer analysis method, find hidden similar information between different sequences, eliminate errors caused by complex network environments, and improve the accuracy of specific video recognition and matching. It can better optimize network video services and improve video link quality.

[0091] Example 2

[0092] 1) Build a server that can access Youtube and configure the proxy

[0093] 2) Prepare a playlist of target videos and play 10 video URLs one by one using 1080p resolution.

[0094] 3) Obtain the audio and video slice size sequences of all 10 videos and sort them in descending order to build a fingerprint library.

[0095] For example, the fingerprint of a data length sequence (L=493000) of a video N (youtube id: ANpKMtl2buE) is:

[0096] ([2097152,2097152,2097152,2097152,2097152,2097152,2097152,2097152,2097152,2097152,2097152,2097152,2097152,2097152,2097152,2097152,2097152,2091698,2083960,2082450,2070884,2068715,2068447,2058701,2050150,2050069,2038049,2036862,2024103,2020716,2013977,2005756,1998376,1992524,1991255,1982544,1971071,1947342,1936234,1934244,1929030,1907200,1896321,1880668,1880126,1878076,1862222,1841600,1805162,1796668,1796668,1774927,1752506,1752506,1746222,1729134,1719107,1705920,1705920,1703867,1670481,1648178,1631820,1627063,1613984,1613984,1585097,1583683,1574740,1555951,1551645,1540113,1527956,1523747,1521226,1518288,1469992,1454585,1454392,1447637,1438126,1438126,1407858,1403340,1384251,1354914,1352889,1341463,1324323,1317133,1317133,1309408,1304443,1294861,1282131,1216185,1021540,918509,807169,760830,660124,522775,521971,521526,516214,516063,513180,509365,508753,504220,493626,493626,493626],[492134,488712,481326,417943,411808,410338,409824,409766,408620,407601,406061,400667,398674,397967,397758,,390989,389865,354539,325020,322504,275395,269886,265702,263767,263473,262133,222126,182256,165849,128692,128676,122986,113417,69154,66200,66103,65829,65536,65536,65536,61736,57625]), the corresponding video information entropy sequence is: ['5.6406','6.1874','6.1570','5.8543','5.8370','6.0964 ','5.9149','6.0482','5.6198','6.0603','5.8417','5.8307','5.7344','5.7142','5.7836','5.9476','6.0533','5.7195','5.7146','5.891 7','6.1342','5.7919','6.0011','5.9418','5.8296','5.8863','5.8393','5.7921','5.8285','6.0826','6.1396','5.9779','6.0971','5.81 07','6.0577','5.9781','6.1168','5.8107','6.1359','5.9789','5.6230','6.0141','5.8341','6.1381','5.6274','5.7691','5.6152','5. 6953','6.0301','6.1539','5.7339','5.9362','5.7432','5.9105','6.1971','5.9611','5.6063','6.1109','6.0460','5.8273','5.9177','6 .1307','5.8559','6.0266','5.8913','5.6157','5.7581','5.8865','5.6530','6.1339','5.8598','6.1529','6.1902','5.7494','5.9632',' 5.9959','6.1065','5.6599','6.0355','5.9508','5.8661','6.0248','5.9522','5.9152','5.9767','6.0625','6.1848','5.6763','5.9927','5.8194','6.1930','6.1234','6.1827','5.8455','5.6275','5.7559','6.1097','6.0139','5.8169','5.8477','6.0510','6.0895','5.9993','5.7797','6.1614','5.6045','5.6991','6.1748',' 5.8802','6.1856','5.6294','5.7293','5.8483'], and the information entropy of the video is ['296.2243','321.7982','460.1847','507.8238','555.8811','363.4972','641.7347','449.7152','328.4323','465.8027','637.5807' ','461.4401','539.5493','318.0784','588.1388','490.5545','510.1288','200.2612','639.7577','232.6555','557.7665','432.3352','469.8811','657.2855','442.9849','331.6924','464. 7911','275.9618','221.1582','368.3762','439.8401','596.0025','536.7447','620.2070','485.4239','691.8773','645.8661','388.3207','516.6553','300.2865','430.7727','297.5787'],

[0097] 4) Play the test video X and obtain its fingerprint (L=520000):

[0098] ([2097152,2097152,2097152,2097152,2097152,2097152,2097152,2097152,2097152,2097152,2097152,2091698,2083960,2082450,2070884,2068447,2058701,2050150,2038049,2036862,2024103,2020716,2013977,2005756,1992524,1991255,1982544,1971071,1947342,1936234,1934244,1929030,1907200,1907200,1896321,1880126,1878076,1870428,1862222,1841600,1825162,1805162,1796668,1774927,1752506,1752506,1746222,1729134,1719107,1705920,1703867,1670481,1648178,1640274,1631820,1627063,1613984,1585097,1583683,1574740,1574740,1555951,1555951,1551645,1540113,1527956,1523747,1521226,1518288,1469992,1454392,1438126,1407858,1403340,1384251,1354914,1354297,1352889,1341463,1324323,1317133,1309408,1304443,1294861,1282131,1080172,956597,928749,748502,591922,542087],[519990,519468,519468,519457,518219,514793,512899,504826,497981,492134,488712,481326,417943,417943,410831,410338,409824,409306,404037,402644,400667,398674,397758,397758,397556,390989,390499,384239,270535,263767,260317,167457,131432,128676,127890,111809,70341,65869,65656,The information entropy of the video is ['5.8335','6.0640','5.9229','5.9381','5.7635','5.6414','6.1896','6.0289','5.8622','5.6 463','6.0406','5.7284','5.9759','5.7834','6.0317','5.7949','6.1946','6.1221','6.0088','5.7991','5.6689','6.0923','5.6459','6 .0922','5.9686','6.1449','6.0269','5.6727','5.8471','6.0711','6.1549','5.9898','5.7305','6.0708','5.7193','5.7066','6.0354', '5.8293','5.7787','5.9394','5.9521','5.7002','6.1905','6.1049','5.9863','5.6435','5.7630','5.9700','5.8595','6.0390','5.9542 ','5.9891','6.0388','5.6683','5.7659','5.8218','5.9111','6.0761','5.6970','6.0419','5.8337','5.8467','6.1956','5.7330','5.61 20','5.7531','6.0597','5.6103','6.0287','5.6414','6.0283','5.9303','5.7132','5.9336','6.0276','5.8138','5.8224','5.6298','6. 0594','5.7367','6.1628','6.1138','5.9416','6.0539','5.6804','5.6893','5.6583','5.8348','6.1235','6.1762','5.7244','5.8392',' 5.7800','5.6467','5.9254','6.1363','5.9456','5.8275','5.6214','5.8303','5.8693','5.8403','5.8189','5.8035','5.6589','6.1915','5.9444','5.8603','6.0497','6.1045','5.6670','5.9643','5.8101'], and the information entropy of the audio is ['244.9999','319.5411','214.7957','418.5916','452.4199','592.5 323','385.9627','527.4658','265.7991','219.9067','338.5157','537.4302','509.3641','698.8003','475.4576','407.5520','268.3395','617.339 4','312.1718','256.6777','466.0697','338.7711','521.6106','290.2381','577.5113','361.3498','212.3387','462.3830','692.3662','432.2624' ,'544.7118','366.4351','520.2256','279.6726','606.7833','599.8337','308.5635','287.2320','519.4266','517.1262','432.1314','228.3770'],

[0099] 5) Calculate the similarity between the fingerprint of the test video X and the videos in the library. For example, the similarity calculation method with the fingerprint of the video in step 3) is:

[0100] a) Assume that the comparison threshold of the length sequence Delta=16, the comparison threshold of the video information entropy is 0.7, and the comparison threshold of the audio information entropy is 300.

[0101] b) First, the lengths of the data sequences of video X and video N are 113 and 91 respectively. The length of the longest common subsequence of video X and video N is 78, calculated by using the improved LCS method. The similarity Sv n,x 78 / (113+91-78)=61.90%

[0102] c) Then similarly, the video similarity Sa between video X and video N is calculated n,x 22.86%

[0103] d) Assume that the video weight Wv = 0.8 and the audio similarity weight Wa = 0.2, and we get S n,x The value is Wa*Sa n,x +Wv*Sv n,x=54.10%

[0104] 6) Finally, the video in the fingerprint library with the highest similarity to video X is the most likely matching video.

[0105] Beneficial effect: By building a fingerprint library of the target video set offline, calculating the current video fingerprint online in real time, and calculating the similarity of the information entropy sequence based on the improved LCS algorithm, the recognition of specific network videos can be achieved.

[0106] The network video recognition method based on information entropy of the present invention can fully match video and audio features, realize an efficient and accurate peer analysis method, find hidden similar information between different sequences, eliminate errors caused by complex network environments, and improve the accuracy of specific video recognition matching, thereby better optimizing network video services and improving video link quality.

[0107] The above specific implementation methods further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above are only specific implementation methods of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A network video recognition and matching method based on information entropy, characterized in that: The matching method comprises: Step S1: Offline construction of target video information entropy fingerprint library; Step S2: Obtain the current video information entropy fingerprint online in real time, and calculate the information entropy of the video and audio parts respectively; Step S3: Calculate the similarity of the video and audio combination based on the LCS algorithm improved by information entropy; Step S4: Return the matching video list to complete the matching identification.

2. According to the method for network video recognition and matching based on information entropy in claim 1, it is characterized in that: The step S1: offline construction of the target video information entropy fingerprint library specifically includes: Step S1.1: Build a server that can access online videos; Step S1.2: Prepare a playlist of target videos; Step S1.3: Play all the videos in step S1.2 one by one, and for each video, play them separately using all resolutions; Step S1.4: Record the data length sequence of each video and classify it according to the parameter L; Step S1.5: For each video and each resolution, sort the length of the video and audio feature data in descending order (V n,f ,A n,f ) is added to the fingerprint library as the fingerprint of video n.

3. The network video recognition and matching method based on information entropy according to claim 2 is characterized in that: The step S1.4: recording the data length sequence of each video and classifying according to the parameter L specifically includes: For a video with number n, resolution f, and length greater than L, data i is denoted as V n,f,i , as the video feature; for the data j with the length less than or equal to L in the video number n, it is recorded as A n,f,j , as audio features.

4. The network video recognition and matching method based on information entropy according to claim 1 is characterized in that: The step S2: obtaining the current video information entropy fingerprint online in real time, and calculating the information entropy of the video and audio parts respectively specifically includes: Step S2.1: For real-time network video traffic, record the data length sequence in real time, and the sequence length does not exceed the parameter L max ; Step S2.2: Classification according to parameter L; Step S2.3: For the information entropy calculation of the video, firstly, the video transmission chunk is restored to a video clip, then the frame is converted into a grayscale image using openCV, and the histogram is calculated and normalized to calculate the information entropy of each frame; finally, the information entropy of all frames is averaged; Step S2.4: For the calculation of audio information entropy, first calculate the probability distribution of the audio signal, remove the zero probability, and calculate the information entropy.

5. The network video recognition and matching method based on information entropy according to claim 1 is characterized in that: The step S2.2: classifying according to the parameter L specifically includes: Sort the data that is greater than L, and the array is recorded as V x , sort the data less than or equal to L, recorded as A x , get the fingerprint of the currently playing video number x (V x ,A x ).

6. The network video recognition and matching method based on information entropy according to claim 1 is characterized in that: The step S3: calculating the similarity of the video and audio combination based on the LCS algorithm improved by information entropy specifically includes: For each video fingerprint in the video fingerprint library (V n,f ,A n,v ), and the current matching video fingerprint (V x ,A x ) to calculate the similarity.

7. The network video recognition and matching method based on information entropy according to claim 6 is characterized in that: The fingerprint of each video in the video fingerprint library (V n,f ,A n,v ), and the current matching video fingerprint (V x ,A x ) Calculating similarity specifically includes: Calculate V n,f and V x The improved longest common descending subsequence, whose length is recorded as L common_v , and V n,f The length is recorded as Lv n,f , the current matching video length is recorded as Lv x ; Then the video similarity Sv between video x and video n is n,x For L common_v / (Lv n,f +Lv x -L common_v ); Find A n,f and A x The improved longest common descending subsequence, whose length is recorded as L common_a , and A n,f The length is recorded as La n,f , the current matching video length is recorded as La x ; Then the audio similarity Sa of video x and video n is n,x For L common_a / (La n,f +La x -L common_a ); The similarity S of the audio and video of video x and video n n,x The value is Wa*Sa n,x +Wv*Sv n,x , where Wa and Wv are the similarity weights of audio and video.

8. The network video recognition and matching method based on information entropy according to claim 7 is characterized in that: The improved longest common descending subsequence is defined as: For string A=[A1,A2…A m ] and B=[B1,B2…B n ], which improves the longest common descending subsequence A' = [A'1, A'2 ... A' k ] is defined as the longest sequence that satisfies the following conditions at the same time: A' is a new string formed by deleting some characters from string A without changing the relative order of the characters; There exists B'=[B'1,B'2…B' k ], and for any 1≤i≤k, |A' i -B' i |≤Delta and video information entropy (A' i )-Video Information Entropy (B' i )|≤DeltaVor|A' i -B' i |≤Delta and audio information entropy (A' i )-audio information entropy (B' i )|≤DeltaA, where Delta is the error range value constant, DeltaV is the video information entropy error constant, and DeltaA is the audio information entropy error constant.

9. The network video recognition and matching method based on information entropy according to claim 7 is characterized in that: The improved longest common descending subsequence length is calculated as follows: For strings A and B of length m and n, create a two-dimensional array D with m+1 rows and n+1 columns, where D[i][j] represents A1, A2, ..A i+1 and B1,B2,..B j+1 Improved longest common subsequence length; For all i and j, let D[i][0] and D[0][j] be 0; For all i and j greater than 0, calculate according to the state transition equation: If A i-1 -B j-1 ≤ Delta, then compare the information entropy. If the absolute value of the video information entropy difference is less than DeltaV, and the absolute value of the audio information entropy difference is less than DeltaA, then D[i][j]=D[i-1][j-1]+1; Otherwise, D[i][j] = max(D[i-1][j], D[i][j-1]); Finally, D[m][n] is the length of the improved longest common subsequence.

10. The network video recognition and matching method based on information entropy according to claim 1, characterized in that: Step S4: returning the matching video list, completing the matching identification specifically includes: Step S4.1: Based on the similarity S of audio and video n,x Sort in descending order and get the corresponding set V n1,f1, V n2,f2 …, the matching is completed; Step S4.2: The most likely matching real-time video is video numbered n1 with a resolution of f1, followed by video numbered n2 with a resolution of f2, and so on.