Video filtering method, device, equipment, storage medium and computer program product
By extracting the video identification and business party identification, querying the filtering condition configuration information, and determining the appropriate filtering plug-in and feature acquisition plug-in, the problem of repeated data acquisition during the video filtering process is solved, and the video filtering efficiency and performance are improved.
Patent Information
- Application Number
- CN202410551332.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-07
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2044-05-07
AI Technical Summary
The existing technology has the problem of low efficiency in the video filtering process, mainly because repeated acquisition of data leads to multiple calls to the same feature service, which increases time consumption.
By receiving the video filtering request, extract the video identification set and business party identification, query the corresponding filter condition configuration information, determine the appropriate filter plug-in, obtain the feature dimensions, use the feature acquisition plug-in to obtain video features, and perform filtering based on the features to avoid duplication Acquisition and useless features.
It improves the efficiency of video filtering, realizes the separation of video feature acquisition and filtering, eliminates the acquisition of useless features and repeated acquisition of features, and improves the performance of filtering processing.
Smart Images

Figure CN118138806B
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a video filtering method, device, equipment, storage medium and computer program product. Background Art
[0002] With the rapid development of computer technology, in order to push personalized videos to users, based on the user's relevant data and massive video data, videos for display are screened from a large number of videos. In this process, filtering and judging videos is particularly important.
[0003] In the related art, a process-oriented approach is usually adopted to develop the video filtering function, and then, based on the video filtering function, a video is checked for availability, for example, business logic calculations are performed in combination with the relevant data of the video to determine whether the video can be displayed to the user. However, the related art involves repeated acquisition of data, resulting in multiple calls to the same feature service, increasing time consumption, and resulting in low efficiency of video filtering. Summary of the invention
[0004] Based on this, it is necessary to provide a video filtering method, device, equipment, storage medium and computer program product that can improve the efficiency of video filtering in response to the above technical problems.
[0005] In a first aspect, the present application provides a video filtering method. The method comprises:
[0006] receiving a video filtering request, and extracting a video identification set and a business party identification from the video filtering request, wherein the business party identification is used to indicate the business party from which the video filtering request originates;
[0007] Querying the filtering condition configuration information corresponding to the business party identifier, and determining at least one filtering plug-in for processing the video filtering request according to the filtering condition configuration information, where different filtering plug-ins correspond to different filtering conditions;
[0008] Determine a feature dimension corresponding to each filter plug-in in the at least one filter plug-in, and determine at least one video feature acquisition plug-in according to the feature dimension, wherein different video feature acquisition plug-ins are used to acquire video features corresponding to different feature dimensions;
[0009] Obtaining, through each of the video feature acquisition plug-ins, the video features corresponding to each video identifier in the video identifier set in the corresponding feature dimension;
[0010] For each video identifier in the video identifier set, each filtering plug-in performs video filtering processing according to the video features corresponding to the video identifier in the corresponding feature dimension to obtain a filtering result about the video identifier set.
[0011] In a second aspect, the present application also provides a video filtering device. The device comprises:
[0012] An extraction module, configured to receive a video filtering request, and extract a video identification set and a business party identification from the video filtering request, wherein the business party identification is used to indicate the business party from which the video filtering request originates;
[0013] A query module, used to query the filtering condition configuration information corresponding to the business party identifier, and determine at least one filtering plug-in for processing the video filtering request according to the filtering condition configuration information, where different filtering plug-ins correspond to different filtering conditions;
[0014] A determination module, used to determine a feature dimension corresponding to each filter plug-in in the at least one filter plug-in, and determine at least one video feature acquisition plug-in according to the feature dimension, wherein different video feature acquisition plug-ins are used to acquire video features corresponding to different feature dimensions;
[0015] An acquisition module, configured to acquire, through each of the video feature acquisition plug-ins, the video features corresponding to each video identifier in the video identifier set in the corresponding feature dimension;
[0016] The filtering module is used to perform video filtering processing on each video identifier in the video identifier set according to the video features corresponding to the video identifier in the corresponding feature dimension through each filtering plug-in to obtain a filtering result on the video identifier set.
[0017] In some embodiments, the query module is used to obtain a mapping relationship between a preset business party identifier and filtering condition configuration information; and query the filtering condition configuration information corresponding to the business party identifier based on the mapping relationship and the extracted business party identifier.
[0018] In some embodiments, the acquisition module is used to acquire a plug-in through each of the video features, and acquire the video features corresponding to the corresponding feature dimensions of each video identifier in the video identifier set from the local cache; if the video features corresponding to the corresponding feature dimensions cannot be acquired from the local cache according to the video identifier, the plug-in identifier of the plug-in is acquired from the cache server providing feature cache service according to the video identifier and the video features, and the video features corresponding to the corresponding feature dimensions are acquired, and the video identifier, the plug-in identifier and the acquired video features corresponding to the corresponding feature dimensions are stored in the local cache accordingly.
[0019] In some embodiments, the acquisition module is used to generate a feature acquisition request based on the video identifier and the plug-in identifier of the video feature acquisition plug-in; based on a pre-established communication connection with a cache server providing a feature cache service, send the feature acquisition request to the cache server; and receive the video features corresponding to the video identifier in the corresponding feature dimension returned by the cache server.
[0020] In some embodiments, the local cache includes cache areas corresponding to each video feature acquisition plug-in, each cache area is used to cache video features of a corresponding feature dimension, and the acquisition module is used to query the video features corresponding to the corresponding feature dimension of each video identifier in the video identifier set from the corresponding cache area through each video feature acquisition plug-in; check the cache duration of the queried video features in the cache area; and when the cache duration does not exceed a preset duration, obtain the video features corresponding to the corresponding feature dimension of each queried video identifier.
[0021] In some embodiments, the acquisition module is also used to obtain the video features corresponding to the corresponding feature dimensions from the cache server providing feature caching service according to the video identifier and the plug-in identifier of the video feature acquisition plug-in when the cache time exceeds a preset time, and store the video identifier, the plug-in identifier of the video feature acquisition plug-in and the obtained video features corresponding to the corresponding feature dimensions in the cache area corresponding to the video feature acquisition plug-in in the local cache.
[0022] In some embodiments, the device also includes an establishment module, which is used to record routing information corresponding to each historical feature acquisition request, and the routing information includes a request initiator identifier and a request receiver identifier involved in the historical feature acquisition request; when the video filtering service is in a restart state, a communication connection for sending a feature acquisition request is established according to the request initiator identifier and the request receiver identifier contained in the routing information, and the communication connection is used when the video filtering service is in a running state.
[0023] In some embodiments, the determination module is further used to determine at least one exemption plug-in for processing the video filtering request according to the filtering condition configuration information, and different exemption plug-ins correspond to different exemption filtering conditions; each of the exemption plug-ins performs video exemption processing according to the video features corresponding to the video identifier in the corresponding feature dimension, and obtains the exemption result for the video identifier set; and determines the non-exempt filtering video identifier from the video identifier set according to the exemption result. The filtering module is used to perform video filtering processing for each non-exempt filtering video identifier according to the video features corresponding to the video identifier in the corresponding feature dimension through each of the filtering plug-ins, and obtains the filtering result for the video identifier set.
[0024] In some embodiments, the determination module is also used to obtain, for each exemption plug-in, the video features corresponding to the exemption plug-in from the video features corresponding to each feature dimension of the video identification, and verify whether the obtained video features hit the exemption filtering conditions corresponding to the exemption plug-in to obtain the verification result corresponding to the exemption plug-in; and determine the exemption result for the video identification set based on the verification results corresponding to each video identification.
[0025] In a third aspect, the present application further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the above-mentioned video filtering method are implemented.
[0026] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and the computer program implements the steps of the above-mentioned video filtering method when executed by a processor.
[0027] In a fifth aspect, the present application further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned video filtering method are implemented.
[0028] The above-mentioned video filtering method, device, equipment, storage medium and computer program product extract a video identification set and a business party identification by receiving a video filtering request, wherein the business party identification is used to indicate the business party from which the video filtering request originates. The filtering condition configuration information corresponding to the business party identification is queried, and at least one filtering plug-in that matches the business party requirements and is used to process the video filtering request is determined according to the filtering condition configuration information. Different filtering plug-ins correspond to different filtering conditions, that is, the filtering conditions required by different business parties are adaptively adjusted according to the filtering condition configuration information, thereby ensuring the effectiveness of video filtering. The feature dimensions corresponding to each filtering plug-in in at least one filtering plug-in are determined, and at least one video feature acquisition plug-in is determined according to the feature dimensions. Different video feature acquisition plug-ins are used to acquire video features corresponding to different feature dimensions. In other words, the required video features can be inferred according to the filtering plug-in, which can not only avoid repeated acquisition of the same video feature, but also avoid acquisition of useless video features, so that the on-demand adaptive acquisition of video features can be achieved, and the efficiency of video feature acquisition can be ensured. Through each video feature acquisition plug-in, the video features corresponding to each video identification in the video identification set in the corresponding feature dimension are obtained in a targeted manner. For each video identifier in the video identifier set, each filter plug-in performs targeted video filtering processing according to the video features corresponding to the video identifier in the corresponding feature dimension, and obtains the filtering result about the video identifier set to complete the video filtering processing of the video identifier. In this way, while realizing the separation of video feature acquisition and video filtering, the acquisition of useless video features and repeated acquisition of video features are eliminated, and the video filtering efficiency is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0030] Figure 1 A diagram showing an application environment of a video filtering method in an embodiment;
[0031] Figure 2 A schematic diagram of a video filtering method according to an embodiment of the present invention;
[0032] Figure 3 is a schematic diagram of a process flow of a video filtering process in one embodiment;
[0033] Figure 4 A schematic diagram of a flow chart of a video feature acquisition step in an embodiment;
[0034] Figure 5 A schematic diagram of cache area distribution in a local cache in an embodiment;
[0035] Figure 6 is a schematic diagram of a video filtering process flow in one embodiment;
[0036] Figure 7 is a schematic diagram of a video filtering framework in one embodiment;
[0037] Figure 8 A schematic diagram of a video push scenario in one embodiment;
[0038] Fig. 9 is a structural block diagram of a video filtering device in one embodiment;
[0039] Fig.10 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0040] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0041] The video filtering method provided in the embodiment of the present application involves artificial intelligence technology (AI), wherein artificial intelligence technology is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that the machines have the functions of perception, reasoning and decision-making.
[0042] Artificial intelligence technology is a comprehensive discipline that covers a wide range of fields, including both hardware-level and software-level technologies. Basic artificial intelligence technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, pre-trained model technology, operation / interaction systems, and mechatronics. Among them, the pre-trained model is also called a large model or a basic model, which can be widely used in downstream tasks in various major directions of artificial intelligence after fine-tuning. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning. The video filtering method provided in the embodiment of the present application specifically involves machine learning of artificial intelligence technology.
[0043] In the related art, in the video push scenario, in order to ensure that the video can be judged and checked, it is necessary to use the developed video filtering function and combine the relevant data of the video to perform business logic calculations. Among them, in order to develop the video filtering function, a process-oriented design method is generally used for development. Among them, process-oriented design is a design method based on processes and steps. In this design method, developers will decompose the problem into a series of functions or processes, each of which performs a specific task, and organize the execution flow of the entire program by calling these functions or processes.
[0044] However, the related technology involves repeated acquisition of data, resulting in multiple calls to the same feature service, increasing time consumption and causing low efficiency in video filtering.
[0045] The video filtering method provided in the embodiment of the present application receives a video filtering request to extract a video identification set and a business party identification, wherein the business party identification is used to indicate the business party from which the video filtering request originates. The filtering condition configuration information corresponding to the business party identification is queried, and at least one filtering plug-in that matches the business party requirements and is used to process the video filtering request is determined according to the filtering condition configuration information. Different filtering plug-ins correspond to different filtering conditions, that is, the filtering conditions required by different business parties are adaptively regulated according to the filtering condition configuration information, thereby ensuring the effectiveness of video filtering. The feature dimensions corresponding to each filtering plug-in in at least one filtering plug-in are determined, and at least one video feature acquisition plug-in is determined according to the feature dimensions. Different video feature acquisition plug-ins are used to obtain video features corresponding to different feature dimensions. In other words, the required video features can be inferred according to the filtering plug-in, which can not only avoid repeated acquisition of the same video features, but also avoid acquisition of useless video features, so that the on-demand adaptive acquisition of video features can be achieved, and the efficiency of video feature acquisition can be ensured. Through each video feature acquisition plug-in, the video features corresponding to the corresponding feature dimensions of each video identification in the video identification set are obtained in a targeted manner. For each video identifier in the video identifier set, each filter plug-in performs targeted video filtering processing according to the video features corresponding to the video identifier in the corresponding feature dimension, and obtains the filtering result about the video identifier set to complete the video filtering processing of the video identifier. In this way, while realizing the separation of video feature acquisition and video filtering, the acquisition of useless video features and repeated acquisition of video features are eliminated, and the video filtering efficiency is improved.
[0046] The video filtering method provided in the embodiment of the present application can be applied to Figure 1In the application environment shown. Among them, the terminal 102 communicates with the push server 104 through the network, and the push server 104 communicates with the filtering server 106 through the network. The data storage system can store the data that the push server 104 needs to process, and can also be placed on the cloud or other servers. The filtering server 106 can store the data that needs to be processed locally, or on the cloud or other servers. The push server 104 is used to push videos. For example, a push system is deployed on the push server 104, and video push is implemented based on the push system. The filtering server 106 is used to perform video filtering processing on the video identifiers in the video identifier set sent by the push server 104.
[0047] In other embodiments, the filtering server 106 may also be integrated as a server of the push server, and the push server 104 executes the present application.
[0048] In some embodiments, the terminal 102 initiates a video processing request to the push server 104. The push server 104 determines the corresponding video identification set and the business party identification by responding to the video processing request, generates a video filtering request based on the video identification set and the business party identification, and sends the video filtering request to the filtering server 106. The video processing request carries the business party identification.
[0049] The filtering server 106 receives the video filtering request, extracts the video identification set and the business party identification from the video filtering request, and the business party identification is used to indicate the business party from which the video filtering request originates; the filtering server 106 queries the filtering condition configuration information corresponding to the business party identification, and determines at least one filtering plug-in for processing the video filtering request according to the filtering condition configuration information, and different filtering plug-ins correspond to different filtering conditions; the filtering server 106 determines the feature dimensions corresponding to each filtering plug-in in at least one filtering plug-in, and determines at least one video feature acquisition plug-in according to the feature dimensions, and different video feature acquisition plug-ins are used to acquire video features corresponding to different feature dimensions; the filtering server 106 acquires the video features corresponding to the corresponding feature dimensions of each video identification in the video identification set through each video feature acquisition plug-in; for each video identification in the video identification set, the filtering server 106 performs video filtering processing according to the video features corresponding to the video identification in the corresponding feature dimensions through each filtering plug-in, and obtains the filtering result about the video identification set. The filtering server 106 returns the filtering result to the push server 104.
[0050] For example, the terminal 102 may be a video creator, and the corresponding video processing request is a video upload request. The video identifier set includes at least one video identifier, and the video corresponding to each video identifier is a video created by the video creator. Correspondingly, after obtaining the filtering result about the video identifier set, the push server 104 sends the obtained filtering result to the recall pool in the push system to provide video push service for the video browser.
[0051] For example, the terminal 102 may be a video browser, and the corresponding video processing request is a video acquisition request. The video identification set includes at least one video identification, and the video corresponding to each video identification is a video obtained after the rough sorting process in the push system is completed. Correspondingly, after obtaining the filtering result about the video identification set, the push server 104 performs a fine sorting process based on the obtained filtering result to obtain the video to be pushed, and returns the video to be pushed to the terminal 102 for exposure and display.
[0052] All the requests mentioned above use a unified entry, that is, a unified protocol format for each request.
[0053] The terminal 102 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, IoT devices, and portable wearable devices. IoT devices may be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. Portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. Head-mounted devices may be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. The push server 104 and the filtering server 106 are both servers. The server may be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services.
[0054] In one embodiment, Figure 2 As shown, a video filtering method is provided, which is applied to Figure 1 Taking the filtering server 106 in the example as an example, the following steps are included:
[0055] Step S202: receiving a video filtering request, extracting a video identification set and a business party identification from the video filtering request, where the business party identification is used to indicate the business party from which the video filtering request originates.
[0056] Among them, the video filtering request is a request to filter the video. The business party is an access platform with at least one of the video receiving capability and the video creation capability. Optionally, the instant messaging application deployed on the terminal includes multiple video access products, such as "Video Account", "Take a Look", "Search", "Nearby", etc. These video access products can be regarded as different business parties, all of which provide users with video access portals. Exemplarily, through the "Video Account", an entry for video upload is provided to the video creator, and the "Video Account" can receive videos uploaded by the video creator. Exemplarily, through "Take a Look", an entry for video viewing is provided to the video browser, and the "Take a Look" can obtain the video to be pushed returned by the push system and expose it to the video browser.
[0057] The business party identifier is used to identify the business party, and each business party has a corresponding business party identifier. The video identifier set includes multiple video identifiers, and the video corresponding to each video identifier is the video to be filtered.
[0058] Optionally, the video identification set is determined based on the video uploaded by the video creator, that is, after the push server obtains the video uploaded by the video creator, it creates a corresponding video identification for the obtained video, obtains a video identification set based on each video identification, and sends the video identification set to the filtering server.
[0059] Optionally, the video identification set is determined based on a video acquisition request triggered by a video browser. Specifically, the video browser sends a video acquisition request to a push server, and the push server recalls and roughly sorts the videos based on the video acquisition request, and determines the video identification of each video, and obtains a video identification set based on each video identification.
[0060] Optionally, the filtering server receives a video filtering request sent by the push server, wherein the video filtering request is a video processing request sent by the terminal in response to the push server, obtains a video identification set, parses the video processing request to obtain a business party identification, and determines the video filtering request according to the business party identification and the video identification set. The video processing request may be a video upload request or a video acquisition request, which is not specifically limited.
[0061] Step S204, querying the filtering condition configuration information corresponding to the business party identifier, and determining at least one filtering plug-in for processing the video filtering request according to the filtering condition configuration information, where different filtering plug-ins correspond to different filtering conditions.
[0062] Among them, the filtering plug-in is a plug-in with video filtering function, which is used to process video filtering requests. Optionally, the filtering plug-in is a service that filters videos according to video features of corresponding feature dimensions. Optionally, the filtering plug-in includes at least a live video filtering plug-in, a non-live video filtering plug-in and a user-related filtering plug-in. Among them, the live video filtering plug-in is a plug-in that performs video filtering on live videos based on the video features of live videos. The non-live video filtering plug-in is a plug-in that performs video filtering on non-live videos based on the video features of non-live videos. The user-related filtering plug-in is a plug-in that performs video filtering on the corresponding video (live video or non-live video) based on the user-related features of the video (which is also a type of video feature).
[0063] Different filter plug-ins have different corresponding filter conditions. For example, the corresponding filter condition of "low live video fluency filter plug-in" is that the fluency is lower than the fluency threshold. The corresponding filter condition of "low live video clarity filter plug-in" is that the clarity is lower than the clarity threshold.
[0064] The filter condition configuration information is configuration information about the filter condition, and can also be regarded as configuration information about video filtering processing. The filter condition configuration information can be used to determine the filter plug-in that matches the business party. The filter condition configuration information includes a plug-in identifier of at least one filter plug-in.
[0065] Optionally, the filtering server parses the video filtering request to obtain a video identifier set (object_id) and a business party identifier (appname), and extracts filtering condition configuration information corresponding to the business party identifier from pre-set filtering condition configuration information according to the business party identifier. The filtering server obtains at least one filtering plug-in from the filtering condition configuration information.
[0066] In some other embodiments, the video filtering request also includes context information (context), and the method further includes: if the context information includes a plug-in identifier of the filtering plug-in, then determining the filtering plug-in for processing the video filtering request based on the plug-in identifier of the filtering plug-in included in the context information.
[0067] Among them, the context information is the context of the filter request, some switch protocols that support customization capabilities, and some customization capabilities within the plug-in, such as specific filtering scores, which are all put into the context information. The content in the above context information can be specified by the push server or by the terminal. In this way, if there is a plug-in identifier of the filter plug-in in the context information, the filter plug-in used to process the video filtering request is determined based on the plug-in identifier of the filter plug-in contained in the context information, and subsequent video filtering processing is performed. If there is no plug-in identifier of the filter plug-in in the context information, the corresponding filter plug-in is obtained from the filter condition configuration information.
[0068] In some embodiments, querying the filtering condition configuration information corresponding to the business party identifier includes: obtaining a mapping relationship between a preset business party identifier and the filtering condition configuration information; and querying the filtering condition configuration information corresponding to the business party identifier based on the mapping relationship and the extracted business party identifier.
[0069] The mapping relationship is pre-set between the business party and the filtering server. For example, for each business party, the corresponding filtering condition configuration information is determined according to the business needs of the business party, and the filtering condition configuration information at least includes a filtering plug-in that matches the business party needs. After the filtering condition configuration information is determined, a business party identifier is generated for the business party, and the business party identifier is associated with the filtering condition configuration information to obtain the mapping relationship.
[0070] In this embodiment, according to the pre-set mapping relationship between the business party identifier and the filtering condition configuration information, the filtering condition configuration information matching the business party can be quickly and accurately queried, thereby ensuring the effectiveness and reliability of the video filtering process.
[0071] Step S206, determining the feature dimensions corresponding to each filter plug-in in at least one filter plug-in, and determining at least one video feature acquisition plug-in according to the feature dimensions, wherein different video feature acquisition plug-ins are used to acquire video features corresponding to different feature dimensions.
[0072] Among them, video features at least include live video features, non-live video features and user-related features, and feature dimensions refer to the types of video features. For example, feature dimensions at least include feature dimensions of live video features, feature dimensions of non-live video features and feature dimensions of user-related features.
[0073] For example, in order to refine the video features, the feature dimensions can also be used as the primary feature dimensions, and each feature dimension also includes at least one secondary feature dimension. For example, the feature dimensions of user-related features include the feature dimensions of the creator identity features and the feature dimensions of the viewer identity features.
[0074] The video feature acquisition plug-in is a plug-in with a video feature acquisition function, which is used to acquire video features of corresponding feature dimensions. Exemplarily, the video feature acquisition plug-in includes at least a live video feature acquisition plug-in for acquiring live video features, a non-live video feature acquisition plug-in for acquiring non-live video features, and a user-related feature acquisition plug-in for acquiring user-related features. Each video feature acquisition plug-in has a corresponding feature dimension.
[0075] Optionally, for each filter plug-in, the filter server obtains the dependency between the filter plug-in and the feature dimension, determines the feature dimension corresponding to the filter plug-in based on the dependency, and determines the video feature acquisition plug-in corresponding to the feature dimension. The dependency can also be understood as the correspondence between the filter plug-in and the feature dimension. The dependency can be updated in a timely manner according to actual conditions, that is, according to actual conditions, the filter plug-in and the feature dimension are freely combined to adapt to actual needs.
[0076] It should be noted that for the same video filtering request, there may be multiple filtering plug-ins corresponding to the same feature dimensions. For example, the "filter plug-in for low live video fluency of non-target accounts" filters live videos posted by non-target accounts and with low fluency. Among them, the target account refers to the account in the whitelist, and the non-target account refers to the account that is not in the whitelist. The "user-related filter plug-in that cancels the author's attention" filters the videos of the author who has been canceled by the video browser. Both of these filter plug-ins need to obtain the video features of the identity information of the video creator. In this case, the video features can be inferred based on the filter plug-in, which can effectively avoid repeated acquisition of video features of the same feature dimension.
[0077] Furthermore, by inferring the video features required for video filtering processing based on the filtering plug-in, it is possible to avoid obtaining useless video features.
[0078] Step S208: Obtain the video features corresponding to the corresponding feature dimensions of each video identifier in the video identifier set through each video feature acquisition plug-in.
[0079] Optionally, for each video feature acquisition plug-in and each video identifier in the video identifier set, the filtering server acquires the video feature corresponding to the video identifier in the corresponding feature dimension according to the video feature acquisition plug-in.
[0080] Exemplarily, the filtering server obtains the video feature corresponding to the video identifier in the corresponding feature dimension from the local cache or from a cache server providing feature cache service according to the video feature acquisition plug-in. For example, the cache server is a server different from the filtering server, and the cache server is used to cache the video features of each video in the push system.
[0081] Optionally, when the filtering condition configuration information includes the plug-in priority corresponding to the business party, the filtering server determines the feature acquisition order of each feature acquisition plug-in according to the plug-in priority, and obtains the corresponding video features in turn through the corresponding feature acquisition plug-ins according to the feature acquisition order.
[0082] Among them, the plug-in priority specifies the order in which the feature acquisition plug-in acquires features. For example, the plug-in priority specifies that the "video feature acquisition plug-in for basic attributes of non-live videos" (such as obtaining the video creator ID, publishing time, etc. of non-live videos) should be used first, and then the "video feature acquisition plug-in for identity information of video creators" should be used. In other words, the video creator ID of non-live videos should be determined first, and then the identity information of the video creator should be determined based on the video creator ID to distinguish whether the creator is the target account.
[0083] Step S210: for each video identifier in the video identifier set, each filtering plug-in performs video filtering processing according to the video features corresponding to the video identifier in the corresponding feature dimension, so as to obtain a filtering result about the video identifier set.
[0084] The filtering result of the video identification set includes the video identifications remaining after filtering and used for video push.
[0085] Optionally, for each video identifier, the filtering server obtains the current filtering plug-in for the current video filtering process from the filtering plug-in that has not performed the video filtering process, and obtains the video features corresponding to the corresponding feature dimensions;
[0086] The filtering server verifies whether the video feature corresponding to the corresponding feature dimension hits the filtering condition corresponding to the current filtering plug-in, and obtains the verification result of the current video filtering processing;
[0087] If the verification result indicates a hit, then the video filtering process for the video identifier is stopped, and the video identifier is filtered from the video identifier set using the current filtering plug-in;
[0088] If the verification result indicates a miss, then obtaining a next filter plug-in for the next video filtering process from the filter plug-in that has not performed the video filtering process, and returning to the step of obtaining the video features corresponding to the corresponding feature dimension to continue executing until the video filtering process corresponding to the last filter plug-in is completed;
[0089] According to the verification result corresponding to the video filtering process corresponding to the last filtering plug-in, determine whether the video identifier is filtered from the video identifier set. If so, use the last filtering plug-in to filter the video identifier from the video identifier set. If not, retain the video identifier in the video identifier set.
[0090] The filtering server performs video filtering processing on each video identifier in the video identifier set in turn according to the above process, and obtains the filtering result on the video identifier set after determining whether the last video identifier is retained in the video identifier set.
[0091] It should be noted that if the filter plug-in corresponding to the current video filtering process is the last filter plug-in, it means that the verification results corresponding to each previous video filtering process are all misses. In this case, it is necessary to determine whether to filter the video identifier based on the verification result corresponding to the video filtering process corresponding to the last filter plug-in.
[0092] Specifically, if the verification result representation corresponding to the video filtering process corresponding to the last filter plug-in does not hit, it is determined not to filter the video ID from the video ID set. If the verification result representation corresponding to the video filtering process corresponding to the last filter plug-in hits, the video set is filtered from the video ID set.
[0093] Based on the above process, the video identifiers to be filtered can be filtered out from the video identifier set, and when performing video filtering processing on each video identifier, once the corresponding video feature is verified for the first time to hit the corresponding filtering condition, the video identifier is directly determined to be filtered out, and the video filtering processing of the video identifier is stopped immediately, that is, the process stops as soon as a filter is hit, avoiding invalid video filtering processing, thereby improving the performance of the video filtering service.
[0094] Optionally, after the filtering server determines the filtering result about the video identification set, the filtering result about the video identification set is returned to the push server as a response packet (which can be understood as a response result to the video filtering request) to instruct the push server to perform corresponding video push processing based on the response packet.
[0095] In the above-mentioned video filtering method, a video filtering request is received to extract a video identification set and a business party identification, wherein the business party identification is used to indicate the business party from which the video filtering request originates. The filtering condition configuration information corresponding to the business party identification is queried, and at least one filtering plug-in that matches the business party requirements and is used to process the video filtering request is determined according to the filtering condition configuration information. Different filtering plug-ins correspond to different filtering conditions, that is, the filtering conditions required by different business parties are adaptively regulated according to the filtering condition configuration information, thereby ensuring the effectiveness of video filtering. The feature dimensions corresponding to each filtering plug-in in at least one filtering plug-in are determined, and at least one video feature acquisition plug-in is determined according to the feature dimensions. Different video feature acquisition plug-ins are used to acquire video features corresponding to different feature dimensions. In other words, the required video features can be inferred according to the filtering plug-in, which can not only avoid repeated acquisition of the same video features, but also avoid acquisition of useless video features, so as to realize on-demand adaptive acquisition of video features and ensure the efficiency of video feature acquisition. Through each video feature acquisition plug-in, the video features corresponding to the corresponding feature dimensions of each video identification in the video identification set are obtained in a targeted manner. For each video identifier in the video identifier set, each filter plug-in performs targeted video filtering processing according to the video features corresponding to the video identifier in the corresponding feature dimension, and obtains the filtering result about the video identifier set to complete the video filtering processing of the video identifier. In this way, while realizing the separation of video feature acquisition and video filtering, the acquisition of useless video features and repeated acquisition of video features are eliminated, and the video filtering efficiency is improved.
[0096] To facilitate understanding of the technical concept of video filtering in the embodiment of the present application, Figure 3 The figure is a schematic diagram of the process of video filtering in one embodiment. The embodiment of the present application is described with the filtering server as the implementation subject, and the specific steps are as follows:
[0097] S3.1: In a work thread (WorkThread), a video filtering request sent by a push server is obtained, where the video filtering request includes a business party identifier, a video identifier set, and context information 1.
[0098] S3.2: parse the video filtering request to obtain context information 1, and update the context information 1 to the first configuration file. The first configuration file verifies that the context information 1 does not contain plug-in indication information, and sends the corresponding filtering condition configuration information to the working thread to perform the plug-in acquisition link. This link can refer to the contents of the previous steps S204 to S206.
[0099] S3.3: Perform the video feature acquisition step according to the at least one video feature acquisition plug-in acquired to obtain the video features corresponding to the corresponding feature dimension of each video identifier in the video identifier set. This step can refer to the content of the previous step S208. In addition, create context information 2 containing context information 1, and update the acquired video features to context information 2.
[0100] S3.4: The push server performs logic processing according to at least one filtering plug-in and the acquired video features. The specific process is shown in the above step S210, and the filtering result about the video identification set is obtained.
[0101] In some other examples, after executing S3.3, the method further includes: if the filtering server obtains an exemption relationship from the filtering condition configuration information or from the context information 1, the exemption relationship is used to determine the video identifier that does not need to be processed by video filtering. The video identifier that does not need to be processed by video filtering is determined based on the exemption relationship, and the video identifier that does not need to be processed by video filtering is updated to the context information 2. Based on the video identifier that does not need to be processed by video filtering, the video identifier to be processed by video filtering is determined. For each video identifier to be processed by video filtering, refer to S3.4 for processing to obtain the filtering result of the video identifier set.
[0102] S3.5: Update the filtering result of the video identification set to context information 2. Send the context information 2 to the first configuration file for storage, construct a return packet according to the context information 2, and output the constructed return packet.
[0103] S3.6: In the auxiliary thread (AssistThread), the sampling rate is obtained from the second configuration file, and the monitoring and reporting is performed based on the sampling rate, that is, the time consumption and filtering proportion of each video filtering request are counted, and the context information 2 fed back by the reply packet construction is obtained, and the context information 2 is analyzed based on the context information 2, and the statistical results are updated to the context information 2, and the updated context information 2 is sent to the second configuration file for storage. Among them, the analysis and monitoring reporting can be performed asynchronously, realizing the asynchronousization of heterogeneity and monitoring reporting.
[0104] In the above process, a unified interface is provided to the outside world, which provides a basis for the corresponding free combination of actual needs and has strong scalability. In addition, generic callbacks can be registered for multiple links such as request parsing, logic processing, and packet return construction to support generic overloading. At the same time, the performance indicators and business indicators of links such as video feature acquisition and logic processing are statistically analyzed at the plug-in granularity, that is, the performance and business are evaluated with plug-ins as statistical units. In addition, the cache capability plug-in is realized through the filtering plug-in and the video feature acquisition plug-in, which can quickly access the filtering server and improve the convenience of video filtering.
[0105] In some embodiments, Figure 4 FIG. 1 is a flow chart of a video feature acquisition step in an embodiment. The video feature corresponding to each video identifier in the video identifier set in the corresponding feature dimension is obtained through each video feature acquisition plug-in, including:
[0106] Step S402: Obtain, through each video feature acquisition plug-in, the video feature corresponding to each video identifier in the video identifier set in the corresponding feature dimension from the local cache.
[0107] The local cache refers to the cache space of the filtering server, which is used to cache the video features involved in the historical video filtering requests.
[0108] Optionally, for each video identifier and each video feature acquisition plug-in, the filtering server queries whether the local cache has cached the video features corresponding to the video identifier in the corresponding feature dimension. If the video features corresponding to the video identifier in the corresponding feature dimension are cached, the queried video features are directly obtained from the local cache.
[0109] Among them, the local cache stores the video identifier, feature dimension and corresponding video feature in a corresponding manner.
[0110] Exemplarily, for each video identifier and each video feature acquisition plug-in, the filtering server determines the plug-in identifier of the video feature acquisition plug-in. If the video feature data corresponding to the video identifier is found in the local cache, it is checked whether the video feature data contains the video feature corresponding to the plug-in identifier. If it is contained, it is determined that the video feature corresponding to the video identifier in the corresponding feature dimension is found. If it is not contained, or the video feature data corresponding to the video identifier does not exist in the local cache, it is determined that the video feature corresponding to the cached video identifier in the corresponding feature dimension is not found.
[0111] It should be noted that the video features corresponding to different feature dimensions have different characteristics. For example, the length of the video feature of user identity information is fixed, that is, it is a fixed-length feature. For another example, the number of live videos is much smaller than the number of non-live videos. For another example, user interaction features such as likes and comments are high-frequency features with high feature acquisition frequency.
[0112] To this end, different feature dimensions are cached in the local cache according to their respective characteristics. In some embodiments, the local cache includes cache areas corresponding to each video feature acquisition plug-in, and each cache area is used to cache video features of the feature dimension corresponding to the corresponding video feature acquisition plug-in.
[0113] For example, Figure 5As shown, it is a schematic diagram of the cache area distribution in the local cache in one embodiment. For feature dimensions with a small number of features (such as feature dimensions of live video features), a single machine can store them, so the corresponding video features are stored in the storage area of EdgeCache (edge cache);
[0114] For feature dimensions with fixed feature lengths, such as feature dimensions of non-live video, the corresponding video features are stored in the MultiHash (multi-level hash) storage area, or in the LRUCache (Least Recently UsedCache) storage area, or no cache is used (not in the local cache);
[0115] For feature dimensions with high acquisition frequency, such as feature dimensions of user-related features, the corresponding video features are stored in the storage area of LRUCache, and the cache may not be used (not in the local cache), and there is no specific limitation.
[0116] In this way, by caching video features of different feature dimensions in their respective corresponding cache areas, it is convenient to effectively manage video features, ensure the reliability of video feature acquisition, and improve the performance of video feature caching service.
[0117] In some embodiments, through each video feature acquisition plug-in, the video features corresponding to the corresponding feature dimensions of each video identification in the video identification set are obtained from the local cache, including: through each video feature acquisition plug-in, the video features corresponding to the corresponding feature dimensions of each video identification in the video identification set are queried from the corresponding cache area; the cache time of the queried video features in the cache area is checked; when the cache time does not exceed the preset time, the video features corresponding to the corresponding feature dimensions of each queried video identification are obtained.
[0118] It should be noted that, to ensure the validity of the local cache, each cache area has a corresponding preset duration, that is, the maximum duration for caching. If the cache duration of a video feature exceeds the preset duration, the video feature needs to be updated or deleted.
[0119] Exemplarily, for each video identifier and each video feature acquisition plug-in, the filtering server determines the cache area corresponding to the video feature acquisition plug-in. If it is found that the video feature data corresponding to the video identifier exists in the cache area, it is checked whether the video feature data contains the video feature corresponding to the plug-in identifier. If it is contained, it is determined that the video feature corresponding to the video identifier in the corresponding feature dimension has been queried. If it is not contained, or if it is found that the video feature data corresponding to the video identifier does not exist in the cache area, it is determined that the video feature corresponding to the video identifier in the corresponding feature dimension has not been queried.
[0120] In this embodiment, for each video feature acquisition plug-in, after the corresponding video feature is queried from the corresponding cache area, the validity of the video feature is further verified based on the cache duration of the video feature in the cache area to ensure the effectiveness of video filtering.
[0121] In some embodiments, the method also includes: when the cache time exceeds a preset time, obtaining video features corresponding to corresponding feature dimensions from a cache server providing feature caching services based on the video identifier and the plug-in identifier of the video feature acquisition plug-in, and storing the video identifier, the plug-in identifier of the video feature acquisition plug-in and the obtained video features corresponding to the corresponding feature dimensions in the cache area corresponding to the video feature acquisition plug-in in the local cache.
[0122] Exemplarily, when the cache duration exceeds a preset duration, a cache server providing feature cache service obtains a plug-in identifier of the plug-in according to the video identifier and the video feature, and obtains video features corresponding to corresponding feature dimensions.
[0123] The filtering server obtains the video feature returned by the cache server, and caches the video feature, the video identifier and the plug-in identifier in a corresponding cache area.
[0124] It should be noted that if the cache duration of a video feature in a corresponding cache area exceeds a preset duration, the video feature may be regarded as an expired video feature.
[0125] For example, when a cache server fails, or when the corresponding video feature is not found in the cache server (i.e., cache failure), the filtering server obtains the corresponding expired video feature from the corresponding cache area. In this way, when the cache server fails to store or fails, the expired video feature in the cache area can be degraded, that is, the video feature acquisition dimension can be flexibly downgraded to ensure that the video filtering corresponding to the video filtering request can be completed, and the bottom line rule can be ensured not to be missed by subsequent pre-issuance inspection.
[0126] In this embodiment, when the cache time exceeds the preset time, the corresponding video features are directly obtained from the cache server, and the video identifier, the plug-in identifier of the video feature acquisition plug-in and the obtained video features are stored in the cache area corresponding to the video feature acquisition plug-in in the local cache, which facilitates the video feature acquisition process corresponding to subsequent other video filtering requests and improves the convenience of video feature acquisition.
[0127] Step S404, when the video features corresponding to the corresponding feature dimensions cannot be obtained from the local cache according to the video identifier, the plug-in identifier of the plug-in is obtained from the cache server providing feature cache service according to the video identifier and the video features, the video features corresponding to the corresponding feature dimensions are obtained, and the video identifier, the plug-in identifier and the obtained video features corresponding to the corresponding feature dimensions are stored in the local cache accordingly.
[0128] Optionally, in the case where the video features corresponding to the corresponding feature dimensions cannot be obtained from the local cache according to the video identifier, the plug-in identifier of the plug-in is obtained according to the video identifier and the video features through the cache server providing the feature cache service, the video features corresponding to the corresponding feature dimensions are queried, and the video features are returned to the filtering server. The filtering server stores the video identifier, the plug-in identifier and the obtained video features in the local cache.
[0129] Exemplarily, after the filtering server obtains the video feature corresponding to the corresponding feature dimension, it determines the cache area corresponding to the feature dimension, and stores the video identifier, the plug-in identifier and the obtained video feature in the cache area in correspondence thereto.
[0130] In other examples, the method also includes: in the event that a cache server fails, or the corresponding video feature is not found in the cache server (i.e., cache failure), the filtering server penetrates the feature acquisition request to the KV (Key-Value) storage server that stores the source data, and obtains the plug-in identifier of the plug-in based on the video identifier and the video feature through the KV storage server, obtains the video feature corresponding to the corresponding feature dimension, and returns it to the filtering server.
[0131] It should be noted that the KV storage server and the cache server are different servers, both of which store video features, wherein the KV storage server stores the video feature data of all video identifiers, and the video features stored in the KV storage server are regarded as source data, and for each video identifier, the KV storage server stores a copy of the video feature data belonging to the video identifier (including all video features of the video identifier (including expired and non-expired).
[0132] It should be noted that the cache service is deployed in the corresponding server cluster, which includes different machines (i.e., cache servers). The server cluster stores the video feature data of each video identifier on at least one machine (cache server). For example, a piece of video feature data is cached in both cache server 1 and cache server 2, which may cause data inconsistency in multiple pieces of video feature data corresponding to the same video identifier. In comparison, the video feature data stored in the KV storage server is more accurate. In general, if the business party has no special requirements, it is assumed that the business party can accept temporary inconsistency in video feature data, that is, directly obtain video feature data from the cache server.
[0133] For example, if the context information of the video filtering request includes penetration information, that is, there is a special requirement, the filtering server can directly penetrate the KV storage server to obtain video features. In this way, on-demand penetration can be performed to improve the availability (high availability) of the video feature acquisition service (server based on the cache server or KV storage server).
[0134] Exemplarily, in the acquisition of video features, the KV storage server can also be called with limited frequency, that is, when the frequency of feature acquisition requests received by a single cache server is too high, it directly penetrates to the KV storage server to obtain video features.
[0135] In some embodiments, a plug-in identifier of a plug-in is obtained from a cache server providing a feature caching service based on a video identifier and a video feature, and video features corresponding to corresponding feature dimensions are obtained, including: obtaining a plug-in identifier of a plug-in based on the video identifier and the video feature, and generating a feature acquisition request; sending the feature acquisition request to the cache server based on a pre-established communication connection with the cache server providing the feature caching service; and receiving the video features corresponding to the video identifier in the corresponding feature dimension returned by the cache server.
[0136] The communication connection is a connection between the filtering server and the cache server to achieve communication between the filtering server and the cache server.
[0137] The feature acquisition request is a request for acquiring video features, and the feature acquisition request includes a video identifier and a plug-in identifier of a video feature acquisition plug-in.
[0138] Exemplarily, the filtering server obtains the plug-in identifier of the plug-in according to the video identifier and the video feature, and generates a feature acquisition request carrying the video identifier and the plug-in identifier. The filtering server obtains multiple pre-established communication connections, each of which is a connection between the filtering server and a cache server for obtaining video features of corresponding feature dimensions.
[0139] From the pre-established multiple communication connections, a communication connection corresponding to the corresponding feature dimension is obtained, and the feature acquisition request is sent to the corresponding cache server according to the communication connection. The cache server parses the feature acquisition request to obtain the video identifier and the plug-in identifier, and according to the video identifier and the plug-in identifier, queries the video feature corresponding to the video identifier in the corresponding feature dimension, and returns it to the filtering server.
[0140] In this way, a feature acquisition request is generated based on the plug-in ID of the video ID and the video feature acquisition plug-in; based on the pre-established communication connection with the cache server that provides feature cache service, the feature acquisition request is directly sent to the cache server; and the video features corresponding to the video ID in the corresponding feature dimension returned by the cache server are received. In this way, based on the pre-established communication connection, video features can be acquired efficiently and quickly, saving time costs.
[0141] In some embodiments, the step of establishing a communication connection includes: recording routing information corresponding to each historical feature acquisition request, the routing information including a request initiator identifier and a request receiver identifier involved in the historical feature acquisition request; when the video filtering service is in a restart state, establishing a communication connection for sending the feature acquisition request based on the request initiator identifier and the request receiver identifier contained in the routing information, and the communication connection is used when the video filtering service is in a running state.
[0142] The historical feature acquisition request is a request for video features that has been successfully sent to a corresponding cache server and obtained from the cache server.
[0143] The routing information is used to record the request initiator ID (such as the filter server ID) and the request receiver ID (such as the cache server ID) of the historical feature acquisition request.
[0144] The video filtering service refers to a server that performs video filtering on a filtering server. If the video filtering server is in a restarting state, it means that the video filtering server is restarted.
[0145] Exemplarily, before the video filtering service is closed, a preset number of historical feature acquisition requests are recorded, and the filtering server filters out the historical feature acquisition requests that have been successfully sent to the corresponding cache server and obtained the video features returned by the cache server from multiple historical feature acquisition requests, and records the routing information corresponding to the filtered historical feature acquisition requests.
[0146] When the video filtering server switches from a closed state to a restarted state, for each routing information, the filtering server establishes a communication connection for sending a feature acquisition request based on the request initiator identifier and the request receiver identifier contained in the routing information. The communication connection is used when the video filtering service is in operation.
[0147] It should be noted that the above recording process can also be understood as a traffic recording process, and considering the performance and development cost, the implementation method of the recording operation should be as simple as possible. Therefore, the recorded historical feature acquisition request and related routing information are stored in the shared memory and continuously refreshed within the set capacity.
[0148] It should be noted that when the filtering server needs to be updated or fails, it is necessary to restart the filtering server. In the related art, after restarting, for each feature acquisition request that needs to obtain video features from the cache server, it is necessary to recreate the corresponding communication connection (such as a socket connection) in the connection pool (for example, a socket connection pool). At this time, if the filtering server needs to obtain three video features, the corresponding feature acquisition request A, feature acquisition request B and feature acquisition request C are generated. At this time, due to the lock in the connection pool, feature acquisition request A is locked during the processing of feature acquisition request A, and feature acquisition requests B and C need to wait for feature acquisition request A to be completed before they can be processed, that is, only one feature acquisition request can be processed at a time.
[0149] After the restart, each feature acquisition request needs to re-establish the communication connection, which takes about 500ms to 1s, greatly increasing the time cost of video filtering.
[0150] In view of this, the process of this embodiment is used to perform preheating services, that is, to establish a communication connection in advance. The establishment process can be to use the script-ready probe detection function provided by p6n (a module management platform implemented based on k8s (kubernetes, an open source container orchestration management system)), and the preheating capability is realized by calling the traffic playback interface through the tool.
[0151] In this way, when the video filtering service is in a restarting state, a communication connection is established in advance based on the routing information corresponding to each pre-recorded historical feature acquisition request to preheat the subsequent cache server to obtain feature acquisition requests. There is no need to establish communication connections one by one when the video filtering service is in operation, which improves the efficiency of video feature acquisition and saves time costs.
[0152] In this embodiment, each video feature acquisition plug-in is used to obtain the video features corresponding to the corresponding feature dimension of each video identifier in the video identifier set from the local cache. In this way, the existing video features can be directly obtained from the local cache to avoid repeated acquisition of video features. In addition, it can also avoid the issuance of a video filtering request to multiple downstream cache servers for feature acquisition, effectively solving the high fan-out problem. In the case where the video features corresponding to the corresponding feature dimension cannot be obtained from the local cache according to the video identifier, the corresponding video features are obtained from the cache server to ensure the efficiency of the entire video feature acquisition process.
[0153] In some embodiments, the method also includes: determining at least one exemption plug-in for processing video filtering requests based on the filtering condition configuration information, different exemption plug-ins corresponding to different exemption filtering conditions; performing video exemption processing according to the video features corresponding to the video identifier in the corresponding feature dimension by each exemption plug-in, to obtain an exemption result for the video identifier set; and determining the video identifier that is not exempted from filtering from the video identifier set based on the exemption result.
[0154] Among them, the exemption plug-in is used to exempt the filtering of the video identification. Exemplarily, the exemption plug-in includes at least a live video exemption plug-in, a non-live video exemption plug-in and a user-related exemption plug-in. Different exemption plug-ins correspond to different exemption filtering conditions. Exemplarily, the "exemption plug-in of the target account" corresponds to the exemption filtering condition that the video creator account corresponding to the video identification is the target account. Each exemption plug-in has a corresponding feature dimension.
[0155] Optionally, when the filtering condition configuration information further includes a plug-in identifier of at least one exempted plug-in, the filtering server determines at least one exempted plug-in for processing the video filtering request according to the plug-in identifier of the at least one exempted plug-in.
[0156] For each video identifier and each exemption plug-in, the filtering server determines the exemption result of the video identifier according to the video features of the feature dimension corresponding to the exemption plug-in and the exemption filtering condition corresponding to the exemption plug-in. The filtering server summarizes the exemption results of each video identifier to obtain the exemption result of the video identifier set.
[0157] The filtering server determines a video identifier that is not exempted from filtering from the video identifier set according to the exemption result of the video identifier set. The video identifier that is not exempted from filtering is a video identifier that needs to be subjected to video filtering processing.
[0158] In some embodiments, each exemption plug-in performs video exemption processing according to the video features corresponding to the video identifier in the corresponding feature dimension to obtain an exemption result for a set of video identifiers, including: for each exemption plug-in, obtaining the video features corresponding to the exemption plug-in from the video features corresponding to each feature dimension of the video identifier, and verifying whether the obtained video features hit the exemption filtering conditions corresponding to the exemption plug-in to obtain the verification result corresponding to the exemption plug-in; and determining the exemption result for the set of video identifiers based on the verification results corresponding to each video identifier.
[0159] The video features corresponding to the feature dimensions of the video identification may be understood as video feature data corresponding to the video identification, and the video feature data includes video features of at least one feature dimension.
[0160] Optionally, for each exemption plug-in, the filtering server determines a corresponding feature dimension, and obtains video features of the corresponding feature dimension from video features corresponding to each feature dimension in the video feature data of the video identifier.
[0161] The filtering server verifies whether the acquired video features match the exemption filtering conditions corresponding to the exemption plug-in, and obtains the verification result corresponding to the exemption plug-in.
[0162] If there is at least one verification result indicating a hit among the multiple verification results of the video identifier, it is determined that the exemption result of the video identifier indicates that the video identifier is a video identifier exempted from filtering.
[0163] If each verification result of the video identifier represents a miss verification result, then determining the exemption result of the video identifier represents that the video identifier is a video identifier that is not exempted from filtering.
[0164] The filtering server aggregates the exemption results of the respective video identifiers to obtain the exemption results for the video identifier set.
[0165] In this way, for each exemption plug-in, by checking whether the acquired video features hit the exemption filtering conditions corresponding to the exemption plug-in, it is possible to comprehensively evaluate whether the video identifier can be exempted from video filtering processing, and obtain the verification results corresponding to the exemption plug-in; then, according to each verification result, the exemption result of the video identifier is determined, and whether the video filtering processing of the video identifier is exempted in time. In addition, once a hit is verified, the corresponding video filtering processing is shielded, the pre-stage of video filtering is realized, and invalid video filtering processing is avoided, thereby improving the performance of the video filtering service.
[0166] In this embodiment, at least one exemption plug-in for processing a video filtering request is determined according to the filtering condition configuration information, and different exemption plug-ins correspond to different exemption filtering conditions. Each exemption plug-in performs video exemption processing according to the video features corresponding to the video identifier in the corresponding feature dimension, and obtains the exemption result of the video identifier set, that is, the exemption result of each video identifier is determined one by one. Based on this, before performing video filtering, based on the exemption record of each video identifier in the exemption result of the video identifier set, there is no need to perform video filtering processing on the video identifier exempted from filtering, which simplifies the video filtering processing process and improves the efficiency of the entire video filtering processing.
[0167] In some embodiments, for each video identification in the video identification set, each filtering plug-in performs video filtering processing according to the video features corresponding to the video identification in the corresponding feature dimension, and obtains the filtering result about the video identification set, including: for each video identification that is not exempted from filtering, each filtering plug-in performs video filtering processing according to the video features corresponding to the video identification in the corresponding feature dimension, and obtains the filtering result about the video identification set.
[0168] Optionally, for each non-exempt video identifier and each filtering plug-in, the filtering server obtains the current filtering plug-in for video filtering from the filtering plug-in that has not performed video filtering processing, and obtains the video features corresponding to the corresponding feature dimensions;
[0169] The filtering server verifies whether the video feature corresponding to the corresponding feature dimension hits the filtering condition corresponding to the current filtering plug-in, and obtains the verification result of the current video filtering processing;
[0170] If the verification result indicates a hit, then the video filtering process for the non-exempt filtering video identifier is stopped, and the non-exempt filtering video identifier is filtered from the video identifier set using the current filtering plug-in;
[0171] If the verification result indicates a miss, then obtaining a next filter plug-in for the next video filtering process from the filter plug-in that has not performed the video filtering process, and returning to the step of obtaining the video features corresponding to the corresponding feature dimension to continue executing until the video filtering process corresponding to the last filter plug-in is completed;
[0172] According to the verification result corresponding to the video filtering processing corresponding to the last filtering plug-in, determine whether the non-exempt filtering video identifier is filtered from the video identifier set. If so, use the last filtering plug-in to filter the non-exempt filtering video identifier from the video identifier set. If not, retain the non-exempt filtering video identifier in the video identifier set.
[0173] The filtering server performs video filtering processing on each non-exempt video identification in turn according to the above process, and obtains the filtering result on the video identification set after determining whether the last non-exempt video identification is retained in the video identification set.
[0174] The following will explain the process of video filtering processing by combining the video feature acquisition plug-in, exemption plug-in and filtering plug-in. Figure 6 FIG. 1 is a schematic diagram of a video filtering process in an embodiment.
[0175] S6.1: The filtering server receives a video filtering request, which carries parameters, for example, the parameters include a user identifier (uin), a video identifier set (object_ids), a business party identifier (appname), and context information 1 (context1).
[0176] S6.2: The filtering server obtains at least one filtering plug-in according to the filtering condition configuration information corresponding to the business party identifier.
[0177] S6.3: The filtering server obtains an exemption plug-in according to the feature dimensions corresponding to each filtering plug-in in at least one filtering plug-in.
[0178] Of course, in some examples, if the filter condition configuration information or the context information 1 includes the exempted plug-in information, the exempted plug-in information may also be determined based on the filter condition configuration information or the context information 1.
[0179] S6.4: The filtering server obtains a video feature acquisition plug-in according to the feature dimensions corresponding to each filter plug-in in at least one filter plug-in. The video feature acquisition plug-in includes at least a live video feature acquisition plug-in, a non-live video feature acquisition plug-in, and a user-related feature acquisition plug-in.
[0180] S6.5: The filtering server generates context information 2 including context information 1, and obtains video features of each feature dimension through at least one of a live video feature acquisition plug-in, a non-live video feature acquisition plug-in, and a user-related feature acquisition plug-in. The video feature acquisition process can run each video feature acquisition plug-in concurrently in a coroutine to ensure the efficiency of video feature acquisition.
[0181] The filtering server updates the video features of each feature dimension to the context information 2. The updated context information is sent to the exemption plug-in and the filtering plug-in, that is, the video features are sent to the exemption plug-in and the filtering plug-in respectively. Among them, the exemption plug-in includes at least a live video exemption plug-in, a non-live video exemption plug-in, and a user-related exemption plug-in. The filtering plug-in includes at least a live video filtering plug-in, a non-live video filtering plug-in, and a user-related filtering plug-in.
[0182] S6.6: The filtering server performs exemption processing based on the video features obtained in each feature dimension through at least one of the live video exemption plug-in, the non-live video exemption plug-in, and the user-related exemption plug-in to obtain the exemption result about the video identification set, and updates the exemption result to the context information 2.
[0183] S6.7: Send the context information 2 updated in S6.6 to the filtering plug-in, that is, return the exemption result to the filtering plug-in.
[0184] S6.8: The filtering server performs video filtering processing based on the obtained exemption results and video features of each feature dimension through at least one of the live video filtering plug-in, the non-live video filtering plug-in and the user-related filtering plug-in to obtain the filtering result about the video identification set, and updates the filtering result to the context information 2 updated in S6.7.
[0185] S6.9: Return the context information 2 updated in S6.8 to the packet return processing link, that is, return the filtering result, and perform packet return based on the filtering result.
[0186] S6.10: If the context information 1 of the video filtering request indicates that there is a video feature acquisition requirement, that is, if there is a video feature transparent transmission requirement, the video features of each feature dimension are sent for packet return processing. Specifically, the video features of each feature dimension are updated to the context information 2 updated in S6.9 to obtain the target context information 2, and the target context information 2 is packet returned to obtain a packet return, and output to the push server.
[0187] During the packet return processing, the video filtering service can also be monitored in real time based on the target context information 2. For example, a monitoring identifier is created for the target context information, the target context information is publicly monitored, the performance of the video filtering service is determined, and the performance is reported.
[0188] In the above process, the target context information 2 includes the video identifiers (object_ids) remaining after filtering and the filtering reasons (filter_reason, ie, the filtering conditions that were met) for filtering out the video identifiers.
[0189] In this embodiment, after determining the video features of each feature dimension of the video identifier, the exemption plug-in is used to pre-screen the video identifiers that do not need to be subjected to video filtering processing from the multiple video features of the video identifier, thereby avoiding video filtering processing for the video identifiers that do not need to be subjected to video filtering processing. In this way, for the remaining video identifiers that are exempted from filtering, video filtering processing is performed according to the corresponding filtering plug-in, which not only ensures the accuracy of the video filtering processing, but also ensures the efficiency of the video filtering processing.
[0190] The present application also provides an application scenario, which applies the above-mentioned video filtering method. Specifically, the application of the video filtering method in the application scenario is as follows: after the video creator uploads the creation video to the push server, the push server generates a video filtering request based on the video identifier of the uploaded video and the business party identifier of the business party involved in the upload. At this time, the video filtering method provided by the embodiment of the present application can be used to improve the efficiency of video filtering. Specifically, the filtering server receives the video filtering request, extracts the video identification set and the business party identifier from the video filtering request, and the business party identifier is used to indicate the business party from which the video filtering request originates; queries the filtering condition configuration information corresponding to the business party identifier, and determines at least one filtering plug-in for processing the video filtering request according to the filtering condition configuration information, and different filtering plug-ins correspond to different filtering conditions; determines the feature dimension corresponding to each filtering plug-in in at least one filtering plug-in, and determines at least one video feature acquisition plug-in according to the feature dimension, and different video feature acquisition plug-ins are used to obtain video features corresponding to different feature dimensions; obtains the video features corresponding to each video identifier in the video identification set in the corresponding feature dimension through each video feature acquisition plug-in; for each video identifier in the video identification set, performs video filtering processing according to the video features corresponding to the video identifier in the corresponding feature dimension through each filtering plug-in, and obtains the filtering result about the video identification set.
[0191] Of course, it is not limited to this. The video filtering method provided in the present application can also be applied to the scenario where the video browser requests video push. The video filtering method provided in the embodiment of the present application can improve the video filtering efficiency.
[0192] The above application scenarios are merely illustrative descriptions. It is to be understood that the application of the video filtering methods provided in the embodiments of the present application is not limited to the above scenarios.
[0193] In a specific embodiment, Figure 7 FIG. 1 is a schematic diagram of a video filtering framework in one embodiment. Figure 7 It can be seen that business parties 1, 2, 3, 4, etc. send video filtering requests to the filtering server. The filtering server responds to the video filtering request and performs request processing, for example, configuring and obtaining plug-ins (i.e., the process of determining the filtering plug-in and the exemption plug-in according to the filtering condition configuration information in the previous text), monitoring customization (i.e., performing corresponding monitoring according to requirements), constructing the return packet format (i.e., constructing the return packet), and obtaining transparent transmission features (i.e., sending the obtained video features to the push server).
[0194] The filtering server determines the video feature acquisition plug-in based on the filtering plug-in to acquire the video feature. For example, the live video feature acquisition plug-in acquires the corresponding video feature from the EdgeCache of the local cache, and the non-live video feature acquisition plug-in acquires the corresponding video feature from the MultiHash and LRUCache of the local cache, or it may not acquire it from the local cache. The user-related feature acquisition plug-in can acquire the corresponding video feature from the LRUCache of the local cache, or it may not acquire it from the local cache.
[0195] When not obtaining video features from the local cache, the video features can be obtained from the cache server in a non-penetrating manner, or from the KV storage server in a penetrating manner. Alternatively, after the cache server receives excessive feature acquisition requests, the video features can be obtained from the cache server in a limited frequency penetrating manner from the KV storage server.
[0196] When performing exemption processing or video filtering processing, the filtering server can adaptively obtain video features of corresponding feature dimensions for exemption processing or video filtering processing. Among them, the exemption plug-in can be determined in advance based on the intervention method (intervention filtering rule), for example, the corresponding exemption plug-in is determined based on natural recommendation (natural push), promotion, operation delivery, incentive measures and other rules. Among them, the filtering plug-in can be determined in advance based on the rule regulation party, for example, the corresponding filtering plug-in is determined based on the regulation aspects such as operation review, e-commerce regulation, experimental regulation, security review, model scoring and external regulation.
[0197] During the video filtering process, the filtering server can perform real-time monitoring, for example, monitoring request results (filtering results corresponding to video filtering requests), video filtering ratio, request time (time required to complete video filtering related to video filtering requests) and filter verification (verification of filtering results).
[0198] Combined with the above Figure 7 The following is a specific example based on the video push scenario. Figure 8 FIG. 1 is a schematic diagram of a video push scenario in an embodiment. The scenario involves the interaction between the first terminal, the second terminal, the push server, the filtering server, the cache server, and the KV storage server, as follows:
[0199] S7.1, the first terminal is the video creator, the video creator sends a video upload request to publish the video, and uploads the published video to the push server. The push server performs model scoring and security review on the uploaded video, and stores the score, review result, and video identification in the KV storage server accordingly, and stores the video identification, score, review result, and video identification in the cache server accordingly for feature storage.
[0200] S7.2, the cache server updates the video ID of the uploaded video to the feed (push stream), obtains the feed update event, and sends it to the push server for filtering and detection before cold start into the pool. In this way, the effective retrieval rate can be improved, invalid feeds can be eliminated offline, and the online inspection volume QPM (Queries Per Minute, number of queries per minute): 5000, and the filtering ratio: 30%.
[0201] S7.3, when performing filtering check before cold start into the pool, the push server sends a video filtering request to the filtering server, wherein the video filtering request includes a business party identifier and a video identifier set, wherein the video identifier set includes at least one video identifier, and the video corresponding to each video identifier is a video created by the video creator.
[0202] S7.4, the filtering server performs non-request dimension filtering in response to the video filtering request, and obtains filtering results for the video identification set. The non-request dimension filtering means that there are requirements for user-related video features, that is, when performing user-related filtering, video filtering is performed only based on the video features of the feature dimension of the creator's identity features, but no requirements are made for the feature dimensions corresponding to the live video features and non-live video features.
[0203] S7.5, the filtering server returns the filtering result to the push server, and the push server sends the video identifier in the filtering result to the cold start recall pool.
[0204] S7.6, the first terminal, as the video browser, sends a video acquisition request to the push server. The push server performs pull-stream recall and rough sorting to obtain a rough sorting result. Based on the rough sorting result, a video filtering request is generated. The video filtering request includes a business party identifier and a video identifier set, wherein the video identifier set includes at least one video identifier, and the video corresponding to each video identifier is the video obtained after the rough sorting process in the push system is completed.
[0205] S7.7, after receiving the video filtering request, the filtering server performs online filtering, that is, performs non-request dimension filtering and request dimension filtering to obtain filtering results for the video identification set. Among them, request dimension filtering refers to requirements for user-related video features, that is, when performing user-related filtering, video filtering is performed only based on the video features of the feature dimension of the browser's identity features. Therefore, it can be understood that when filtering online, no requirements are made for the feature dimensions of user-related, live video, and non-live video. Among them, in online filtering, the current available status of the feed can be checked in batches, and the full amount of rules are judged. The heaviest logic QPM: 1.5kw*300, filtering ratio: 8%.
[0206] S7.8, after obtaining the filtering results fed back by the filtering server, the push server performs fine sorting in sequence to obtain the fine sorting results, and performs filtering check before sending based on the fine sorting results, that is, core rule filtering is performed based on the video features obtained from the KV storage server. Based on the core rule filtering results, exposure filtering detection is performed, that is, based on the video features obtained from the KV storage server, core rule filtering is performed again to obtain the final filtering results, and the video corresponding to the video identifier in the final filtering result is returned to the second terminal for exposure display.
[0207] Among them, in the pre-post filtering check, the current status of the feed can be checked in batches, and the full amount of rules are judged. The heaviest logic QPM: 1.5kw*300, the filtering ratio: 8%. Among them, the exposure check can delay the unfollowing; QPM: 3534*50 filtering ratio: 0.2%.
[0208] Above Figure 7 In the process, by connecting important video feature features to the feed update event, the cancellation of attention and the addition of attention can take effect in seconds. In addition, high-time-efficiency services can be set up according to needs, and the cache can be penetrated to filter based on the source data to ensure the stable operation of high-time-efficiency services. For local cache, new data is pulled in advance before the high-frequency video feature cache expires to ensure the hit rate and update in seconds. In addition, multiple funnels are pushed to optimize performance and guarantee business indicators, relying on different data sources and timing to ensure the rapid effectiveness of cancellation of attention. In this way, the timeliness of video filtering services can be improved.
[0209] The video filtering processes in S7.4 and S7.7 can both adopt the following steps to obtain corresponding filtering results. Specifically:
[0210] After receiving the video filtering request, the filtering server extracts the video identification set and the business party identification from the video filtering request, where the business party identification is used to indicate the business party from which the video filtering request originates. The mapping relationship between the pre-set business party identification and the filtering condition configuration information is obtained; based on the mapping relationship and the extracted business party identification, the filtering condition configuration information corresponding to the business party identification is queried. At least one filtering plug-in for processing the video filtering request is determined according to the filtering condition configuration information, and different filtering plug-ins correspond to different filtering conditions.
[0211] The filtering server determines a feature dimension corresponding to each filtering plug-in in at least one filtering plug-in, and determines at least one video feature acquisition plug-in according to the feature dimension. Different video feature acquisition plug-ins are used to acquire video features corresponding to different feature dimensions.
[0212] Through each video feature acquisition plug-in, the video features corresponding to the corresponding feature dimension of each video identifier in the video identifier set are obtained from the local cache. Specifically, the local cache includes cache areas corresponding to each video feature acquisition plug-in, and each cache area is used to cache the video features of the corresponding feature dimension. Through each video feature acquisition plug-in, the video features corresponding to the corresponding feature dimension of each video identifier in the video identifier set are queried from the corresponding cache area; the cache duration of the queried video features in the cache area is checked; when the cache duration does not exceed the preset duration, the video features corresponding to the corresponding feature dimension of each queried video identifier are obtained.
[0213] When the cache time exceeds the preset time, the video features corresponding to the corresponding feature dimensions are obtained from the cache server providing feature cache service according to the video identifier and the plug-in identifier of the video feature acquisition plug-in, and the video identifier, the plug-in identifier of the video feature acquisition plug-in and the obtained video features corresponding to the corresponding feature dimensions are stored in the cache area corresponding to the video feature acquisition plug-in in the local cache.
[0214] In the case where the video features corresponding to the corresponding feature dimensions cannot be obtained from the local cache according to the video identifier, a feature acquisition request is generated according to the video identifier and the plug-in identifier of the video feature acquisition plug-in; based on a pre-established communication connection with the cache server providing feature cache service, the feature acquisition request is sent to the cache server; and the video features corresponding to the corresponding feature dimensions of the video identifier returned by the cache server are received.
[0215] Among them, the step of establishing a communication connection includes: recording the routing information corresponding to each historical feature acquisition request, the routing information includes the request initiator identifier and the request receiver identifier involved in the historical feature acquisition request; when the video filtering service is in a restart state, according to the request initiator identifier and the request receiver identifier contained in the routing information, a communication connection for sending the feature acquisition request is established, and the communication connection is used when the video filtering service is in a running state.
[0216] Obtain the plug-in identification of the plug-in from the cache server according to the video identification and the video features, obtain the video features corresponding to the corresponding feature dimensions, and store the video identification, the plug-in identification and the obtained video features corresponding to the corresponding feature dimensions in the local cache.
[0217] At least one exemption plug-in for processing the video filtering request is determined according to the filtering condition configuration information, and different exemption plug-ins correspond to different exemption filtering conditions; for each exemption plug-in, the video features corresponding to the exemption plug-in are obtained from the video features corresponding to each feature dimension of the video identifier, and the obtained video features are verified to see whether they hit the exemption filtering conditions corresponding to the exemption plug-in, and the verification result corresponding to the exemption plug-in is obtained; according to the verification results corresponding to each video identifier, the exemption result of the video identifier set is determined. According to the exemption result, the video identifier that is not exempted from filtering is determined from the video identifier set.
[0218] For each video identification that is not exempted from filtering, each filtering plug-in performs video filtering processing according to the video features corresponding to the video identification in the corresponding feature dimension, and obtains the filtering result about the video identification set.
[0219] In addition, to ensure that the video filtering of the core business can be carried out continuously and effectively, the core business (for example, push, subscription number, etc.) is physically isolated from the non-core business (for example, red dot). For example, the filtering server in the first filtering server cluster is used to process the video filtering request of the business party corresponding to the core business, and the filtering server in the second filtering service cluster is used to process the video filtering request of the business party corresponding to the non-core business. In addition, the cache server of the first cache server cluster is used to cache the video features corresponding to the core business, and the cache server of the second cache server cluster is used to cache the video features corresponding to the non-core business. In addition, in the event of a failure, in order to ensure that the core business can operate normally, the request is flexibly downgraded, that is, the video filtering request corresponding to the non-core business is lost in proportion. Of course, in the absence of abnormal circumstances, the video filtering request of the core business and the video filtering request of the non-core business are processed normally.
[0220] In addition, if the number of video filtering requests obtained by the filtering server at the current moment is too large (for example, Batchsize is greater than 400), all video filtering requests can be automatically divided into packets, for example, into 10 packets, each packet including 40 video filtering requests, and video filtering processing is performed on each packet in turn to ensure the performance of the video filtering service.
[0221] After using the above video filtering process, the operating cost and performance time consumption are significantly improved, as shown in Table 1:
[0222] Table 1: Performance comparison table
[0223]
[0224] Under the same video filtering request, the fan-out is also significantly reduced, as shown in Table 2:
[0225] Table 2: Comparison table
[0226]
[0227] In the above table, cpu is the central processing unit, Avg is the average time consumption, and Req in Table 2 is the video filtering request.
[0228] In this embodiment, a video filtering request is received to extract a video identification set and a business party identification, wherein the business party identification is used to indicate the business party from which the video filtering request originates. The filtering condition configuration information corresponding to the business party identification is queried, and at least one filtering plug-in that matches the business party requirements and is used to process the video filtering request is determined according to the filtering condition configuration information. Different filtering plug-ins correspond to different filtering conditions to achieve adaptive control of filtering conditions required by different business parties, thereby ensuring the effectiveness of video filtering. The feature dimensions corresponding to each filtering plug-in in at least one filtering plug-in are determined, and at least one video feature acquisition plug-in is determined according to the feature dimensions. Different video feature acquisition plug-ins are used to acquire video features corresponding to different feature dimensions. In other words, the required video features can be inferred according to the filtering plug-in, which can not only avoid repeated acquisition of the same video features, but also avoid acquiring useless video features, so as to achieve adaptive acquisition of video features on demand, and ensure the efficiency of video feature acquisition. Through each video feature acquisition plug-in, the video features corresponding to the corresponding feature dimensions of each video identification in the video identification set are obtained in a targeted manner. For each video identifier in the video identifier set, through each filtering plug-in, according to the video features corresponding to the video identifier in the corresponding feature dimension, targeted video filtering processing is performed to obtain the filtering results about the video identifier set to complete the video filtering processing of the video identifier. In this way, while realizing the separation of video feature acquisition and video filtering, the acquisition of useless video features and the repeated acquisition of video features are eliminated, and the video filtering efficiency is improved. In addition, the above-mentioned video filtering framework is a plug-in framework, which can realize high-availability, high-performance, high-scalability, high-efficiency, and full-operation filtering services. Further, in the above-mentioned embodiment, the filtering conditions of different scenarios are adjusted according to the filtering condition configuration information and the business party identifier, which reduces hard coding and a large amount of repetitive development work, enhances code readability, and reduces the difficulty of testing through plug-ins, reduces maintenance costs, isolates code development, facilitates the mutual iteration of different capabilities, and builds a complete monitoring capability on this basis.
[0229] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0230] Based on the same inventive concept, the embodiment of the present application also provides a video filtering device for implementing the above-mentioned video filtering method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above-mentioned method, so the specific limitations in one or more video filtering device embodiments provided below can refer to the limitations on the video filtering method above, and will not be repeated here.
[0231] In one embodiment, Fig. 9 As shown, a video filtering device 900 is provided, comprising: an extraction module 902, a query module 904, a determination module 906, an acquisition module 908 and a filtering module 910, wherein:
[0232] An extraction module 902 is used to receive a video filtering request, and extract a video identification set and a business party identification from the video filtering request, where the business party identification is used to indicate the business party from which the video filtering request originates;
[0233] A query module 904 is used to query the filtering condition configuration information corresponding to the business party identifier, and determine at least one filtering plug-in for processing the video filtering request according to the filtering condition configuration information, where different filtering plug-ins correspond to different filtering conditions;
[0234] A determination module 906 is used to determine a feature dimension corresponding to each filter plug-in in at least one filter plug-in, and determine at least one video feature acquisition plug-in according to the feature dimension, wherein different video feature acquisition plug-ins are used to acquire video features corresponding to different feature dimensions;
[0235] An acquisition module 908 is used to acquire the video features corresponding to each video identifier in the video identifier set in the corresponding feature dimension through each video feature acquisition plug-in;
[0236] The filtering module 910 is used to perform video filtering processing on each video identifier in the video identifier set according to the video features corresponding to the video identifier in the corresponding feature dimension through each filtering plug-in to obtain the filtering result of the video identifier set.
[0237] In some embodiments, the query module 904 is used to obtain a mapping relationship between a preset business party identifier and filtering condition configuration information; and query the filtering condition configuration information corresponding to the business party identifier based on the mapping relationship and the extracted business party identifier.
[0238] In some embodiments, the acquisition module 908 is used to obtain the plug-in through each video feature, and obtain the video features corresponding to the corresponding feature dimensions of each video identifier in the video identifier set from the local cache; if the video features corresponding to the corresponding feature dimensions cannot be obtained from the local cache according to the video identifier, the plug-in identifier of the plug-in is obtained from the cache server providing the feature cache service according to the video identifier and the video features, the video features corresponding to the corresponding feature dimensions are obtained, and the video identifier, the plug-in identifier and the obtained video features corresponding to the corresponding feature dimensions are stored in the local cache accordingly.
[0239] In some embodiments, the acquisition module 908 is used to obtain the plug-in identifier of the plug-in according to the video identifier and the video feature, and generate a feature acquisition request; based on a pre-established communication connection with a cache server that provides a feature cache service, the feature acquisition request is sent to the cache server; and the video features corresponding to the video identifier in the corresponding feature dimension returned by the cache server are received.
[0240] In some embodiments, the local cache includes cache areas corresponding to each video feature acquisition plug-in, each cache area is used to cache video features of corresponding feature dimensions, and the acquisition module 908 is used to query the video features corresponding to the corresponding feature dimensions of each video identifier in the video identifier set from the corresponding cache area through each video feature acquisition plug-in; check the cache time of the queried video features in the cache area; when the cache time does not exceed the preset time, obtain the video features corresponding to the corresponding feature dimensions of each queried video identifier.
[0241] In some embodiments, the acquisition module 908 is also used to obtain video features corresponding to corresponding feature dimensions from a cache server that provides feature caching services based on the video identifier and the plug-in identifier of the video feature acquisition plug-in when the cache time exceeds a preset time, and store the video identifier, the plug-in identifier of the video feature acquisition plug-in, and the obtained video features corresponding to the corresponding feature dimensions in the cache area corresponding to the video feature acquisition plug-in in the local cache.
[0242] In some embodiments, the device also includes an establishment module, which is used to record routing information corresponding to each historical feature acquisition request, and the routing information includes a request initiator identifier and a request receiver identifier involved in the historical feature acquisition request; when the video filtering service is in a restart state, a communication connection for sending a feature acquisition request is established based on the request initiator identifier and the request receiver identifier contained in the routing information, and the communication connection is used when the video filtering service is in a running state.
[0243] In some embodiments, the determination module 906 is further used to determine at least one exemption plug-in for processing the video filtering request according to the filtering condition configuration information, and different exemption plug-ins correspond to different exemption filtering conditions; each exemption plug-in performs video exemption processing according to the video features corresponding to the video identifier in the corresponding feature dimension, and obtains the exemption result about the video identifier set; and determines the non-exempt filtering video identifier from the video identifier set according to the exemption result. The filtering module 910 is used to perform video filtering processing on each non-exempt filtering video identifier according to the video features corresponding to the video identifier in the corresponding feature dimension through each filtering plug-in, and obtains the filtering result about the video identifier set.
[0244] In some embodiments, the determination module 906 is also used to obtain, for each exemption plug-in, the video features corresponding to the exemption plug-in from the video features corresponding to each feature dimension of the video identification, and verify whether the obtained video features hit the exemption filtering conditions corresponding to the exemption plug-in to obtain the verification result corresponding to the exemption plug-in; and determine the exemption result for the video identification set based on the verification results corresponding to each video identification.
[0245] Each module in the above video filtering device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module.
[0246] In one embodiment, a computer device is provided. The computer device may be a server or a terminal. The internal structure diagram thereof may be as follows: Fig.10As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a video filtering method is implemented.
[0247] Those skilled in the art will understand that Fig.10 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0248] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.
[0249] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0250] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0251] 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, stored data, displayed data, 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 relevant data must comply with relevant regulations.
[0252] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present 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. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0253] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, 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.
[0254] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A video filtering method, characterized in that: The method comprises: receiving a video filtering request, and extracting a video identification set and a business party identification from the video filtering request, wherein the business party identification is used to indicate the business party from which the video filtering request originates; Querying the filtering condition configuration information corresponding to the business party identifier, and determining multiple filtering plug-ins for processing the video filtering request according to the filtering condition configuration information, where different filtering plug-ins correspond to different filtering conditions; Determine a feature dimension corresponding to each of the plurality of filter plug-ins, and determine at least one video feature acquisition plug-in according to the feature dimension, wherein different video feature acquisition plug-ins are used to acquire video features corresponding to different feature dimensions; Obtaining, through each of the video feature acquisition plug-ins, the video features corresponding to each video identifier in the video identifier set in the corresponding feature dimension; For each video identifier in the video identifier set, each filtering plug-in performs video filtering processing according to the video features corresponding to the video identifier in the corresponding feature dimension to obtain a filtering result about the video identifier set.
2. The method according to claim 1, characterized in that The querying of the filtering condition configuration information corresponding to the business party identifier includes: Obtain the mapping relationship between the pre-set business party identifier and the filter condition configuration information; According to the mapping relationship and the extracted business party identifier, the filtering condition configuration information corresponding to the business party identifier is queried.
3. The method according to claim 1, characterized in that: The obtaining of the video features corresponding to each video identifier in the video identifier set in the corresponding feature dimension through each of the video feature obtaining plug-ins includes: Obtaining, through each of the video feature acquisition plug-ins, the video features corresponding to each video identifier in the video identifier set in the corresponding feature dimension from the local cache; In the case where the video features corresponding to the corresponding feature dimensions cannot be obtained from the local cache according to the video identifier, the plug-in identifier of the plug-in is obtained from the cache server providing feature cache service according to the video identifier and the video features, the video features corresponding to the corresponding feature dimensions are obtained, and the video identifier, the plug-in identifier and the obtained video features corresponding to the corresponding feature dimensions are stored in the local cache accordingly.
4. The method according to claim 3, characterized in that The step of obtaining a plug-in identifier of a plug-in according to the video identifier and the video feature from a cache server providing a feature cache service, and obtaining a video feature corresponding to a corresponding feature dimension, includes: Generate a feature acquisition request according to the video identifier and the plug-in identifier of the video feature acquisition plug-in; Based on a pre-established communication connection with a cache server providing a feature cache service, sending the feature acquisition request to the cache server; The video feature corresponding to the video identifier in the corresponding feature dimension returned by the cache server is received.
5. The method according to claim 3, characterized in that: The local cache includes cache areas corresponding to the respective video feature acquisition plug-ins, each cache area is used to cache video features of the corresponding feature dimension, and the video features corresponding to each video identifier in the video identifier set in the corresponding feature dimension are obtained from the local cache through each of the video feature acquisition plug-ins, including: Through each of the video feature acquisition plug-ins, the video feature corresponding to each video identifier in the video identifier set in the corresponding feature dimension is queried from the corresponding cache area; Checking the cache duration of the queried video feature in the cache area; When the cache duration does not exceed the preset duration, the video features corresponding to each queried video identifier in the corresponding feature dimension are obtained.
6. The method according to claim 5, characterized in that The method further comprises: When the cache duration exceeds the preset duration, the video features corresponding to the corresponding feature dimensions are obtained from the cache server providing feature cache service according to the video identifier and the plug-in identifier of the video feature acquisition plug-in, and the video identifier, the plug-in identifier of the video feature acquisition plug-in and the obtained video features corresponding to the corresponding feature dimensions are stored in the cache area corresponding to the video feature acquisition plug-in in the local cache.
7. The method according to claim 4, characterized in that The steps of establishing the communication connection include: Recording the routing information corresponding to each historical feature acquisition request, wherein the routing information includes a request initiator identifier and a request receiver identifier involved in the historical feature acquisition request; When the video filtering service is in a restarting state, a communication connection for sending a feature acquisition request is established according to the request initiator identifier and the request receiver identifier included in the routing information, and the communication connection is used when the video filtering service is in a running state.
8. The method according to claim 1, characterized in that The method further comprises: Determine at least one exemption plug-in for processing the video filtering request according to the filtering condition configuration information, where different exemption plug-ins correspond to different exemption filtering conditions; Performing video exemption processing according to the video features corresponding to the video identifiers in the corresponding feature dimensions by each of the exemption plug-ins, to obtain an exemption result for the video identifier set; Determine, from the video identification set, a video identification that is not exempted from filtering according to the exemption result; For each video identifier in the video identifier set, performing video filtering processing according to the video features corresponding to the video identifier in the corresponding feature dimension by each filtering plug-in to obtain a filtering result about the video identifier set, including: For each video identification that is not exempted from filtering, each filtering plug-in performs video filtering processing according to the video features corresponding to the video identification in the corresponding feature dimension to obtain a filtering result about the video identification set.
9. The method according to claim 8, characterized in that The step of performing video exemption processing according to the video features corresponding to the video identifiers in the corresponding feature dimensions by each of the exemption plug-ins to obtain an exemption result for the video identifier set includes: For each exemption plug-in, obtain the video features corresponding to the exemption plug-in from the video features corresponding to each feature dimension of the video identifier, and verify whether the obtained video features hit the exemption filtering condition corresponding to the exemption plug-in, and obtain the verification result corresponding to the exemption plug-in; An exemption result for the video identification set is determined according to the verification results corresponding to the respective video identifications.
10. A video filtering device, characterized in that: The device comprises: An extraction module, configured to receive a video filtering request, and extract a video identification set and a business party identification from the video filtering request, wherein the business party identification is used to indicate the business party from which the video filtering request originates; A query module, used to query the filtering condition configuration information corresponding to the business party identifier, and determine multiple filtering plug-ins for processing the video filtering request according to the filtering condition configuration information, where different filtering plug-ins correspond to different filtering conditions; A determination module, used to determine a feature dimension corresponding to each of the plurality of filter plug-ins, and to determine at least one video feature acquisition plug-in according to the feature dimension, wherein different video feature acquisition plug-ins are used to acquire video features corresponding to different feature dimensions; An acquisition module, configured to acquire, through each of the video feature acquisition plug-ins, the video features corresponding to each video identifier in the video identifier set in the corresponding feature dimension; The filtering module is used to perform video filtering processing on each video identifier in the video identifier set according to the video features corresponding to the video identifier in the corresponding feature dimension through each filtering plug-in to obtain a filtering result on the video identifier set.
11. The device according to claim 10, characterized in that The query module is used to obtain a mapping relationship between a preset business party identifier and filtering condition configuration information; and query the filtering condition configuration information corresponding to the business party identifier based on the mapping relationship and the extracted business party identifier.
12. The device according to claim 10, characterized in that The acquisition module is used to acquire plug-ins through each of the video features, and acquire the video features corresponding to the corresponding feature dimensions of each video identifier in the video identifier set from the local cache; if the video features corresponding to the corresponding feature dimensions cannot be acquired from the local cache according to the video identifier, the plug-in identifier of the plug-in is acquired from the cache server providing feature cache service according to the video identifier and the video feature, the video features corresponding to the corresponding feature dimensions are acquired, and the video identifier, the plug-in identifier and the acquired video features corresponding to the corresponding feature dimensions are stored in the local cache in correspondence.
13. The device according to claim 12, characterized in that The acquisition module is used to acquire a plug-in identifier of a plug-in according to the video identifier and the video feature, and generate a feature acquisition request; Based on a pre-established communication connection with a cache server providing a feature cache service, the feature acquisition request is sent to the cache server; and the video feature corresponding to the video identifier in the corresponding feature dimension returned by the cache server is received.
14. The device according to claim 12, characterized in that The local cache includes cache areas corresponding to each video feature acquisition plug-in, each cache area is used to cache video features of a corresponding feature dimension, and the acquisition module is used to query the video features corresponding to each video identifier in the video identifier set in the corresponding feature dimension from the corresponding cache area through each video feature acquisition plug-in; Check the cache duration of the queried video features in the cache area; if the cache duration does not exceed the preset duration, obtain the video features corresponding to the corresponding feature dimensions of each queried video identifier.
15. The device according to claim 14, characterized in that The acquisition module is also used to obtain the video features corresponding to the corresponding feature dimensions from the cache server providing feature caching service according to the video identifier and the plug-in identifier of the video feature acquisition plug-in when the cache time exceeds the preset time, and store the video identifier, the plug-in identifier of the video feature acquisition plug-in and the obtained video features corresponding to the corresponding feature dimensions in the cache area corresponding to the video feature acquisition plug-in in the local cache.
16. The device according to claim 13, characterized in that The device also includes an establishment module, which is used to record routing information corresponding to each historical feature acquisition request, and the routing information includes a request initiator identifier and a request receiver identifier involved in the historical feature acquisition request; when the video filtering service is in a restart state, a communication connection for sending a feature acquisition request is established according to the request initiator identifier and the request receiver identifier contained in the routing information, and the communication connection is used when the video filtering service is in a running state.
17. The device according to claim 10, characterized in that The determination module is further used to determine at least one exemption plug-in for processing the video filtering request according to the filtering condition configuration information, where different exemption plug-ins correspond to different exemption filtering conditions; perform video exemption processing according to the video features corresponding to the video identifier in the corresponding feature dimension by each of the exemption plug-ins to obtain an exemption result for the video identifier set; and determine the video identifier that is not exempted from filtering from the video identifier set according to the exemption result; The filtering module is used to perform video filtering processing on each video identifier that is not exempted from filtering according to the video features corresponding to the video identifier in the corresponding feature dimension through each filtering plug-in, so as to obtain the filtering result about the video identifier set.
18. The device according to claim 17, characterized in that The determination module is further configured to obtain, for each exemption plug-in, video features corresponding to the exemption plug-in from the video features corresponding to each feature dimension of the video identifier, and verify whether the obtained video features hit the exemption filtering condition corresponding to the exemption plug-in, thereby obtaining a verification result corresponding to the exemption plug-in; An exemption result for the video identification set is determined according to the verification results corresponding to the respective video identifications.
19. 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, the steps of the method according to any one of claims 1 to 9 are implemented.
20. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.
21. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.
Citation Information
Patent Citations
Database verification method and device, computer device, and storage medium
CN109032824A
Video data recommendation method and device, server and storage medium
CN109800324A
