Content-based data matching method, model training method, device and equipment
By encoding feature similarity in a multi-level format and converting it into similarity-encoded embedded features, the problem of ignored embedded feature relationships in existing technologies is solved, achieving higher matching accuracy and recommendation effectiveness, and improving the accuracy and effectiveness of content push.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-10
- Publication Date
- 2026-03-10
Smart Images

Figure CN121637053A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer, in particular to a content-based data matching method, a content-based model training method, device, computer equipment, storage medium and computer program product. BACKGROUND
[0002] With the development of Internet technology, various content information (such as videos, images, articles, etc.) also increases sharply, and users can browse various content information through various online platforms. With the substantial increase in information, it is becoming increasingly important to quickly obtain the content that users want or are interested in from the vast amount of content when facing a large amount of content.
[0003] Currently, the user embedding features of a target user and the content embedding features of a candidate content are usually discretized through a conventional bucketing method, the matching degree between the target user and the candidate content is determined based on the discretization result, and then it is determined whether to recommend the candidate content to the target user based on the matching degree. However, this discretization method is relatively rough, and obviously ignores the relationship between the embedding features and the relationship within the embedding features, resulting in information loss, and thus reducing the accuracy of the matching degree and reducing the effectiveness and accuracy of the recommendation. SUMMARY
[0004] Therefore, it is necessary to provide a content-based data matching method, a content-based model training method, device, computer equipment, computer readable storage medium and computer program product capable of improving the effectiveness and accuracy of recommendation to solve the above technical problems.
[0005] The present application provides a content-based data matching method, comprising:
[0006] obtaining object embedding features of a target object and content embedding features of a candidate content, and calculating feature similarity between the object embedding features and the content embedding features;
[0007] performing base coding on the feature similarity to obtain similarity coding corresponding to each base respectively;
[0008] For any base, based on the coding value corresponding to each position in the similarity coding, determining the target embedding feature corresponding to each position from the position embedding feature corresponding to the base, and obtaining the coding embedding feature corresponding to the similarity coding based on the target embedding feature corresponding to each position; the position embedding feature includes a preset embedding feature corresponding to the target coding value of each position;
[0009] determining the matching degree between the target object and the candidate content based on the coding embedding feature corresponding to each similarity coding respectively.
[0010] The application also provides a content-based data matching device, comprising:
[0011] A data acquisition module is configured to acquire object embedding features of a target object and content embedding features of candidate content, and calculate feature similarity between the object embedding features and the content embedding features;
[0012] A similarity encoding module is configured to encode the feature similarity in a plurality of different bases to obtain similarity encodings corresponding to the plurality of different bases respectively;
[0013] An encoding conversion module is configured to, for any one of the plurality of different bases, determine target embedding features corresponding to each position in the similarity encoding based on an encoding value corresponding to the position in a position embedding feature corresponding to the base, and obtain an encoding embedding feature corresponding to the similarity encoding based on the target embedding features corresponding to the positions;
[0014] A matching degree determination module is configured to determine a matching degree between the target object and the candidate content based on the encoding embedding features corresponding to the similarity encodings respectively.
[0015] The application also provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the content-based data matching method when executing the computer program.
[0016] The application also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the steps of the content-based data matching method.
[0017] The application also provides a computer program product comprising a computer program, wherein the computer program is executed by a processor to implement the steps of the content-based data matching method.
[0018] The application provides a content-based model training method, comprising:
[0019] Acquiring training samples and training labels corresponding to the training samples, wherein the training samples comprise object embedding features of training objects and content embedding features of training content, and the training labels are interaction labels between the training objects and the training content;
[0020] Calculating feature similarity between the object embedding features and the content embedding features in the training samples;
[0021] Encoding the feature similarity in a plurality of different bases to obtain similarity encodings corresponding to the plurality of different bases respectively;
[0022] For any one base, based on the encoding value corresponding to each position in the similarity encoding, the target embedding feature corresponding to each position is determined from the base corresponding position embedding feature, and the encoding embedding feature corresponding to the similarity encoding is obtained based on the target embedding feature corresponding to each position; the position embedding feature includes each position in the preset embedding feature corresponding to the target encoding value;
[0023] Based on the encoding embedding feature corresponding to each similarity encoding of the training sample and the training label, the initial matching degree prediction model is trained to obtain the target matching degree prediction model.
[0024] The application also provides a content-based model training device, comprising:
[0025] A training data acquisition module is configured to acquire a training sample and a training label corresponding to the training sample; the training sample includes an object embedding feature of a training object and a content embedding feature of a training content, and the training label is an interaction label between the training object and the training content;
[0026] A similarity calculation module is configured to calculate a feature similarity between the object embedding feature and the content embedding feature in the training sample;
[0027] A similarity encoding module is configured to encode the feature similarity in a base to obtain a similarity encoding corresponding to each base;
[0028] An encoding conversion module is configured to, for any one base, based on the encoding value corresponding to each position in the similarity encoding, determine the target embedding feature corresponding to each position from the base corresponding position embedding feature, and obtain the encoding embedding feature corresponding to the similarity encoding based on the target embedding feature corresponding to each position; the position embedding feature includes each position in the preset embedding feature corresponding to the target encoding value;
[0029] A model training module is configured to train an initial matching degree prediction model based on the encoding embedding feature corresponding to each similarity encoding of the training sample and the training label, to obtain a target matching degree prediction model.
[0030] The application also provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above-mentioned content-based model training method when executing the computer program.
[0031] The application also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the steps of the above-mentioned content-based model training method.
[0032] The application further provides a computer program product comprising a computer program which, when executed by a processor, implements the steps of the content-based model training method described above.
[0033] The content-based data matching method, the content-based model training method, the device, the computer device, the storage medium and the computer program product described above obtain object embedding features of a target object and content embedding features of candidate content, calculate feature similarity between the object embedding features and the content embedding features, encode the feature similarity in a plurality of bases to obtain similarity encodings corresponding to the plurality of bases respectively, for any one base, determine target embedding features corresponding to each position from position embedding features corresponding to the base based on encoding values corresponding to the positions in the similarity encoding, obtain encoding embedding features corresponding to the similarity encoding based on the target embedding features corresponding to each position, and determine a matching degree between the target object and the candidate content based on the encoding embedding features corresponding to each similarity encoding. In this way, the feature similarity between user embedding features of a target user and content embedding features of candidate content is calculated, the feature similarity is encoded in a plurality of bases, the embedding features can be effectively compressed, the embedding features are converted into data that is easier to process, the similarity encoding obtained by encoding the feature similarity in a plurality of bases contains relationship information between the user embedding features and the content embedding features, and the accuracy of subsequent data processing can be improved. For any one base, each piece of data in the similarity encoding is fully utilized, the similarity encoding is converted into encoding embedding features that are easier to learn according to the encoding values of each position in the similarity encoding and the position embedding features corresponding to the base, and the deficiencies of different bases can be made up for each other, and the influence of data jumping caused by a single base can be alleviated. Therefore, the matching degree between the target object and the candidate content is finally determined based on the encoding embedding features of the plurality of bases, the accuracy of the matching degree can be ensured, and then whether to push the candidate content to the target user is determined based on the matching degree, and the pushing effectiveness and the pushing accuracy can be improved. When training a matching degree prediction model, the training sample containing the user embedding features and the content embedding features is converted into encoding embedding features that are easier to learn by the method of the application, the model training effect can be improved, and the pushing accuracy and the pushing effectiveness of content pushing to a user based on the model can be improved. BRIEF DESCRIPTION OF DRAWINGS
[0034] In order to more clearly illustrate the technical solutions in the embodiments of the application or the related art, the drawings needed to be used in the embodiments or the related art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the application, and for those skilled in the art, other drawings can be obtained without creative labor.
[0035] Figure 1 An application environment diagram for a content-based data matching method and a content-based model training method in one embodiment;
[0036] Figure 2 A flow diagram of a content-based data matching method in one embodiment;
[0037] Figure 3 A diagram of converting feature similarity to encoded embedding features in one embodiment;
[0038] Figure 4 A diagram of converting feature similarity to encoded embedding features in another embodiment;
[0039] Figure 5 A diagram of calculating a match score between a target user and a candidate content in one embodiment;
[0040] Figure 6 A diagram of calculating a match score between a target user and a candidate advertisement in one embodiment;
[0041] Figure 7 A diagram of calculating a match score between a target user and a candidate advertisement in another embodiment;
[0042] Figure 8 A flow diagram of a content-based model training method in one embodiment;
[0043] Figure 9 A diagram of training a model in one embodiment;
[0044] Figure 10 A diagram of calculating a match score between a target user and a candidate advertisement in another embodiment;
[0045] Figure 11 A diagram of an interface of a video application in one embodiment;
[0046] Figure 12 A diagram of an interface of a news application in one embodiment;
[0047] Figure 13 A diagram of an interface of a social application in one embodiment;
[0048] Figure 14 A block diagram of a content-based data matching apparatus in one embodiment;
[0049] Figure 15 A block diagram of a content-based model training apparatus in one embodiment;
[0050] Figure 16 This is an internal structural diagram of a computer device in one embodiment;
[0051] Figure 17 This is a diagram of the internal structure of a computer device in another embodiment. Detailed Implementation
[0052] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0053] The content-based data matching method and content-based model training method provided in this application can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be set up independently, integrated into server 104, or placed in the cloud or on other devices. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, projection devices, etc. Portable wearable devices can include smartwatches, smart bracelets, head-mounted devices, etc. Head-mounted devices can be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. Server 104 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.
[0054] Both the terminal and the server can be used independently to execute the content-based data matching method and the content-based model training method provided in the embodiments of this application. The terminal and the server can also be used collaboratively to execute the content-based data matching method and the content-based model training method provided in the embodiments of this application.
[0055] For example, the server obtains the object embedding features of the target object and the content embedding features of the candidate content, calculates the feature similarity between the object embedding features and the content embedding features, and encodes the feature similarity in at least two different bases to obtain similarity codes. For any base, based on the encoded values corresponding to each position in the similarity code, the server determines the target embedding features corresponding to each position from the positional embedding features corresponding to the base, and obtains the encoded embedding features corresponding to the similarity code based on the target embedding features corresponding to each position. The positional embedding features include the preset embedding features corresponding to the target encoded values at each position. Based on the encoded embedding features corresponding to each similarity code, the server determines the matching degree between the target object and the candidate content. Subsequently, the server can determine the target content from multiple candidate content based on the matching degree and push the target content to the terminal corresponding to the target object.
[0056] For example, the server obtains training samples and corresponding training labels. The training samples include object embedding features of training objects and content embedding features of training content. The training labels are interaction labels between the training objects and training content. The server calculates the feature similarity between the object embedding features and content embedding features in the training samples, and encodes the feature similarity using at least two different bases to obtain similarity codes. For any base, based on the encoded values at each position in the similarity code, the server determines the target embedding features corresponding to each position from the positional embedding features corresponding to that base. Based on the target embedding features at each position, the server obtains the encoded embedding features corresponding to the similarity code, where the positional embedding features include the preset embedding features corresponding to the target encoded values at each position. The server trains an initial matching degree prediction model based on the encoded embedding features and training labels corresponding to each similarity code of the training samples, obtaining a target matching degree prediction model. Subsequently, the server can use the target matching degree prediction model locally or send it to other devices for their use.
[0057] In one embodiment, such as Figure 2 As shown, a content-based data matching method is provided. Taking the application of this method to a computer device as an example, the computer device can be a terminal or a server. It can be understood that this method can be executed independently by the terminal or server, or it can be implemented through interaction between the terminal and the server. Specifically:
[0058] Step S202: Obtain the object embedding features of the target object and the content embedding features of the candidate content, and calculate the feature similarity between the object embedding features and the content embedding features.
[0059] Here, "object" refers to the user. The target object is the object to be processed. Candidate content is the content to be matched against the target object. The matching degree between the target object and the candidate content is calculated, and based on the matching degree, it is determined whether to push the candidate content as the target content to the target object.
[0060] It is understood that content can be online information presented through at least one media format (such as text, images, video, audio, etc.). For example, content can be video content, graphic content, audio content, text content, etc. The various types of content involved in this application can be content obtained from content platforms. A content platform is a platform that provides content services; different content platforms can provide different content. For example, video platforms can provide various movies, TV series, short videos, and other video content; music platforms can provide audio content; and novel platforms can provide text content. Different content platforms can also provide the same content; for example, video platforms, music platforms, and novel platforms can all provide advertising content. A content platform can be an application or a functional module within an application.
[0061] Object embedding features are the embedding features of objects. Content embedding features are the embedding features of content. An embedding feature is a feature vector representing an instance, allowing this vector to express certain characteristics of the instance, while the distance between feature vectors reflects the similarity between instances. Embedding features are typically low-dimensional dense vectors, converting high-dimensional, discrete, or symbolic data describing instances into low-dimensional dense vectors. Low-dimensional dense vectors can capture the inherent features and relationships in the original data that are difficult to measure and compute directly. Converting data describing a target object into embedding features yields the object embedding features of the target object. Converting data describing candidate content into embedding features yields the content embedding features of the candidate content. Data describing an object can be called user information, which may include at least one of the following: personal information, behavioral information, etc. Data describing content can be called content information, which may include at least one of the following: content author, content title, content summary, content tags, content feedback, etc. Embedding features can be obtained through various machine learning models. For example, by inputting the target user's user information into the user tower of a trained dual-tower model, the object embedding features of the target user are obtained; and by inputting the content information of candidate content into the item tower of the trained dual-tower model, the content embedding features of the candidate content are obtained. As another example, by inputting the target user's user information into a trained multimodal model, the object embedding features of the target user are obtained; and by inputting the content information of candidate content into a trained multimodal model, the content embedding features of the candidate content are obtained.
[0062] Specifically, the computer device acquires the object embedding features of the target object and the content embedding features of the candidate content, determines the matching degree between the target object and the candidate content based on the object embedding features and the content embedding features, and determines whether to push the candidate content to the target object based on the matching degree.
[0063] To determine the matching degree, the computer device first calculates the feature similarity between object embedding features and content embedding features. For example, it calculates the cosine distance between object embedding features and content embedding features as feature similarity; it calculates the Euclidean distance between object embedding features and content embedding features as feature similarity; and so on.
[0064] Step S204: Encode the feature similarity using a base system to obtain similarity codes corresponding to at least two base systems.
[0065] Specifically, encoding feature similarity in a number system involves converting the feature similarity into data represented in a number system. For example, converting feature similarity to binary yields a binary similarity code; converting it to ternary yields a ternary similarity code; converting it to quinary yields a quinary similarity code; converting it to octal yields an octal similarity code; and so on. Computer equipment encodes feature similarity in number systems to obtain similarity codes corresponding to at least two different number systems.
[0066] It is understandable that single-base number systems exhibit certain abrupt transitions. Taking binary as an example, there are encoding transitions at certain integer power boundaries. For instance, the binary codes for 63 and 64 are 111111 and 1000000, respectively. Conversely, for some significantly different integers, the differences in their binary codes are not substantial. For example, the binary codes for 63 and 575 are 111111 and 10001111, respectively. Therefore, the method in this application employs multiple bases for encoding, allowing different bases to compensate for each other's shortcomings to a certain extent.
[0067] Step S206: For any number system, based on the encoding values corresponding to each position in the similarity encoding, determine the target embedding features corresponding to each position from the position embedding features corresponding to the number system, and obtain the encoding embedding features corresponding to the similarity encoding based on the target embedding features corresponding to each position; the position embedding features include the preset embedding features corresponding to the target encoding values at each position.
[0068] The similarity code consists of multiple digits, meaning each digit corresponds to a position. For example, if the feature similarity is 50, the binary code for 50 is 110010. In this binary code, the digits from most significant to least significant are 1, 1, 0, 0, 1, 0. Similarly, the quinary code for 50 is 200. In this quinary code, the digits from most significant to least significant are 2, 0, 0.
[0069] A positional embedding feature corresponding to a number system includes multiple preset embedding features corresponding to different positions in the number system encoding result at the target encoding value. For example, if the number system encoding result is limited to a maximum of 10 bits, then a positional embedding feature corresponding to a number system includes 10 preset embedding features corresponding to different positions at the target encoding value. The preset embedding features are pre-defined embedding features. The preset embedding features can be set as needed. For example, features can be randomly generated as preset embedding features. The target encoding value is a specific encoding value, a designated encoding value. The target encoding value can be set as needed.
[0070] For example, in binary, the encoded value at a position can be 0 or 1, and the target encoded value can be 1. In ternary, the encoded value at a position can be 0, 1, or 2, and the target encoded value can be 1 or 2. In quinary, the encoded value at a position can be 0, 1, 2, 3, or 4, and the target encoded value can be 1, 2, 3, or 4.
[0071] For certain number systems, a single position can correspond to multiple target encoded values. Each position has a corresponding preset embedding feature for each target encoded value, and these preset embedding features can be different. For example, in ternary system, the encoded value at a position can be 0, 1, or 2. If the target encoded value is 1 or 2, then the position at 1 corresponds to preset embedding feature A, and the position at 2 corresponds to preset embedding feature B. Different positions can have different preset embedding features corresponding to the same target encoded value. For example, in binary system, the encoded values at each position in the binary encoding result can be 0 or 1. If the target encoded value is 1, the preset embedding features corresponding to each position at 1 are different.
[0072] The encoding embedding features corresponding to similarity encoding include the target embedding features corresponding to each position in the similarity encoding.
[0073] Specifically, by encoding feature similarity using a radix, at least two radix-based similarity codes can be obtained. For any radix, based on the encoded values at each position in the similarity code, the target embedding feature corresponding to each position is determined from the positional embedding features corresponding to the radix. The positional embedding features include preset embedding features corresponding to the target encoded value at each position. If the encoded value at a certain position in the similarity code is the target encoded value, then the preset embedding feature corresponding to that position at the target encoded value is obtained from the positional embedding features corresponding to the radix, and the target embedding feature at that position is determined based on the preset embedding feature corresponding to the target encoded value. For example, the preset embedding feature can be used as the target embedding feature; the preset embedding feature can be compressed to obtain the target embedding feature. If the encoded value at a certain position in the similarity code is not the target encoded value, then the target embedding feature corresponding to that position is determined through other methods. Finally, the computer device obtains the encoded embedding feature corresponding to the similarity code based on the target embedding features corresponding to each position. For example, the encoded embedding feature corresponding to each position can be combined in an ordered manner according to position to obtain the encoded embedding feature corresponding to the similarity code.
[0074] It is understandable that there are multiple similarity codes, with one similarity code corresponding to one number system. This results in multiple encoding embedding features, and one encoding embedding feature corresponds to one similarity code.
[0075] Step S208: Determine the matching degree between the target object and the candidate content based on the encoding embedding features corresponding to each similarity encoding.
[0076] Specifically, computer devices can determine the matching degree between the target object and candidate content based on the encoding embedding features corresponding to each similarity code. For example, the encoding embedding features corresponding to each similarity code can be input into a machine learning model, and the machine learning model can output the matching degree between the target object and candidate content.
[0077] Matching score reflects the degree of matching between a target object and candidate content. Computer devices can determine whether to push candidate content to the target object based on the matching score. For example, candidate content with a matching score greater than a matching score threshold can be used as target content and pushed to the target object. Alternatively, if there are multiple candidate contents, the matching score between each candidate and the target object can be determined, and the candidate with the highest matching score can be used as target content and pushed to the target object.
[0078] It is understood that the recommendation in this application method can be a user-initiated recommendation (also known as a search). The method involves obtaining search information input by the target user (such as search terms, search phrases, and search images), and retrieving multiple pieces of content matching the search information from a content library as candidate content. For example, multiple pieces of content similar to the search information are retrieved as candidate content. The matching degree between each candidate content and the target object is determined, and the candidate content is sorted according to the matching degree from highest to lowest to obtain a content sequence. This content sequence is then displayed to the user as the search results.
[0079] The recommendations in this application can also be passively received recommendations by the user. When a target user enters the content platform, multiple candidate content items are retrieved from the content library. The matching degree between each candidate content item and the target object is determined, and candidate content items with a matching degree greater than a matching degree threshold are selected as target content. When the target user enters the content platform, the target content is recommended to the target user.
[0080] In one embodiment, non-embedded features of the target object and candidate content are obtained. Based on the encoded embedded features and non-embedded features corresponding to each similarity encoding, the matching degree between the target object and candidate content is determined. In this way, the encoded embedded features are obtained based on the embedded features of the target object and candidate content. By combining the embedded features and non-embedded features of the target object and candidate content to determine the matching degree, the accuracy of the matching degree can be effectively improved, thereby improving the accuracy and effectiveness of push notifications.
[0081] In the aforementioned content-based data matching method, the feature similarity between the user embedding features of the target user and the content embedding features of the candidate content is calculated. Encoding the feature similarity using multiple bases effectively compresses the embedded features, transforming them into more easily processed data. Furthermore, the similarity encoding obtained through base encoding contains information about the relationship between the user embedding features and the content embedding features, which helps improve the accuracy of subsequent data processing. For any base, by fully utilizing the data in the similarity encoding, and based on the encoded values at each position in the similarity encoding and the corresponding positional embedding features in the base, the similarity encoding is transformed into more easily learned encoded embedding features. Different bases can also compensate for each other's shortcomings, mitigating the impact of data jumps caused by single-base encoding. Therefore, the final matching degree between the target object and candidate content is determined based on the encoded embedding features in various bases, ensuring the accuracy of the matching degree. Subsequently, determining whether to push candidate content to the target user based on the matching degree improves the effectiveness and accuracy of the push notification. When training the matching degree prediction model, the method in this application transforms the training samples containing user embedding features and content embedding features into more easily learned encoded embedding features, which can improve the model training effect and thus improve the accuracy and effectiveness of content push to users based on the model.
[0082] In one embodiment, feature similarity is encoded in at least two bases to obtain similarity codes corresponding to each base, including:
[0083] The feature similarity is amplified by a preset factor, and the amplified feature similarity is converted into at least two bases to obtain the similarity codes corresponding to each of the at least two bases.
[0084] Specifically, considering that feature similarity usually contains decimals, in order to facilitate number system encoding, the feature similarity is first magnified by a preset factor, and then the magnified feature similarity is converted into at least two number systems to obtain the similarity codes corresponding to at least two number systems.
[0085] It's understandable that the preset multiplier is a pre-set multiplier. The preset multiplier can be set as needed. For example, the preset multiplier can be 100 times. If the feature similarity is 0.6, then the feature similarity is magnified by 100 times and converted to binary to obtain the similarity code 111100.
[0086] In the above embodiments, the feature similarity is first amplified by a preset factor, and then the amplified feature similarity is converted into at least two bases, which can reduce the encoding complexity and obtain a similarity code that is easy to process in subsequent data.
[0087] In one embodiment, based on the encoded values corresponding to each position in the similarity encoding, the target embedding features corresponding to each position are determined from the position embedding features corresponding to the radix, including:
[0088] Based on the encoding values corresponding to each position in the similarity encoding, each position is classified to obtain the first position and the second position; the encoding value corresponding to the first position is the target encoding value;
[0089] From the positional embedding features corresponding to the base, obtain the preset embedding features corresponding to the target encoding values of each first position as the target embedding features corresponding to the first position;
[0090] The preset embedding features corresponding to the non-target encoded values are used as the target embedding features corresponding to each second position.
[0091] In this system, the encoded value at the first position is the target encoded value, and the encoded value at the second position is a non-target encoded value. Non-target encoded values are any encoded values other than the target encoded value. The target encoded value can be considered a valid encoded value, and non-target encoded values can be considered invalid encoded values. Each non-target encoded value has a corresponding preset embedding feature. The preset embedding features for each position corresponding to the non-target encoded value are the same. The preset embedding features for non-target encoded values can be set as needed. For example, the preset embedding feature for a non-target encoded value could be an embedding feature consisting of 0s.
[0092] Specifically, the computer device classifies each position based on the encoded value corresponding to each position in the similarity encoding. Positions with encoded values equal to the target encoded value are designated as first positions, and positions with encoded values not equal to the target encoded value are designated as second positions. For the first position, the computer device extracts the preset embedding features corresponding to the target encoded value for each first position from the position embedding features corresponding to the radix, using these as the target embedding features for that first position. For the second position, the computer device uses the preset embedding features corresponding to the non-target encoded value as the target embedding features for each second position.
[0093] For example, refer to Figure 3Assuming a feature similarity of 51, the feature similarity is converted to ternary notation, resulting in a similarity code of 1220. The positional embedding features corresponding to each position include preset embedding features for each position with a code value of 1 and preset embedding features for each position with a code value of 2. From the positional embedding features in the ternary notation, the preset embedding features corresponding to each 1 in the similarity code at its respective position are extracted as target embedding features for each 1 in the similarity code. Similarly, the preset embedding features corresponding to each 2 in the similarity code at its respective position are extracted as target embedding features for each 2 in the similarity code. The preset embedding features corresponding to a code value of 0 are extracted as target embedding features for each 0 in the similarity code. These target embedding features are then combined in order of position to obtain the encoded embedding features corresponding to the similarity code.
[0094] In the above embodiments, for positions in the similarity encoding where the encoded value is the target encoded value, a preset embedding feature corresponding to the target encoded value at that position is obtained from the position embedding feature corresponding to the radix, and used as the target embedding feature for that position. For positions in the similarity encoding where the encoded value is not the target encoded value, the preset embedding feature corresponding to the non-target encoded value is used as the target embedding feature for that second position. In this way, the target embedding feature not only facilitates subsequent calculation and learning, but also allows for the rapid identification of valid and invalid encoded values in the similarity encoding.
[0095] In one embodiment, based on the target embedding features corresponding to each location, the encoded embedding features corresponding to the similarity encoding are obtained, including:
[0096] The target embedding features corresponding to each position are combined in order of position to obtain the combined embedding features;
[0097] Pooling is performed on the combined embedded features to obtain the encoded embedded features corresponding to the similarity encoding.
[0098] Pooling, in this context, refers to dividing a feature vector into multiple sub-vectors, processing each sub-vector independently (such as calculating the mean or sum of all data within the sub-vector), and then merging the results to obtain the final pooled result. Pooling significantly reduces the time complexity of data processing and improves computational efficiency.
[0099] Specifically, when obtaining the encoded embedding features corresponding to the similarity code based on the target embedding features corresponding to each position, the computer device can combine the target embedding features corresponding to each position in an ordered manner to obtain the combined embedding features. Then, it can perform pooling on the combined embedding features to obtain the encoded embedding features corresponding to the similarity code. For example, sum pooling can be performed on the combined embedding features to obtain the encoded embedding features; or average pooling can be performed on the combined embedding features to obtain the encoded embedding features.
[0100] In the above embodiments, the target embedding features corresponding to each position are first combined in an orderly manner, and then pooling is performed to obtain the encoded embedding features. Pooling can effectively reduce the number of parameters and computational cost, and prevent overfitting.
[0101] In a specific application, taking binary as an example, refer to... Figure 4 If the feature similarity between the target user's user embedding and the candidate content's content embedding is 45, 45 is converted to binary, resulting in 101101. To ensure consistent length across the various feature similarity base encoding results, zeros are padded before 101101 to obtain the binary similarity encoding. If the base encoding result includes k bits, each bit corresponds to an initial embedding (i.e., a preset embedding feature). The initial embeddings corresponding to the k positions form the binary positional embedding feature. For any given position, if the encoding value at that position is 1, the initial embedding corresponding to that position is activated; otherwise, it is not activated. Finally, the activated initial embeddings are arranged according to their positions, with zeros padded at positions where the encoding value is 0. Then, they are fused using avg_pooling to obtain the binary encoding embedding feature corresponding to the feature similarity.
[0102] In a specific application, the binary-coded embedding features are: X2=pooling{emb(x1), …,emb(x2)} i ), …, emb(x m )}. Where, { x1, …, x i , …, x m} represents the binary similarity encoding of the feature similarity, emb(x) i () represents the target embedding feature corresponding to the i-th position. In x i When it is 1, emb(x) i) represents the preset embedding feature corresponding to the i-th position in the binary position embedding feature; in x i When it is 0, emb(x) i ) represents a preset embedded feature consisting of 0.
[0103] Ternary encoding embedding features: X3=pooling{emb(x1), …, emb(x1)} i ), …, emb(x n )}. Where, { x1, …, x i , …, x n} represents the ternary similarity encoding of the feature similarity, x i emb(x) represents the encoded value corresponding to the i-th position in the similarity encoding. i () represents the target embedding feature corresponding to the i-th position. In x i When the value is 2, emb(x) i ) represents the preset embedding feature corresponding to the i-th position in the ternary position embedding feature when the encoding value is 2; in x i When it is 1, emb(x) i ) represents the preset embedding feature corresponding to the i-th position in the ternary position embedding feature when the encoded value is 1; in x i When it is 0, emb(x) i ) represents a preset embedded feature consisting of 0.
[0104] The quinary encoding embedding features are: X5 = pooling{emb(x1), …, emb(x)} i ), …, emb(x l )}. Where, { x1, …, x i , …, x l} represents the similarity code for feature similarity in quinary notation, x i emb(x) represents the encoded value corresponding to the i-th position in the similarity encoding. i () represents the target embedding feature corresponding to the i-th position. In x i When the value is 4, emb(x) i ) represents the preset embedding feature corresponding to the i-th position in the quinary-based position embedding feature when the encoding value is 4; in x i When the value is 3, emb(x) i ) represents the preset embedding feature corresponding to the i-th position in the quinary-based position embedding feature when the encoded value is 3; in x i When the value is 2, emb(x) i) represents the preset embedding feature corresponding to the i-th position in the quinary-based position embedding feature when the encoding value is 2; in x i When it is 1, emb(x) i ) represents the preset embedding feature corresponding to the i-th position in the quinary-based position embedding feature when the encoded value is 1; in x i When it is 0, emb(x) i ) represents a preset embedded feature consisting of 0.
[0105] It is understandable that, by analogy, we can obtain the encoding embedding features corresponding to other number systems.
[0106] In a specific application, refer to Figure 5 The process involves: acquiring the object embedding features of the target object and the content embedding features of the candidate content; calculating the feature similarity between the object embedding features and the content embedding features; encoding the feature similarity in various bases to obtain similarity codes for each base; converting the positional embedding features corresponding to each base into encoded embedding features to obtain encoded embedding features for each base; acquiring the non-embedded features of the target object and candidate content; extracting features associated with the encoded embedding features from the non-embedded features to obtain target-related features; for example, concatenating the various encoded embedding features to synthesize the embedding features and extracting features associated with the encoded embedding features from the non-embedded features; or extracting features associated with each encoded embedding feature from the non-embedded features to obtain sub-related features, and obtaining the target-related features based on these sub-related features; and finally, determining the matching degree between the target object and the candidate content based on the target-related features.
[0107] In one embodiment, the matching degree between the target object and the candidate content is determined based on the encoding embedding features corresponding to each similarity encoding, including:
[0108] Feature extraction is performed on the encoding embedding features corresponding to each similarity code to obtain enhanced embedding features;
[0109] Obtain non-embedded features of the target object and candidate content;
[0110] From non-embedded features, extract features that are associated with the enhanced embedded features to obtain the target associated features;
[0111] Based on target association features, the matching degree between the target object and candidate content is determined.
[0112] Embedded features are features obtained by embedding data. Conversely, non-embedded features are data that has not undergone embedding. For example, embedding transforms high-dimensional, discrete, or symbolic data into low-dimensional dense vectors; similarly, non-embedded features can be high-dimensional, discrete, or symbolic data. Non-embedded features of target objects and candidate content are features obtained by representing user information of target objects and content information of candidate content in their original form or through simple processing. For example, representing ID-type features such as user ID, content ID, user tags, and content tags using one-hot encoding before embedding results in non-embedded features. It can be understood that non-embedded features include the non-embedded features of target users and the non-embedded features of candidate content.
[0113] Specifically, the computer device can acquire the non-embedded features of the target object and candidate content, and determine the matching degree between the target object and candidate content based on the non-embedded features and the encoded embedding features calculated according to the embedded features of the target object and candidate content.
[0114] The computer device extracts features from the encoding embedding features corresponding to each similarity code, extracting effective information from these features to obtain reinforced embedding features. For example, various networks and models can be used to extract features from the data. Another example is concatenating the encoding embedding features corresponding to each similarity code to obtain a comprehensive embedding feature; applying attention processing to this comprehensive embedding feature yields reinforced embedding features; applying attention processing to each individual encoding embedding feature yields sub-reinforced embedding features; concatenating these reinforced embedding features yields the final reinforced embedding feature; and so on. Furthermore, the computer device acquires the non-embedded features of the target object and candidate content, extracting features associated with the reinforced embedding features from these non-embedded features to obtain target-related features. For example, applying attention processing to the reinforced embedding features based on the non-embedded features yields target-related features. Finally, the computer device determines the matching degree between the target object and candidate content based on the target-related features. For example, converting the target-related features into probability values yields the matching degree between the target object and candidate content.
[0115] In one embodiment, the non-embedded features of the target object are embedded to obtain the object embedded features of the target object. Similarly, the non-embedded features of the candidate content are embedded to obtain the content embedded features of the candidate content. Embedding can be implemented using various network layers and models. For example, embedding can be implemented through an embedding layer.
[0116] In the above embodiments, feature extraction is performed on the encoding embedding features corresponding to each similarity code to remove redundant information and obtain enhanced embedding features, thereby improving the accuracy of subsequent data processing. From the non-embedded features of the target object and candidate content, features associated with the enhanced embedding features are extracted to obtain target-related features. These target-related features can reflect user interests and preferences. Based on these features, the matching degree between the target object and candidate content is determined, which improves the accuracy of the matching degree and thus enhances the effectiveness and accuracy of push notifications.
[0117] In one embodiment, feature extraction is performed on the encoding embedding features corresponding to each similarity encoding to obtain enhanced embedding features, including:
[0118] The embedding features corresponding to each similarity code are concatenated to obtain the comprehensive embedding features;
[0119] Self-attention processing is applied to the comprehensive embedding features to obtain enhanced embedding features.
[0120] Attention processing is used to capture useful information from feature vectors, focusing attention on the important parts of the feature vectors. It can be implemented using various attention mechanisms in machine learning. Self-attention is a special type of attention processing that does not require external information; it extracts useful information from feature vectors through internal interactions. It can also be implemented using the self-attention mechanism in machine learning.
[0121] Specifically, when extracting features from the encoding embedding features corresponding to each similarity code, the computer device can first concatenate the encoding embedding features corresponding to each similarity code to obtain a comprehensive embedding feature, and then perform self-attention processing on the comprehensive embedding feature to obtain a reinforced embedding feature. The internal interactions of the comprehensive embedding feature are enhanced through self-attention processing, resulting in a reinforced embedding feature.
[0122] In one embodiment, self-attention processing is performed on the comprehensive embedding features to obtain enhanced embedding features, including: determining a third attention weight based on the comprehensive embedding features; and fusing the third attention weight and the comprehensive embedding features to obtain enhanced embedding features.
[0123] In the above embodiments, the encoding embedding features corresponding to each similarity code are concatenated to obtain a comprehensive embedding feature. Self-attention processing is then applied to the comprehensive embedding feature to obtain an enhanced embedding feature. Concatenation followed by self-attention processing effectively enhances the feature interactions between the various encoding embedding features, resulting in an accurate enhanced embedding feature.
[0124] In a specific application, the formula for calculating enhanced embedded features is as follows:
[0125]
[0126]
[0127]
[0128] Where X2 represents the binary similarity code corresponding to the feature similarity, X3 represents the ternary similarity code corresponding to the feature similarity, and X5 represents the pentatonic similarity code corresponding to the feature similarity. `concat` means concatenation, and `p` represents the combined embedded features. `p` is obtained by concatenating X2, X3, and X5. `weight` represents the attention weight, and `results` represents the enhanced embedded features. `p` obtains its weight through internal feature interactions, and `p` and `weight` are multiplied to obtain `results`. `d` represents the feature dimension of `p`. `softmax` represents the normalization exponential function, and `p`... T This represents the transpose of p.
[0129] In one embodiment, feature extraction is performed on the encoding embedding features corresponding to each similarity encoding to obtain enhanced embedding features, including:
[0130] Based on similarity coding, self-attention processing is performed on the coding embedding features corresponding to the similarity coding to obtain the sub-enhanced embedding features corresponding to the similarity coding;
[0131] The enhanced embedding features are obtained based on the sub-enhanced embedding features corresponding to each similarity code.
[0132] Specifically, when extracting features from the encoding embedding features corresponding to each similarity code, the computer device first performs self-attention processing on the encoding embedding features corresponding to the similarity codes to obtain the sub-enhanced embedding features corresponding to each similarity code, and then concatenates the sub-enhanced embedding features to obtain the enhanced embedding features.
[0133] The encoding embedding features corresponding to similarity encodings are obtained based on the similarity encodings. Therefore, when performing self-attention processing on the encoding embedding features corresponding to similarity encodings, it can be done directly on the encoding embedding features, or it can be done on the encoding embedding features corresponding to the similarity encodings. Because there are multiple similarity encodings for the same feature similarity, multiple sub-enhanced embedding features can be obtained. Finally, based on the sub-enhanced embedding features corresponding to each similarity encoding, the enhanced embedding feature is obtained. For example, the enhanced embedding feature can be obtained by concatenating the various sub-enhanced embedding features. Alternatively, the enhanced embedding feature can include various sub-enhanced embedding features.
[0134] In the above embodiments, self-attention processing is performed on the encoded embedding features corresponding to the similarity codes based on similarity codes to obtain sub-enhanced embedding features corresponding to the similarity codes. Based on the sub-enhanced embedding features corresponding to each similarity code, enhanced embedding features are obtained. By first performing self-attention processing based on similarity codes and then concatenating them, the feature interactions within the encoded embedding features can be enhanced with the help of similarity codes, thereby obtaining accurate enhanced embedding features.
[0135] In one embodiment, feature extraction is performed on the encoding embedding features corresponding to each similarity code to obtain enhanced embedding features. This includes: concatenating the encoding embedding features corresponding to each similarity code to obtain a comprehensive embedding feature; performing self-attention processing on the comprehensive embedding feature to obtain a first embedding feature; performing self-attention processing on the encoding embedding features corresponding to the similarity code based on the similarity code to obtain sub-enhanced embedding features corresponding to the similarity code; concatenating each of the first sub-enhanced embedding features to obtain a second embedding feature; and obtaining the enhanced embedding feature based on the first and second embedding features. This concatenation followed by self-attention processing enhances the feature interactions between the various encoding embedding features, while the self-attention processing followed by concatenation enhances the feature interactions within the encoding embedding features. Combining the two feature extraction methods yields two enhanced embedding features (i.e., the first and second embedding features), and based on these two enhanced embedding features, the final enhanced embedding feature is obtained, further improving the accuracy of the final enhanced embedding feature.
[0136] It is understandable that when obtaining enhanced embedding features based on the first and second embedding features, the enhanced embedding features can be obtained by concatenating the first and second embedding features, or by fusing the first and second embedding features.
[0137] In one embodiment, based on similarity encoding, attention processing is performed on the encoded embedding features corresponding to the similarity encoding to obtain sub-enhanced embedding features corresponding to the similarity encoding, including:
[0138] The first attention weight is determined based on similarity encoding;
[0139] By fusing the encoding embedding features corresponding to the similarity encoding and the first attention weight, the sub-enhanced embedding features corresponding to the similarity encoding are obtained.
[0140] Specifically, when performing attention processing on the encoding embedding features corresponding to similarity codes, for any given similarity code, the computer device can first determine a first attention weight based on the similarity code, and then fuse the encoding embedding features corresponding to the similarity code with the first attention weight to obtain the sub-enhanced embedding features corresponding to the similarity code. For example, the similarity code can be converted into weights using a normalization function to obtain the first attention weight. Alternatively, the encoding embedding features corresponding to the similarity code can be multiplied by the first attention weight to obtain the sub-enhanced embedding features corresponding to the similarity code. Another example is feature extraction from the encoding embedding features corresponding to the similarity code to obtain updated embedding features, which can then be multiplied by the first attention weight to obtain the sub-enhanced embedding features corresponding to the similarity code.
[0141] In the above embodiments, a first attention weight is determined based on similarity encoding. This first attention weight determines the feature interaction mode within the encoded embedded feature. Different similarity codes correspond to different first attention weights, thereby increasing the diversity of feature interaction modes and helping to improve the accuracy of subsequent data processing. The encoded embedded feature corresponding to the similarity code and the first attention weight are then fused to obtain the sub-enhanced embedded feature corresponding to the similarity code.
[0142] In a specific application, the formula for calculating enhanced embedded features is as follows:
[0143]
[0144]
[0145]
[0146] Among them, B i This represents the similarity encoding corresponding to base i, softmax represents the normalization exponential function, and weight... i B i The corresponding first attention weight, B i Substituting into the softmax function, we obtain the weight. i X i B i The corresponding encoding embedding features, that is, the encoding embedding features corresponding to the similarity encoding in base i, results i X represents i The corresponding sub-enhanced embedding features will weight i and X i Multiply to get results i`results2` represents the sub-enhanced embedding features corresponding to the binary similarity encoding. `results3` represents the sub-enhanced embedding features corresponding to the ternary similarity encoding. `results5` represents the sub-enhanced embedding features corresponding to the pentine similarity encoding. `concat` means concatenation, and `results` represents the enhanced embedding features. `results` is obtained by concatenating `results2`, `results3`, and `results5`.
[0147] In one embodiment, features associated with the enhanced embedded features are extracted from non-embedded features to obtain target associated features, including:
[0148] From non-embedded features, extract features associated with sub-enhanced embedded features to obtain sub-associated features;
[0149] The target associated features are obtained by concatenating the various sub-associated features.
[0150] Specifically, the computer device performs self-attention processing on the encoded embedding features corresponding to the similarity encoding based on similarity encoding, obtaining sub-enhanced embedding features corresponding to the similarity encoding. From the non-embedded features, features associated with the sub-enhanced embedding features are extracted to obtain sub-association features. Because there are multiple similarity encodings for the same feature similarity, multiple sub-enhanced embedding features and multiple sub-association features can be obtained. Finally, the computer device concatenates the various sub-association features to obtain the target association feature.
[0151] In one embodiment, extracting features associated with sub-reinforced embedding features from non-embedded features to obtain sub-associated features includes: determining a fourth attention weight based on the non-embedded features and the sub-reinforced embedding features; and fusing the fourth attention weight and non-embedded features to obtain the sub-associated features. In this way, there are multiple sub-reinforced embedding features, resulting in multiple fourth attention weights, which increases the diversity of attention weights and helps improve the accuracy of subsequent data processing.
[0152] In the above embodiments, the sub-enhanced embedding features obtained through various number systems are fully utilized. Features associated with each sub-enhanced embedding feature are extracted from the non-embedded features to obtain sub-association features. The sub-association features are then concatenated to obtain the target association features. This ensures that the target association features contain effective information extracted from the non-embedded features through various number systems, thereby improving the accuracy of the target association features. Consequently, the accuracy of the matching degree can be improved when determining the matching degree based on the target association features.
[0153] In a specific application, the formula for calculating the target association feature is as follows:
[0154]
[0155]
[0156]
[0157] In this approach, sub-enhanced embedding features are used as the query, and non-embedded features are used as the key and value. Attention processing is performed based on the query, key, and value to extract interest features (i.e., sub-association features) related to the sub-enhanced embedding features from the non-embedded features. i k represents the sub-enhanced embedding feature corresponding to the i-ary representation (i.e., the sub-enhanced embedding feature corresponding to the similarity encoding in the i-ary representation). i This represents the non-embedded features corresponding to base i. The non-embedded features are the same for all bases. `softmax` represents the normalization exponential function. `weight`... i This represents the fourth attention weight corresponding to base i, where q i and k respectively i Perform feature interactions to obtain weights i attention i Representing the sub-association features corresponding to base i, weighting i and k i Multiply to obtain attention i attention2 represents the sub-association features corresponding to binary data. attention3 represents the sub-association features corresponding to ternary data. attention5 represents the sub-association features corresponding to quinary data. result represents the target association features. concat means concatenating attention2, attention3, and attention5 to obtain result.
[0158] In one embodiment, features associated with the enhanced embedded features are extracted from non-embedded features to obtain target associated features, including:
[0159] The second attention weights are determined based on non-embedded features and reinforced embedded features.
[0160] By fusing the second attention weights and non-embedded features, target-related features are obtained.
[0161] Specifically, computer devices can directly extract features associated with enhanced embedded features from non-embedded features to obtain target associated features.
[0162] The computer device first determines the second attention weight based on non-embedded features and reinforced embedded features. For example, it calculates the feature similarity between non-embedded features and reinforced embedded features, and obtains the second attention weight based on this similarity. Alternatively, it fuses the non-embedded features and reinforced embedded features to obtain fused embedded features, and then obtains the second attention weight based on these fused embedded features. For example, it multiplies the second attention weight and non-embedded features to obtain target-related features. The computer device then fuses the second attention weight and non-embedded features again to obtain target-related features. Another example is feature extraction from the non-embedded features to obtain target reinforced features, which are then multiplied by the second attention weight to obtain target-related features.
[0163] In the above embodiments, the enhanced embedding feature is obtained based on the feature similarity between the target user's object embedding feature and the candidate content's content embedding feature, which can reflect the target user's interest in the candidate content. The non-embedded features of the target user and the candidate content can reflect the user characteristics of the target user and the content characteristics of the candidate content. Based on the non-embedded features and the enhanced embedding feature, a second attention weight is determined. The second attention weight and the non-embedded features are then fused to obtain the target association feature, which has a strong feature expression capability and can better reflect the target user's interest in the candidate content. Therefore, the accuracy of the matching degree can be improved when the matching degree is subsequently determined based on the target association feature.
[0164] In a specific application, the formula for calculating the target association feature is as follows:
[0165]
[0166]
[0167] In this approach, the enhanced embedded features are used as the query, and the non-embedded features are used as the key and value. Attention processing is performed based on the query, key, and value to extract interest features related to the enhanced embedded features from the non-embedded features. Here, q represents the enhanced embedded feature, k represents the non-embedded feature, d represents the feature dimension of the non-embedded feature, and the softmax function represents the normalization exponential function. The interaction between q and k yields the weight. Attention represents the target-related features; multiplying the weight by k yields the attention mechanism.
[0168] In one embodiment, feature extraction is performed on the encoding embedding features corresponding to each similarity encoding to obtain reinforced embedding features; non-embedded features of the target object and the candidate content are obtained; features associated with the reinforced embedding features are extracted from the non-embedded features to obtain first associated features; features associated with the sub-reinforced embedding features are extracted from the non-embedded features to obtain sub-associated features; the sub-associated features are concatenated to obtain second associated features; and the target associated features are obtained based on the first and second associated features. Combining the two associated feature extraction methods yields two target associated features (i.e., first and second associated features), and based on these two target associated features, the final target associated features are obtained, which can further improve the accuracy of the final target associated features.
[0169] In one embodiment, the matching degree between the target object and the candidate content is determined based on the encoding embedding features corresponding to each similarity encoding, including:
[0170] Obtain non-embedded features of the target object and candidate content;
[0171] The non-embedded features and the encoded embedded features corresponding to each similarity encoding are input into the target matching degree prediction model to obtain the matching degree between the target object and the candidate content.
[0172] The matching degree prediction model is a machine learning model used to predict the matching degree between users and content. The input data for the matching degree prediction model includes coded embedding features determined based on the feature similarity between the user's embedding features and the content's embedding features, as well as non-embedding features of the user and content. The output data of the matching degree prediction model includes the matching degree between the user and the content. The target matching degree prediction model is a trained matching degree prediction model.
[0173] Specifically, the computer device can acquire the non-embedded features of the target object and candidate content, and input the non-embedded features and the corresponding encoded embedding features of each similarity code into the target matching degree prediction model. The target matching degree prediction model processes the input data and outputs the matching degree between the target object and the candidate content. For example, in the target matching degree prediction model, feature extraction is performed on the encoded embedding features corresponding to each similarity code to obtain reinforced embedding features. From the non-embedded features, features associated with the reinforced embedding features are extracted to obtain target association features. Based on the target association features, the matching degree between the target object and the candidate content is determined, and the matching degree between the target object and the candidate content is output.
[0174] In the above embodiments, the machine learning model has powerful data processing capabilities. It inputs the non-embedded features of the target object and candidate content, as well as the encoded embedding features determined based on the embedded features of the target object and candidate content, into the target matching degree prediction model. The target matching degree prediction model can quickly output an accurate matching degree between the target object and candidate content. Furthermore, the encoded embedding features are easy to learn; the target matching degree prediction model can learn effective information from the encoded embedding features that helps predict the matching degree, thereby outputting an accurate matching degree.
[0175] In one embodiment, the non-embedded features and the encoded embedded features corresponding to each similarity encoding are input into the target matching degree prediction model to obtain the matching degree between the target object and the candidate content, including:
[0176] By using the non-embedded processing layer in the target matching degree prediction model, feature extraction is performed on the non-embedded features to obtain target enhancement features;
[0177] By using the self-attention layer in the target matching degree prediction model, feature extraction is performed on the encoding embedding features corresponding to each similarity encoding to obtain enhanced embedding features;
[0178] By using the target attention layer in the target matching prediction model, features associated with the enhancement embedding features are extracted from the target enhancement features to obtain target-related features;
[0179] The output layer of the target matching degree prediction model outputs the matching degree between the target object and the candidate content based on the target association features.
[0180] The target matching prediction model comprises a non-embedded processing layer, a self-attention layer, a target attention layer, and an output layer. The non-embedded processing layer processes non-embedded features, inputting user and content non-embedded features for feature extraction and outputting target-enhanced features. The self-attention layer handles data interaction within features, inputting various encoded embedding features for feature extraction and outputting enhanced embedding features. The target attention layer handles data interaction between features, inputting target-enhanced features and enhanced embedding features for extraction and outputting target-related features. The output layer outputs the matching score, inputting target-related features and outputting the matching score between users and content based on these features.
[0181] Specifically, the non-embedded features of the target object and candidate content are input into the target matching degree prediction model, and the encoded embedding features determined based on the embedded features of the target object and candidate content are also input into the target matching degree prediction model. In the target matching degree prediction model, a non-embedded processing layer extracts features from the non-embedded features to obtain target enhancement features. A self-attention layer extracts features from the encoded embedding features corresponding to each similarity encoding to obtain enhancement embedding features. A target attention layer extracts features associated with the enhancement embedding features from the target enhancement features to obtain target association features. Finally, an output layer outputs the matching degree between the target object and candidate content based on the target association features.
[0182] In the above embodiments, by processing data in an orderly manner through each network layer in the target matching degree prediction model, more critical and useful features can be extracted, thereby outputting a more accurate matching degree.
[0183] In a specific application, using content as advertising and multiple number systems including binary, ternary, and quinary as examples, the method of this application is illustrated. (Reference) Figure 6 The process involves obtaining the user embedding features of the target user and the ad embedding features of the candidate ads, calculating the feature similarity between them, and converting the feature similarity into binary, ternary, and quinary representations to obtain similarity codes. Taking binary as an example, if the code value at a certain position in the binary similarity code is the target code value, the preset embedding feature corresponding to that position in the binary position is activated from the embedded features of that position. Unactivated positions are padded with preset embedding features consisting of 0s to obtain combined embedding features. These combined embedding features are then pooled to obtain the encoded embedding features corresponding to the similarity codes. The encoded embedding features corresponding to the similarity codes in various bases are concatenated to obtain the comprehensive embedding features. The comprehensive embedding features are input into the attention layer (self-attention layer) to obtain the enhanced embedding features. The non-embedded features of the target user and candidate ads are obtained and input into the embedding layer. The output data of the embedding layer is input into a multilayer perceptron to obtain the target enhanced features. The target enhanced features and the enhanced embedding features are input into the target attention layer (target-attention layer) to obtain the target associated features. The target associated features are input into the output layer, and the output layer outputs the matching score between the target user and the candidate ads. Subsequently, multiple candidate ads can be sorted according to their matching scores, and the top k candidate ads can be recommended to the target user.
[0184] In a specific application, using content as advertising and multiple number systems including binary, ternary, and quinary as examples, the method of this application is illustrated. (Reference) Figure 7The process involves obtaining the user embedding features of the target user and the ad embedding features of the candidate ads, calculating the feature similarity between them, and converting the feature similarity into binary, ternary, and quinary representations to obtain similarity codes. Taking binary as an example, if the code value at a certain position in the binary similarity code is the target code value, the preset embedding feature corresponding to that position in the binary position is activated from the corresponding position embedding feature. Unactivated positions are padded with preset embedding features consisting of 0s to obtain combined embedding features. These combined embedding features are then pooled to obtain the encoded embedding features corresponding to the similarity codes. Each encoded embedding feature is input into its corresponding self-attention layer to obtain sub-enhanced embedding features. The non-embedded features of the target user and candidate ads are obtained and input into the embedding layer. The output data of the embedding layer is input into a multilayer perceptron to obtain target enhanced features. These target enhanced features are input into each target attention layer, and each sub-enhanced embedding feature is input into its corresponding target attention layer. Each target attention layer outputs sub-association features. The various sub-association features are concatenated to obtain the target association feature. This target association feature is then input into the output layer, which outputs the matching score between the target user and the candidate ads. Subsequently, multiple candidate ads can be ranked according to the matching score, and the top k candidate ads can be recommended to the target user.
[0185] It can be understood that the target model (i.e., the target matching prediction model) may include an embedding layer, a multilayer perceptron, a self-attention layer, a target attention layer, and an output layer. Furthermore, the target model may also include an encoding layer, which inputs the user embedding features of the target user and the ad embedding features of the candidate ads, and outputs a comprehensive embedding feature. During model training, the encoding layer does not require parameter adjustment, while the embedding layer, multilayer perceptron, self-attention layer, target attention layer, and output layer adjust their parameters.
[0186] It is understandable that binary, ternary, and quinary are examples, and multiple number systems can include other number systems.
[0187] In one embodiment, the candidate content is a candidate advertisement. The content-based data matching method also includes:
[0188] Obtain the push cost corresponding to candidate ads;
[0189] The recommendation level of candidate ads is determined based on push cost and matching degree;
[0190] Based on recommendation rates, target ads are selected from multiple candidate ads to identify the target audience.
[0191] In this context, the cost per mille (CPM) for advertising refers to the cost an advertiser pays for user interaction events when placing an ad. For example, CPM can be the cost per thousand impressions, one click, or one conversion. Examples include 15 yuan for 1000 impressions (CPM), 1 cent per click (CPC), and 10 yuan per registration (CPA). CPM is used to represent the advertiser's required cost.
[0192] Specifically, the method of this application can be applied to advertising recommendation scenarios. It comprehensively considers the matching degree between the target audience and candidate ads, as well as the push cost of the candidate ads, to select suitable ads for display to the target audience. The computer device calculates the matching degree between the target audience and candidate ads, and determines the recommendation degree of the candidate ads based on the push cost of the candidate ads and the matching degree. For example, the matching degree is a matching score; the push cost is converted into a push score; the matching score and the push score are weighted and summed to obtain the target score, which is then used as the recommendation degree. Finally, based on the recommendation degree, the computer device determines the target ads for the target audience from multiple candidate ads and recommends the target ads to the target audience. For example, candidate ads with a recommendation degree greater than a recommendation degree threshold are used as target ads; multiple candidate ads are sorted from highest to lowest recommendation degree, and the top k candidate ads are used as target ads; and so on.
[0193] In the above embodiments, the recommendation level of candidate advertisements is determined based on push cost and matching degree. Based on the recommendation level, advertisements that match the user's interests and have high conversion potential are selected for display, thereby improving the accuracy and effectiveness of push, enhancing user experience, and protecting the interests of advertisers.
[0194] In one embodiment, such as Figure 8 As shown, a content-based model training method is provided. Taking the application of this method to a computer device as an example, the computer device can be a terminal or a server. It can be understood that this method can be executed independently by the terminal or server, or it can be implemented through interaction between the terminal and the server. Wherein:
[0195] Step S802: Obtain training samples and corresponding training labels; training samples include object embedding features of training objects and content embedding features of training content, and training labels are interaction labels between training objects and training content.
[0196] The training samples include object embedding features of the training objects and content embedding features of the training content. The training objects are the objects in the data that need to be used in model training. This can be understood as users. The training content refers to the content in the data that needs to be used in model training. This can be understood as online information presented through at least one media format (such as text, images, video, audio, etc.). For example, content can be video content, graphic content, audio content, text content, etc. Object embedding features are the embedding features of the objects. Content embedding features are the embedding features of the content.
[0197] Training tags are interaction labels between the training object and the training content. Training tags indicate the actual interaction results between the training object and the training content. Training content is pushed to the training object, which can choose whether to interact with the training content as needed, thus obtaining the interaction tags between the training object and the training content. It can be understood that different interaction operations will produce different interaction results. Interaction operations can be clicks, purchases, likes, comments, shares, browsing (such as browsing time exceeding a time threshold, or the proportion of viewed content exceeding a proportion threshold), etc. If a user interacts with a certain piece of content, it reflects that the user is interested in that content.
[0198] Specifically, the computer device can acquire a training set, which includes multiple training samples and their corresponding training labels. Based on the training set, the initial matching degree prediction model is trained to obtain the target matching degree prediction model.
[0199] It can be understood that each training label in the training set can be a specific interaction result for a certain interactive operation. The target matching prediction model trained based on the training set is then used to predict the matching degree between the object and the content in that interactive operation. For example, a training label might be a click label, indicating whether the training object clicked the training content. The target matching prediction model trained based on the click label is used to predict the matching degree between the object and the content in the click operation; that is, it's used to predict whether the target object will click the content to be matched.
[0200] The training labels in the training set can also include interaction results for various interactive operations. Therefore, the target matching prediction model trained on the training set is used to predict the overall matching degree between the object and the content across multiple interactive operations. For example, training labels include click, share, and like labels. The click label indicates whether the training object clicked on the training content, the share label indicates whether the training object shared the training content, and the like label indicates whether the training object liked the training content. The target matching prediction model trained based on these labels is used to predict the overall matching degree between the object and the content across these interactive operations; that is, it is used to predict whether the target object will click, share, or like the content to be matched.
[0201] Step S804: Calculate the feature similarity between object embedding features and content embedding features in the training samples.
[0202] Step S806: Encode the feature similarity using a base system to obtain similarity codes corresponding to at least two base systems.
[0203] Specifically, the computer device calculates the cosine distance between the object embedding features and the content embedding features, converts the feature similarity into data represented in a number system, and obtains the similarity codes corresponding to at least two number systems.
[0204] Step S808: For any number system, based on the encoding values corresponding to each position in the similarity encoding, determine the target embedding features corresponding to each position from the position embedding features corresponding to the number system, and obtain the encoding embedding features corresponding to the similarity encoding based on the target embedding features corresponding to each position; the position embedding features include the preset embedding features corresponding to the target encoding values at each position.
[0205] Specifically, for any number system, based on the encoded values at each position in the similarity encoding, the target embedding features corresponding to each position are determined from the positional embedding features corresponding to the number system. The positional embedding features include preset embedding features corresponding to the target encoded value at each position. If the encoded value at a certain position in the similarity encoding is the target encoded value, then the preset embedding feature corresponding to that position at the target encoded value is obtained from the positional embedding features corresponding to the number system, and the target embedding feature at that position is determined based on this preset embedding feature. For example, the preset embedding feature can be used as the target embedding feature; the preset embedding feature can be compressed to obtain the target embedding feature. If the encoded value at a certain position in the similarity encoding is not the target encoded value, then the target embedding feature at that position is determined through other methods. Finally, the computer device obtains the encoding embedding feature corresponding to the similarity encoding based on the target embedding features corresponding to each position. For example, the target embedding features corresponding to each position can be combined in an ordered manner according to their positions to obtain the encoding embedding feature corresponding to the similarity encoding.
[0206] It is understood that the specific process of converting similarity encoding into encoded embedded features can be referred to the content of the foregoing embodiments, and will not be repeated here.
[0207] Step S810: Based on the encoding embedding features and training labels corresponding to each similarity encoding of the training samples, train the initial matching degree prediction model to obtain the target matching degree prediction model.
[0208] The matching degree prediction model is a machine learning model used to predict the matching degree between users and content. The input data for the matching degree prediction model includes encoded embedding features determined based on the feature similarity between the user's embedding features and the content's embedding features, as well as non-embedding features of the user and content. The output data of the matching degree prediction model includes the matching degree between the user and the content. The initial matching degree prediction model is the matching degree prediction model to be trained. The target matching degree prediction model is the already trained matching degree prediction model.
[0209] Specifically, the computer device can train an initial matching degree prediction model based on the encoding embedding features corresponding to each similarity code of the training samples and the training labels corresponding to the training samples, thereby obtaining a target matching degree prediction model. For example, the encoding embedding features corresponding to each similarity code of the training samples are input into the initial matching degree prediction model to obtain the predicted labels corresponding to the training samples. Based on the predicted labels corresponding to the training samples and the training labels, the model loss is calculated. Based on the model loss, the model parameters of the initial matching degree prediction model are adjusted until the convergence condition is met, thereby obtaining the target matching degree prediction model.
[0210] The convergence condition is the criterion for determining whether the model has converged. Convergence conditions include, but are not limited to, at least one of the following: model loss is greater than a preset loss value, the number of model iterations is greater than a preset number of iterations, or the rate of change of model loss is less than a preset rate of change. It can be understood that the model parameters can be adjusted based on the model loss using the gradient descent algorithm.
[0211] In one embodiment, reference Figure 9The process begins by acquiring a training set, which includes multiple training samples and their respective training labels. The training samples consist of non-embedded features of the training objects and content, object embedding features of the training objects, and content embedding features of the training content. For any given training sample, the feature similarity between the object embedding features and content embedding features is calculated. This similarity is then encoded using at least two different bases to obtain similarity codes. Based on the positional embedding features corresponding to these bases, the similarity codes are converted into encoded embedding features, resulting in the encoded embedding features corresponding to each training sample. The non-embedded features and the encoded embedding features of the training samples are input into an initial matching degree prediction model, which outputs the predicted labels for the training samples. The training labels and predicted labels of the multiple training samples are then substituted into a loss function to obtain the model loss. The model loss is backpropagated to adjust the model parameters, resulting in an intermediate matching degree prediction model. The process then returns to the step of acquiring the training set for iterative training. This iterative training continues until the convergence condition is met, yielding the target matching degree prediction model.
[0212] In the above-mentioned content-based model training method, when training the matching degree prediction model, the training samples containing user embedding features and content embedding features are transformed into more easily learned encoded embedding features by the method of this application, which can improve the model training effect and thus improve the accuracy and effectiveness of pushing content to users based on the model.
[0213] In a specific embodiment, the method of this application can be applied to the advertising recommendation scenario. The method of this application can better utilize user embedding features and advertising embedding features in the advertising recommendation model, so that the advertising recommendation model can learn the information of the embedding features more fully, thereby better capturing users' interest preferences for advertisements.
[0214] This application proposes a multi-base collaborative bucketing encoding scheme. Based on this scheme, information compression is applied to user and ad embedding features, transforming them into more easily learned features to adapt to the ad recommendation model and mitigating the abrupt changes inherent in unibase encoding. (Reference) Figure 10The process involves obtaining the user embedding (user embedding feature) of the target user and the ad embedding (ad embedding feature) of the candidate ads, calculating the feature similarity between the user embedding and the ad embedding, and then converting the feature similarity by a factor of 100 into binary, ternary, and quinary representations to obtain multiple similarity codes. Each similarity code consists of k bits. For binary, each bit corresponds to an initial embedding (also called position embedding). For any given position, if the encoding value in the similarity code is 1, the initial embedding at that position is activated; otherwise, it is not activated. Finally, the activated initial embeddings are arranged according to their positions, with zeros added to the positions where the encoding value is 0. These are then fused using sumpooling to obtain the binary encoding embedding feature corresponding to the feature similarity. For the ternary representation, each bit corresponds to two initial embeddings. For any given position, if the encoding value at that position is 1, the initial embedding corresponding to position 1 is activated; if the encoding value at that position is 2, the initial embedding corresponding to position 2 is activated; and if the encoding value at that position is 0, the initial embedding corresponding to that position is not activated. Finally, the activated initial embeddings are arranged according to their respective positions, and zero-based embeddings are added to the positions where the encoding value is 0. Then, sum pooling is used to fuse them, resulting in the binary encoding embedding feature corresponding to the feature similarity. For a quinary system, each bit corresponds to four initial embeddings. For any given position, if the similarity encoding value at that position is 1, the initial embedding corresponding to position 1 is activated; if the value is 2, the embedding corresponding to position 2 is activated; if the value is 3, the embedding corresponding to position 3 is activated; if the value is 4, the embedding corresponding to position 4 is activated; and if the value is 0, the embedding corresponding to that position is not activated. Finally, the activated initial embeddings are arranged according to their positions, with zeros added to the positions where the value is 0. These are then fused using sum pooling to obtain the binary encoding embedding feature corresponding to the feature similarity.
[0215] The encoded embedding features are learned embedding features (i.e., learnable embedding features) and used as part of the input to the ad recommendation model. The sparse features (non-embedding features) of the target user and candidate ads are used as another part of the input to the ad recommendation model. The ad recommendation model ultimately outputs a matching score between the target user and the candidate ads. The ad recommendation model is a deep neural network.
[0216] In the advertising recommendation model, the self-attention mechanism is used to better extract effective information from the encoded embedded features, and the target-attention mechanism is used to extract interest features related to the self-attention result from the sparse features. The matching score is output based on the target-attention result.
[0217] Solution 1 for the self-attention mechanism:
[0218] 1. Concatenation encoding embedding features: ;
[0219] 2. Enhance internal interactions within p to generate weight values: ;
[0220] 3. The self-attention result is obtained by calculating the weight values and p: .
[0221] Solution 2 for the self-attention mechanism:
[0222] 1. Calculate the weight values for each encoded embedding feature: ;
[0223] 2. Each encoded embedding feature is multiplied by its corresponding weight value to obtain the self-attention result in each base: ;
[0224] 3. Concatenate the self-attention results from each base to obtain the final self-attention result: .
[0225] Solution 1 for the target-attention mechanism:
[0226] 1. Use the self-attention result as the query in the attention mechanism and the sparse features as the key in the attention mechanism to calculate the interaction weights: ;
[0227] 2. Using sparse features as the value in the attention mechanism, multiply them by the interaction weights to obtain the final target-attention result: .
[0228] Solution 2 for the target-attention mechanism:
[0229] 1. The self-attention results for each base are used to calculate interaction weights with the sparse features: ;
[0230] 2. Multiply the sparse features by each interaction weight to obtain the target-attention results in each base: ;
[0231] 3. Concatenate the target-attention results from each base to obtain the final target-attention result in each base: .
[0232] The user's behavioral chain on ads displayed within an application can generally be summarized as: impression (exposure) → click → conversion (such as registering an account, downloading the app, following a public account, submitting a form, etc.). During model training, the training labels corresponding to the training samples can be click labels, so the matching score output by the ad recommendation model represents the click-through rate predicted by the model. Conversely, the training labels corresponding to the training samples can be conversion labels, so the matching score output by the ad recommendation model represents the conversion rate predicted by the model. When the model is applied, it combines click-through rate, conversion rate, and advertiser bids to select suitable ads for users to display.
[0233] refer to Figure 11 The method described in this application can be applied to ad recommendation scenarios in video applications, see reference. Figure 12 The method described in this application can be applied to advertising recommendation scenarios in news applications, see reference. Figure 13 This method can be applied to advertising recommendation scenarios in social applications. It is understood that this method can also be applied to advertising recommendation scenarios in other applications. This method can recommend ads that match user interests and have high conversion potential.
[0234] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0235] Based on the same inventive concept, embodiments of this application also provide a content-based data matching apparatus for implementing the content-based data matching method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations of the one or more content-based data matching apparatus embodiments provided below can be found in the limitations of the content-based data matching method above, and will not be repeated here. Based on the same inventive concept, embodiments of this application also provide a content-based model training apparatus for implementing the content-based model training method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations of the one or more content-based model training apparatus embodiments provided below can be found in the limitations of the content-based model training method above, and will not be repeated here.
[0236] In one embodiment, such as Figure 14 As shown, a content-based data matching device is provided, including: a data acquisition module 1402, a similarity encoding module 1404, an encoding conversion module 1406, and a matching degree determination module 1408, wherein:
[0237] The data acquisition module 1402 is used to acquire the object embedding features of the target object and the content embedding features of the candidate content, and to calculate the feature similarity between the object embedding features and the content embedding features.
[0238] The similarity encoding module 1404 is used to encode the feature similarity in a number system to obtain the similarity codes corresponding to at least two number systems.
[0239] The encoding conversion module 1406 is used to determine the target embedding features corresponding to each position from the position embedding features corresponding to the base for any number of bases, based on the encoding values corresponding to each position in the similarity encoding, and obtain the encoding embedding features corresponding to the similarity encoding based on the target embedding features corresponding to each position; the position embedding features include the preset embedding features corresponding to the target encoding values at each position.
[0240] The matching degree determination module 1408 is used to determine the matching degree between the target object and the candidate content based on the encoding embedding features corresponding to each similarity encoding.
[0241] In one embodiment, the similarity encoding module 1404 further includes:
[0242] The feature similarity is amplified by a preset factor, and the amplified feature similarity is converted into at least two bases to obtain the similarity codes corresponding to each of the at least two bases.
[0243] In one embodiment, the encoding conversion module 1406 is further configured to:
[0244] Based on the encoding values corresponding to each position in the similarity encoding, each position is classified to obtain the first position and the second position; the encoding value corresponding to the first position is the target encoding value;
[0245] From the positional embedding features corresponding to the base, obtain the preset embedding features corresponding to the target encoding values of each first position as the target embedding features corresponding to the first position;
[0246] The preset embedding features corresponding to the non-target encoded values are used as the target embedding features corresponding to each second position.
[0247] In one embodiment, the encoding conversion module 1406 is further configured to:
[0248] The target embedding features corresponding to each position are combined in order of position to obtain the combined embedding features;
[0249] Pooling is performed on the combined embedded features to obtain the encoded embedded features corresponding to the similarity encoding.
[0250] In one embodiment, the matching degree determination module 1408 is further configured to:
[0251] Feature extraction is performed on the encoding embedding features corresponding to each similarity code to obtain enhanced embedding features;
[0252] Obtain non-embedded features of the target object and candidate content;
[0253] From non-embedded features, extract features that are associated with the enhanced embedded features to obtain the target associated features;
[0254] Based on target association features, the matching degree between the target object and candidate content is determined.
[0255] In one embodiment, the matching degree determination module 1408 is further configured to:
[0256] The embedding features corresponding to each similarity code are concatenated to obtain the comprehensive embedding features;
[0257] Self-attention processing is applied to the comprehensive embedding features to obtain enhanced embedding features.
[0258] In one embodiment, the matching degree determination module 1408 is further configured to:
[0259] Based on similarity coding, self-attention processing is performed on the coding embedding features corresponding to the similarity coding to obtain the sub-enhanced embedding features corresponding to the similarity coding;
[0260] The enhanced embedding features are obtained based on the sub-enhanced embedding features corresponding to each similarity code.
[0261] In one embodiment, the matching degree determination module 1408 is further configured to:
[0262] The first attention weight is determined based on similarity encoding;
[0263] By fusing the encoding embedding features corresponding to the similarity encoding and the first attention weight, the sub-enhanced embedding features corresponding to the similarity encoding are obtained.
[0264] In one embodiment, the matching degree determination module 1408 is further configured to:
[0265] From non-embedded features, extract features associated with sub-enhanced embedded features to obtain sub-associated features;
[0266] The target associated features are obtained by concatenating the various sub-associated features.
[0267] In one embodiment, the matching degree determination module 1408 is further configured to:
[0268] The second attention weights are determined based on non-embedded features and reinforced embedded features.
[0269] By fusing the second attention weights and non-embedded features, target-related features are obtained.
[0270] In one embodiment, the matching degree determination module 1408 is further configured to:
[0271] Obtain non-embedded features of the target object and candidate content;
[0272] The non-embedded features and the encoded embedded features corresponding to each similarity encoding are input into the target matching degree prediction model to obtain the matching degree between the target object and the candidate content.
[0273] In one embodiment, the matching degree determination module 1408 is further configured to:
[0274] By using the non-embedded processing layer in the target matching degree prediction model, feature extraction is performed on the non-embedded features to obtain target enhancement features;
[0275] By using the self-attention layer in the target matching degree prediction model, feature extraction is performed on the encoding embedding features corresponding to each similarity encoding to obtain enhanced embedding features;
[0276] By using the target attention layer in the target matching prediction model, features associated with the enhancement embedding features are extracted from the target enhancement features to obtain target-related features;
[0277] The output layer of the target matching degree prediction model outputs the matching degree between the target object and the candidate content based on the target association features.
[0278] In one embodiment, such as Figure 15 As shown, a content-based model training device is provided, including: a training data acquisition module 1502, a similarity calculation module 1504, a similarity encoding module 1506, an encoding conversion module 1508, and a model training module 1510, wherein:
[0279] The training data acquisition module 1502 is used to acquire training samples and corresponding training labels. The training samples include the object embedding features of the training objects and the content embedding features of the training content. The training labels are the interaction labels between the training objects and the training content.
[0280] The similarity calculation module 1504 is used to calculate the feature similarity between object embedding features and content embedding features in the training samples.
[0281] The similarity encoding module 1506 is used to encode the feature similarity in a base, obtaining the similarity codes corresponding to at least two bases.
[0282] The encoding conversion module 1508 is used to determine the target embedding features corresponding to each position from the position embedding features corresponding to the base for any number of bases, based on the encoding values corresponding to each position in the similarity encoding, and obtain the encoding embedding features corresponding to the similarity encoding based on the target embedding features corresponding to each position; the position embedding features include the preset embedding features corresponding to the target encoding values at each position.
[0283] The model training module 1510 is used to train the initial matching degree prediction model based on the encoding embedding features and training labels corresponding to each similarity encoding of the training samples, and to obtain the target matching degree prediction model.
[0284] The aforementioned content-based data matching device and content-based model training device can improve the accuracy of the matching degree, and then determine whether to push candidate content to the target user based on the matching degree, thereby improving the effectiveness and accuracy of the push.
[0285] Each module in the aforementioned content-based data matching device or content-based model training device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0286] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 16 As shown, this computer device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores data related to content-based data matching methods and / or content-based model training methods. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements a content-based data matching method and / or a content-based model training method.
[0287] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 17As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When executed by the processor, the computer program implements a content-based data matching method and / or a content-based model training method. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0288] Those skilled in the art will understand that Figure 16 , Figure 17 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0289] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.
[0290] In one embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0291] In one embodiment, a computer program product is provided, the computer program product including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0292] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0293] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0294] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0295] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method of content-based data matching, characterized by, The method comprises: obtaining object embedding features of a target object and content embedding features of a candidate content, calculating feature similarity between the object embedding features and the content embedding features; encoding the feature similarity in a base to obtain similarity encodings corresponding to at least two bases respectively; for any base, based on the encoding values corresponding to each position in the similarity encoding, determining the target embedding features corresponding to each position from the position embedding features corresponding to the base, and based on the target embedding features corresponding to each position, obtaining the encoding embedding features corresponding to the similarity encoding; the position embedding features comprise preset embedding features corresponding to each position and a target encoding value; based on the encoding embedding features corresponding to each similarity encoding respectively, determining the matching degree between the target object and the candidate content.
2. The method of claim 1, wherein, The encoding of the feature similarity in a base to obtain similarity encodings corresponding to at least two bases respectively comprises: amplifying the feature similarity by a preset multiple, converting the amplified feature similarity into at least two bases to obtain similarity encodings corresponding to at least two bases respectively.
3. The method of claim 1, wherein, The determination of the target embedding features corresponding to each position from the position embedding features corresponding to the base based on the encoding values corresponding to each position in the similarity encoding comprises: based on the encoding values corresponding to each position in the similarity encoding, classifying each position to obtain first positions and second positions; the encoding value corresponding to the first position is a target encoding value; from the position embedding features corresponding to the base, obtaining the preset embedding features corresponding to each first position and a respective target encoding value as the target embedding features corresponding to the first position; the preset embedding features corresponding to non-target encoding values are used as the target embedding features corresponding to each second position.
4. The method of claim 1, wherein, The obtaining of the encoding embedding features corresponding to the similarity encoding based on the target embedding features corresponding to each position comprises: combining the target embedding features corresponding to each position in order according to the position to obtain combined embedding features; performing pooling processing on the combined embedding features to obtain the encoding embedding features corresponding to the similarity encoding.
5. The method of claim 1, wherein, The determination of the matching degree between the target object and the candidate content based on the encoding embedding features corresponding to each similarity encoding respectively comprises: performing feature extraction on the encoding embedding features corresponding to each similarity encoding respectively to obtain enhanced embedding features; obtaining non-embedding features of the target object and the candidate content; from the non-embedding features, extracting features associated with the enhanced embedding features to obtain target associated features; based on the target associated features, determining the matching degree between the target object and the candidate content.
6. The method of claim 5, wherein, The feature extraction on the encoding embedding features corresponding to each similarity encoding respectively to obtain enhanced embedding features comprises: splicing the encoding embedding features corresponding to each similarity encoding respectively to obtain comprehensive embedding features; performing self-attention processing on the comprehensive embedding features to obtain enhanced embedding features.
7. The method of claim 5, wherein, The feature extraction on the encoding embedding features corresponding to each similarity encoding respectively to obtain enhanced embedding features comprises: The coding embedding features corresponding to the similarity encodings are subjected to self-attention processing based on the similarity encodings to obtain sub-enhanced embedding features corresponding to the similarity encodings. The enhanced embedding features are obtained based on the sub-enhanced embedding features corresponding to the respective similarity encodings.
8. The method of claim 7, wherein, The method comprises: The first attention weight is determined based on the similarity encodings; The sub-enhanced embedding features corresponding to the similarity encodings are obtained by fusing the coding embedding features corresponding to the similarity encodings and the first attention weight.
9. The method of claim 7, wherein, The method comprises: The sub-association features are obtained by extracting features associated with the sub-enhanced embedding features from the non-embedding features; The sub-association features are obtained by extracting features associated with the sub-enhanced embedding features from the non-embedding features; 10. The method of claim 5, wherein, The target association features are obtained by splicing the sub-association features. The method comprises: The second attention weight is determined based on the non-embedding features and the enhanced embedding features; 11. The method of claim 1, wherein, The target association features are obtained by fusing the second attention weight and the non-embedding features. The method comprises: The non-embedding features of the target object and the candidate content are obtained; 12. The method of claim 11, wherein, The matching degree between the target object and the candidate content is obtained by inputting the non-embedding features and the coding embedding features corresponding to the respective similarity encodings into a target matching degree prediction model. The method comprises: The target enhanced features are obtained by feature extraction on the non-embedding features through a non-embedding processing layer in the target matching degree prediction model; The enhanced embedding features are obtained by feature extraction on the coding embedding features corresponding to the respective similarity encodings through a self-attention layer in the target matching degree prediction model; The target association features are obtained by extracting features associated with the enhanced embedding features from the target enhanced features through a target attention layer in the target matching degree prediction model; 13. The method according to any one of claims 1 to 12, characterized in that, The matching degree between the target object and the candidate content is output based on the target association features through an output layer of the target matching degree prediction model. The candidate content is a candidate advertisement, and the method further comprises: The push cost corresponding to the candidate advertisement is obtained; The recommendation degree corresponding to the candidate advertisement is determined based on the push cost and the matching degree; 14. A content-based model training method, characterized by, The target advertisement for the target object is determined from the plurality of candidate advertisements based on the recommendation degree. The method comprises: The training sample and the training label corresponding to the training sample are obtained; the training sample comprises object embedding features of a training object and content embedding features of a training content, and the training label is an interaction label between the training object and the training content; calculate a feature similarity between the object embedding feature and the content embedding feature in the training sample; base on the encoding value corresponding to each position in the similarity encoding, determine a target embedding feature corresponding to the position from the position embedding feature corresponding to the base, and obtain an encoding embedding feature corresponding to the similarity encoding based on the target embedding feature corresponding to each position; the position embedding feature includes a preset embedding feature corresponding to the target encoding value of each position; base on the encoding embedding feature corresponding to each similarity encoding of the training sample and the training label, train an initial matching degree prediction model to obtain a target matching degree prediction model. The device comprises:
15. A content-based data matching apparatus, characterized by comprising: a data acquisition module configured to acquire an object embedding feature of a target object and a content embedding feature of a candidate content, and calculate a feature similarity between the object embedding feature and the content embedding feature; a similarity encoding module configured to encode the feature similarity in a base to obtain a similarity encoding corresponding to each base; a code conversion module configured to, for any base, determine a target embedding feature corresponding to each position based on an encoding value corresponding to the position in the similarity encoding from a position embedding feature corresponding to the base, and obtain an encoding embedding feature corresponding to the similarity encoding based on the target embedding feature corresponding to each position; the position embedding feature includes a preset embedding feature corresponding to the target encoding value of each position; a matching degree determination module configured to determine a matching degree between the target object and the candidate content based on the encoding embedding feature corresponding to each similarity encoding. The device comprises:
16. A content-based model training apparatus, characterized by comprising: a training data acquisition module configured to acquire a training sample and a training label corresponding to the training sample; the training sample includes an object embedding feature of a training object and a content embedding feature of a training content, and the training label is an interaction label between the training object and the training content; a similarity calculation module configured to calculate a feature similarity between the object embedding feature and the content embedding feature in the training sample; a similarity encoding module configured to encode the feature similarity in a base to obtain a similarity encoding corresponding to each base; a code conversion module configured to, for any base, determine a target embedding feature corresponding to each position based on an encoding value corresponding to the position in the similarity encoding from a position embedding feature corresponding to the base, and obtain an encoding embedding feature corresponding to the similarity encoding based on the target embedding feature corresponding to each position; the position embedding feature includes a preset embedding feature corresponding to the target encoding value of each position; a model training module configured to train an initial matching degree prediction model based on the encoding embedding feature corresponding to each similarity encoding of the training sample and the training label to obtain a target matching degree prediction model. The processor implements the steps of the method of any one of claims 1-14 when executing the computer program. 17.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-16. The processor implements the steps of the method of any one of claims 1-14 when executing the computer program.
18. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program, which when executed by a processor, implements the steps of the method of any one of claims 1 to 14.
19. A computer program product comprising a computer program, characterized in that, The computer program, which when executed by a processor, implements the steps of the method of any one of claims 1 to 14.