Digital fingerprint generation, data push method, device and storage medium
In the process of digital fingerprint generation, the feature extraction model and similarity calculation are used to filter out historical push data characteristics that meet the conditions as digital fingerprints for the data to be pushed, which solves the problem of low digital fingerprint accuracy caused by the hash algorithm and improves the accuracy of data push.
Patent Information
- Application Number
- CN202111127690.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-26
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2041-09-26
AI Technical Summary
In the prior art, the digital fingerprint generated by the hash algorithm can easily generate different digital fingerprints for similar data, resulting in low accuracy of digital fingerprint generation, which in turn affects the accuracy of data push.
By obtaining the similarity level information of the data to be pushed, searching the target feature extraction configuration information based on the similar level information, using the corresponding feature extraction model for feature extraction, calculating the similarity between the data to be pushed and the historical push data features, filtering out the historical push data features that meet the preset conditions, and using its corresponding digital fingerprint as the digital fingerprint of the data to be pushed.
Improve the accuracy of digital fingerprint generation and ensure that data of the same similar level is given to the same digital fingerprint, thereby improving the accuracy of data push.
Smart Images

Figure CN114329004B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet technologies, and in particular, to a method, apparatus, computer device, and storage medium for generating digital fingerprints and pushing data. Background Art
[0002] With the development of Internet technologies, digital fingerprint technology has emerged. Digital fingerprints are a security measure used to protect multimedia files and information. When pushing data to users, it is usually necessary to detect whether the data push is repeated. When no repeated data has been pushed, the push is performed. Among them, when performing duplicate detection, digital fingerprints can be used for detection. However, currently, the hash algorithm is usually used to generate digital fingerprints, which easily causes different digital fingerprints to be generated for similar data, resulting in low accuracy of digital fingerprint generation, thereby reducing the accuracy of data duplicate detection and causing inaccurate data push. Summary of the Invention
[0003] Based on this, in view of the above technical problems, it is necessary to provide a method, apparatus, computer device, and storage medium for generating digital fingerprints and pushing data that can improve the accuracy of digital fingerprint generation and thus improve the accuracy of data push.
[0004] A method for generating digital fingerprints, the method comprising:
[0005] Obtaining data to be pushed and corresponding similarity level information;
[0006] Based on the similarity level information, searching for corresponding target feature extraction configuration information from each preset feature extraction configuration information, where the preset feature extraction configuration information includes a feature extraction model corresponding to the preset similarity level information;
[0007] Obtaining the feature extraction model corresponding to the similarity level information from the target feature extraction configuration information, and inputting the data to be pushed into the feature extraction model corresponding to the similarity level information for feature extraction to obtain the features of the data to be pushed;
[0008] Obtaining the features of each historical push data with a generated digital fingerprint, calculating the similarity between the features of the data to be pushed and the features of the historical push data, determining a candidate set of historical push data features from the features of the historical push data with a generated digital fingerprint based on the similarity, and screening target historical push data features from the candidate set of historical push data features;
[0009] When the target historical push data features meet the preset fingerprint assignment conditions, obtaining the digital fingerprint corresponding to the target historical push data features, and using the digital fingerprint corresponding to the target historical push data features as the digital fingerprint corresponding to the data to be pushed, where the digital fingerprint corresponding to the data to be pushed is used to retrieve push data having the same similarity level information as the data to be pushed.
[0010] In one embodiment, the data features to be pushed include video data features;
[0011] The steps of obtaining the historical push data features of each generated digital fingerprint, calculating the similarity between the data features to be pushed and the historical push data features, and determining a candidate set of historical push data features from the historical push data features of each generated digital fingerprint include:
[0012] Sending the video data features to at least two node servers, where the node servers include the historical video data center features of each and the associated historical video data feature sets; the at least two node servers obtain the video data features, calculate the video center similarity between the video data features and the historical video data center features of each, select the historical video data center features of the first video quantity from the historical video data center features of each based on the video center similarity, calculate the video similarity between the video data features and the historical video data features in the historical video data feature sets associated with the historical video data center features of the first video quantity, select the historical video data features of the second video quantity from the historical video data feature sets associated with the historical video data center features of the first video quantity based on the video similarity, obtain the node historical video data feature set, and return the node historical video data feature set associated with the corresponding video similarity;
[0013] Obtaining at least two node historical video data feature sets and the corresponding video similarities returned by the at least two node servers, and screening the historical video data features of the candidate video quantity from the at least two node historical video data feature sets based on the video similarity to obtain a candidate set of historical video data features.
[0014] In one embodiment, the data features to be pushed include text data features;
[0015] The steps of obtaining the historical push data features of each generated digital fingerprint, calculating the similarity between the data features to be pushed and the historical push data features, and determining a candidate set of historical push data features from the historical push data features of each generated digital fingerprint include:
[0016] Send the text data features to at least two node servers, where the node servers include respective historical text data center features and associated historical text data feature sets; the at least two node servers obtain the text data features, calculate the text center similarity between the text data features and the respective historical text data center features, select historical text data center features with a first number of texts from the respective historical text data center features based on the text center similarity, calculate the text similarity between the text data features and the historical text data features in the historical text data feature sets associated with the historical text data center features with the first number of texts, select historical text data features with a second number of texts from the historical text data feature sets associated with the historical text data center features with the first number of texts based on the text similarity to obtain a node historical text data feature set, and associate and return the node historical text data feature set and the corresponding text similarity;
[0017] Obtain at least two node historical text data feature sets and the corresponding text similarities returned by the at least two node servers, and screen historical text data features with a candidate number of texts from the at least two node historical text data feature sets based on the text similarity to obtain a candidate historical text data feature set.
[0018] A digital fingerprint generation device, the device includes:
[0019] An acquisition module for acquiring data to be pushed and corresponding similarity level information;
[0020] A configuration lookup module for looking up corresponding target feature extraction configuration information from each preset feature extraction configuration information based on the similarity level information, where the preset feature extraction configuration information includes a feature extraction model corresponding to the preset similarity level information;
[0021] A feature extraction module for obtaining the feature extraction model corresponding to the similarity level information from the target feature extraction configuration information, inputting the data to be pushed into the feature extraction model corresponding to the similarity level information for feature extraction to obtain data features to be pushed;
[0022] A feature screening module for obtaining the historical push data features of each generated digital fingerprint, calculating the similarity degree between the data features to be pushed and the historical push data features, determining a candidate historical push data feature set from the historical push data features of each generated digital fingerprint based on the similarity degree, and screening target historical push data features from the candidate historical push data feature set;
[0023] A fingerprint obtaining module, configured to obtain a digital fingerprint corresponding to the target historical push data feature when the target historical push data feature meets the preset fingerprint assignment condition, use the digital fingerprint corresponding to the target historical push data feature as the digital fingerprint corresponding to the data to be pushed, and the digital fingerprint corresponding to the data to be pushed is used to retrieve push data having the same similarity level information as the data to be pushed.
[0024] A computer device includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0025] Obtain data to be pushed and corresponding similarity level information;
[0026] Based on the similarity level information, find the corresponding target feature extraction configuration information from each preset feature extraction configuration information, and the preset feature extraction configuration information includes a feature extraction model corresponding to the preset similarity level information;
[0027] Obtain the feature extraction model corresponding to the similarity level information from the target feature extraction configuration information, input the data to be pushed into the feature extraction model corresponding to the similarity level information for feature extraction, and obtain the data feature to be pushed;
[0028] Obtain the historical push data features of each generated digital fingerprint, calculate the similarity between the data feature to be pushed and the historical push data features, determine a candidate historical push data feature set from the historical push data features of each generated digital fingerprint based on the similarity, and screen the target historical push data features from the candidate historical push data feature set;
[0029] When the target historical push data feature meets the preset fingerprint assignment condition, obtain the digital fingerprint corresponding to the target historical push data feature, use the digital fingerprint corresponding to the target historical push data feature as the digital fingerprint corresponding to the data to be pushed, and the digital fingerprint corresponding to the data to be pushed is used to retrieve push data having the same similarity level information as the data to be pushed.
[0030] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0031] Obtain data to be pushed and corresponding similarity level information;
[0032] Based on the similarity level information, find the corresponding target feature extraction configuration information from each preset feature extraction configuration information, and the preset feature extraction configuration information includes a feature extraction model corresponding to the preset similarity level information;
[0033] Obtain the feature extraction model corresponding to the similarity level information from the target feature extraction configuration information, input the data to be pushed into the feature extraction model corresponding to the similarity level information for feature extraction, and obtain the features of the data to be pushed;
[0034] Obtain the features of each historical push data with a generated digital fingerprint, calculate the similarity between the features of the data to be pushed and the features of the historical push data, determine a candidate set of historical push data features from the features of the historical push data with each generated digital fingerprint based on the similarity, and screen the target historical push data features from the candidate set of historical push data features;
[0035] When the target historical push data features meet the preset fingerprint assignment conditions, obtain the digital fingerprint corresponding to the target historical push data features, and use the digital fingerprint corresponding to the target historical push data features as the digital fingerprint corresponding to the data to be pushed. The digital fingerprint corresponding to the data to be pushed is used to retrieve push data with the same similarity level information as the data to be pushed.
[0036] The above digital fingerprint generation method, device, computer device, and storage medium obtain the similarity level information corresponding to the data to be pushed, search for the corresponding target feature extraction configuration information from each preset feature extraction configuration information based on the similarity level information, and then use the feature extraction model corresponding to the similarity level information in the target feature extraction configuration information to perform feature extraction on the data to be pushed to obtain the features of the data to be pushed, improving the accuracy of obtaining the features of the data to be pushed. Then, use the features of the data to be pushed to calculate the similarity with the features of each historical push data, and screen the target historical push data features from the features of each historical push data based on the similarity, improving the accuracy of the obtained target historical push data features. Then, when the target historical push data features meet the preset fingerprint assignment conditions, use the digital fingerprint corresponding to the target historical push data features as the digital fingerprint corresponding to the data to be pushed, improving the accuracy of the digital fingerprint corresponding to the data to be pushed, that is, assigning the same digital fingerprint to push data with the same similarity level information, thereby improving the accuracy of retrieving push data with the same similarity level information as the data to be pushed.
[0037] A data push method, the method includes:
[0038] Obtain a data push request, which carries an identifier of the data to be pushed and a target push party;
[0039] Obtain the corresponding data to be pushed and the corresponding digital fingerprint to be pushed based on the data identifier to be pushed. The digital fingerprint to be pushed is obtained by acquiring the similarity level information corresponding to the data to be pushed, and searching for the corresponding target feature extraction configuration information from each preset feature extraction configuration information based on the similarity level information; obtaining the feature extraction model corresponding to the similarity level information from the target feature extraction configuration information, inputting the data to be pushed into the feature extraction model corresponding to the similarity level information for feature extraction to obtain the feature of the data to be pushed, acquiring the features of historical push data with generated digital fingerprints, calculating the similarity degree between the feature of the data to be pushed and the features of historical push data, determining a candidate set of historical push data features from the features of historical push data with generated digital fingerprints based on the similarity degree, and screening the target historical push data features from the candidate set of historical push data features; when the target historical push data features meet the preset fingerprint assignment condition, obtaining the digital fingerprint corresponding to the target historical push data features.
[0040] Search for a matching digital fingerprint in the push data digital fingerprint library corresponding to the target push party based on the digital fingerprint of the data to be pushed. When no matching digital fingerprint is found, push the data to be pushed to the target push party.
[0041] A data push generation device, the device includes:
[0042] A request acquisition module, configured to acquire a data push request, where the data push request carries a data identifier to be pushed and a target push party;
[0043] A fingerprint acquisition module, configured to obtain the corresponding data to be pushed and the corresponding digital fingerprint to be pushed based on the data identifier to be pushed. The digital fingerprint to be pushed is obtained by acquiring the similarity level information corresponding to the data to be pushed, and searching for the corresponding target feature extraction configuration information from each preset feature extraction configuration information based on the similarity level information; obtaining the feature extraction model corresponding to the similarity level information from the target feature extraction configuration information, inputting the data to be pushed into the feature extraction model corresponding to the similarity level information for feature extraction to obtain the feature of the data to be pushed, acquiring the features of historical push data with generated digital fingerprints, calculating the similarity degree between the feature of the data to be pushed and the features of historical push data, determining a candidate set of historical push data features from the features of historical push data with generated digital fingerprints based on the similarity degree, and screening the target historical push data features from the candidate set of historical push data features; when the target historical push data features meet the preset fingerprint assignment condition, obtaining the digital fingerprint corresponding to the target historical push data features.
[0044] A push module, configured to search for a matching digital fingerprint in the push data digital fingerprint library corresponding to the target push party based on the digital fingerprint of the data to be pushed. When no matching digital fingerprint is found, push the data to be pushed to the target push party.
[0045] A computer device includes a memory and a processor. The memory stores a computer program. When the processor executes the computer program, the following steps are implemented:
[0046] Obtain a data push request, which carries an identifier of data to be pushed and a target push party;
[0047] Based on the identifier of the data to be pushed, obtain the corresponding data to be pushed and the corresponding digital fingerprint of the data to be pushed. The digital fingerprint of the data to be pushed is obtained by acquiring the similarity level information corresponding to the data to be pushed, and based on the similarity level information, searching for the corresponding target feature extraction configuration information from each preset feature extraction configuration information; obtaining the feature extraction model corresponding to the similarity level information from the target feature extraction configuration information, inputting the data to be pushed into the feature extraction model corresponding to the similarity level information for feature extraction to obtain the feature of the data to be pushed, obtaining the features of historical push data with generated digital fingerprints, calculating the similarity between the feature of the data to be pushed and the features of historical push data, determining a candidate set of historical push data features from the features of historical push data with generated digital fingerprints based on the similarity, and screening the target historical push data features from the candidate set of historical push data features; when the target historical push data features meet the preset fingerprint assignment conditions, obtaining the digital fingerprint corresponding to the target historical push data features;
[0048] Search for a matching digital fingerprint in the push data digital fingerprint library corresponding to the target push party based on the digital fingerprint of the data to be pushed. When no matching digital fingerprint is found, push the data to be pushed to the target push party.
[0049] A computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the following steps are implemented:
[0050] Obtain a data push request, which carries an identifier of data to be pushed and a target push party;
[0051] Obtain the corresponding data to be pushed and the corresponding digital fingerprint to be pushed based on the identifier of the data to be pushed. The digital fingerprint to be pushed is obtained by acquiring the similarity level information corresponding to the data to be pushed, and searching for the corresponding target feature extraction configuration information from each preset feature extraction configuration information based on the similarity level information; obtaining the feature extraction model corresponding to the similarity level information from the target feature extraction configuration information, inputting the data to be pushed into the feature extraction model corresponding to the similarity level information for feature extraction to obtain the feature of the data to be pushed, acquiring the features of historical push data with generated digital fingerprints, calculating the similarity between the feature of the data to be pushed and the features of historical push data, determining a candidate set of historical push data features from the features of historical push data with generated digital fingerprints based on the similarity, and screening the target historical push data features from the candidate set of historical push data features; when the target historical push data features meet the preset fingerprint assignment conditions, the digital fingerprint corresponding to the target historical push data features is obtained.
[0052] Search for a matching digital fingerprint in the push data digital fingerprint library corresponding to the target push party based on the digital fingerprint of the data to be pushed. When no matching digital fingerprint is found, push the data to be pushed to the target push party.
[0053] In the above data push method, device, computer device, and storage medium, by using the digital fingerprint corresponding to the data to be pushed to search for a matching digital fingerprint in the push data digital fingerprint library corresponding to the target push party, when no matching digital fingerprint is found, push the data to be pushed to the target push party. Among them, when the target historical push data features meet the preset fingerprint assignment conditions, the digital fingerprint corresponding to the target historical push data features is used as the digital fingerprint corresponding to the data to be pushed. And the target historical push data features are obtained by feature extraction using the feature extraction model corresponding to the similarity level information of the data to be pushed to obtain the feature of the data to be pushed, and then screening the similarity from the features of historical push data with generated digital fingerprints using the feature of the data to be pushed, thereby improving the accuracy of the obtained digital fingerprint, and further improving the accuracy of matching, making the data push more accurate. Description of the Drawings
[0054] Figure 1 It is an application environment diagram of the digital fingerprint generation method in an embodiment;
[0055] Figure 2 It is a flowchart of the digital fingerprint generation method in an embodiment;
[0056] Figure 3 It is a framework diagram of fingerprint generation service loading in a specific embodiment;
[0057] Figure 4Schematic diagram of configuration file generation in a specific embodiment;
[0058] Figure 5 Flow schematic diagram of feature extraction in an embodiment;
[0059] Figure 6 Flow schematic diagram of training an image feature extraction model in an embodiment;
[0060] Figure 7 Frame schematic diagram of training an image feature extraction model in a specific embodiment;
[0061] Figure 8 Flow schematic diagram of training a video feature extraction model in an embodiment;
[0062] Figure 9 Frame schematic diagram of training a video category prediction model in a specific embodiment;
[0063] Figure 10 Flow schematic diagram of training a text feature extraction model in an embodiment;
[0064] Figure 11 Frame schematic diagram of training a text feature extraction model in a specific embodiment;
[0065] Figure 12 Flow schematic diagram of obtaining digital fingerprints in an embodiment;
[0066] Figure 13 Schematic diagram of similarity retrieval in a specific embodiment;
[0067] Figure 14 Frame schematic diagram of offline generation of digital fingerprints in a specific embodiment;
[0068] Figure 15 Flow schematic diagram of obtaining candidate images in an embodiment;
[0069] Figure 16 Flow schematic diagram of obtaining candidate videos in an embodiment;
[0070] Figure 17 Flow schematic diagram of obtaining candidate texts in an embodiment;
[0071] Figure 18 Flow schematic diagram of obtaining digital fingerprints in another embodiment;
[0072] Figure 19 Frame schematic diagram of retrieval recall in a specific embodiment;
[0073] Figure 20 Flow schematic diagram of obtaining each digital fingerprint in an embodiment;
[0074] Figure 21 It is a schematic flow diagram of data push in an embodiment;
[0075] Figure 22 It is a schematic architecture diagram of an advertisement similarity retrieval system in a specific embodiment;
[0076] Figure 23 It is a structural block diagram of a digital fingerprint generation device in an embodiment;
[0077] Figure 24 It is a structural block diagram of a data push device in an embodiment;
[0078] Figure 25 It is an internal structure diagram of a computer device in an embodiment;
[0079] Figure 26 It is an internal structure diagram of a computer device in an embodiment. Detailed implementation manners
[0080] In order to make the objectives, technical solutions and advantages of this application clearer, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not used to limit this application.
[0081] Computer Vision Technology (CV) Computer vision is a science that studies how to enable machines to "see". Further, it refers to using cameras and computers to replace human eyes for machine vision such as target recognition and measurement, and further performing graphic processing to make the computer process into images that are more suitable for human eyes to observe or transmitted to instruments for detection. As a scientific discipline, computer vision studies related theories and technologies and attempts to establish artificial intelligence systems that can obtain information from images or multi-dimensional data. Computer vision technology usually includes image processing, image recognition, image semantic understanding, image retrieval, OCR, video processing, video semantic understanding, video content / behavior recognition, three-dimensional object reconstruction, 3D technology, virtual reality, augmented reality, simultaneous localization and mapping, autonomous driving, intelligent transportation and other technologies, and also includes common biometric recognition technologies such as face recognition and fingerprint recognition.
[0082] Natural Language Processing (NLP) is an important direction in the fields of computer science and artificial intelligence. It studies various theories and methods that can enable effective communication between humans and computers in natural language. Natural language processing is a science that integrates linguistics, computer science, and mathematics. Therefore, the research in this field will involve natural language, that is, the language people use in daily life, so it has a close connection with the research of linguistics. Natural language processing technologies usually include text processing, semantic understanding, machine translation, robot question answering, knowledge graphs, and other technologies.
[0083] The solution provided by the embodiments of this application involves technologies such as image processing, video processing, and text processing in artificial intelligence, and will be specifically described through the following embodiments:
[0084] The digital fingerprint method provided by this application can be applied to an application environment as Figure 1 shown. Among them, the terminal 102 communicates with the server 104 through the network. The server 104 receives the fingerprint generation instruction sent by the terminal 102, generates fingerprints according to the instruction to obtain the data to be pushed and the corresponding similarity level information; the server 104 searches for the corresponding target feature extraction configuration information from each preset feature extraction configuration information based on the similarity level information, and the preset feature extraction configuration information includes the feature extraction model corresponding to the preset similarity level information; the server 104 obtains the feature extraction model corresponding to the similarity level information from the target feature extraction configuration information, inputs the data to be pushed into the feature extraction model corresponding to the similarity level information for feature extraction, and obtains the features of the data to be pushed; the server 104 obtains the historical push data features of each generated digital fingerprint from the database 106, calculates the similarity between the features of the data to be pushed and the historical push data features, determines the candidate historical push data feature set from the historical push data features of each generated digital fingerprint based on the similarity, and filters the target historical push data features from the candidate historical push data feature set; when the target historical push data features meet the preset fingerprint assignment conditions, the server 104 obtains the digital fingerprint corresponding to the target historical push data features, and uses the digital fingerprint corresponding to the target historical push data features as the digital fingerprint corresponding to the data to be pushed. The digital fingerprint corresponding to the data to be pushed is used to retrieve the push data with the same similarity level information as the data to be pushed. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptop computers, smartphones, tablet computers, and portable wearable devices, and the server 104 can be implemented by an independent server or a server cluster composed of multiple servers.
[0085] In one embodiment, as Figure 2 shown, a digital fingerprint generation method is provided. This method is applied to Figure 1Taking the server in as an example for illustration, it can be understood that this method can also be applied to a terminal, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the following steps are included:
[0086] Step 202, obtain the data to be pushed and the corresponding similarity level information.
[0087] Among them, the data to be pushed refers to the push data for which digital fingerprints need to be generated. This push data can be unimodal data, multimodal data, or cross-modal data, that is, the data to be pushed can include at least one of image data, text data, and video data. The push data refers to the data that can be pushed to the user. For example, the push data can be advertisements, products, news, etc. Then the data to be pushed can be advertisements, products, news, etc. that need to generate digital fingerprints. The similarity level information is used to characterize the similarity level corresponding to the data to be pushed, and different similarity levels are used to characterize different degrees of similarity. The similarity levels can include exactly the same, visually the same, visually similar, and semantically similar, etc. Among them, exactly the same means that the MD5 (Message-Digest Algorithm, a widely used cryptographic hash function that can produce a 128-bit (16-byte) hash value to ensure the integrity and consistency of information transmission) of the push data is the same, that is, the same data. Visually the same means that the push data looks extremely similar visually, with only minor differences, such as minor differences in subtitles / logos, etc., and minor differences in borders / occlusions / croppings, etc. Visually similar means that the push data looks relatively similar visually, such as larger differences in layout / special effects / background colors, etc., and larger differences in borders / occlusions / croppings, etc. Semantically similar means that only the core content in the push data is the same. For example, the same model of product, etc.
[0088] Specifically, the server can directly obtain the data to be pushed and the corresponding similarity level information from the database, and the similarity level information can be pre-set. Among them, different modalities of data in the data to be pushed can have different similarity levels. The server can also obtain the data to be pushed and the corresponding similarity level information from the business party. The server can also obtain the data to be pushed and the corresponding similarity level information input by the user through the terminal.
[0089] Step 204, based on the similarity level information, search for the corresponding target feature extraction configuration information from each preset feature extraction configuration information, and the preset feature extraction configuration information includes the feature extraction model corresponding to the preset similarity level information.
[0090] Among them, the preset feature extraction configuration information refers to the information pre-configured for feature extraction. Different preset feature extraction configuration information is configured with feature extraction models corresponding to different similarity level information. The preset similarity level information refers to the similarity level information associated with the feature extraction model configured in the preset feature extraction configuration information. Different feature extraction models are used for feature extraction of the data to be pushed corresponding to different similarity level information. The feature extraction model refers to an artificial intelligence model for feature extraction of the data to be pushed, which is pre-trained. Different modalities of data can correspond to different feature extraction models.
[0091] Specifically, the server searches in each preset feature extraction configuration information for the preset feature extraction configuration information with the same similarity level information as that corresponding to the data to be pushed, and takes the preset feature extraction configuration information with the same similarity level information as the target feature extraction configuration information. The preset feature extraction configuration information includes the feature extraction model corresponding to the preset similarity level information.
[0092] Step 206: Obtain the feature extraction model corresponding to the similarity level information from the target feature extraction configuration information, and input the data to be pushed into the feature extraction model corresponding to the similarity level information for feature extraction to obtain the features of the data to be pushed.
[0093] Among them, the features of the data to be pushed are used to characterize the features extracted from the data to be pushed and can be represented by vectors.
[0094] Specifically, the server obtains the feature extraction model corresponding to the similarity level information from the target feature extraction configuration information. In one embodiment, the target feature extraction configuration information is configured with the call information of the feature extraction model, and the feature extraction model can be called through the call information. In one embodiment, the target feature extraction configuration information is configured with third-party service information, and the feature extraction service is obtained through the third-party service information, and the feature extraction model is obtained through the feature extraction service. Then, the data to be pushed is input into the feature extraction model corresponding to the similarity level information for feature extraction to obtain the output features of the data to be pushed. Among them, when the data to be pushed includes different modalities of data, the data of different modules can be input into the corresponding feature extraction models in parallel for feature extraction to obtain the output features of the data to be pushed.
[0095] Step 208: Obtain the historical push data features with generated digital fingerprints, calculate the similarity degree between the features of the data to be pushed and the historical push data features, determine a candidate set of historical push data features from the historical push data features with generated digital fingerprints based on the similarity degree, and screen the target historical push data features from the candidate set of historical push data features.
[0096] Among them, the historical push data feature refers to the feature corresponding to the push data for which digital fingerprints have been generated in history. The similarity degree is used to represent the similarity between the to-be-pushed data and the historical push data. The higher the similarity degree, the more similar the to-be-pushed data is to the historical push data. The candidate historical push data feature set refers to the set of historical push data features that are filtered according to the similarity degree and need to be further filtered.
[0097] Specifically, the server can directly obtain the historical push data features of each generated digital fingerprint from the database. The historical push data feature is obtained and saved by feature extraction when the historical push data generates numerical fingerprints. The server uses a similarity algorithm to calculate the similarity degree between the to-be-pushed data feature and the historical push data feature. The similarity algorithm can be a distance similarity algorithm, a cosine similarity algorithm, etc. Then, according to the size of the similarity degree, it filters from the historical push data features of each generated digital fingerprint to obtain a candidate historical push data feature set, and then filters the target historical push data features from the candidate historical push data feature set.
[0098] Step 210, when the target historical push data feature meets the preset fingerprint assignment condition, obtain the digital fingerprint corresponding to the target historical push data feature, and use the digital fingerprint corresponding to the target historical push data feature as the digital fingerprint corresponding to the to-be-pushed data. The digital fingerprint corresponding to the to-be-pushed data is used to retrieve the push data with the same similarity level information as the to-be-pushed data.
[0099] Among them, the preset fingerprint assignment condition refers to the pre-set fingerprint assignment condition, which may include that the similarity threshold corresponding to the target historical push data feature exceeds the preset threshold.
[0100] Specifically, when the server determines that the target historical push data feature meets the preset fingerprint assignment condition, it indicates that the to-be-pushed data and the historical push data corresponding to the target historical push data feature belong to the same similarity level. At this time, the server obtains the digital fingerprint corresponding to the target historical push data feature and uses the digital fingerprint corresponding to the target historical push data feature as the digital fingerprint corresponding to the to-be-pushed data. The digital fingerprint corresponding to the to-be-pushed data is used to retrieve the push data with the same similarity level information as the to-be-pushed data, and then the retrieved push data with the same similarity level information can be sent to the retriever. In one embodiment, the server can use the digital fingerprint corresponding to the to-be-pushed data to retrieve the push data with the same similarity level information as the to-be-pushed data, and then calculate the freshness of the push data to determine whether to push the to-be-pushed data.
[0101] The above digital fingerprint generation method obtains the similarity level information corresponding to the data to be pushed, searches for the corresponding target feature extraction configuration information from each preset feature extraction configuration information based on the similarity level information, and then uses the feature extraction model corresponding to the similarity level information in the target feature extraction configuration information to extract features from the data to be pushed, obtaining the features of the data to be pushed, improving the accuracy of obtaining the features of the data to be pushed. Then, it calculates the similarity degree between the features of the data to be pushed and the features of each historical pushed data, and filters out the target historical pushed data features from the features of each historical pushed data through the similarity degree, improving the accuracy of the obtained target historical pushed data features. Then, when the target historical pushed data features meet the preset fingerprint assignment conditions, the digital fingerprint corresponding to the target historical pushed data features is used as the digital fingerprint corresponding to the data to be pushed, improving the accuracy of the digital fingerprint corresponding to the data to be pushed, that is, pushing data with the same similarity level information is assigned the same digital fingerprint, thereby improving the accuracy of retrieving pushed data with the same similarity level information as the data to be pushed.
[0102] In one embodiment, obtaining the data to be pushed and the corresponding similarity level information includes:
[0103] Obtaining the fingerprint generation service image address, loading the fingerprint generation service based on the fingerprint generation service image address. The fingerprint generation service includes each preset feature extraction configuration information. The fingerprint generation service is started through a preset script file, and the data to be pushed and the corresponding similarity level information are obtained through the fingerprint generation service.
[0104] Among them, the fingerprint generation service image address refers to the address where the fingerprint generation service image is stored. The fingerprint generation service refers to the service used for fingerprint generation. The preset script file refers to the script preset for service startup.
[0105] Specifically, the business party can first merge each preset feature extraction configuration information and the fingerprint generation service into a fingerprint generation service image, push the fingerprint generation service image to the cloud platform for storage, and save the fingerprint generation service image address. Then, when needed, the server obtains the fingerprint generation service image address, pulls the fingerprint generation service from the fingerprint generation service image address and loads the fingerprint generation service. The fingerprint generation service includes each preset feature extraction configuration information. The process corresponding to the fingerprint generation service is started through a preset script file, and the data to be pushed and the corresponding similarity level information are obtained through the fingerprint generation service process, thereby performing fingerprint generation.
[0106] In a specific embodiment, such as Figure 3As shown in the figure, it is a schematic diagram of the framework loaded for the fingerprint generation service. Among them, the business party provides various fingerprint generation schemes. Through various fingerprint generation schemes, the configuration information module, and the inference of the DAG (Directed Acyclic Graph), various feature extraction configuration information is generated. This feature extraction configuration information can be schema (xml format file) configuration, such as Figure 4 As shown in the figure, it is a schematic diagram of the generation of N schema configuration files. Among them, L0 represents completely the same, L1 represents visually the same, L2 represents visually similar, and L3 represents semantically similar. Images, videos, and texts can have corresponding similarity levels and feature extraction models. Then, the configured feature extraction configuration information is pushed to the configuration center. The operator pulls the schema configuration and various services from the configuration center, combines and packages them into a docker (an open-source application container engine that allows developers to package their applications and dependent packages into a portable image, and then publish it to any popular Linux or Windows machine, and can also achieve virtualization) image and pushes it to the cloud platform. The server is equipped with a docker client that can pull the feature extraction configuration information and the fingerprint generation service from the cloud platform in real time and load them. Then, the fingerprint generation service process is started through a script in the docker running environment. It is also possible to pull and load the similarity retrieval service, and start the similarity retrieval service process through a script in the docker running environment.
[0107] In one embodiment, obtaining the data to be pushed and the corresponding similarity level information includes the steps of:
[0108] Obtaining a retrieval request for the data to be pushed, where the retrieval request for the data to be pushed carries an identifier of the data to be pushed; searching for the corresponding digital fingerprint in a preset fingerprint cache based on the identifier of the data to be pushed. When the digital fingerprint corresponding to the identifier of the data to be pushed is not found, obtaining the data to be pushed and the corresponding similarity level information based on the identifier of the data to be pushed.
[0109] Among them, the retrieval request for the data to be pushed refers to a request for retrieving similar push data for the data to be pushed. The identifier of the data to be pushed is used to uniquely identify the data to be pushed. The preset fingerprint cache stores each generated digital fingerprint and the corresponding identifier of the data to be pushed, which can be a distributed cache. In a specific embodiment, this distributed cache is a distributed K-V data storage engine. By using the table name + key (key), the uniquely corresponding value can be returned. When the value does not exist, a null (empty) value is returned. In this article, the table name is obtained by loading the schema configuration file, the key is the unique identifier field of the advertisement - the identifier of the data to be pushed, and the value is the digital fingerprint corresponding to the identifier of the data to be pushed.
[0110] Specifically, the server obtains a data retrieval request to be pushed sent by the user terminal. The data retrieval request to be pushed carries an identifier of the data to be pushed. The server parses the data retrieval request to be pushed to obtain the identifier of the data to be pushed, and then uses the identifier of the data to be pushed to look up the corresponding digital fingerprint in the preset fingerprint cache. When the corresponding digital fingerprint is found, it indicates that the digital fingerprint of the data to be pushed has been generated and does not need to be regenerated. At this time, the server responds to the data retrieval request to be pushed for similarity retrieval. When the digital fingerprint corresponding to the identifier of the data to be pushed is not found, it indicates that the digital fingerprint of the data to be pushed has not been generated. At this time, the digital fingerprint needs to be generated first before similarity retrieval can be performed. At this time, the server can obtain the data to be pushed and the corresponding similarity level information through the identifier of the data to be pushed. By using the distributed cache to determine whether the digital fingerprint has been generated, the generation of digital fingerprints for the pushed data whose digital fingerprints have already been generated is avoided, saving server resources.
[0111] In one embodiment, the data to be pushed includes at least one of image data, video data, and text data, and the similarity level information includes at least one of an image similarity level, a video similarity level, and a text similarity level;
[0112] Step 204, that is, based on the similarity level information, looking up the corresponding target feature extraction configuration information from each preset feature extraction configuration information, includes the steps of:
[0113] Looking up the same similarity level information from the preset similarity level information in each preset feature extraction configuration information based on at least one of the image similarity level, the video similarity level, and the text similarity level, and using the preset feature extraction configuration information corresponding to the same similarity level information as the target feature extraction configuration information. The target feature extraction configuration information includes at least one of the feature extraction models corresponding to the image similarity level, the video similarity level, and the text similarity level.
[0114] Among them, image data refers to data of the image type. Video data refers to data of the video type, and text data refers to data of the text type. The image similarity level refers to the similarity level corresponding to the image data. The video similarity level refers to the similarity level corresponding to the video data. The text similarity level refers to the similarity level corresponding to the text data. The image similarity level, the video similarity level, and the text similarity level respectively correspond to feature extraction models.
[0115] Specifically, when the data to be pushed is unimodal data, such as image data, the preset similarity level information with only this image similarity level is searched from the preset similarity level information in each preset feature extraction configuration information through the image similarity level. That is, the obtained target feature extraction configuration information includes the image similarity level and the corresponding image feature extraction model. When the data to be pushed is multimodal data, for example, the data to be pushed includes image data and video data, the preset similarity level information with only this image similarity level and video similarity level is searched from the preset similarity level information in each preset feature extraction configuration information through the image similarity level corresponding to the image data and the video similarity level corresponding to the video data. The obtained target feature extraction configuration information includes the image similarity level and the corresponding image feature extraction model, as well as the video similarity level and the corresponding video feature extraction model. When the data to be pushed includes image data, video data, and text data, the preset similarity level information including the image similarity level, video similarity level, and text similarity level is searched from the preset similarity level information in each preset feature extraction configuration information through the image similarity level corresponding to the image data, the video similarity level corresponding to the video data, and the text similarity level corresponding to the text data. The obtained target feature extraction configuration information includes the image similarity level and the corresponding image feature extraction model, the video similarity level and the corresponding video feature extraction model, as well as the text similarity level and the corresponding text feature extraction model.
[0116] In the above embodiment, the target feature extraction configuration information is found from each preset feature extraction configuration information through the data to be pushed including different modal data. The target feature extraction configuration information includes the feature extraction model corresponding to each modal data. Then, the feature extraction model corresponding to each modal data is used for feature extraction, so that the extracted features can be more accurate.
[0117] In one embodiment, as Figure 5 shown, step 202, that is, obtaining the feature extraction model corresponding to the similarity level information from the target feature extraction configuration information, and inputting the data to be pushed into the feature extraction model corresponding to the similarity level information for feature extraction to obtain the features of the data to be pushed, includes:
[0118] Step 502, obtaining the feature extraction model corresponding to at least one of the image similarity level, video similarity level, and text similarity level from the target feature extraction configuration information.
[0119] Among them, different modal data in the data to be pushed can have different similarity levels or the same similarity level.
[0120] Specifically, the target feature extraction configuration information in the server obtains the feature extraction model to be used for feature extraction. When the data to be pushed is image data, the image feature extraction model corresponding to the image similarity level is obtained from the target feature extraction configuration information and is used to perform feature extraction on the image data. When the data to be pushed includes image data and text data, the image feature extraction model corresponding to the image similarity level and the text feature extraction model corresponding to the text similarity level are obtained from the target feature extraction configuration information and are used to perform feature extraction on the image data and the text data respectively. When the data to be pushed includes image data, video data, and text data, the image feature extraction model corresponding to the image similarity level, the video feature extraction model corresponding to the video similarity level, and the text feature extraction model corresponding to the text similarity level are obtained from the target feature extraction configuration information and are used to perform feature extraction on the image data, the video data, and the text data respectively.
[0121] Step 504, input the image data into the feature extraction model corresponding to the image similarity level to perform image feature extraction, and obtain image features; and / or
[0122] Among them, the image features are used to characterize the features corresponding to the image data in the data to be pushed.
[0123] Specifically, the server can perform feature extraction in parallel. That is, different data in the data to be pushed are simultaneously input into the corresponding feature extraction models for feature extraction. For example, the image data can be input into the feature extraction model corresponding to the image similarity level to perform image feature extraction, and obtain image features.
[0124] Step 506, input the video data into the feature extraction model corresponding to the video similarity level to perform video feature extraction, and obtain video features; and / or
[0125] Step 508, input the text data into the feature extraction model corresponding to the text similarity level to perform text feature extraction, and obtain text features.
[0126] Among them, the video features are used to characterize the features corresponding to the video data in the data to be pushed. The image features are used to characterize the features corresponding to the image data in the data to be pushed. The text features are used to characterize the features corresponding to the text data in the data to be pushed.
[0127] Specifically, the server can perform feature extraction in parallel. That is, different data in the data to be pushed are simultaneously input into the corresponding feature extraction models for feature extraction. For example, when the data to be pushed includes image data, video data, and text data, the image data can be input into the feature extraction model corresponding to the image similarity level for image feature extraction to obtain the output image features. At the same time, the video data is input into the feature extraction model corresponding to the video similarity level for video feature extraction to obtain the output video features. At the same time, the text data is input into the feature extraction model corresponding to the text similarity level for text feature extraction to obtain the output text features.
[0128] In the above embodiment, by inputting data of different modalities in the data to be pushed into the feature extraction models of the same similarity level for feature extraction, the extracted features are made more accurate.
[0129] In one embodiment, as Figure 6 shown, the generation of the feature extraction model corresponding to the image similarity level includes the following steps:
[0130] Step 602, obtain a training image set, where the training image set includes training images and corresponding image class labels, and the training images in the training image set have the same image similarity level.
[0131] Among them, a training image refers to an image used when training an image feature extraction model. The image class label is used to represent the true class of the content in the image. For example, categories such as cats and cars in the image. The training images in the training image set are all images of the same similarity level. For example, the images in the training image set are all semantically similar images, or visually identical images, or exactly the same images, or visually similar images.
[0132] Specifically, the server can obtain the training image set from a database, or from a third party providing data services, or from the business side, or can collect the training image set from the Internet.
[0133] Step 604, determine the current training image from the training image set, input the current training image into the initial image class prediction model, the initial image class prediction model outputs an initial image representation through an image feature extraction network, and based on the initial image representation, perform image class prediction to obtain the initial image class.
[0134] Among them, the current training image refers to the image used during the current training. The initial image category prediction model is the image category prediction model with initialized model parameters. The image category prediction model is a model used to predict the content category in an image and is established through a neural network algorithm. For example, it can be established using CNN (Convolutional Neural Networks). The image feature extraction network is a neural network for image feature extraction and is the network in the image category prediction model before classification. The initial image representation refers to the image features output by the initial image classification network. The initial image category refers to the image category output by the initial image category prediction model.
[0135] Specifically, the server sequentially takes each training image in the training image set as the current training image and inputs the current training image into the initial image category prediction model. The initial image category prediction model outputs the initial image representation through the image feature extraction network, predicts the image category based on the initial image representation, and obtains the initial image category.
[0136] Step 606: Calculate the error between the initial image category and the image category label, update the initial image category prediction model based on the error, and return to execute the step of inputting the current training image into the initial image category prediction model until the image training completion condition is reached, and obtain the image category prediction model corresponding to the image similarity level.
[0137] Specifically, the server uses a classification loss function to calculate the error between the initial image category and the image category label. Among them, the classification loss function can use the cross-entropy loss function. Then, use the gradient descent algorithm to update the parameters in the initial image category prediction model in reverse, and return to execute the step of inputting the current training image into the initial image category prediction model until the image training completion condition is reached, and obtain the image category prediction model corresponding to the image similarity level. The image training completion conditions include that the training reaches the maximum number of iterations, the error obtained from the training is less than the preset threshold, the model parameters no longer change, and so on.
[0138] Step 608: Obtain the image feature extraction model corresponding to the image similarity level based on the image feature extraction network in the image category prediction model.
[0139] Specifically, the server uses the image feature extraction network in the trained image category prediction model as the image feature extraction model corresponding to the image similarity level. Then, by using training images of different image similarity levels to train and obtain image category prediction models corresponding to different image similarity levels, and further obtain image feature extraction models corresponding to different image similarity levels, and then perform subsequent use.
[0140] In the above embodiments, the feature extraction model corresponding to the same image similarity level is trained by using the training images corresponding to the same image similarity level, so as to improve the accuracy when the obtained feature extraction model extracts features from the images of this image similarity level.
[0141] In a specific embodiment, as Figure 7 shown, it is a schematic framework diagram for training an image feature extraction model. The image classification prediction model includes a preprocessing layer, a convolutional layer, a pooling layer, a fully connected layer, and a normalization layer. During training, a training image is obtained, and the image category label corresponding to the training image is a dog. The training image is input into the preprocessing layer for edge detection to obtain an edge detection map. The edge detection map is input into the convolutional layer for feature detection. Among them, feature extraction detection can be performed through three feature detectors of the dog's ears, nose, and back to obtain three feature maps. The three feature maps are input into the pooling layer for feature compression. The feature compression result is input into the fully connected layer for feature summation and aggregation to obtain a feature vector. Then, the feature vector is input into the normalization layer for classification prediction to obtain a training result. Then, loss calculation is performed through the training result and the training label, and the model parameters are updated backward until the training is completed to obtain an image classification prediction model. Then, the preprocessing layer, convolutional layer, pooling layer, and fully connected layer in the image classification prediction model are used as the image feature extraction model for subsequent use.
[0142] In an embodiment, as Figure 8 shown, the generation of the feature extraction model corresponding to the video similarity level includes the following steps:
[0143] Step 802, obtain a training video set. The training video set includes training videos and corresponding video category labels, and the training videos in the training video set have the same video similarity level.
[0144] Among them, the training video refers to the video used when training the video feature extraction model. The video category label is used to characterize the true category of the content in the video. For example, categories such as cats, cars, dogs, and people in the video. The training videos in the training video set are all videos of the same video similarity level. For example, the videos in the training video set are all semantically similar videos, or visually identical videos, or exactly the same videos, or visually similar videos.
[0145] Specifically, the server can obtain the training video set from a database, or obtain the training video set from a third party providing data services, or obtain the training video set from the business side, or collect the training video set from the Internet.
[0146] Step 804: Determine the current training video from the training video set, and extract video frames from the current training video at a preset time interval to obtain a video frame sequence.
[0147] Herein, the current training video refers to the video used during the current training. The video frame sequence refers to a sequence composed of video frames.
[0148] Specifically, the server sequentially takes each training video in the training video set as the current video. Extract video frames from the current training video at a preset time interval, and form a video frame sequence with the extracted video frames. Among them, the server can group the extracted video frames, partition the video frames in each group to obtain each video frame region, so as to obtain a video frame region sequence.
[0149] Step 806: Input the video frame sequence into the initial video category prediction model. The initial video category prediction model maps the video frame sequence through the initial mapping network to obtain initial mapping features, inputs the mapping features into the initial attention encoding network for attention encoding to obtain initial video features, and inputs the initial video features into the initial classification network for classification to obtain the initial video category.
[0150] Herein, the initial video category prediction model is a video category prediction model with initialized model parameters. The video category prediction model is a model used for predicting the content category in a video, and can extract spatial and temporal features. The initial mapping network refers to the initialized mapping network, and the mapping network is used to map video frames into position embeddings. The initial mapping features refer to the features obtained after being mapped by the initial mapping network. The initial video features refer to the video features obtained after being subjected to attention encoding by the initial attention encoding network. The initial video category refers to the video category obtained after being classified by the initial classification network.
[0151] Specifically, the server inputs the video frame sequence into the initial video category prediction model, which includes an initial mapping network, an initial attention encoding network, and an initial classification network. Thus, the output initial video category is obtained. Among them, spatial and temporal features can be extracted through the attention encoding network.
[0152] Step 808: Calculate the error between the initial video category and the video category label, update the initial video category prediction model based on the error, and return to execute the step of determining the current training video from the training video set until the video training completion condition is reached, and obtain the video category prediction model corresponding to the video similarity level.
[0153] Specifically, the server calculates the error between the initial video category and the video category label using a classification loss function, and then uses the gradient descent algorithm to update the parameters in the initial video category prediction model in reverse to obtain an updated video category prediction model. Then, the updated video category prediction model is used as the initial video category prediction model, and the step of determining the current training video from the training video set is executed until the video training completion condition is reached, and a video category prediction model corresponding to the video similarity level is obtained. The video training completion condition can be that the training reaches the maximum number of iterations, the training error is less than a preset threshold, and the model parameters no longer have errors, etc.
[0154] Step 810: Obtain a feature extraction model corresponding to the video similarity level based on the mapping network and the attention encoding network in the video category prediction model.
[0155] Specifically, the server uses the mapping network and the attention encoding network in the video category prediction model as the feature extraction model corresponding to the video similarity level. Then, different video category prediction models corresponding to different video similarity levels are trained by using training videos of different video similarity levels, and then feature extraction models corresponding to different video similarity levels are obtained, and then subsequent use is carried out.
[0156] In the above embodiment, by using the training videos corresponding to the same video similarity level to train and obtain the feature extraction model corresponding to this video similarity level, the accuracy of the obtained feature extraction model for extracting features from videos of this video similarity level is improved.
[0157] In a specific embodiment, as Figure 9 shown, it is a schematic diagram of the framework for training the video category prediction model. Among them, one frame is extracted from the training video every N minutes, and then the video frames are grouped. The video frames in each group are partitioned, and the corresponding areas of each group of video frames are mapped into a tensor. This tensor refers to position + token Embedding (position + marker embedding). Then, after multiple attention merges in the Transformer (an encoder-decoder architecture model in computer vision), finally, the output is converted into the probability of predicting each video category through the MLP network to obtain the output video category. Then, the error between the output video category and the category label of the training video is calculated, and the video category prediction model is updated in reverse according to the error until the training is completed. The mapping network and the Transformer network in the trained video category prediction model are used as the video feature extraction model.
[0158] In an embodiment, as Figure 10 shown, the generation of the feature extraction model corresponding to the text similarity level includes the following steps:
[0159] Step 1002: Obtain a training text set, where the training text set includes text triples. A text triple includes a target text, a positive text, and a negative text. The target text and the positive text in the text triple have the same text similarity level.
[0160] Among them, a text triple refers to the text used when training a text feature extraction model. The target text and the positive text in the text triple are texts of the same similarity level, that is, texts of the same category. The negative text is a text that is different from the target text or the positive text, that is, the negative text is not similar to the target text or the positive text. The target text and the positive text in each text triple in the training text set are texts of the same similarity level.
[0161] Specifically, the server can obtain the training text set from a database, or obtain the training text set from a third party providing data services, or obtain the training text set from a business party, or collect the training text set from the Internet. In one embodiment, the server can establish text triples from the retrieval recall data set obtained by an existing retrieval system to obtain the training text set.
[0162] Step 1004: Input the text triple into the initial text feature extraction model for feature extraction to obtain target text features, positive text features, and negative text features.
[0163] Among them, the initial text feature extraction model refers to a text feature extraction model with initialized model parameters. The text feature extraction model is used to extract features from text and is obtained through a text vectorization network. For example, an initial text feature extraction model can be established using the BERT (Bidirectional Encoder Representations from Transformers) algorithm. Target text features refer to the features extracted through the initial text feature extraction model. Positive text features are the features extracted through the initial text feature extraction model. Negative text features are the features extracted through the initial text feature extraction model.
[0164] Specifically, the server sequentially inputs the text triples in the training text set into the initial text feature extraction model for feature extraction to obtain the output target text features, positive text features, and negative text features.
[0165] Step 1006: Obtain the positive retrieval similarity and negative retrieval similarity corresponding to the text triple.
[0166] Specifically, the positive retrieval similarity refers to the similarity between the target text and the positive text obtained through similarity retrieval by an existing retrieval system. The negative retrieval similarity refers to the similarity between the target text and the negative text obtained through similarity retrieval by an existing retrieval system. Among them, the existing retrieval system can be an ElasticSearch (a search server based on Lucene. It provides a full-text search engine with distributed multi-user capabilities) retrieval system, and the recall score corresponding to ElasticSearch is used as the corresponding retrieval similarity. Among them, the scoring formula of ElasticSearch can be used to calculate the recall score between the target text and the positive text as the positive retrieval similarity, and calculate the recall score between the target text and the negative text as the negative retrieval similarity. The scoring formula of ElasticSearch can be shown as the following formula (1);
[0167]
[0168] Among them, score(q, d) represents the recall score between two texts, that is, the degree of similarity. coord(q, d) represents the coordination factor. queryNorm(q) represents the query norm, tf represents the term frequency, idf represents the inverse document frequency, boost represents the term weight, and norm represents the length norm. In one embodiment, the normalized value of the recall score corresponding to ElasticSearch can also be used as the corresponding retrieval similarity. The retrieval similarity can be obtained using the following formula (2).
[0169]
[0170] Among them, Es_normed represents the retrieval similarity obtained by normalization. ES represents the recall score, and max_score represents the recall score obtained when the text matches itself.
[0171] Step 1008, calculate the similarity distance between the target text feature and the positive text feature to obtain the positive distance similarity, and calculate the similarity distance between the target text feature and the positive text feature to obtain the negative distance similarity.
[0172] Specifically, the server uses the distance similarity algorithm to calculate the similarity between the target text feature and the positive text feature to obtain the positive distance similarity, which is used to represent the similarity degree between the target text and the positive text. At the same time, the distance similarity algorithm is used to calculate the similarity distance between the target text feature and the positive text feature to obtain the negative distance similarity, which is used to represent the similarity degree between the target text and the negative text. Among them, the distance similarity algorithm can use the L2 norm algorithm.
[0173] Step 1010: Calculate the triple loss based on the positive retrieval similarity, negative retrieval similarity, positive distance similarity, and negative distance similarity to obtain the initial loss information corresponding to the text triple.
[0174] Specifically, the server calculates the error between the positive retrieval similarity and the positive distance similarity, calculates the error between the negative retrieval similarity and the negative distance similarity, and then calculates the sum of the errors to obtain the initial loss information corresponding to the text triple.
[0175] Step 1012: Update the initial text feature extraction model based on the initial loss information, and return to iterate the steps of obtaining the text triple until the text training completion condition is reached, and obtain the text feature extraction model corresponding to the text similarity level.
[0176] Specifically, the server uses the initial loss information to update the initial text feature extraction model backward according to the gradient descent algorithm to obtain the updated text feature extraction model, and takes the updated text feature extraction model as the initial text feature extraction model and returns to iterate the steps of obtaining the text triple until the text training completion condition is reached, and obtain the text feature extraction model corresponding to the text similarity level. Then, by using the training text sets of different similarity levels to train, the text category prediction models corresponding to different text similarity levels are obtained, and further the text feature extraction models corresponding to different text similarity levels are obtained, and then the subsequent use is carried out.
[0177] In the above embodiment, by using the training text set corresponding to the same similarity level to train and obtain the text feature extraction model corresponding to this similarity level, the accuracy of the obtained text feature extraction model for feature extraction of the text of this similarity level is improved.
[0178] In one embodiment, the training steps of the text feature extraction model can also be used to train the image feature extraction model and the video feature extraction model. For example, obtain a training image set, where the training image set includes various image triples, and an image triple includes a target image, a positive image, and a negative image; the target image and the positive image in the image triple have the same text similarity level. Input the image triple into the initial image feature extraction model for feature extraction to obtain the target image feature, the positive image feature, and the negative image feature. Obtain the positive retrieval similarity and the negative retrieval similarity corresponding to the image triple. Calculate the similarity distance between the target image feature and the positive image feature to obtain the positive distance similarity, and calculate the similarity distance between the target image feature and the negative image feature to obtain the negative distance similarity. Calculate the image triple loss based on the positive retrieval similarity, the negative retrieval similarity, the positive distance similarity, and the negative distance similarity to obtain the initial loss information corresponding to the image triple. Update the initial image feature extraction model based on the initial loss information, and return to the step of obtaining the image triple and iterate until the image training completion condition is reached to obtain the image feature extraction model corresponding to the image similarity level. In one embodiment, the training steps of the image feature extraction model can also be used to train the text feature extraction model.
[0179] In a specific embodiment, as Figure 11 shown, it is a schematic framework diagram for training the text feature extraction model. Among them, input the target text, the positive text, and the negative text into the initial text feature extraction model. First, vectorize the text through BERT, that is, the vectorization network, and then perform pooling through the pooling layer to obtain the output feature vector. Then, calculate the loss based on the feature vector, update the initial text feature extraction model according to the initial loss information, and when the training is completed, obtain the text feature extraction model based on the vectorization network and the pooling layer.
[0180] In one embodiment, step 1010, that is, calculating the triple loss based on the positive retrieval similarity, the negative retrieval similarity, the positive distance similarity, and the negative distance similarity to obtain the initial loss information corresponding to the text triple, includes:
[0181] Calculate the error between the positive retrieval similarity and the positive distance similarity to obtain the positive error information, and calculate the negative error information of the negative retrieval similarity and the negative distance similarity; calculate the sum of the positive error information and the negative error information to obtain the initial loss information corresponding to the text triple.
[0182] Specifically, the positive error information is used to represent the error between the positive retrieval similarity and the positive distance similarity, and the negative error information is used for the error between the negative retrieval similarity and the negative distance similarity. In a specific embodiment, it can be calculated using formula (3) shown below.
[0183]
[0184] Among them, a represents the target text, p represents the positive text, and n represents the negative text. ES(a, p) represents the positive retrieval similarity, ES(a, n) represents the negative retrieval similarity, d(a, p) represents the positive distance similarity, and d(a, n) represents the negative distance similarity.
[0185] In the above embodiment, by calculating the positive error information and the negative error information, the initial loss information corresponding to the text triple is obtained, that is, during the training process, the training result approaches the retrieval result, so that the trained text feature extraction model is more accurate.
[0186] In one embodiment, at least two historical push data center features are included in the features of the historical push data with generated digital fingerprints.
[0187] Such as Figure 12 As shown, in step 208, calculate the similarity between the feature of the data to be pushed and the features of the historical push data, and determine a candidate set of historical push data features from the features of the historical push data with generated digital fingerprints based on the similarity, and screen the target historical push data features from the candidate set of historical push data features, including:
[0188] Step 1202, calculate the central similarity between the feature of the data to be pushed and at least two historical push data center features, and select the first target number of historical push data center features from at least two historical push data center features based on the central similarity.
[0189] Among them, the historical push data center feature refers to the feature corresponding to the historical push data category center. The historical push data center feature is obtained by clustering the features of the historical push data with generated digital fingerprints, and then the historical push data center feature is used as an index for similarity retrieval. Each historical push data center feature is used to represent the historical push data features of the same class.
[0190] Specifically, the server uses a similarity algorithm to calculate the similarity between the feature of the data to be pushed and each historical push data center feature, so as to obtain the central similarity. Then, each historical push data center feature is sorted from large to small in turn according to the central similarity, and then the first target number of historical push data center features are selected from large to small in turn. The first target number refers to the number of historical push data center features to be selected, which is set in advance. For example, the top 5 historical push data center features can be selected.
[0191] Step 1204: Obtain a historical push data feature set associated with the first target number of historical push data center features, calculate the feature similarity degree between the data features to be pushed and the historical push data features in the historical push data feature set, and select the second target number of historical push data features from the historical push data feature set based on the feature similarity degree to obtain a candidate historical push data feature set.
[0192] Among them, the historical push data feature set refers to the set of historical push data features corresponding to all the first target number of historical push data center features. Each historical push data center feature corresponds to a set of historical push data features of the same type.
[0193] Specifically, the server obtains the historical push data feature set associated with the selected first target number of historical push data center features, that is, for each selected historical push data center feature, the corresponding set of historical push data features of the same type is obtained. Then, calculate the feature similarity degree between the data features to be pushed and each historical push data feature in each historical push data feature set, and then sort each historical push data feature in descending order according to the feature similarity degree, and sequentially select the second target number of historical push data features from each historical push data feature set in descending order, and merge all the selected second target number of historical push data features to obtain a candidate historical push data feature set. The second target number refers to the number of candidate historical push data features to be selected from the historical push data feature set.
[0194] Step 1206: Determine the historical push data feature corresponding to the maximum feature similarity degree from the candidate historical push data feature set based on the feature similarity degree, and use the historical push data feature corresponding to the maximum feature similarity degree as the target historical push data feature.
[0195] Specifically, the server selects the historical push data feature corresponding to the maximum feature similarity degree as the target historical push data feature based on the feature similarity degree between the data features to be pushed and each candidate historical push data feature in the candidate historical push data feature set.
[0196] Step 210: When the target historical push data feature meets the preset fingerprint assignment condition, obtain the digital fingerprint corresponding to the target historical push data feature, and use the digital fingerprint corresponding to the target historical push data feature as the digital fingerprint corresponding to the data to be pushed, including:
[0197] Step 1208: When the maximum feature similarity degree exceeds the preset similarity threshold, obtain the digital fingerprint corresponding to the target historical push data feature, and use the digital fingerprint corresponding to the target historical push data feature as the digital fingerprint corresponding to the data to be pushed.
[0198] Specifically, the server determines whether the maximum feature similarity exceeds a pre-set similarity threshold, which is a condition for determining whether to assign a digital fingerprint. When the maximum feature similarity exceeds the pre-set similarity threshold, the digital fingerprint corresponding to the target historical push data feature is obtained, and the digital fingerprint corresponding to the target historical push data feature is used as the digital fingerprint corresponding to the data to be pushed.
[0199] In a specific embodiment, as Figure 13 shown, it is a schematic diagram for similarity retrieval. Among them, the similarity distance between the query vector, that is, the feature to be pushed, and the central feature of each historical push data is calculated. The similarity distance of the central feature of the historical push data, that is, the similarity distance of the central feature 1, is 0.1, which is the smallest. At this time, it indicates that the feature to be pushed is most similar to the central feature 1. Then, the similarity between the feature to be pushed and the historical push data features in the central feature 1 is calculated, and then the historical push data feature corresponding to the maximum similarity is selected as the target historical push data feature according to this similarity.
[0200] In the above embodiment, by calculating the similarity degree of the central features of the historical push data, and selecting the central features of the historical push data with the first target number, and then calculating the similarity degree of the historical push data features in the historical push data feature set associated with the central features of the historical push data with the first target number, the target historical push data feature is selected, thus avoiding traversal calculation, reducing the calculation amount, and improving the efficiency.
[0201] In an embodiment, in step 210, when the target historical push data feature meets the pre-set fingerprint assignment condition, the digital fingerprint corresponding to the target historical push data feature is obtained, and the digital fingerprint corresponding to the target historical push data feature is used as the digital fingerprint corresponding to the data to be pushed, including:
[0202] When the target historical push data feature does not meet the pre-set fingerprint assignment condition, the data to be pushed is stored in the target message queue; when it is detected that the pre-set fingerprint generation condition is reached, each data to be pushed is obtained from the target message queue, and each data to be pushed is subjected to similarity clustering to obtain each data set to be pushed; the digital fingerprint corresponding to each data set to be pushed is generated to obtain the digital fingerprint corresponding to the data to be pushed in each data set to be pushed.
[0203] Among them, the target message queue is a message queue for storing the data to be pushed that does not meet the pre-set fingerprint assignment condition. The pre-set fingerprint generation condition refers to the condition for fingerprint generation, which may include that the number of data to be pushed in the target message queue reaches the pre-set number upper limit or reaches a pre-set time window. The data set to be pushed refers to a set of similar data to be pushed.
[0204] Specifically, when the target historical push data feature does not meet the preset fingerprint assignment condition, it indicates that there is no historical push data feature in the historical push data feature that is the same as the digital fingerprint of the data to be pushed at this time. At this time, the server stores the data to be pushed into the target message queue and generates digital fingerprints through offline clustering. That is, when the server detects that the preset fingerprint generation condition is reached, it obtains each piece of data to be pushed from the target message queue, and performs similarity clustering on each piece of data to be pushed through a clustering algorithm to obtain each data set to be pushed. Among them, the clustering algorithm can use the DBSCAN (Density-Based Spatial Clustering of Applications with Noise) clustering algorithm, etc. At this time, the server generates a corresponding digital fingerprint for each data set to be pushed, that is, the data to be pushed in the data set to be pushed has the same digital fingerprint.
[0205] In the above embodiment, by performing similarity clustering on the data to be pushed that does not meet the preset fingerprint assignment condition, and generating corresponding digital fingerprints for each obtained data set to be pushed, the generated digital fingerprints are made more accurate and omissions are avoided.
[0206] In a specific embodiment, as Figure 14 shown, it is a framework schematic diagram for generating digital fingerprints for advertising offline clustering. Specifically: Obtain the advertising stream, extract the advertising materials from the advertising stream, and then need to perform similarity retrieval on the advertising using digital fingerprints. At this time, first perform digital fingerprint retrieval in the cache. When an existing digital fingerprint is retrieved, search for the advertisement corresponding to the same digital fingerprint in the vector library. When there is no digital fingerprint in the cache, perform fingerprint generation, and screen out the topk similar advertising materials from each advertising material with a generated digital fingerprint through an inverted index. And when the maximum similarity exceeds the preset similarity threshold, it indicates that the same existing digital fingerprint has been found. At this time, the digital fingerprint corresponding to the maximum similarity is used as the digital fingerprint of the advertisement. When the maximum similarity is less than the preset similarity threshold, that is, it indicates that no same existing digital fingerprint has been found. At this time, the data to be pushed is stored in the message queue, and near real-time time window / batch clustering is performed after accumulating a certain number or within a certain time period. That is, use DBSCAN clustering to group for a time window, and assign a new digital fingerprint to each group. For example, cluster the data sets to be pushed stored in the message queue in the time period from 0:10 to 0:20 in window 2 to obtain cluster 1, cluster 2, and cluster 3, and then generate a corresponding digital fingerprint for each cluster respectively.
[0207] In one embodiment, the data feature to be pushed includes an image data feature;
[0208] Such as Figure 15As shown in step 208, that is, obtaining the historical push data features of each generated digital fingerprint, calculating the similarity between the to-be-pushed data features and the historical push data features, and determining a candidate historical push data feature set from the historical push data features of each generated digital fingerprint, including:
[0209] Step 1502, sending the image data features to at least two node servers. The node servers include each historical image data center feature and the associated historical image data feature set. The at least two node servers obtain the image data features, calculate the image center similarity between the image data features and each historical image data center feature, select the historical image data center features with the first number of images from each historical image data center feature based on the image center similarity, calculate the image similarity between the image data features and the historical image data features in the historical image data feature set associated with the historical image data center features with the first number of images, select the historical image data features with the second number of images from the historical image data feature set associated with the historical image data center features with the first number of images based on the image similarity, obtain the node historical image data feature set, and return the node historical image data feature set associated with the corresponding image similarity.
[0210] Among them, each node server stores a partial historical image data feature set associated with each historical image data center feature. The number of historical image data features associated with each historical image data center feature stored in the node server is determined based on the number of node servers. For example, when the number of node servers is 3, one-third of the number of historical image data features associated with each historical image data center feature can be stored. The first number of images refers to the number of historical image data center features to be selected that is preset. The second number of images refers to the number of historical image data features selected that is preset.
[0211] Specifically, when the server performs similarity retrieval, it can send the image data features to at least two node servers, and then the node servers perform internal retrieval, that is, the node servers perform inverted index retrieval in the partial historical image data feature sets stored in themselves to obtain the node historical image data feature set. The number of historical image data features in the node historical image data feature set is the product of the second number of images and the first number of images. In one embodiment, the node server sorts the historical image data features in the node historical image data feature set in descending order of image similarity and selects the historical image data features with the second target number of images to obtain the finally determined historical image data feature set.
[0212] Step 1504: Obtain at least two sets of historical image data features and corresponding image similarities returned by at least two node servers. Screen the historical image data features of the candidate image quantity from at least two sets of historical image data features based on the image similarity to obtain a candidate set of historical image data features.
[0213] Specifically, the server obtains at least two sets of historical image data features and corresponding image similarities returned by at least two node servers. Then, sort the returned historical image data features according to the size of the image similarity, and then select the historical image data features of the candidate image quantity from the sorting result in descending order to obtain a candidate set of historical image data features.
[0214] In one embodiment, the data features to be pushed include video data features;
[0215] As Figure 16 shown, step 208, that is, obtain the historical push data features with each generated digital fingerprint, calculate the similarity degree between the data features to be pushed and the historical push data features, and determine a candidate set of historical push data features from the historical push data features with each generated digital fingerprint based on the similarity degree, including:
[0216] Step 1602: Send the video data features to at least two node servers. The node servers include each historical video data center feature and the associated historical video data feature set. The at least two node servers obtain the video data features, calculate the video center similarity between the video data features and each historical video data center feature, select the historical video data center features of the first video quantity from each historical video data center feature based on the video center similarity, calculate the video similarity between the video data features and the historical video data features in the historical video data feature set associated with the historical video data center features of the first video quantity, select the historical video data features of the second video quantity from the historical video data feature set associated with the historical video data center features of the first video quantity based on the video similarity to obtain a set of node historical video data features, and associate and return the set of node historical video data features and the corresponding video similarity.
[0217] Among them, each node server stores a partial historical video data feature set associated with each historical video data center feature. Determine the quantity of historical video data features associated with each historical video data center feature stored in the node server based on the quantity of node servers. For example, when the node server is 3, one-third of the quantity of historical video data features associated with each historical video data center feature can be stored. The first video quantity refers to the pre-set quantity of historical video data center features to be selected. The second video quantity refers to the pre-set quantity of selected historical video data features.
[0218] Specifically, when performing similarity retrieval, the server may send video data features to at least two node servers, and then the node servers perform internal retrieval, that is, the node servers perform inverted index retrieval in a partial historical video data feature set stored in themselves to obtain a node historical video data feature set. The number of historical video data features in the node historical video data feature set is the product of the second video quantity and the first video quantity. In one embodiment, the node server sorts the historical video data features in the node historical video data feature set in descending order of video similarity, and selects historical video data features with a second target quantity to obtain a finally determined historical video data feature set. The finally determined historical video data feature set and the corresponding video similarity are returned to the server.
[0219] Step 1604: Obtain at least two node historical video data feature sets and corresponding video similarities returned by at least two node servers, and screen historical video data features with a candidate video quantity from the at least two node historical video data feature sets based on the video similarity to obtain a candidate historical video data feature set.
[0220] Specifically, the server obtains at least two node historical video data feature sets and corresponding video similarities returned by at least two node servers. Then, the returned historical video data features are sorted according to the magnitude of the video similarity, and then historical video data features with a candidate video quantity are sequentially selected from the largest to the smallest of the sorting results to obtain a candidate historical video data feature set.
[0221] In one embodiment, the data features to be pushed include text data features;
[0222] As Figure 17 shown, step 208, that is, obtaining historical push data features for which digital fingerprints have been generated respectively, calculating the similarity between the data features to be pushed and the historical push data features, and determining a candidate historical push data feature set from the historical push data features for which digital fingerprints have been generated respectively based on the similarity, includes:
[0223] In step 1702, the text data features are sent to at least two node servers. The node servers include respective historical text data center features and associated historical text data feature sets. The at least two node servers obtain the text data features, calculate the text center similarity between the text data features and each historical text data center feature, select, based on the text center similarity, the historical text data center features of the first text quantity from each historical text data center feature, calculate the text similarity between the text data features and the historical text data features in the historical text data feature sets associated with the historical text data center features of the first text quantity, select, based on the text similarity, the historical text data features of the second text quantity from the historical text data feature sets associated with the historical text data center features of the first text quantity to obtain a node historical text data feature set, and return the node historical text data feature set associated with the corresponding text similarity.
[0224] Among them, partial historical text data feature sets associated with each historical text data center feature are stored in the node servers. The number of historical text data features associated with each historical text data center feature stored in the node servers is determined based on the number of node servers. For example, when the number of node servers is 3, one-third of the number of historical text data features associated with each historical text data center feature can be stored. The first text quantity refers to the number of historical text data center features to be selected that is preset. The second text quantity refers to the number of historical text data features selected that is preset.
[0225] Specifically, when performing similarity retrieval, the server can send the text data features to at least two node servers, and then the node servers perform internal retrieval, that is, the node servers perform inverted index retrieval in the partial historical text data feature sets stored in themselves to obtain a node historical text data feature set. The number of historical text data features in the node historical text data feature set is the product of the second text quantity and the first text quantity. In one embodiment, the node servers further sort the historical text data features in the node historical text data feature set in descending order of text similarity and select the historical text data features of the second target quantity to obtain the finally determined historical text data feature set.
[0226] In step 1704, at least two node historical text data feature sets and the corresponding text similarities returned by at least two node servers are obtained, and the historical text data features of the candidate text quantity are screened from the at least two node historical text data feature sets based on the text similarity to obtain a candidate historical text data feature set.
[0227] Specifically, the server obtains at least two sets of historical text data features and corresponding text similarities returned by at least two node servers. Then, it sorts the returned historical text data features according to the magnitude of the text similarity, and then sequentially selects the historical text data features of the candidate text quantity from largest to smallest in the sorting result to obtain a candidate set of historical text data features. In one embodiment, a fixed number of text data features can be retrieved through ElasticFaiss search, and the fixed number of text data features and the candidate set of historical text data features are merged as the final candidate set of historical text data features.
[0228] In one embodiment, the candidate set of historical push data features includes a candidate set of historical image data features, a candidate set of historical video data features, and a candidate set of historical text data features;
[0229] As Figure 18 shown, step 208, screening target historical push data features from the candidate set of historical push data features, includes:
[0230] Step 1802, obtaining a first candidate set of historical push data corresponding to the candidate set of historical image data features, a second candidate set of historical push data corresponding to the candidate set of historical video data features, and a third candidate set of historical push data corresponding to the candidate set of historical text data features, and obtaining a target candidate set of historical push data based on the first candidate set of historical push data, the second candidate set of historical push data, and the third candidate set of historical push data.
[0231] Among them, when the data to be pushed is multi-modal data, including image data, text data, and video data, the obtained candidate set of historical push data features includes a candidate set of historical image data features, a candidate set of historical video data features, and a candidate set of historical text data features.
[0232] Specifically, the server obtains the corresponding historical push data according to each historical image data feature in the candidate set of historical image data features to obtain a first candidate set of historical push data, which is a set of historical push data recalled according to the image data in the data to be pushed. Then, it obtains the corresponding historical push data according to each historical video data feature in the candidate set of historical video data features to obtain a second candidate set of historical push data, which is a set of historical push data recalled according to the video data in the data to be pushed. Then, it obtains the corresponding historical push data according to each historical text data feature in the candidate set of historical text data features to obtain a third candidate set of historical push data, which is a set of historical push data recalled according to the text data in the data to be pushed. Then, the first candidate set of historical push data, the second candidate set of historical push data, and the third candidate set of historical push data are merged to obtain a target candidate set of historical push data.
[0233] Step 1804: Obtain the image similarity corresponding to the candidate historical image data feature in the candidate historical image data feature set, obtain the video similarity corresponding to the candidate historical video data feature in the candidate historical video data feature set, and obtain the text similarity corresponding to the candidate historical text feature in the candidate historical text feature set.
[0234] Step 1806: Calculate the similarity degree between each target candidate historical push data in the target candidate historical push data set and the data to be pushed based on the image similarity, video similarity, and text similarity, obtain each target candidate similarity, and determine the target historical push data from each target candidate historical push data based on each target candidate similarity.
[0235] Among them, the image similarity refers to the similarity between the image data in the data to be pushed and the historical image data feature in the candidate historical image data feature set. The video similarity refers to the similarity between the video data in the data to be pushed and the historical video data feature in the candidate historical video data feature set. The text similarity refers to the similarity between the text data in the data to be pushed and the historical text data feature in the candidate historical text data feature set.
[0236] Specifically, the server obtains each image similarity, each video similarity, and each text similarity, then calculates the similarity degree between each target candidate historical push data in the target candidate historical push data set and the data to be pushed, obtains each target candidate similarity, and selects the target candidate historical push data with the largest target candidate similarity from each target candidate historical push data as the target historical push data.
[0237] In a specific embodiment, the target candidate similarity can be calculated using the following formula (4).
[0238]
[0239] Among them, X1 represents the target candidate historical push data, X2 represents the data to be pushed, and L(X1, X2) refers to the target candidate similarity. W1 represents the image weighting value, W2 represents the video weighting value, and W3 represents the text weighting value, which are set according to experience.
[0240] Step 210, that is, when the target historical push data feature meets the preset fingerprint assignment condition, obtain the digital fingerprint corresponding to the target historical push data feature, and use the digital fingerprint corresponding to the target historical push data feature as the digital fingerprint corresponding to the data to be pushed, including:
[0241] Step 1808, when the target historical push data meets the preset fingerprint assignment condition, obtain the digital fingerprint corresponding to the target historical push data, and use the digital fingerprint corresponding to the target historical push data as the digital fingerprint corresponding to the data to be pushed.
[0242] Specifically, when the server determines that the target candidate similarity corresponding to the target historical push data exceeds the preset similarity threshold, the server obtains the digital fingerprint corresponding to the target historical push data, and uses the digital fingerprint corresponding to the target historical push data as the digital fingerprint corresponding to the data to be pushed.
[0243] In the above embodiment, different historical push data are recalled for different modality data, and finally the target candidate similarity is calculated, and then the target historical push data is selected, which improves the accuracy of the obtained target historical push data. Then, when the target historical push data meets the preset fingerprint assignment condition, the digital fingerprint corresponding to the target historical push data is used as the digital fingerprint corresponding to the data to be pushed, which improves the accuracy of the obtained digital fingerprint.
[0244] In a specific embodiment, such as Figure 19As shown, it is a schematic diagram of the retrieval and recall framework. Among them, ElasticFaiss (a vector similarity search cluster built on top of the faiss library, whose architecture and interface method are similar to the popular text search service ElasticSearch, can conveniently help users build a general online similarity search service, suitable for many search service scenarios) is used for similarity search services, including rough ranking and fine ranking. It includes three main shards, each main shard is a node server, and the data in each replica shard is a backup of the main shard. When performing real-time retrieval, when the feature of the data to be pushed is unimodal data, the main shard obtains the feature of the data to be pushed, and first performs rough ranking and recall in one-third of the historical push data feature clustering clusters saved by itself, that is, calculates the similarity degree between the feature of the data to be pushed and the historical push data center feature, and recalls the top K (positive integer) historical push data center features according to the similarity degree, that is, the cluster center. Then, in the clusters corresponding to the top K historical push data center features, that is, in the historical push data feature set, perform similarity recall, that is, calculate the similarity degree between the feature of the data to be pushed and the historical push data features in the selected historical push data feature set, and select N (positive integer) historical push data features according to the similarity degree, that is, obtain the candidate historical push data feature set, and there are K * N historical push data features in this candidate historical push data feature set. Then sort according to the similarity degree, select N historical push data features from the candidate historical push data feature set, and return the N historical push data features to the service request. The server obtains the 3 * N historical push data features returned by the three main shards, sorts them again according to the similarity degree, selects N historical push data features from the 3 * N historical push data features, and then obtains the corresponding M (positive integer) historical push data according to the N historical push data features, where M is greater than or equal to N. Among them, when the data to be pushed is multimodal data, such as including images, text, and videos, 3 * M historical push data are recalled. Then, 100 historical text push data are retrieved and recalled through ElastocSeach. Finally, 3 * M + 100 historical push data are obtained as the candidate historical push data set. Then perform fine ranking, that is, calculate the similarity degree between the data to be pushed and the 3 * M + 100 historical push data in the candidate historical push data set, select the historical push data corresponding to the maximum similarity degree, and when the maximum similarity degree exceeds the preset similarity threshold, use the digital fingerprint corresponding to the historical push data corresponding to the maximum similarity degree as the digital fingerprint corresponding to the data to be pushed. Among them, digital fingerprints are generated for all the push data stored in the database and saved in the main shard, and a full digital fingerprint index is established for digital fingerprint retrieval.
[0245] In one embodiment, as Figure 20 shown, the digital fingerprint generation method further includes:
[0246] Step 2002, obtain the data to be pushed, and obtain the feature extraction model corresponding to the preset similarity level information in each preset feature extraction configuration information.
[0247] Step 2004, input the data to be pushed into the feature extraction model corresponding to each preset similarity level information for feature extraction, and obtain the features of the data to be pushed corresponding to each preset similarity level information.
[0248] Step 2006, determine the target historical push data features corresponding to each preset similarity level information from the historical push data features with generated digital fingerprints.
[0249] Step 2008, when the target historical push data features corresponding to each preset similarity level information meet the preset fingerprint assignment condition, use the digital fingerprint corresponding to the target historical push data features corresponding to each preset similarity level information as the digital fingerprint corresponding to the data to be pushed.
[0250] Specifically, when the server only obtains the data to be pushed and does not obtain the similarity level information corresponding to the data to be pushed, at this time, the server can generate digital fingerprints corresponding to each preset similarity level information, that is, perform feature extraction through the feature extraction model corresponding to each preset similarity level information, and determine the target historical push data features corresponding to each preset similarity level information from the historical push data features with generated digital fingerprints. And when the target historical push data features corresponding to each preset similarity level information meet the preset fingerprint assignment condition, use the digital fingerprint corresponding to the target historical push data features corresponding to each preset similarity level information as the digital fingerprint corresponding to the data to be pushed. Then save the digital fingerprints corresponding to each preset similarity level information. Further, the server can send a notification message to the user terminal, and this notification information is a prompt message for generating digital fingerprints corresponding to each preset similarity level information. Then the server obtains the digital fingerprint corresponding to the similarity level information selected by the user terminal and saves the association relationship between the user terminal, the data to be pushed, and the selected similarity level information corresponding to the digital fingerprint. When receiving a similarity retrieval request for the data to be pushed from the user terminal, obtain the digital fingerprint corresponding to the selected similarity level information according to the association relationship, and use this digital fingerprint for retrieving similar push data.
[0251] In one embodiment, as Figure 21 shown, a data push method is provided. Taking the example that this method is applied to the Figure 1 server, it can be understood that this method can also be applied to the terminal, and can also be applied to a system including the terminal and the server, and is implemented through the interaction between the terminal and the server.
[0252] In this embodiment, the following steps are included:
[0253] Step 2102: Obtain a data push request, which carries an identifier of the data to be pushed and a target push party.
[0254] Among them, the identifier of the data to be pushed is used to uniquely identify the data to be pushed. The target push party refers to the user terminal to which the data to be pushed is to be pushed.
[0255] Specifically, the server obtains the data push request sent by the service terminal, and parses the data push request to obtain the identifier of the data to be pushed and the target push party. The server can also directly obtain the identifier of the data to be pushed and the target push party from the database.
[0256] Step 2104: Based on the identifier of the data to be pushed, obtain the corresponding data to be pushed and the corresponding digital fingerprint to be pushed. The digital fingerprint to be pushed is obtained by acquiring the similarity level information corresponding to the data to be pushed, searching for the corresponding target feature extraction configuration information from each preset feature extraction configuration information based on the similarity level information; obtaining the feature extraction model corresponding to the similarity level information from the target feature extraction configuration information, inputting the data to be pushed into the feature extraction model corresponding to the similarity level information for feature extraction to obtain the feature of the data to be pushed, acquiring the features of historical push data with generated digital fingerprints, calculating the similarity degree between the feature of the data to be pushed and the features of historical push data, determining a candidate set of historical push data features from the features of historical push data with generated digital fingerprints based on the similarity degree, and screening the target historical push data features from the candidate set of historical push data features; when the target historical push data features meet the preset fingerprint assignment conditions, obtaining the digital fingerprint corresponding to the target historical push data features.
[0257] Specifically, the server obtains the corresponding data to be pushed according to the identifier of the data to be pushed, and then finds the digital fingerprint corresponding to the data to be pushed in the digital fingerprint database, that is, obtains the digital fingerprint to be pushed. The digital fingerprint of the data to be pushed can be obtained by any of the embodiments of the above digital fingerprint generation method. For example, by obtaining the similarity level information corresponding to the data to be pushed, and based on the similarity level information, finding the corresponding target feature extraction configuration information from each preset feature extraction configuration information; obtaining the feature extraction model corresponding to the similarity level information from the target feature extraction configuration information, inputting the data to be pushed into the feature extraction model corresponding to the similarity level information for feature extraction to obtain the features of the data to be pushed, obtaining the features of historical push data with generated digital fingerprints, calculating the similarity degree between the features of the data to be pushed and the features of historical push data, determining a candidate set of historical push data features from the features of historical push data with generated digital fingerprints based on the similarity degree, and screening target historical push data features from the candidate set of historical push data features; when the target historical push data features meet the preset fingerprint assignment conditions, using the digital fingerprint corresponding to the target historical push data features as the digital fingerprint to be pushed.
[0258] Step 2106, search for a matching digital fingerprint in the push data digital fingerprint database corresponding to the target push party based on the digital fingerprint of the data to be pushed. When no matching digital fingerprint is found, push the data to be pushed to the target push party.
[0259] Specifically, the push data digital fingerprint database corresponding to the target push party stores the digital fingerprints of the push data that has been pushed to the target push party. When the server finds the digital fingerprint of the data to be pushed in the push data digital fingerprint database corresponding to the target push party, it means that the data to be pushed has been pushed to the target push party, so the data to be pushed may not be pushed to the target push party. Other information such as the number of push data with the same digital fingerprint that has been pushed can also be further obtained to calculate the freshness of the data to be pushed. For example, the greater the number of pushed data, the lower the freshness. When the freshness is less than a certain threshold, no further push is performed to avoid the flooding of similar advertisements. When no matching digital fingerprint is found, it means that no push data with the same digital fingerprint has been pushed to the target push party. At this time, the server can push the data to be pushed to the target push party. In one embodiment, different push data with the same digital fingerprint as the data to be pushed can also be obtained, and then the optimal push data is selected from all the push data and the data to be pushed corresponding to the same digital fingerprint for pushing. Among them, the optimal push data can be selected by estimating the push effects of all the push data and the data to be pushed, so as to maximize the push effect of the push data.
[0260] The above data pushing method, device, computer device and storage medium search for a matching digital fingerprint in the digital fingerprint library of the target pusher by using the digital fingerprint corresponding to the data to be pushed. When no matching digital fingerprint is found, the data to be pushed is pushed to the target pusher. Among them, when the characteristics of the target historical push data meet the preset fingerprint assignment conditions, the digital fingerprint corresponding to the characteristics of the target historical push data is used as the digital fingerprint corresponding to the data to be pushed. And the characteristics of the target historical push data are obtained by using the feature extraction model corresponding to the similarity level information of the data to be pushed to extract the characteristics of the data to be pushed, and then screening the similarity degree from the characteristics of each historical push data with generated digital fingerprints, so as to improve the accuracy of the obtained digital fingerprint, and further improve the accuracy of matching, making the data push more accurate.
[0261] In one embodiment, the server can also obtain a data similarity search request sent by the user terminal, and the data similarity search request carries the data to be searched. Obtain the digital fingerprint corresponding to the data to be searched, and the digital fingerprint corresponding to the data to be searched can be obtained through any one of the above digital fingerprint generation methods. Use the digital fingerprint corresponding to the data to be searched to match the same digital fingerprint in the digital fingerprint database. When the same digital fingerprint is matched, obtain the similar data corresponding to the same digital fingerprint, and return the similar data as the search result to the user terminal. For example, the user can perform data search through the search page in the search application.
[0262] This application also provides an application scenario, which applies the above digital fingerprint generation method. When the method is applied to the advertisement similarity retrieval system, specifically, such as Figure 22As shown, it is a schematic diagram of the architecture of an advertisement similarity retrieval system. Among them, the configuration information, that is, the pre-set feature extraction configuration information, is pushed to the configuration center and merged into a service image. When generating fingerprints for all advertisement materials, the service image is pulled from the configuration center and the service instance process is loaded. In the service instance process, features of corresponding similarity levels and modalities of data are extracted through multiple models. For example, the text in the advertisement material to be generated is feature-extracted through a text feature extraction model of the same similarity level, the video in the advertisement material to be generated is feature-extracted through a video feature extraction model of the same similarity level, and the image in the advertisement material to be generated is feature-extracted through an image feature extraction model of the same similarity level, so as to obtain the features of the advertisement material to be generated. Then, the features of the advertisement material to be generated are subjected to single / multi / cross-modal similarity recall and sorting in a vector similarity search cluster (ElasticFaiss) and a distributed retrieval engine (ElasticSearch). Among them, rough ranking is performed in the similarity search cluster, and a fixed number of similar recalls are performed in the distributed retrieval engine to obtain a rough ranking result, that is, 250 advertisement materials with existing digital fingerprints similar to the advertisement material to be generated are recalled. Then, fine ranking is performed, that is, the distance similarity between the features of the advertisement materials with existing digital fingerprints and the advertisement material to be generated is calculated, and they are sorted in descending order of distance similarity. The top 30 advertisement materials with existing digital fingerprints are selected, and when the clustering similarity corresponding to the top 30 advertisement materials exceeds a preset similarity threshold, the digital fingerprint that appears the most times is selected from the digital fingerprints corresponding to the top 30 advertisement materials as the digital fingerprint of the advertisement material to be generated. Digital fingerprints corresponding to all advertisement materials are generated in sequence and saved in the fingerprint database. Then, subsequent fingerprint generation and subscription can be carried out. Among them, fingerprint generation refers to recalling advertisement materials from the advertisement materials with existing digital fingerprints for the new advertisement material, that is, performing rough ranking and fine ranking on the new advertisement material through the advertisement materials with existing digital fingerprints, so as to obtain the fingerprint corresponding to the new advertisement material. Among them, digital fingerprints corresponding to the new advertisement material at different similarity levels can be generated. Then, through comparative experiments, the digital fingerprint corresponding to the most preferred similarity level is determined from the digital fingerprints corresponding to different similarity levels as the unique digital fingerprint corresponding to the new advertisement material. It is also possible to use the advertisement materials with existing digital fingerprints for subsequent business uses, such as, for advertisement review, for advertisement search services, for advertisement recommendation, and so on.
[0263] In a specific embodiment, the advertisement generation end may generate corresponding digital fingerprints for the advertisements in the advertisement library by using any one of the embodiments of the above digital fingerprint generation method, and save them in the advertisement digital fingerprint library. Then, the advertisement recommendation end recommends advertisements, that is, obtains the advertisements to be recommended, locates the advertisement fingerprints of the advertisements to be recommended, locates the same digital fingerprints in the advertisement digital fingerprint library, obtains each advertisement with the same digital fingerprint, and then selects the optimal advertisement from each advertisement with the same digital fingerprint according to the recommendation strategy set by the service. Finally, the final advertisement is put into advertisement. It should be understood that although Figure 2-21 the steps in the flowchart in Figure 2-21 are shown in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover,
[0264] In one embodiment, as Figure 23 shown, a digital fingerprint generation device 2300 is provided. This device can be a software module or a hardware module, or a combination of both to become a part of a computer device. Specifically, the device includes: an acquisition module 2302, a configuration search module 2304, a feature extraction module 2306, a feature screening module 2308, and a fingerprint obtaining module 2310, where:
[0265] The acquisition module 2302 is configured to acquire the data to be pushed and the corresponding similarity level information;
[0266] The configuration search module 2304 is configured to search for the corresponding target feature extraction configuration information from each preset feature extraction configuration information based on the similarity level information. The preset feature extraction configuration information includes the feature extraction model corresponding to the preset similarity level information;
[0267] The feature extraction module 2306 is configured to obtain the feature extraction model corresponding to the similarity level information from the target feature extraction configuration information, input the data to be pushed into the feature extraction model corresponding to the similarity level information for feature extraction, and obtain the data to be pushed features;
[0268] A feature screening module 2308 is configured to obtain historical push data features of each generated digital fingerprint, calculate the similarity between the to-be-pushed data features and the historical push data features, determine a candidate historical push data feature set from the historical push data features of each generated digital fingerprint based on the similarity, and screen target historical push data features from the candidate historical push data feature set;
[0269] A fingerprint obtaining module 2310 is configured to, when the target historical push data features meet the preset fingerprint assignment condition, obtain the digital fingerprint corresponding to the target historical push data features, use the digital fingerprint corresponding to the target historical push data features as the digital fingerprint corresponding to the to-be-pushed data, and the digital fingerprint corresponding to the to-be-pushed data is used to retrieve push data having the same similarity level information as the to-be-pushed data.
[0270] In one embodiment, the obtaining module 2302 is further configured to obtain a fingerprint generation service image address, load a fingerprint generation service based on the fingerprint generation service image address, where the fingerprint generation service includes various preset feature extraction configuration information, start the fingerprint generation service through a preset script file, and obtain the to-be-pushed data and the corresponding similarity level information through the fingerprint generation service.
[0271] In one embodiment, the obtaining module 2302 is further configured to obtain a to-be-pushed data retrieval request carrying a to-be-pushed data identifier; search for a corresponding digital fingerprint in a preset fingerprint cache based on the to-be-pushed data identifier, and when the digital fingerprint corresponding to the to-be-pushed data identifier is not found, obtain the to-be-pushed data and the corresponding similarity level information based on the to-be-pushed data identifier.
[0272] In one embodiment, the to-be-pushed data includes at least one of image data, video data, and text data, and the similarity level information includes at least one of an image similarity level, a video similarity level, and a text similarity level;
[0273] The configuration search module 2304 is further configured to search for the same similarity level information from the preset similarity level information in each preset feature extraction configuration information based on at least one of the image similarity level, the video similarity level, and the text similarity level, and use the preset feature extraction configuration information corresponding to the same similarity level information as the target feature extraction configuration information, where the target feature extraction configuration information includes at least one of an image similarity level, a video similarity level, and a text similarity level corresponding feature extraction model.
[0274] In one embodiment, the feature extraction module 2306 is further configured to obtain at least one corresponding feature extraction model of an image similarity level, a video similarity level, and a text similarity level from the target feature extraction configuration information; input the image data into the feature extraction model corresponding to the image similarity level to perform image feature extraction to obtain image features; and / or input the video data into the feature extraction model corresponding to the video similarity level to perform video feature extraction to obtain video features; and / or input the text data into the feature extraction model corresponding to the text similarity level to perform text feature extraction to obtain text features.
[0275] In one embodiment, the digital fingerprint generation device 2300 further includes:
[0276] An image model training module, configured to obtain a training image set, the training image set including training images and corresponding image class labels, where the training images in the training image set have the same image similarity level; determine a current training image from the training image set, input the current training image into an initial image class prediction model, the initial image class prediction model outputs an initial image representation through an image feature extraction network, perform image class prediction based on the initial image representation to obtain an initial image class; calculate the error between the initial image class and the image class label, update the initial image class prediction model based on the error, and return to execute the step of inputting the current training image into the initial image class prediction model until the image training completion condition is reached, to obtain an image class prediction model corresponding to the image similarity level; obtain an image feature extraction model corresponding to the image similarity level based on the image feature extraction network in the image class prediction model.
[0277] In one embodiment, the digital fingerprint generation device 2300 further includes:
[0278] A video model training module is used to obtain a training video set. The training video set includes training videos and corresponding video category labels. The training videos in the training video set have the same video similarity level. Determine the current training video from the training video set, extract video frames from the current training video at a preset time interval to obtain a video frame sequence. Input the video frame sequence into an initial video category prediction model. The initial video category prediction model maps the video frame sequence through an initial mapping network to obtain initial mapping features, inputs the mapping features into an initial attention encoding network for attention encoding to obtain initial video features, inputs the initial video features into an initial classification network for classification to obtain an initial video category. Calculate the error between the initial video category and the video category label, update the initial video category prediction model based on the error, and return to execute the step of determining the current training video from the training video set until the video training completion condition is reached, and obtain a video category prediction model corresponding to the video similarity level. Based on the mapping network and the attention encoding network in the video category prediction model, obtain a feature extraction model corresponding to the video similarity level.
[0279] In one embodiment, the digital fingerprint generation device 2300 further includes:
[0280] A text model training module is used to obtain a training text set. The training text set includes text triples. The text triples include a target text, a positive text, and a negative text. The target text and the positive text in the text triples have the same text similarity level. Input the text triples into an initial text feature extraction model for feature extraction to obtain target text features, positive text features, and negative text features. Obtain the positive retrieval similarity and the negative retrieval similarity corresponding to the text triples. Calculate the similarity distance between the target text features and the positive text features to obtain a positive distance similarity, and calculate the similarity distance between the target text features and the negative text features to obtain a negative distance similarity. Perform triple loss calculation based on the positive retrieval similarity, the negative retrieval similarity, the positive distance similarity, and the negative distance similarity to obtain initial loss information corresponding to the text triples. Update the initial text feature extraction model based on the initial loss information, and return to execute the step of obtaining the text triples iteratively until the text training completion condition is reached, and obtain a text feature extraction model corresponding to the text similarity level.
[0281] In one embodiment, the text model training module is further used to calculate the error between the positive retrieval similarity and the positive distance similarity to obtain positive error information, and calculate the negative error information of the negative retrieval similarity and the negative distance similarity. Calculate the sum of the positive error information and the negative error information to obtain the initial loss information corresponding to the text triples.
[0282] In one embodiment, at least two historical push data center features are included in the historical push data features of each generated digital fingerprint.
[0283] The feature screening module 2308 is further configured to calculate the central similarity degree between the features of the data to be pushed and the features of at least two historical pushed data center features, and select the features of the historical pushed data center with the first target number from the features of at least two historical pushed data center features based on the central similarity degree; obtain the set of historical pushed data features associated with the features of the historical pushed data center with the first target number, calculate the feature similarity degree between the features of the data to be pushed and the features of the historical pushed data in the set of historical pushed data features, and select the features of the historical pushed data with the second target number from the set of historical pushed data features based on the feature similarity degree to obtain a candidate set of historical pushed data features; determine the historical pushed data feature corresponding to the maximum feature similarity degree from the candidate set of historical pushed data features based on the feature similarity degree, and use the historical pushed data feature corresponding to the maximum feature similarity degree as the target historical pushed data feature;
[0284] The fingerprint obtaining module 2310 is further configured to, when the maximum feature similarity degree exceeds a preset similarity threshold, obtain the digital fingerprint corresponding to the target historical pushed data feature, and use the digital fingerprint corresponding to the target historical pushed data feature as the digital fingerprint corresponding to the data to be pushed.
[0285] In one embodiment, the fingerprint obtaining module 2310 is further configured to store the data to be pushed into the target message queue when the target historical pushed data feature does not meet the preset fingerprint assignment condition; when it is detected that the preset fingerprint generation condition is reached, obtain each data to be pushed from the target message queue, perform similarity clustering on each data to be pushed to obtain each data set to be pushed; generate the digital fingerprint corresponding to each data set to be pushed to obtain the digital fingerprint corresponding to the data to be pushed in each data set to be pushed.
[0286] In one embodiment, the features of the data to be pushed include image data features;
[0287] The feature screening module 2308 is further configured to send the image data features to at least two node servers, where the node servers include respective historical image data center features and associated historical image data feature sets; the at least two node servers obtain the image data features, calculate the image center similarity between the image data features and the respective historical image data center features, select historical image data center features with a first image quantity from the respective historical image data center features based on the image center similarity, calculate the image similarity between the image data features and the historical image data features in the historical image data feature sets associated with the historical image data center features with the first image quantity, select historical image data features with a second image quantity from the historical image data feature sets associated with the historical image data center features with the first image quantity based on the image similarity, obtain a node historical image data feature set, associate and return the node historical image data feature set and the corresponding image similarity; obtain at least two node historical image data feature sets and the corresponding image similarities returned by the at least two node servers, and screen historical image data features with a candidate image quantity from the at least two node historical image data feature sets based on the image similarity to obtain a candidate historical image data feature set.
[0288] In one embodiment, the data features to be pushed include video data features;
[0289] The feature screening module 2308 is further configured to send the video data features to at least two node servers, where the node servers include respective historical video data center features and associated historical video data feature sets; the at least two node servers obtain the video data features, calculate the video center similarity between the video data features and the respective historical video data center features, select historical video data center features with a first video quantity from the respective historical video data center features based on the video center similarity, calculate the video similarity between the video data features and the historical video data features in the historical video data feature sets associated with the historical video data center features with the first video quantity, select historical video data features with a second video quantity from the historical video data feature sets associated with the historical video data center features with the first video quantity based on the video similarity, obtain a node historical video data feature set, associate and return the node historical video data feature set and the corresponding video similarity; obtain at least two node historical video data feature sets and the corresponding video similarities returned by the at least two node servers, and screen historical video data features with a candidate video quantity from the at least two node historical video data feature sets based on the video similarity to obtain a candidate historical video data feature set.
[0290] In one embodiment, the data features to be pushed include text data features;
[0291] The feature screening module 2308 is further configured to send the text data features to at least two node servers, where the node servers include the respective historical text data center features and the associated historical text data feature sets; the at least two node servers obtain the text data features, calculate the text center similarity between the text data features and the respective historical text data center features, select the historical text data center features with the first number of texts from the respective historical text data center features based on the text center similarity, calculate the text similarity between the text data features and the historical text data features in the historical text data feature sets associated with the historical text data center features with the first number of texts, select the historical text data features with the second number of texts from the historical text data feature sets associated with the historical text data center features with the first number of texts based on the text similarity, obtain the node historical text data feature set, and associate and return the node historical text data feature set and the corresponding text similarity; obtain at least two node historical text data feature sets and the corresponding text similarities returned by the at least two node servers, and screen and obtain the historical text data features with the candidate number of texts from the at least two node historical text data feature sets based on the text similarity, so as to obtain the candidate historical text data feature set.
[0292] In one embodiment, the candidate historical push data feature set includes a candidate historical image data feature set, a candidate historical video data feature set, and a candidate historical text data feature set;
[0293] The feature screening module 2308 is further configured to obtain a first candidate historical push data set corresponding to the candidate historical image data feature set, a second candidate historical push data set corresponding to the candidate historical video data feature set, and a third candidate historical push data set corresponding to the candidate historical text data feature set, and obtain the target candidate historical push data set based on the first candidate historical push data set, the second candidate historical push data set, and the third candidate historical push data set; obtain the image similarity corresponding to the candidate historical image data features in the candidate historical image data feature set, obtain the video similarity corresponding to the candidate historical video data features in the candidate historical video data feature set, and obtain the text similarity corresponding to the candidate historical text features in the candidate historical text feature set; calculate the similarity degree between each target candidate historical push data in the target candidate historical push data set and the data to be pushed based on the image similarity, the video similarity, and the text similarity, obtain each target candidate similarity, and determine the target historical push data from each target candidate historical push data based on each target candidate similarity;
[0294] The fingerprint obtaining module 2310 is further configured to, when the target historical push data meets the preset fingerprint assignment condition, obtain the digital fingerprint corresponding to the target historical push data, and use the digital fingerprint corresponding to the target historical push data as the digital fingerprint corresponding to the data to be pushed.
[0295] In one embodiment, the digital fingerprint generation device 2300 further includes:
[0296] A multi-fingerprint generation module, configured to obtain data to be pushed, and obtain a feature extraction model corresponding to the preset similarity level information in each preset feature extraction configuration information; input the data to be pushed into the feature extraction model corresponding to each preset similarity level information for feature extraction, to obtain the features of the data to be pushed corresponding to each preset similarity level information; determine the target historical push data features corresponding to each preset similarity level information from the historical push data features of each generated digital fingerprint; when the target historical push data features corresponding to each preset similarity level information meet the preset fingerprint assignment condition, use the digital fingerprint corresponding to the target historical push data features corresponding to each preset similarity level information as the digital fingerprint corresponding to the data to be pushed.
[0297] In one embodiment, as Figure 24 shown, a data push device 2400 is provided. This device can be a software module, a hardware module, or a combination of both to form a part of a computer device. Specifically, the device includes a request acquisition module 2402, a fingerprint acquisition module 2404, and a push module 2406, where:
[0298] The request acquisition module 2402 is configured to obtain a data push request, which carries an identifier of the data to be pushed and a target push party;
[0299] The fingerprint acquisition module 2404 is configured to obtain the corresponding data to be pushed and the corresponding digital fingerprint to be pushed based on the identifier of the data to be pushed. The digital fingerprint to be pushed is obtained by obtaining the similarity level information corresponding to the data to be pushed, searching for the corresponding target feature extraction configuration information from each preset feature extraction configuration information based on the similarity level information; obtaining the feature extraction model corresponding to the similarity level information from the target feature extraction configuration information, inputting the data to be pushed into the feature extraction model corresponding to the similarity level information for feature extraction to obtain the features of the data to be pushed, obtaining the historical push data features of each generated digital fingerprint, calculating the similarity degree between the features of the data to be pushed and the historical push data features, determining a candidate set of historical push data features from the historical push data features of each generated digital fingerprint based on the similarity degree, and screening the target historical push data features from the candidate set of historical push data features; when the target historical push data features meet the preset fingerprint assignment condition, obtaining the digital fingerprint corresponding to the target historical push data features;
[0300] The push module 2406 is configured to search for a matching digital fingerprint in the push data digital fingerprint library corresponding to the target push party based on the digital fingerprint of the data to be pushed. When no matching digital fingerprint is found, push the data to be pushed to the target push party.
[0301] For the specific limitations of the digital fingerprint generation device and the data push device, reference may be made to the limitations of the digital fingerprint generation method and the data push method in the foregoing text, which will not be elaborated herein. Each module in the above digital fingerprint generation device and data push device can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or stored in the memory of the computer device in the form of software, so as to facilitate the processor to call and execute the operations corresponding to each of the above modules.
[0302] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as Figure 25 shown. The computer device includes a processor, a memory, and a network interface connected through a system bus. Among them, 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 database of the computer device is used to store historical push data with generated digital fingerprints. The network 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, it implements a digital fingerprint generation method or a data push method.
[0303] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as Figure 26 shown. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected through a system bus. Among them, 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 and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner. The wireless manner can be achieved through WIFI, a carrier network, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a digital fingerprint generation method or a data push method. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device may be a touch layer covering the display screen, or a button, a trackball, or a touchpad provided on the housing of the computer device, or an external keyboard, a touchpad, or a mouse, etc.
[0304] Those skilled in the art can understand that Figure 25 and26 The structure shown is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have a different component layout.
[0305] In one embodiment, a computer device is further provided, including a memory and a processor. A computer program is stored in the memory, and when the processor executes the computer program, the steps in the above method embodiments are implemented.
[0306] In one embodiment, a computer-readable storage medium is provided, storing a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0307] In one embodiment, a computer program product or a computer program is provided. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the steps in the above method embodiments.
[0308] Those of ordinary skill in the art can understand that all or part of the processes of implementing the methods in the above embodiments can be completed by instructing relevant hardware through a computer program. 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 above method embodiments. Among them, any reference to a memory, storage, database, or other medium used in the various embodiments provided in this application can include at least one of non-volatile and volatile memories. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical memory, etc. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.
[0309] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, 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, it should be considered as the scope recorded in this specification.
[0310] The embodiments described above merely represent several implementation manners of the present application. The description is relatively specific and detailed, but it should not be construed as a limitation on the scope of the invention patent. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several variations and improvements can be made, and these all fall within the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the appended claims.
Claims
1. A digital fingerprint generation method, characterized in that, The method includes: Obtaining the data to be pushed and the corresponding similarity level information, where the similarity level information is used to characterize the similarity level corresponding to the data to be pushed; Based on the similarity level information, searching for the corresponding target feature extraction configuration information from each preset feature extraction configuration information, where the preset feature extraction configuration information includes a feature extraction model corresponding to the preset similarity level information, and the target feature extraction configuration information is the preset feature extraction configuration information with the same similarity level information as the data to be pushed; Obtaining the feature extraction model corresponding to the similarity level information from the target feature extraction configuration information, inputting the data to be pushed into the feature extraction model corresponding to the similarity level information for feature extraction, and obtaining the features of the data to be pushed; Obtaining the features of historical push data for which digital fingerprints have been generated, calculating the similarity degree between the features of the data to be pushed and the features of the historical push data, determining a candidate set of historical push data features from the features of the historical push data for which digital fingerprints have been generated based on the similarity degree, and screening the target historical push data features from the candidate set of historical push data features; When the target historical push data features meet the preset fingerprint assignment conditions, obtaining the digital fingerprint corresponding to the target historical push data features, and using the digital fingerprint corresponding to the target historical push data features as the digital fingerprint corresponding to the data to be pushed, where the digital fingerprint corresponding to the data to be pushed is used to retrieve push data with the same similarity level information as the data to be pushed, and the data to be pushed and the historical push data corresponding to the target historical push data features belong to the same similarity level.
2. The method according to claim 1, wherein The obtaining of the data to be pushed and the corresponding similarity level information includes: Obtaining the fingerprint generation service mirror address, loading the fingerprint generation service based on the fingerprint generation service mirror address, where the fingerprint generation service includes each preset feature extraction configuration information Starting the fingerprint generation service through a preset script file, and obtaining the data to be pushed and the corresponding similarity level information through the fingerprint generation service.
3. The method according to claim 1, wherein The obtaining of the data to be pushed and the corresponding similarity level information includes: Obtaining a retrieval request for the data to be pushed, where the retrieval request for the data to be pushed carries an identifier of the data to be pushed; Searching for the corresponding digital fingerprint in a preset fingerprint cache based on the identifier of the data to be pushed, and when the digital fingerprint corresponding to the identifier of the data to be pushed is not found, obtaining the data to be pushed and the corresponding similarity level information based on the identifier of the data to be pushed.
4. The method according to claim 1, characterized in that, The data to be pushed includes at least one of image data, video data, and text data, and the similarity level information includes at least one of an image similarity level, a video similarity level, and a text similarity level; The searching for the corresponding target feature extraction configuration information from each preset feature extraction configuration information based on the similarity level information includes: Search for the same similarity level information from the preset similarity level information in each preset feature extraction configuration information based on at least one of the image similarity level, video similarity level, and text similarity level, and use the preset feature extraction configuration information corresponding to the same similarity level information as the target feature extraction configuration information. The target feature extraction configuration information includes at least one of the feature extraction models corresponding to the image similarity level, video similarity level, and text similarity level.
5. The method according to claim 4, wherein Obtain the feature extraction model corresponding to the similarity level information from the target feature extraction configuration information, and input the data to be pushed into the feature extraction model corresponding to the similarity level information for feature extraction to obtain the features of the data to be pushed, including: Obtain the feature extraction models corresponding to at least one of the image similarity level, video similarity level, and text similarity level from the target feature extraction configuration information; Input the image data into the feature extraction model corresponding to the image similarity level for image feature extraction to obtain image features; and / or Input the video data into the feature extraction model corresponding to the video similarity level for video feature extraction to obtain video features; and / or Input the text data into the feature extraction model corresponding to the text similarity level for text feature extraction to obtain text features.
6. The method according to claim 5, wherein The generation of the feature extraction model corresponding to the image similarity level includes the following steps: Obtain a training image set, which includes training images and corresponding image category labels, and the training images in the training image set have the same image similarity level; Determine the current training image from the training image set, input the current training image into the initial image category prediction model, the initial image category prediction model outputs an initial image representation through an image feature extraction network, and perform image category prediction based on the initial image representation to obtain an initial image category; Calculate the error between the initial image category and the image category label, update the initial image category prediction model based on the error, and return to execute the step of inputting the current training image into the initial image category prediction model until the image training completion condition is reached, and obtain the image category prediction model corresponding to the image similarity level; Obtain the image feature extraction model corresponding to the image similarity level based on the image feature extraction network in the image category prediction model.
7. The method according to claim 5, wherein The generation of the feature extraction model corresponding to the video similarity level includes the following steps: Obtain a training video set, which includes training videos and corresponding video category labels, and the training videos in the training video set have the same video similarity level; Determine the current training video from the training video set, and extract video frames from the current training video at a preset time interval to obtain a video frame sequence; Input the video frame sequence into an initial video category prediction model. The initial video category prediction model maps the video frame sequence through an initial mapping network to obtain initial mapped features, inputs the mapped features into an initial attention encoding network for attention encoding to obtain initial video features, and inputs the initial video features into an initial classification network for classification to obtain an initial video category; Calculate the error between the initial video category and the video category label, update the initial video category prediction model based on the error, and return to execute the step of determining the current training video from the training video set until the video training completion condition is reached, and obtain the video category prediction model corresponding to the video similarity level; Obtain the feature extraction model corresponding to the video similarity level based on the mapping network and the attention encoding network in the video category prediction model.
8. The method according to claim 5, wherein The generation of the feature extraction model corresponding to the text similarity level includes the following steps: Obtain a training text set, where the training text set includes text triples, and the text triples include a target text, a positive text, and a negative text; the target text and the positive text in the text triples have the same text similarity level; Input the text triples into an initial text feature extraction model for feature extraction to obtain target text features, positive text features, and negative text features; Obtain the positive retrieval similarity and the negative retrieval similarity corresponding to the text triples; Calculate the similarity distance between the target text features and the positive text features to obtain a positive distance similarity, and calculate the similarity distance between the target text features and the negative text features to obtain a negative distance similarity; Perform triple loss calculation based on the positive retrieval similarity, the negative retrieval similarity, the positive distance similarity, and the negative distance similarity to obtain the initial loss information corresponding to the text triples; Update the initial text feature extraction model based on the initial loss information, and return to iteratively execute the step of obtaining text triples until the text training completion condition is reached, and obtain the text feature extraction model corresponding to the text similarity level.
9. The method according to claim 8, characterized in that, Performing triple loss calculation based on the positive retrieval similarity, the negative retrieval similarity, the positive distance similarity, and the negative distance similarity to obtain the initial loss information corresponding to the text triples includes: Calculate the error between the positive retrieval similarity and the positive distance similarity to obtain positive error information, and calculate the negative error information of the negative retrieval similarity and the negative distance similarity; Calculate the sum of the positive error information and the negative error information to obtain the initial loss information corresponding to the text triples.
10. The method according to claim 1, wherein At least two historical push data center features are included in the feature of each generated digital fingerprint historical push data; Calculating the similarity degree between the to-be-pushed data feature and the historical push data feature, and determining a candidate historical push data feature set from the features of each generated digital fingerprint historical push data based on the similarity degree, and screening target historical push data features from the candidate historical push data feature set includes: Calculate the central similarity degree between the data features to be pushed and the central features of the at least two historical pushed data centers, and select the central features of the first target number of historical pushed data centers from the central features of the at least two historical pushed data centers based on the central similarity degree; Obtain the set of historical pushed data features associated with the central features of the first target number of historical pushed data centers, calculate the feature similarity degree between the data features to be pushed and the historical pushed data features in the set of historical pushed data features, and select the historical pushed data features of the second target number from the set of historical pushed data features based on the feature similarity degree to obtain a candidate set of historical pushed data features; Determine the historical pushed data feature corresponding to the maximum feature similarity degree from the candidate set of historical pushed data features based on the feature similarity degree, and use the historical pushed data feature corresponding to the maximum feature similarity degree as the target historical pushed data feature; When the target historical pushed data feature meets the preset fingerprint assignment condition, obtain the digital fingerprint corresponding to the target historical pushed data feature, and use the digital fingerprint corresponding to the target historical pushed data feature as the digital fingerprint corresponding to the data to be pushed, including: When the maximum feature similarity degree exceeds the preset similarity threshold, obtain the digital fingerprint corresponding to the target historical pushed data feature, and use the digital fingerprint corresponding to the target historical pushed data feature as the digital fingerprint corresponding to the data to be pushed.
11. The method according to claim 1, wherein When the target historical pushed data feature meets the preset fingerprint assignment condition, obtain the digital fingerprint corresponding to the target historical pushed data feature, and use the digital fingerprint corresponding to the target historical pushed data feature as the digital fingerprint corresponding to the data to be pushed, including: When the target historical pushed data feature does not meet the preset fingerprint assignment condition, store the data to be pushed into the target message queue; When it is detected that the preset fingerprint generation condition is reached, obtain each data to be pushed from the target message queue, perform similarity clustering on each data to be pushed to obtain each data set to be pushed; Generate the digital fingerprints corresponding to each data set to be pushed to obtain the digital fingerprints corresponding to the data to be pushed in each data set to be pushed.
12. The method according to claim 1, characterized in that, The data features to be pushed include image data features; The obtaining of the central features of each historical pushed data with a generated digital fingerprint, calculating the similarity degree between the data features to be pushed and the central features of the historical pushed data, and determining a candidate set of historical pushed data features from the central features of the historical pushed data with each generated digital fingerprint based on the similarity degree, includes: Send the image data features to at least two node servers, where the node servers include respective historical image data center features and associated historical image data feature sets; the at least two node servers obtain the image data features, calculate the image center similarity between the image data features and each of the historical image data center features, select historical image data center features with a first image quantity from each of the historical image data center features based on the image center similarity, calculate the image similarity between the image data features and the historical image data features in the historical image data feature sets associated with the historical image data center features with the first image quantity, select historical image data features with a second image quantity from the historical image data feature sets associated with the historical image data center features with the first image quantity based on the image similarity to obtain a node historical image data feature set, and associate and return the node historical image data feature set and the corresponding image similarity; Obtain at least two node historical image data feature sets and the corresponding image similarities returned by the at least two node servers, and screen historical image data features with a candidate image quantity from the at least two node historical image data feature sets based on the image similarity to obtain a candidate historical image data feature set.
13. The method according to claim 1, characterized in that, The data features to be pushed include video data features; The method of obtaining each historical push data feature with a generated digital fingerprint, calculating the similarity degree between the data features to be pushed and the historical push data features, and determining a candidate historical push data feature set from each of the historical push data features with the generated digital fingerprint based on the similarity degree includes: Send the video data features to at least two node servers, where the node servers include respective historical video data center features and associated historical video data feature sets; the at least two node servers obtain the video data features, calculate the video center similarity between the video data features and each of the historical video data center features, select historical video data center features with a first video quantity from each of the historical video data center features based on the video center similarity, calculate the video similarity between the video data features and the historical video data features in the historical video data feature sets associated with the historical video data center features with the first video quantity, select historical video data features with a second video quantity from the historical video data feature sets associated with the historical video data center features with the first video quantity based on the video similarity to obtain a node historical video data feature set, and associate and return the node historical video data feature set and the corresponding video similarity; Obtain at least two node historical video data feature sets and the corresponding video similarities returned by the at least two node servers, and screen historical video data features with a candidate video quantity from the at least two node historical video data feature sets based on the video similarity to obtain a candidate historical video data feature set.
14. The method according to claim 1, characterized in that, The data features to be pushed include text data features; Obtaining the historical push data features of each generated digital fingerprint, calculating the similarity between the data features to be pushed and the historical push data features, and determining a candidate historical push data feature set from the historical push data features of each generated digital fingerprint, includes: Sending the text data features to at least two node servers, where the node servers include each historical text data center feature and the associated historical text data feature set; the at least two node servers obtain the text data features, calculate the text center similarity between the text data features and each historical text data center feature, select historical text data center features with a first text quantity from each historical text data center feature based on the text center similarity, calculate the text similarity between the text data features and the historical text data features in the historical text data feature set associated with the historical text data center features with the first text quantity, select historical text data features with a second text quantity from the historical text data feature set associated with the historical text data center features with the first text quantity based on the text similarity, obtain a node historical text data feature set, and return the node historical text data feature set associated with the corresponding text similarity; Obtaining at least two node historical text data feature sets and the corresponding text similarities returned by the at least two node servers, and screening historical text data features with a candidate text quantity from the at least two node historical text data feature sets based on the text similarity to obtain a candidate historical text data feature set.
15. The method according to claim 1, characterized in that, The candidate historical push data feature set includes a candidate historical image data feature set, a candidate historical video data feature set, and a candidate historical text data feature set; Screening target historical push data features from the candidate historical push data feature set includes: Obtaining a first candidate historical push data set corresponding to the candidate historical image data feature set, a second candidate historical push data set corresponding to the candidate historical video data feature set, and a third candidate historical push data set corresponding to the candidate historical text data feature set, and obtaining a target candidate historical push data set based on the first candidate historical push data set, the second candidate historical push data set, and the third candidate historical push data set; Obtaining the image similarity corresponding to the candidate historical image data features in the candidate historical image data feature set, obtaining the video similarity corresponding to the candidate historical video data features in the candidate historical video data feature set, and obtaining the text similarity corresponding to the candidate historical text features in the candidate historical text feature set; Calculating the similarity between each target candidate historical push data in the target candidate historical push data set and the data to be pushed based on the image similarity, the video similarity, and the text similarity to obtain each target candidate similarity, and determining target historical push data from each target candidate historical push data based on each target candidate similarity; When the target historical push data feature meets the preset fingerprint assignment condition, obtaining the digital fingerprint corresponding to the target historical push data feature, and using the digital fingerprint corresponding to the target historical push data feature as the digital fingerprint corresponding to the data to be pushed, includes: When the target historical push data meets the preset fingerprint assignment condition, obtaining the digital fingerprint corresponding to the target historical push data, and using the digital fingerprint corresponding to the target historical push data as the digital fingerprint corresponding to the data to be pushed.
16. The method according to claim 1, wherein The method further includes: Obtaining the data to be pushed, and obtaining the feature extraction model corresponding to the preset similarity level information in each preset feature extraction configuration information; Inputting the data to be pushed into the feature extraction model corresponding to each preset similarity level information for feature extraction, to obtain the data to be pushed features corresponding to each preset similarity level information; Based on the data to be pushed features corresponding to each preset similarity level information, determining the target historical push data features corresponding to each preset similarity level information from the historical push data features of each generated digital fingerprint; When the target historical push data features corresponding to each preset similarity level information meet the preset fingerprint assignment condition, using the digital fingerprint corresponding to the target historical push data features corresponding to each preset similarity level information as the digital fingerprint corresponding to the data to be pushed.
17. A data push method, characterized in that, The method includes: Obtaining a data push request, where the data push request carries an identifier of the data to be pushed and a target push party; Based on the identifier of the data to be pushed, obtaining the corresponding data to be pushed and the corresponding digital fingerprint to be pushed. The digital fingerprint to be pushed is obtained by obtaining the similarity level information corresponding to the data to be pushed, where the similarity level information is used to represent the similarity level corresponding to the data to be pushed. Based on the similarity level information, searching for the corresponding target feature extraction configuration information in each preset feature extraction configuration information. The target feature extraction configuration information is the preset feature extraction configuration information that has the same similarity level information as the data to be pushed; obtaining the feature extraction model corresponding to the similarity level information from the target feature extraction configuration information, inputting the data to be pushed into the feature extraction model corresponding to the similarity level information for feature extraction to obtain the data to be pushed features, obtaining the historical push data features of each generated digital fingerprint, calculating the similarity degree between the data to be pushed features and the historical push data features, determining a candidate set of historical push data features from the historical push data features of each generated digital fingerprint based on the similarity degree, and screening the target historical push data features from the candidate set of historical push data features; when the target historical push data features meet the preset fingerprint assignment condition, obtaining the digital fingerprint corresponding to the target historical push data features, where the data to be pushed and the historical push data corresponding to the target historical push data features belong to the same similarity level; Search for a matching digital fingerprint in the push data digital fingerprint library corresponding to the target push party based on the digital fingerprint of the data to be pushed. When no matching digital fingerprint is found, push the data to be pushed to the target push party.
18. A digital fingerprint generation device, characterized in that, The device includes: An acquisition module, configured to acquire data to be pushed and corresponding similarity level information, where the similarity level information is used to characterize the similarity level corresponding to the data to be pushed; A configuration search module, configured to search for corresponding target feature extraction configuration information from each preset feature extraction configuration information based on the similarity level information. The preset feature extraction configuration information includes a feature extraction model corresponding to the preset similarity level information, and the target feature extraction configuration information is the preset feature extraction configuration information that has the same similarity level information as the data to be pushed; A feature extraction module, configured to obtain the feature extraction model corresponding to the similarity level information from the target feature extraction configuration information, input the data to be pushed into the feature extraction model corresponding to the similarity level information for feature extraction, and obtain the features of the data to be pushed; A feature screening module, configured to obtain the features of historical push data for which digital fingerprints have been generated, calculate the similarity between the features of the data to be pushed and the features of the historical push data, determine a candidate set of historical push data features from the features of the historical push data for which digital fingerprints have been generated based on the similarity, and screen target historical push data features from the candidate set of historical push data features; A fingerprint obtaining module, configured to, when the target historical push data features meet the preset fingerprint assignment conditions, obtain the digital fingerprint corresponding to the target historical push data features, and use the digital fingerprint corresponding to the target historical push data features as the digital fingerprint corresponding to the data to be pushed. The digital fingerprint corresponding to the data to be pushed is used to retrieve push data that has the same similarity level information as the data to be pushed, and the data to be pushed and the historical push data corresponding to the target historical push data features belong to the same similarity level.
19. The device according to claim 18, characterized in that, The acquisition module is further configured to obtain the fingerprint generation service image address, load the fingerprint generation service based on the fingerprint generation service image address. The fingerprint generation service includes each preset feature extraction configuration information. Start the fingerprint generation service through a preset script file, and obtain the data to be pushed and the corresponding similarity level information through the fingerprint generation service.
20. The device according to claim 18, characterized in that The acquisition module is further configured to obtain a retrieval request for the data to be pushed, where the retrieval request for the data to be pushed carries an identifier of the data to be pushed; search for the corresponding digital fingerprint in a preset fingerprint cache based on the identifier of the data to be pushed. When the digital fingerprint corresponding to the identifier of the data to be pushed is not found, obtain the data to be pushed and the corresponding similarity level information based on the identifier of the data to be pushed.
21. The device according to claim 18, characterized in that, The data to be pushed includes at least one of image data, video data, and text data, and the similarity level information includes at least one of an image similarity level, a video similarity level, and a text similarity level; The configuration search module is further configured to search for the same similarity level information from the preset similarity level information in each preset feature extraction configuration information based on at least one of the image similarity level, video similarity level, and text similarity level, and use the preset feature extraction configuration information corresponding to the same similarity level information as the target feature extraction configuration information. The target feature extraction configuration information includes at least one of the feature extraction models corresponding to the image similarity level, video similarity level, and text similarity level.
22. The device according to claim 21, wherein The feature extraction module is further configured to obtain at least one of the feature extraction models corresponding to the image similarity level, video similarity level, and text similarity level from the target feature extraction configuration information; input the image data into the feature extraction model corresponding to the image similarity level to perform image feature extraction and obtain image features. And / or input the video data into the feature extraction model corresponding to the video similarity level to perform video feature extraction and obtain video features. And / or input the text data into the feature extraction model corresponding to the text similarity level to perform text feature extraction and obtain text features.
23. The device according to claim 22, wherein, The apparatus further includes: An image model training module, configured to obtain a training image set, where the training image set includes training images and corresponding image category labels, and the training images in the training image set have the same image similarity level; determine a current training image from the training image set, input the current training image into an initial image category prediction model, the initial image category prediction model outputs an initial image representation through an image feature extraction network, perform image category prediction based on the initial image representation to obtain an initial image category; calculate the error between the initial image category and the image category label, update the initial image category prediction model based on the error, and return to execute the step of inputting the current training image into the initial image category prediction model until the image training completion condition is reached, and obtain the image category prediction model corresponding to the image similarity level; obtain the image feature extraction model corresponding to the image similarity level based on the image feature extraction network in the image category prediction model.
24. The device according to claim 22, characterized in that, The apparatus further includes: A video model training module, which is used to obtain a training video set. The training video set includes training videos and corresponding video category labels, and the training videos in the training video set have the same video similarity level; determine the current training video from the training video set, extract video frames from the current training video at a preset time interval to obtain a video frame sequence; input the video frame sequence into an initial video category prediction model. The initial video category prediction model maps the video frame sequence through an initial mapping network to obtain initial mapping features, inputs the mapping features into an initial attention encoding network for attention encoding to obtain initial video features, inputs the initial video features into an initial classification network for classification to obtain an initial video category; calculate the error between the initial video category and the video category label, update the initial video category prediction model based on the error, and return to execute the step of determining the current training video from the training video set until the video training completion condition is reached, then obtain the video category prediction model corresponding to the video similarity level; obtain the feature extraction model corresponding to the video similarity level based on the mapping network and the attention encoding network in the video category prediction model.
25. The device according to claim 22, characterized in that, The device further includes: A text model training module, which is used to obtain a training text set. The training text set includes text triples, and the text triples include target texts, positive texts, and negative texts; the target texts and positive texts in the text triples have the same text similarity level; input the text triples into an initial text feature extraction model for feature extraction to obtain target text features, positive text features, and negative text features; obtain the positive retrieval similarity and negative retrieval similarity corresponding to the text triples; calculate the similarity distance between the target text features and the positive text features to obtain a positive distance similarity, and calculate the similarity distance between the target text features and the negative text features to obtain a negative distance similarity; perform triple loss calculation based on the positive retrieval similarity, negative retrieval similarity, positive distance similarity, and negative distance similarity to obtain the initial loss information corresponding to the text triples; update the initial text feature extraction model based on the initial loss information, and return to execute the step of obtaining text triples iteratively until the text training completion condition is reached, then obtain the text feature extraction model corresponding to the text similarity level.
26. The device according to claim 25, characterized in that, The text model training module is further used to calculate the error between the positive retrieval similarity and the positive distance similarity to obtain positive error information, and calculate the negative error information of the negative retrieval similarity and the negative distance similarity; Calculate the sum of the positive error information and the negative error information to obtain the initial loss information corresponding to the text triples.
27. The device according to claim 18, characterized in that At least two historical push data center features are included in the features of each generated digital fingerprint historical push data. The feature screening module is further configured to calculate the central similarity degree between the to-be-pushed data feature and the at least two historical pushed data center features, select a first target number of historical pushed data center features from the at least two historical pushed data center features based on the central similarity degree; obtain the historical pushed data feature set associated with the first target number of historical pushed data center features, calculate the feature similarity degree between the to-be-pushed data feature and the historical pushed data features in the historical pushed data feature set, select a second target number of historical pushed data features from the historical pushed data feature set based on the feature similarity degree to obtain a candidate historical pushed data feature set; determine the historical pushed data feature corresponding to the maximum feature similarity degree from the candidate historical pushed data feature set based on the feature similarity degree, and use the historical pushed data feature corresponding to the maximum feature similarity degree as the target historical pushed data feature; The fingerprint obtaining module is further configured to, when the maximum feature similarity degree exceeds a preset similarity threshold, obtain the digital fingerprint corresponding to the target historical pushed data feature, and use the digital fingerprint corresponding to the target historical pushed data feature as the digital fingerprint corresponding to the to-be-pushed data.
28. The device according to claim 18, characterized in that, The fingerprint obtaining module is further configured to, when the target historical pushed data feature does not meet the preset fingerprint assignment condition, store the to-be-pushed data into a target message queue; When it is detected that a preset fingerprint generation condition is reached, obtain each to-be-pushed data from the target message queue, perform similarity clustering on the each to-be-pushed data to obtain each to-be-pushed data set; generate the digital fingerprint corresponding to each to-be-pushed data set to obtain the digital fingerprint corresponding to the to-be-pushed data in each to-be-pushed data set.
29. The device according to claim 18, characterized in that The to-be-pushed data feature includes an image data feature; The feature screening module is further configured to send the image data features to at least two node servers, where the node servers include respective historical image data center features and associated historical image data feature sets; the at least two node servers obtain the image data features, calculate the image center similarity between the image data features and the respective historical image data center features, select historical image data center features with a first image quantity from the respective historical image data center features based on the image center similarity, calculate the image similarity between the image data features and the historical image data features in the historical image data feature sets associated with the historical image data center features with the first image quantity, select historical image data features with a second image quantity from the historical image data feature sets associated with the historical image data center features with the first image quantity based on the image similarity, obtain a node historical image data feature set, and return the node historical image data feature set and the corresponding image similarity in an associated manner; obtain at least two node historical image data feature sets and the corresponding image similarities returned by the at least two node servers, and screen historical image data features with a candidate image quantity from the at least two node historical image data feature sets based on the image similarity to obtain a candidate historical image data feature set.
30. The device according to claim 18, characterized in that, The data features to be pushed include video data features; The feature screening module is further configured to send the video data features to at least two node servers, where the node servers include respective historical video data center features and associated historical video data feature sets; the at least two node servers obtain the video data features, calculate the video center similarity between the video data features and the respective historical video data center features, select historical video data center features with a first video quantity from the respective historical video data center features based on the video center similarity, calculate the video similarity between the video data features and the historical video data features in the historical video data feature sets associated with the historical video data center features with the first video quantity, select historical video data features with a second video quantity from the historical video data feature sets associated with the historical video data center features with the first video quantity based on the video similarity, obtain a node historical video data feature set, and return the node historical video data feature set and the corresponding video similarity in an associated manner; Obtain at least two node historical video data feature sets and the corresponding video similarities returned by the at least two node servers, and screen historical video data features with a candidate video quantity from the at least two node historical video data feature sets based on the video similarity to obtain a candidate historical video data feature set.
31. The device according to claim 18, characterized in that, The data features to be pushed include text data features; The feature screening module is further configured to send the text data features to at least two node servers, where the node servers include respective historical text data center features and associated historical text data feature sets; the at least two node servers obtain the text data features, calculate the text center similarity between the text data features and the respective historical text data center features, select historical text data center features with a first number of texts from the respective historical text data center features based on the text center similarity, calculate the text similarity between the text data features and the historical text data features in the historical text data feature sets associated with the historical text data center features with the first number of texts, select historical text data features with a second number of texts from the historical text data feature sets associated with the historical text data center features with the first number of texts based on the text similarity, obtain a node historical text data feature set, and return the node historical text data feature set and the corresponding text similarity in association; obtain at least two node historical text data feature sets and the corresponding text similarities returned by the at least two node servers, and screen historical text data features with a candidate number of texts from the at least two node historical text data feature sets based on the text similarity to obtain a candidate historical text data feature set.
32. The device according to claim 18, characterized in that, The candidate historical push data feature set includes a candidate historical image data feature set, a candidate historical video data feature set, and a candidate historical text data feature set; The feature screening module is further configured to obtain a first candidate historical push data set corresponding to the candidate historical image data feature set, a second candidate historical push data set corresponding to the candidate historical video data feature set, and a third candidate historical push data set corresponding to the candidate historical text data feature set, and obtain a target candidate historical push data set based on the first candidate historical push data set, the second candidate historical push data set, and the third candidate historical push data set; obtain the image similarity corresponding to the candidate historical image data features in the candidate historical image data feature set, obtain the video similarity corresponding to the candidate historical video data features in the candidate historical video data feature set, and obtain the text similarity corresponding to the candidate historical text features in the candidate historical text feature set; calculate the similarity degree between each target candidate historical push data in the target candidate historical push data set and the data to be pushed based on the image similarity, the video similarity, and the text similarity to obtain respective target candidate similarities, and determine target historical push data from the respective target candidate historical push data based on the respective target candidate similarities; When the target historical push data meets the preset fingerprint assignment condition, the fingerprint obtaining module is further configured to obtain the digital fingerprint corresponding to the target historical push data, and use the digital fingerprint corresponding to the target historical push data as the digital fingerprint corresponding to the data to be pushed.
33. The device according to claim 18, characterized in that, The device further includes: A multi - fingerprint generation module, which is used to obtain data to be pushed, and obtain a feature extraction model corresponding to the preset similarity level information in each preset feature extraction configuration information; input the data to be pushed into the feature extraction model corresponding to each preset similarity level information for feature extraction to obtain the features of the data to be pushed corresponding to each preset similarity level information; determine the target historical push data features corresponding to each preset similarity level information from the historical push data features of each generated digital fingerprint; when the target historical push data features corresponding to each preset similarity level information meet the preset fingerprint assignment condition, use the digital fingerprint corresponding to the target historical push data features corresponding to each preset similarity level information as the digital fingerprint corresponding to the data to be pushed.
34. A data push device, characterized in that, The device includes: A request acquisition module, which is used to obtain a data push request, and the data push request carries an identifier of data to be pushed and a target push party; A fingerprint acquisition module, which is used to obtain the corresponding data to be pushed and the corresponding digital fingerprint to be pushed based on the identifier of the data to be pushed. The digital fingerprint to be pushed is obtained by obtaining the similarity level information corresponding to the data to be pushed. The similarity level information is used to represent the similarity level corresponding to the data to be pushed. Based on the similarity level information, find the corresponding target feature extraction configuration information from each preset feature extraction configuration information. The target feature extraction configuration information is the preset feature extraction configuration information with the same similarity level information as the data to be pushed; obtain the feature extraction model corresponding to the similarity level information from the target feature extraction configuration information, input the data to be pushed into the feature extraction model corresponding to the similarity level information for feature extraction to obtain the features of the data to be pushed, obtain the historical push data features of each generated digital fingerprint, calculate the similarity degree between the features of the data to be pushed and the historical push data features, determine a candidate set of historical push data features from the historical push data features of each generated digital fingerprint based on the similarity degree, and screen the target historical push data features from the candidate set of historical push data features; when the target historical push data features meet the preset fingerprint assignment condition, obtain the digital fingerprint corresponding to the target historical push data features, and the data to be pushed and the historical push data corresponding to the target historical push data features belong to the same similarity level; A push module, which is used to search for a matching digital fingerprint in the push data digital fingerprint library corresponding to the target push party based on the digital fingerprint of the data to be pushed. When no matching digital fingerprint is found, push the data to be pushed to the target push party.
35. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 17.
36. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the method according to any one of claims 1 to 17.
37. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the method according to any one of claims 1 to 17.
Citation Information
Patent Citations
A news text infringement detection method and device based on digital fingerprints and semantic features
CN109918621A
User behavior data processing method and device, equipment and storage medium
CN112107866A