Video detection method and device, computer equipment, readable storage medium and program product
By identifying characteristic length features in video traffic data, video traffic can be intercepted in real time during transmission, solving the problem of low success rate of video detection in existing technologies and achieving efficient video traffic interception.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- DAWNING NETWORK TECH CO LTD
- Filing Date
- 2024-10-23
- Publication Date
- 2026-05-01
AI Technical Summary
In existing video detection methods, video traffic detection requires waiting until all video traffic has finished transmitting before all slice length features can be obtained, resulting in a low interception success rate.
By identifying the header length of the first video slice, the video length remainder, the header length of the first audio slice, and the audio length remainder in the video traffic data as identification markers, the system checks whether a rule is matched in the video identification rule table and intercepts the first video or audio slice before it is fully transmitted.
It improves the success rate of video detection and interception, enabling timely identification and interception during video transmission, and enhancing the accuracy and comprehensiveness of video detection.
Smart Images

Figure CN121967793A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of network traffic analysis and detection technology, and in particular to a video detection method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Technology
[0002] With the development of computer network technology, the number of global internet users has grown rapidly, and the scale of networks has continued to expand. The demand for research on network behavior and for network traffic analysis and detection is increasing, with video media traffic accounting for the largest share.
[0003] Traditional video detection and recognition technologies use HTTPS (Hypertext Transfer Protocol over Secure Socket Layer) to transmit data. They learn the length sequence features of each video and audio slice in the video as video recognition rules to identify video traffic and then perform operations such as intercepting the identified video traffic.
[0004] However, in traditional video detection and recognition technologies, it is necessary to wait until the entire video traffic has finished transmitting before the length sequence feature containing all the slice lengths can be obtained. At this point, the video interception action has lost its meaning, resulting in a low success rate and poor video interception effect. Summary of the Invention
[0005] Therefore, it is necessary to provide a video detection method, apparatus, computer equipment, computer-readable storage medium, and computer program product that can improve the success rate of video detection and interception in response to the above-mentioned technical problems.
[0006] Firstly, this application provides a video detection method, including:
[0007] Acquire video traffic data and identify the first video slice header length, video length remainder, first audio slice header length, and audio length remainder in the video traffic data;
[0008] Based on the first video slice header length, the video length remainder, the first audio slice header length, and the audio length remainder, the system checks whether a video recognition rule is matched in the video recognition rule table.
[0009] If the video recognition rules are met, the video traffic data is intercepted.
[0010] In this embodiment, four length features in the video traffic data—the header length of the first video slice, the video length remainder, the header length of the first audio slice, and the audio length remainder—are used as markers to identify the video traffic data. These four length features all belong to the first slice features of the video traffic data. Therefore, by identifying these four length features, the video traffic data can be blocked before the first video slice or the first audio slice completes transmission, thereby improving the success rate of video traffic interception.
[0011] In one embodiment, before identifying the first video slice header feature, video length remainder feature, first audio slice header feature, and audio length remainder feature in the video traffic data, the method further includes:
[0012] Obtain sample video traffic data at different resolutions;
[0013] Based on the video transmission protocol, the header length of the first video slice, the length remainder of the first video slice, the header length of the first audio slice, and the audio length remainder of the first audio slice are identified in the sample video traffic data at each resolution.
[0014] Based on the first video slice header length, the first video slice length remainder, the first audio slice header length, and the first audio slice audio length remainder of the sample video traffic data at each resolution, a video recognition rule table is constructed.
[0015] In this embodiment, a video recognition rule table with four length features corresponding to sample video traffic data at different resolutions is pre-constructed based on sample video traffic data at different resolutions. The video traffic data is then inspected and intercepted using the video recognition rules in the video recognition rule table, thereby improving the efficiency of video recognition inspection and processing.
[0016] In one embodiment, identifying the first video slice header length, video length remainder, first audio slice header length, and audio length remainder in the video traffic data includes:
[0017] Based on the video transmission protocol, the length of the first video data packet in the video traffic data is identified;
[0018] The position of the next video data packet is determined based on the length of the first video data packet, the sequence number of the video segment contained in the first video data packet, and the remaining length of the video traffic data.
[0019] The length of the next video data packet is determined until the length of the first video slice header, the video length remainder, the first audio slice header length, and the audio length remainder are determined based on the length of each video data packet.
[0020] In this embodiment, based on the video transmission protocol, the starting position of the next video segment and the sequence number of the video data packet corresponding to the next video segment are determined by identifying the length of the TLS video segment in the video traffic data. This process continues until four length feature values of the video traffic data to be detected are identified. These four length feature values are all length features of the first slice in the video traffic data. Therefore, it is ensured that the video traffic data can be identified in a timely manner and effectively intercepted before the complete transmission of the video.
[0021] In one embodiment, the method further includes:
[0022] If the video traffic data changes video resolution, then new video traffic data is obtained;
[0023] Identify the header length of the first video slice, the video length remainder, the header length of the first audio slice, and the audio length remainder in the new video traffic data, and check whether the video recognition rule is matched in the video recognition rule table.
[0024] In this embodiment, the video recognition rule table contains the values of four length features of sample video traffic data at various resolutions during its construction. Therefore, even if the video traffic data is retransmitted with a different video resolution, the new video traffic data can still be identified and blocked, improving the accuracy and comprehensiveness of video detection.
[0025] In one embodiment, acquiring video traffic data includes:
[0026] Based on preset video crawling tools or video crawling scripts, obtain candidate video traffic data;
[0027] Based on the target identifier carried by the candidate video traffic data, video traffic data is determined from the candidate video traffic data.
[0028] In this embodiment, candidate video traffic data is obtained through video crawling tools or video crawling scripts, and video traffic data is filtered from the candidate video traffic data based on the target identifier carried by the candidate video traffic data. This allows for the pre-screening of video traffic data before video detection, reducing the amount of data processed by video traffic data and improving the efficiency of video recognition.
[0029] In one embodiment, the step of detecting whether a video recognition rule is matched in the video recognition rule table based on the first video slice header length, the video length remainder, the first audio slice header length, and the audio length remainder includes:
[0030] Based on the first video slice header length, the video length remainder, the first audio slice header length, and the audio length remainder, a match is made among the various length rules included in the video recognition rule table;
[0031] If the length of the first video slice header, the video length remainder, the length of the first audio slice header, and the audio length remainder satisfy one of the length rules in the video recognition rules, then the video recognition rule is determined to be matched.
[0032] In this embodiment, the video traffic data is examined through a video recognition rule table to determine whether the video traffic data matches the video recognition rule. Since the four length features are only features of the first video slice and the first audio slice in the video, the video traffic data is blocked and intercepted in a timely and rapid manner if the video recognition rule is matched.
[0033] Secondly, this application also provides a video detection device, comprising:
[0034] The first identification module is used to acquire video traffic data and identify the first video slice header length, video length remainder, first audio slice header length, and audio length remainder in the video traffic data.
[0035] The detection module is used to detect whether a video recognition rule is matched in the video recognition rule table based on the length of the first video slice header, the video length remainder, the length of the first audio slice header, and the audio length remainder.
[0036] The interception module is used to intercept the video traffic data when the video recognition rule is matched.
[0037] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0038] Acquire video traffic data and identify the first video slice header length, video length remainder, first audio slice header length, and audio length remainder in the video traffic data;
[0039] Based on the first video slice header length, the video length remainder, the first audio slice header length, and the audio length remainder, the system checks whether a video recognition rule is matched in the video recognition rule table.
[0040] If the video recognition rules are met, the video traffic data is intercepted.
[0041] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:
[0042] Acquire video traffic data and identify the first video slice header length, video length remainder, first audio slice header length, and audio length remainder in the video traffic data;
[0043] Based on the first video slice header length, the video length remainder, the first audio slice header length, and the audio length remainder, the system checks whether a video recognition rule is matched in the video recognition rule table.
[0044] If the video recognition rules are met, the video traffic data is intercepted.
[0045] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:
[0046] Acquire video traffic data and identify the first video slice header length, video length remainder, first audio slice header length, and audio length remainder in the video traffic data;
[0047] Based on the first video slice header length, the video length remainder, the first audio slice header length, and the audio length remainder, the system checks whether a video recognition rule is matched in the video recognition rule table.
[0048] If the video recognition rules are met, the video traffic data is intercepted.
[0049] The aforementioned video detection method, apparatus, computer equipment, computer-readable storage medium, and computer program product acquire video traffic data and identify the first video slice header length, video length remainder, first audio slice header length, and audio length remainder in the video traffic data. Based on the first video slice header length, the video length remainder, the first audio slice header length, and the audio length remainder, the method checks whether a video recognition rule is matched in a video recognition rule table. If the video recognition rule is matched, the video traffic data is intercepted. This method uses four length features—the first video slice header length, video length remainder, first audio slice header length, and audio length remainder—as markers to identify video traffic data. These four length features all belong to the first slice features of the video traffic data. Therefore, by identifying these four length features, the video traffic data is blocked before the first video slice or the first audio slice completes transmission, improving the success rate of video traffic interception. Attached Figure Description
[0050] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0051] Figure 1 This is a diagram illustrating the application environment of a video detection method in one embodiment;
[0052] Figure 2 This is a flowchart illustrating a video detection method in one embodiment;
[0053] Figure 3 This is a flowchart illustrating the steps of constructing a video recognition rule table in one embodiment;
[0054] Figure 4 This is a flowchart illustrating the steps for identifying four length features in video traffic data in one embodiment.
[0055] Figure 5 This is a traffic diagram illustrating the four length feature steps for identifying video traffic data after switching video resolutions in one embodiment.
[0056] Figure 6 This is a flowchart illustrating the steps of determining video traffic data from candidate video traffic data in one embodiment.
[0057] Figure 7 This is a traffic diagram illustrating the step of determining matching video recognition rules and verifying video traffic data in one embodiment.
[0058] Figure 8 This is a structural block diagram of a video detection device in one embodiment;
[0059] Figure 9 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0060] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0061] Traditional video detection and recognition technologies obtain video information, such as video ID, resolution, and duration, from plaintext strings (e.g., URLs) in HTTP traffic. However, due to video encryption, identifying video content from HTTPS traffic becomes extremely difficult, rendering traditional plaintext string-based methods obsolete. Therefore, a new approach has been developed that learns the complete length sequence features of video and audio segments transmitted over the link, and then identifies the video based on these complete length sequence features.
[0062] However, methods for identifying videos based on complete length sequence features rely on the simultaneous transmission of subsequent video segments during playback—a process known as "playing while transmitting." The total segment length isn't available until the entire video stream has finished transmitting, by which time most of the video resources have already been transmitted. At this point, intercepting the video becomes meaningless. Furthermore, if a video is identified and blocked, changing the segment length sequence by switching to an alternative domain or altering the video resolution can prevent detection of the altered video stream data, meaning the video still cannot be identified or blocked. Therefore, current traditional video detection methods have a low success rate in video detection and blocking.
[0063] The video detection method provided in this application embodiment can be applied to, for example, Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. Specifically, traffic processing device 106 is directly connected in series to the network under test; that is, terminal 102 is connected to server 104 via switch 108, and traffic processing device 106 is also connected in series to this network link via switch 110. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can be smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, projection devices, etc. Portable wearable devices can be smartwatches, smart bracelets, head-mounted devices, etc. Head-mounted devices can be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. Server 104 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.
[0064] In one exemplary embodiment, such as Figure 2 As shown, a video detection method is provided, which can be applied to... Figure 1The following description uses the flow processing device 106 as an example, including steps 202 to 206. Wherein:
[0065] Step 202: Obtain video traffic data and identify the first video slice header length, video length remainder, first audio slice header length, and audio length remainder in the video traffic data.
[0066] In implementation, if video blocking is targeted at a specific video website, the traffic processing device uses specific tools (e.g., web crawlers, Python scripts, etc.) to crawl the traffic data of that video website. This traffic data (which can be downlink traffic data) is then transmitted to the traffic processing device via a switch. The traffic processing device then acquires this video traffic data and identifies the lengths of the first video slice header, the first video slice length remainder, the first audio slice header, and the first audio slice length remainder. These four length features, arranged in a preset fixed order, constitute the comprehensive features for video recognition and detection; that is, video detection and recognition are based on the length feature sequence formed by these four length features.
[0067] Step 204: Based on the first video slice header length, video length remainder, first audio slice header length, and audio length remainder, check whether the video recognition rule is matched in the video recognition rule table.
[0068] In implementation, the traffic processing device pre-builds a video recognition rule table, which contains video recognition rules for identifying target videos. Each video recognition rule is constructed based on length features extracted from sample videos. Specifically, the video recognition rule table contains video recognition rules for four length features corresponding to each sample video: the header length of the first video slice, the video length remainder, the header length of the first audio slice, and the audio length remainder. Therefore, the traffic processing device matches the collected header length of the first video slice, the video length remainder, the header length of the first audio slice, and the audio length remainder against the video recognition rule table, detecting whether the four length features identified in the current video traffic data match the video recognition rules in the table. If the four length features in the current video traffic data are exactly the same as the four length features contained in a certain video recognition rule, then the current video traffic data matches that video recognition rule.
[0069] Step 206: If the video recognition rules are met, the video traffic data is intercepted.
[0070] In practice, if the four length features in the current video traffic data match the video recognition rules in the video recognition rule table, the process processing device will identify the video traffic data that needs to be intercepted. The traffic processing device will then intercept the video traffic data to ensure that the target video is effectively intercepted.
[0071] In the aforementioned video detection method, video traffic data is acquired, and the header length, video length remainder, first audio slice header length, and audio length remainder of the video traffic data are identified. Based on these parameters, the video recognition rule is checked against a video recognition rule table to determine if a rule is matched. If a rule is matched, the video traffic data is blocked. This method, by using only the header length, video length remainder, first audio slice header length, and audio length remainder of the first video slice, blocks video traffic data before the first video or audio slice completes transmission, thus improving the success rate of video traffic interception.
[0072] In one exemplary embodiment, such as Figure 3 As shown, prior to step 202, the method further includes:
[0073] Step 302: Obtain sample video traffic data at different resolutions.
[0074] In implementation, the traffic processing device acquires sample video traffic data at different resolutions. Specifically, each sample video traffic data contains multiple video slices, and each video slice contains multiple video and audio segments. At the same resolution, the video and audio data content of the same video slice is fixed, and the transmission length of that video slice is also constant. However, for the same video at different resolutions, the transmission length of the video slice will differ. Therefore, to prevent the problem of adjusting the video resolution to evade detection and interception during the video detection and interception process, sample video traffic data at different resolutions needs to be selected when constructing the video recognition rule table. This ensures that the video traffic data of the target video at different resolutions can be intercepted.
[0075] Step 304: Based on the video transmission protocol, identify the first video slice header length, the first video slice length remainder, the first audio slice header length, and the first audio slice audio length remainder in the sample video traffic data at each resolution.
[0076] In implementation, the traffic processing device, based on the video transmission protocol, identifies the header length, length remainder, header length, and audio length remainder of the first video slice in the sample video traffic data at each resolution. Specifically, the sample video traffic data contains multiple video slices, each containing multiple TLS video and audio segments. During transmission, each video slice first transmits a header containing information such as the slice's transmission length, resolution, byte range, video name, and encoding method. However, this header information is encrypted and unknowable. The length of the video header, however, is a known attribute and is fixed. Furthermore, to avoid the situation where the video is transmitted while being detected, and the target video (the video to be intercepted) has already been transmitted, rendering interception meaningless, the lengths of the video header and audio header of the first video slice and first audio slice in the video traffic data are used as identification features. Moreover, to ensure the accuracy of target video identification, additional length features are considered as markers for identifying video traffic data. For example, besides the video header, the first video slice contains multiple TLS video segments. The maximum length of each TLS video segment is 16384 bytes (2 to the power of 14). Adding the 17-byte length of the video header for the first video slice, a remainder other than 16384 bytes will occur during transmission. This remainder is called the length remainder. For instance, after the preceding TLS segments are all 16384 bytes long, if the next transmitted video segment is 1941 bytes, then 1941 bytes is the length remainder of the first video slice. Furthermore, since video traffic data includes both video and audio, and video traffic data can be transmitted either first (audio first, then video) or first (video first, then audio), the following steps are taken: If video is transmitted first, the video length remainder of the first video slice is determined first, and then the audio length remainder of the first audio slice is determined during audio transmission. If audio is transmitted first, the audio length remainder of the first audio slice is determined first, and then the video length remainder of the first video slice is determined during video transmission. Thus, the traffic processing device obtains four length features from the sample video traffic data at the current resolution: the header length of the first video slice, the length remainder of the first video slice, the header length of the first audio slice, and the audio length remainder of the first audio slice.
[0077] Similarly, the same recognition method was used for different resolutions to obtain four length features corresponding to the sample video traffic data at different resolutions.
[0078] Step 306: Based on the first video slice header length, the first video slice length remainder, the first audio slice header length, and the first audio slice audio length remainder of the sample video traffic data at each resolution, construct a video recognition rule table.
[0079] In implementation, the traffic processing device constructs a video recognition rule table based on the header length of the first video slice, the length remainder of the first video slice, the header length of the first audio slice, and the audio length remainder of the first audio slice of the sample video traffic data at each resolution. Therefore, the constructed video recognition rule table contains four length features corresponding to the video traffic data at each resolution.
[0080] In this embodiment, a video recognition rule table with four length features corresponding to sample video traffic data at different resolutions is pre-constructed based on sample video traffic data at different resolutions. The video traffic data is then inspected and intercepted using the video recognition rules in the video recognition rule table, thereby improving the efficiency of video recognition inspection and processing.
[0081] In one exemplary embodiment, such as Figure 4 As shown, the specific processing steps of step 202 include:
[0082] Step 402: Based on the video transmission protocol, identify the length of the first video segment in the video traffic data.
[0083] In implementation, during actual video detection, the traffic processing device is connected in series to the network under test to block the playback of the target video (e.g., video A1) in the network. During video traffic processing, based on a preset video transmission protocol, the source of the video traffic can be identified first. For example, if traffic with an HTTPS SNI (Server Name Indication) of AAA.com or xxxx.com is encountered, it is considered to be the target video source (i.e., source A) that needs to be blocked. This video traffic data is then further identified, specifically the downlink traffic of YouTube. Processing begins from the first TLS (Transport Layer Security) header after key exchange to find the length of the first video segment (i.e., the TLS). For example, the traffic processing device finds the current TLS length to be L1.
[0084] Step 404: Determine the starting position of the next video segment based on the length of the first video segment, the sequence number of the video data packets contained in the first video segment, and the remaining length of the video traffic data.
[0085] In implementation, the traffic processing device determines the starting position of the next TLS video segment based on the length of the first video segment, the sequence number of the video data packets contained in the first video segment, and the remaining length of the video traffic data. Furthermore, after determining the starting position of the next TLS video segment, it can further determine the sequence number of the TCP packets to be processed contained in the next TLS video segment. The formula for calculating the sequence number of the TCP packets to be processed is as follows:
[0086] Q1 = S1 + L1 - P1
[0087] Where Q1 represents the sequence number of the TCP packet to be processed corresponding to the next TLS video segment, S1 represents the sequence number of the TCP packet corresponding to the current TLS video segment, L1 represents the length of the current TLS video segment, and P1 represents the remaining length of the current video traffic data.
[0088] Step 406: Determine the length of the next video segment, until the length of the first video slice header, the video length remainder, the first audio slice header length, and the audio length remainder are determined based on the length of each video segment.
[0089] In implementation, the sequence number S2 of the TCP packet to be processed corresponding to the subsequent TLS video segment is used. If S2 is less than or equal to the pre-calculated Q1, and the length of S2 plus the data portion of the packet is greater than or equal to Q1, then the required next TLS header information is in the payload of the packet in S2. Based on the offset of the TLS header position represented by Q1-S2, the expected sequence number Q2 of the next TLS header can be obtained, thus determining the starting position of the next video segment and consequently the length L2 of the next video segment. Similarly, the traffic processing device can obtain the length L3 of the subsequent TLS video segment and the sequence number S3 of the corresponding TCP packet, etc., until the traffic processing device finds the four length feature values: the length of the first video segment header, the video length remainder, the length of the first audio segment header, and the audio length remainder. How to determine these four length feature values has been specifically described in step 304 of the above embodiment, that is, by identifying the video length remainder and the audio length remainder, the length of the first video segment header, the length of the first audio segment header, etc., are determined. This embodiment will not elaborate further here.
[0090] In this embodiment, based on the video transmission protocol, the starting position of the next video segment and the sequence number of the video data packet corresponding to the next video segment are determined by identifying the length of the TLS video segment in the video traffic data. This process continues until four length feature values of the video traffic data to be detected are identified. These four length feature values are all length features of the first slice in the video traffic data. Therefore, it is ensured that the video traffic data can be identified in a timely manner and effectively intercepted before the complete transmission of the video.
[0091] In one exemplary embodiment, such as Figure 5 As shown, if the video bandwidth data of a video changes resolution, the length of each video slice in the video bandwidth data will change. Therefore, if the video is retransmitted with video bandwidth data corresponding to the new video resolution, the bandwidth processing device needs to re-identify and detect the video bandwidth data of the video. The method also includes:
[0092] Step 501: If the video traffic data changes video resolution, then obtain the new video traffic data.
[0093] In practice, if a video has its resolution changed after it has been identified and blocked, and the video is retransmitted, the video traffic data still needs to be transmitted from the beginning. In this way, the traffic processing device can still obtain the video traffic data again and re-identify the video traffic data.
[0094] Step 502: Identify the first video slice header length, video length remainder, first audio slice header length, and audio length remainder in the new video traffic data, and check whether the video recognition rule is matched in the video recognition rule table.
[0095] In implementation, the traffic processing device identifies four length features in the new video traffic data: the header length of the first video slice, the video length remainder, the header length of the first audio slice, and the audio length remainder. The specific method for identifying these four length features of video traffic data has been described in step 304 of the above embodiment, and this process is the same as the identification process in step 304; therefore, it will not be repeated here. Since the video recognition rule table is pre-constructed considering the four length features of different sample video traffic data at different resolutions, even if the video traffic data changes resolution during application, the traffic processing device can still identify the four length features of the video traffic data after the resolution change, re-detect whether the video traffic data matches the rules according to the video recognition rule table, and then determine whether to block or intercept the video traffic data. This ensures that regardless of how the video resolution changes, the target video can still be identified and its video traffic data intercepted.
[0096] In this embodiment, the video recognition rule table contains the values of four length features of sample video traffic data at various resolutions during its construction. Therefore, even if the video traffic data is retransmitted with a different video resolution, the new video traffic data can still be identified and blocked, improving the accuracy and comprehensiveness of video detection.
[0097] In one exemplary embodiment, such as Figure 6As shown, the specific processing steps for obtaining video traffic data in step 202 include:
[0098] Step 602: Obtain candidate video traffic data based on a preset video crawling tool or video crawling script.
[0099] In practice, the traffic processing device acquires candidate video traffic data based on preset video crawling tools or video crawling scripts. Specifically, the traffic processing device acquires candidate video traffic data from major video websites and video platforms through Python scripts and other methods.
[0100] Step 604: Based on the target identifier carried by the candidate video traffic data, determine the video traffic data in the candidate video traffic data.
[0101] In implementation, candidate video traffic data from different video websites or platforms carries the identifiers of those websites and platforms. Specifically, the traffic processing device filters the candidate video traffic data based on the target identifiers carried by the candidate traffic data, selecting the video traffic data that needs to be identified and blocked. For example, if video traffic data from a certain video website A is selected as the video traffic data to be identified and blocked, the traffic processing device determines the identifier corresponding to video website A as the target identifier. From the full pool of candidate video traffic data, the candidate video traffic data carrying the target identifier is then identified as the target video traffic data.
[0102] In this embodiment, candidate video traffic data is obtained through video crawling tools or video crawling scripts, and video traffic data is filtered from the candidate video traffic data based on the target identifier carried by the candidate video traffic data. This allows for the pre-screening of video traffic data before video detection, reducing the amount of data processed by video traffic data and improving the efficiency of video recognition.
[0103] In one exemplary embodiment, such as Figure 7 As shown, the specific processing steps of step 204 include:
[0104] Step 702: Based on the first video slice header length, video length remainder, first audio slice header length, and audio length remainder, perform matching in the various length rules contained in the video recognition rule table.
[0105] In implementation, the traffic processing device matches the data against various length rules in the video recognition rule table based on the length of the first video slice header, the video length remainder, the first audio slice header, and the audio length remainder. Specifically, the video recognition rule table contains video recognition rules with four length features: the length of the first video slice header, the video length remainder, the first audio slice header, and the audio length remainder corresponding to each sample video. After obtaining the four length features of the current video traffic data, the traffic processing device iterates through each video recognition rule in the video recognition rule table based on these four length features, matching each rule against the specified length.
[0106] Step 704: If the first video slice header length, video length remainder, first audio slice header length, and audio length remainder are consistent with a certain video recognition rule, it is determined that the video recognition rule has been matched.
[0107] In practice, if the header length of the first video slice, the video length remainder, the header length of the first audio slice, and the audio length remainder are consistent with a certain video recognition rule, the traffic processing device determines that the video traffic data has been matched with a video recognition rule in the video recognition rule table.
[0108] Optionally, if the combination of the first video slice header length, video length remainder, first audio slice header length, and audio length remainder is different from any video recognition rule in the video recognition rule table, it indicates that the video traffic data does not match the video recognition rule, and the video traffic data does not need to be blocked.
[0109] In this embodiment, the video traffic data is examined through a video recognition rule table to determine whether the video traffic data matches the video recognition rule. Since the four length features are only features of the first video slice and the first audio slice in the video, the video traffic data is blocked and intercepted in a timely and rapid manner if the video recognition rule is matched.
[0110] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0111] Based on the same inventive concept, this application also provides a video detection apparatus for implementing the video detection method described above. The solution provided by this apparatus is similar to the implementation described in the above method; therefore, the specific limitations in one or more video detection apparatus embodiments provided below can be found in the limitations of the video detection method described above, and will not be repeated here.
[0112] In one exemplary embodiment, such as Figure 8 As shown, a video detection device 800 is provided, including: a first identification module 801, a detection module 802, and an interception module 803, wherein:
[0113] The first identification module 801 is used to acquire video traffic data and identify the first video slice header length, video length remainder, first audio slice header length, and audio length remainder in the video traffic data.
[0114] The detection module 802 is used to detect whether a video recognition rule is matched in the video recognition rule table based on the first video slice header length, video length remainder, first audio slice header length, and audio length remainder.
[0115] The interception module 803 is used to intercept video traffic data when the video recognition rules are matched.
[0116] In one exemplary embodiment, the device 800 further includes:
[0117] The first acquisition module is used to acquire sample video traffic data at different resolutions;
[0118] The second identification module is used to identify the first video slice header length, the first video slice length remainder, the first audio slice header length, and the first audio slice audio length remainder in the sample video traffic data at each resolution, based on the video transmission protocol.
[0119] The module is used to construct a video recognition rule table based on the header length of the first video slice, the length remainder of the first video slice, the header length of the first audio slice, and the audio length remainder of the first audio slice of the sample video traffic data at each resolution.
[0120] In one exemplary embodiment, the first identification module 801 is specifically used to identify the length of a first video segment in video traffic data based on a video transmission protocol;
[0121] The starting position of the next video segment is determined based on the length of the first video segment, the sequence number of the video data packets contained in the first video segment, and the remaining length of the video traffic data.
[0122] Determine the length of the next video segment until the length of the first video slice header, the video length remainder, the first audio slice header length, and the audio length remainder are determined based on the length of each video segment.
[0123] In one exemplary embodiment, the device 800 further includes:
[0124] The second acquisition module is used to acquire new video traffic data if the video resolution changes.
[0125] The third identification module is used to identify the header length of the first video slice, the video length remainder, the header length of the first audio slice, and the audio length remainder in the new video traffic data.
[0126] In an exemplary embodiment, the first identification module 801 is specifically used to obtain candidate video traffic data based on a preset video crawling tool or video crawling script;
[0127] Based on the target identifier carried by the candidate video traffic data, the video traffic data is determined from the candidate video traffic data.
[0128] In an exemplary embodiment, the detection module 802 is specifically used to match the length rules contained in the video recognition rule table based on the first video slice header length, the video length remainder, the first audio slice header length, and the audio length remainder.
[0129] If the length of the first video slice header, the video length remainder, the length of the first audio slice header, and the audio length remainder match a certain video recognition rule, then the video recognition rule is determined to be matched.
[0130] Each module in the aforementioned video detection device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0131] In one exemplary embodiment, a computer device is provided, which may be a traffic processing device, and its internal structure diagram may be as follows. Figure 9As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a video detection method. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0132] Those skilled in the art will understand that Figure 9 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0133] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0134] Acquire video traffic data and identify the header length of the first video slice, the video length remainder, the header length of the first audio slice, and the audio length remainder in the video traffic data;
[0135] Based on the first video slice header length, video length remainder, first audio slice header length, and audio length remainder, check whether the video recognition rule is matched in the video recognition rule table;
[0136] If the video recognition rules are met, the video traffic data will be intercepted.
[0137] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0138] Obtain sample video traffic data at different resolutions;
[0139] Based on the video transmission protocol, the header length of the first video slice, the length remainder of the first video slice, the header length of the first audio slice, and the audio length remainder of the first audio slice are identified in the sample video traffic data at each resolution.
[0140] Based on the header length of the first video slice, the length remainder of the first video slice, the header length of the first audio slice, and the audio length remainder of the first audio slice of the sample video traffic data at each resolution, a video recognition rule table is constructed.
[0141] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0142] Based on the video transmission protocol, identify the length of the first video segment in the video traffic data;
[0143] The starting position of the next video segment is determined based on the length of the first video segment, the sequence number of the video data packets contained in the first video segment, and the remaining length of the video traffic data.
[0144] Determine the length of the next video segment until the length of the first video slice header, the video length remainder, the first audio slice header length, and the audio length remainder are determined based on the length of each video segment.
[0145] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0146] If the video traffic data changes video resolution, then obtain the new video traffic data;
[0147] Identify the header length of the first video slice, the video length remainder, the header length of the first audio slice, and the audio length remainder in the new video traffic data.
[0148] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0149] Based on preset video crawling tools or video crawling scripts, obtain candidate video traffic data;
[0150] Based on the target identifier carried by the candidate video traffic data, the video traffic data is determined from the candidate video traffic data.
[0151] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0152] Based on the first video slice header length, video length remainder, first audio slice header length, and audio length remainder, a match is made among the various length rules included in the video recognition rule table;
[0153] If the length of the first video slice header, the video length remainder, the length of the first audio slice header, and the audio length remainder match a certain video recognition rule, then the video recognition rule is determined to be matched.
[0154] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.
[0155] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0156] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0157] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0158] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0159] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A video detection method, characterized in that, The method includes: Acquire video traffic data and identify the first video slice header length, video length remainder, first audio slice header length, and audio length remainder in the video traffic data; Based on the first video slice header length, the video length remainder, the first audio slice header length, and the audio length remainder, the system checks whether a video recognition rule is matched in the video recognition rule table. If the video recognition rules are met, the video traffic data is intercepted.
2. The method according to claim 1, characterized in that, Before identifying the first video slice header feature, video length remainder feature, first audio slice header feature, and audio length remainder feature in the video traffic data, the method further includes: Obtain sample video traffic data at different resolutions; Based on the video transmission protocol, the header length of the first video slice, the length remainder of the first video slice, the header length of the first audio slice, and the audio length remainder of the first audio slice are identified in the sample video traffic data at each resolution. Based on the first video slice header length, the first video slice length remainder, the first audio slice header length, and the first audio slice audio length remainder of the sample video traffic data at each resolution, a video recognition rule table is constructed.
3. The method according to claim 1, characterized in that, The identification of the header length of the first video slice, the video length remainder, the header length of the first audio slice, and the audio length remainder in the video traffic data includes: Based on the video transmission protocol, the length of the first video segment in the video traffic data is identified; The starting position of the next video segment is determined based on the length of the first video segment, the sequence number of the video data packets contained in the first video segment, and the remaining length of the video traffic data. The length of the next video segment is determined until the length of the first video slice header, the video length remainder, the first audio slice header length, and the audio length remainder are determined based on the length of each video segment.
4. The method according to claim 1, characterized in that, The method further includes: If the video traffic data changes video resolution, then new video traffic data is obtained; Identify the header length of the first video slice, the video length remainder, the header length of the first audio slice, and the audio length remainder in the new video traffic data, and check whether the video recognition rule is matched in the video recognition rule table.
5. The method according to claim 1, characterized in that, The acquisition of video traffic data includes: Based on preset video crawling tools or video crawling scripts, obtain candidate video traffic data; Based on the target identifier carried by the candidate video traffic data, video traffic data is determined from the candidate video traffic data.
6. The method according to claim 1, characterized in that, The step of detecting whether a video recognition rule is matched in the video recognition rule table based on the first video slice header length, the video length remainder, the first audio slice header length, and the audio length remainder includes: Based on the first video slice header length, the video length remainder, the first audio slice header length, and the audio length remainder, a match is made among the various length rules included in the video recognition rule table; If the length of the first video slice header, the remainder of the video length, the length of the first audio slice header, and the remainder of the audio length are consistent with any one of the video recognition rules, then the video recognition rule is determined to be matched.
7. A video detection device, characterized in that, The device includes: The first identification module is used to acquire video traffic data and identify the first video slice header length, video length remainder, first audio slice header length, and audio length remainder in the video traffic data. The detection module is used to detect whether a video recognition rule is matched in the video recognition rule table based on the length of the first video slice header, the video length remainder, the length of the first audio slice header, and the audio length remainder. The interception module is used to intercept the video traffic data when the video recognition rule is matched.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.