Information selection, encoder training method, electronic device, and storage medium
Patent Information
- Application Number
- CN202510424977.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-07
- Publication Date
- 2026-10-16
AI Technical Summary
[0003]然而,采用上述方法,选取的信息与对象的需求契合度较低,导致选取的信息准确率较低
[0023]This application provides an information selection, encoder training method, apparatus, electronic device, and storage medium. In this application, firstly, feature extraction is performed on the information's description data using a base model to obtain pre-trained features. Then, based on these pre-trained features, the confidence level of the information's description data belonging to multiple description categories is determined. This confidence level indicates the description category to which the information's description data belongs. Next, the confidence level of the information's description data belonging to multiple description categories is encoded to obtain the information's description data category code. Thus, the information's description data category code actually indicates the description category to which the information's description data belongs. The information's information identity information indicates the corresponding information category, and the object's object identity information indicates the object category to which the object belongs. The information's description data category code, information identity information, and object identity information all serve as the information's ID. This method transforms pre-trained features of information into an information space containing the information's identity information and the object's identity information. When selecting information using at least one of these two information types, along with the information's descriptive data category code, it efficiently and accurately fuses the information's identity information and/or the object's identity information with the information's descriptive data category code. This results in a better match between the selected target information and the object's needs, leading to higher accuracy. It avoids situations where the pre-trained features extracted by the base model and the information's identity information are not in the same space, resulting in poor fusion between the pre-trained features and the information's identity information, or vice versa, leading to a mismatch between the selected information and the object's needs and poor accuracy.
Smart Images

Figure CN122927488A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electronic information technology, and more specifically, to an information selection, encoder training method, apparatus, electronic device, and storage medium. Background Technology
[0002] Currently, Large Language Models (LLA) can extract features from information such as text, video, and audio to obtain pre-trained features. Then, recommendation models select some information from the information and recommend it to the target audience based on these pre-trained features and the identity information of the information itself, thereby achieving efficient information recommendation.
[0003] However, using the above method, the selected information does not match the needs of the target audience very well, resulting in a low accuracy rate of the selected information. Summary of the Invention
[0004] In view of this, embodiments of this application propose an information selection method, apparatus, electronic device, and storage medium for encoder training.
[0005] In a first aspect, embodiments of this application provide an information selection method, comprising: extracting features from the descriptive data of information using a pre-trained base model to obtain pre-trained features of the information; determining the confidence level of the descriptive data of the information belonging to multiple descriptive categories based on the pre-trained features of the information using a preset encoder; encoding the confidence level of the descriptive data of the information belonging to multiple descriptive categories to obtain descriptive data category codes of the information; selecting target information for an object from multiple pieces of information based on the descriptive data category codes of each of the multiple pieces of information and information identity information, and / or, based on the descriptive data category codes of each of the multiple pieces of information and object identity information of an object, and / or, based on object identity information, the descriptive data category codes of each of the multiple pieces of information and information identity information; the object identity information is used to indicate the object category to which the object belongs, and the information identity information is used to indicate the information category to which the corresponding information belongs.
[0006] Secondly, embodiments of this application provide a method for training an encoder, the method comprising: extracting features from sample description data of sample information using a base model to obtain pre-training sample features of the sample information; fusing and encoding the pre-training sample features and sample object category features of the sample information using an encoder to obtain an encoding result of sample description data of the sample information; the sample object category features are obtained by extracting features from the sample object identity information of the sample object, the sample object identity information being used to indicate the object category to which the sample object belongs; determining the probability that the sample description data of the sample information belongs to multiple description categories based on the encoding result of the sample description data of the sample information and the cluster centers of each of the multiple description categories; for each description category, determining the sample frequency of the cluster center of the description category based on the probability that the sample description data of the sample information belongs to the description category; determining the confidence level that the sample description data of the sample information belongs to the description category based on the probability that the sample description data of the sample information belongs to the description category and the sample frequency of the cluster centers of the description category; determining the encoding loss based on the confidence level and probability that the sample description data of each sample information belongs to multiple description categories; and adjusting the parameters of the encoder using the encoding loss.
[0007] Thirdly, embodiments of this application provide an information selection device, comprising: a first feature extraction module, configured to extract features from the description data of information using a pre-trained base model to obtain pre-trained features of the information; a first determination module, configured to determine the confidence level of the description data of the information belonging to multiple description categories based on the pre-trained features of the information using a preset encoder; an encoding module, configured to encode the confidence level of the description data of the information belonging to multiple description categories to obtain description data category codes of the information; and a selection module, configured to select target information for an object from multiple pieces of information based on the description data category codes of multiple pieces of information and information identity information, and / or, based on the description data category codes of multiple pieces of information and object identity information of an object, and / or, based on object identity information, description data category codes of multiple pieces of information and information identity information; the object identity information is used to indicate the object category to which the object belongs, and the information identity information is used to indicate the information category to which the corresponding information belongs.
[0008] Optionally, the first determining module is further configured to fuse and encode the pre-trained features of the information and the object category features through an encoder to obtain the information description data encoding result; the object category features are obtained after feature extraction of the object identity information; and based on the information description data encoding result and the cluster centers of the multiple description categories, determine the confidence level of the information description data belonging to the multiple description categories respectively.
[0009] Optionally, the first determining module is further configured to, for each description category, determine the probability that the description data of the information belongs to the description category based on the distance between the description data encoding result of the information and the cluster center of the description category; determine the frequency of the cluster center of the description category based on the probability that the description data of each piece of information belongs to the description category; and determine the confidence level that the description data of each piece of information belongs to the description category based on the probability that the description data of each piece of information belongs to the description category and the frequency of the cluster center of the description category.
[0010] Optionally, the encoding module is also used to round down the confidence that the information's description data belongs to multiple description categories to obtain the rounded confidence that the information's description data belongs to multiple description categories; obtain the position codes corresponding to each of the multiple description categories; and for each piece of information, concatenate the rounded confidence that the information's description data belongs to each description category with the corresponding position code to obtain the information's description data category code.
[0011] Optionally, the selection module is also used to perform embedding processing on the description data category encoding of the information to obtain the category embedding feature corresponding to the information; to perform embedding processing on the information identity information of the information to obtain the identity embedding feature of the information; to perform embedding processing on the object identity information to obtain the object identity embedding feature of the object; to fuse the category embedding feature and the identity embedding feature corresponding to the information with the object identity embedding feature to obtain the fusion feature of the information; and to select the target information for the object from the multiple information based on the fusion features of the multiple information.
[0012] Optionally, the description data category coding includes sub-coding features for each of the multiple description categories; the selection module is also used to perform embedding processing on the sub-coding features of each description category in the description data category coding of the information to obtain the embedding result of the information for each description category; and to fuse the embedding results of the information for multiple description categories to obtain the category embedding feature corresponding to the information.
[0013] Fourthly, embodiments of this application provide a training apparatus for an encoder, comprising: a second feature extraction module, used to extract features from sample description data of sample information using a base model to obtain pre-trained sample features of the sample information; a second determination module, used to fuse and encode the pre-trained sample features and sample object category features of the sample information using an encoder to obtain the sample description data encoding result of the sample information; the sample object category feature is obtained by extracting features from the sample object identity information of the sample object, and the sample object identity information is used to indicate the object category to which the sample object belongs; and a third determination module, used to perform clustering based on the sample description data encoding result of the sample information and the respective clusters of multiple description categories. The system comprises the following modules: a central determination module, a fourth determination module, and a fifth determination module. The fifth determination module determines the confidence level of the sample description data belonging to a description category based on the probability of the sample description data belonging to the description category and the sample frequency of the cluster centers of the description category. The sixth determination module determines the encoding loss based on the confidence level and probability of the sample description data belonging to multiple description categories for each sample information. The seventh determination module adjusts the encoder parameters based on the encoding loss.
[0014] Optionally, the loss determination module is also used to determine the relative entropy between the probability and confidence of multiple sample information based on the confidence and probability of the sample description data belonging to multiple description categories for each sample information, as the encoding loss.
[0015] Optionally, the parameter adjustment module is further configured to determine a first interest similarity between multiple sample information based on the pre-trained sample features of each sample information; determine a second interest similarity between multiple sample information based on the sample information identity information of each sample information; the sample information identity information is used to indicate the information category to which the corresponding sample information belongs; determine an alignment loss based on the first interest similarity and the second interest similarity between multiple sample information; and adjust the encoder parameters through the encoding loss and the alignment loss.
[0016] Optionally, the parameter adjustment module is further configured to convert the distance between the pre-trained sample features of any two sample information from multiple sample information into a probability value to obtain the pre-trained feature similarity probability between the two sample information; sum the pre-trained feature similarity probabilities between the first sample information and each of the other sample information to obtain the total pre-trained feature similarity probability corresponding to the first sample information; the first sample information is any one of the multiple sample information, and the other sample information is the sample information other than the first sample information from the multiple sample information; based on the pre-trained feature similarity probability between the first sample information and the second sample information and the total pre-trained feature similarity probability corresponding to the first sample information, determine the first interest similarity between the first sample information and the second sample information; the second sample information is any one of the other sample information.
[0017] Optionally, the parameter adjustment module is also used to determine the relative entropy between the first interest similarity and the second interest similarity of multiple sample information based on the first interest similarity between multiple sample information and the second interest similarity between multiple sample information, as an alignment loss.
[0018] Optionally, the parameter adjustment module is also used to reconstruct the sample information based on the sample description data encoding result and sample object category features of the decoder to obtain the reconstructed features of the sample information; determine the reconstruction loss based on the reconstructed features of each sample information and the difference between the pre-trained sample features; and adjust the parameters of the encoder and the decoder through the reconstruction loss, encoding loss and alignment loss.
[0019] Optionally, the parameter adjustment module is also used to update the cluster centers of multiple descriptive categories based on the sample description data encoding results of multiple sample information.
[0020] Fifthly, embodiments of this application provide an electronic device, including a processor and a memory; the memory stores computer-readable instructions, which, when executed by the processor, implement the above-described method.
[0021] Sixthly, embodiments of this application provide a computer-readable storage medium storing computer-readable instructions that, when executed by a processor, implement the above-described method.
[0022] In a seventh aspect, embodiments of this application provide a computer program product, including computer instructions, which, when executed by a processor, implement the method described above.
[0023] This application provides an information selection, encoder training method, apparatus, electronic device, and storage medium. In this application, firstly, feature extraction is performed on the information's description data using a base model to obtain pre-trained features. Then, based on these pre-trained features, the confidence level of the information's description data belonging to multiple description categories is determined. This confidence level indicates the description category to which the information's description data belongs. Next, the confidence level of the information's description data belonging to multiple description categories is encoded to obtain the information's description data category code. Thus, the information's description data category code actually indicates the description category to which the information's description data belongs. The information's information identity information indicates the corresponding information category, and the object's object identity information indicates the object category to which the object belongs. The information's description data category code, information identity information, and object identity information all serve as the information's ID. This method transforms pre-trained features of information into an information space containing the information's identity information and the object's identity information. When selecting information using at least one of these two information types, along with the information's descriptive data category code, it efficiently and accurately fuses the information's identity information and / or the object's identity information with the information's descriptive data category code. This results in a better match between the selected target information and the object's needs, leading to higher accuracy. It avoids situations where the pre-trained features extracted by the base model and the information's identity information are not in the same space, resulting in poor fusion between the pre-trained features and the information's identity information, or vice versa, leading to a mismatch between the selected information and the object's needs and poor accuracy. Attached Figure Description
[0024] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0025] Figure 1 A schematic diagram is shown illustrating the application scenarios applicable to the embodiments of this application;
[0026] Figure 2 A flowchart of an information selection method according to an embodiment of this application is shown;
[0027] Figure 3 This illustration shows a schematic diagram of the probability distribution of information belonging to different information categories in an embodiment of this application;
[0028] Figure 4 This illustration shows a schematic diagram of the confidence distribution of information belonging to different information categories in an embodiment of this application;
[0029] Figure 5 A comparison chart of the probability distribution and confidence distribution of information belonging to different information categories in an embodiment of this application is shown;
[0030] Figure 6 A flowchart illustrating a training method for an encoder according to an embodiment of this application is shown;
[0031] Figure 7 A flowchart of an encoder training method according to yet another embodiment of this application is shown;
[0032] Figure 8 A flowchart of an encoder training method according to another embodiment of this application is shown;
[0033] Figure 9 A schematic diagram of the training process of an encoder according to an embodiment of this application is shown;
[0034] Figure 10 A schematic diagram of an information selection process according to an embodiment of this application is shown;
[0035] Figure 11 A schematic diagram of the discovery page of a social application according to an embodiment of this application is shown;
[0036] Figure 12 A schematic diagram of a game store recommendation page according to an embodiment of this application is shown;
[0037] Figure 13 A schematic diagram of a game store homepage according to an embodiment of this application is shown;
[0038] Figure 14 A block diagram of an information selection device according to an embodiment of this application is shown;
[0039] Figure 15 A block diagram of a training apparatus for an encoder according to one embodiment of this application is shown;
[0040] Figure 16 A structural block diagram of an electronic device for performing an information selection method according to an embodiment of this application is shown. Detailed Implementation
[0041] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0042] In the following description, the terms "first" and "second" are used merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first" and "second" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.
[0043] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit the application. It should be noted that "multiple" as used herein refers to two or more. "And / or" describes the association relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship.
[0044] Please refer to Figure 1 The diagram illustrates an application scenario applicable to the embodiments of this application. This application scenario includes a terminal 110, a server 120, and a database 130.
[0045] Terminal 110 can be a smartphone, tablet, e-book reader, music player, wearable device, smart home device, in-vehicle terminal, etc. Terminal 110 has a client installed, which can receive information. For example, the client can be an instant messaging client, a content interaction client, an email client, an SMS client, etc.
[0046] The server 120 can be a standalone physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.
[0047] Database 130 can be a standalone physical storage device, a database cluster or distributed system consisting of multiple physical storage devices, or a cloud storage database that provides cloud storage functionality. The database is used to store descriptive data for each piece of information, object identity information, and information identity information.
[0048] In some embodiments, server 120 obtains description data and identity information of multiple pieces of information from database 130. Then, for each piece of information, server 120 performs feature extraction on the description data of the information through a base model to obtain pre-trained features of the information. Based on the pre-trained features of each piece of information, server 120 determines the confidence level of the description data of the information belonging to multiple description categories. After that, server 120 continues to encode the confidence level of the information belonging to multiple information categories to obtain the description category code corresponding to the information. Finally, based on the description category code and identity information corresponding to each piece of information, server 120 selects target information for the target object from the multiple pieces of information and sends the target information to terminal 110 so that terminal 110 can display the target information.
[0049] In some other embodiments, the terminal 110 may obtain description data and identity information of each of the multiple pieces of information from the database 130 through the server 120, and then select target information from the multiple pieces of information based on the description data and identity information of each of the multiple pieces of information, and display the target information.
[0050] It is worth mentioning that, in this embodiment of the application, the training process of the encoder, the training process of the decoder, and the update process of the cluster centers of multiple information categories are also involved. These processes can be executed by the server 120 obtaining data from the database 130 (involving sample description data of multiple sample information, sample object identity information of sample objects, and sample information identity information of sample information, etc.). These processes can also be executed by the terminal obtaining data from the database 130 through the server 120. This application does not limit this.
[0051] For ease of understanding, the following explanation will use electronic devices as the subject of the information selection method in this application.
[0052] Please see Figure 2 , Figure 2 This invention illustrates a flowchart of an information selection method according to an embodiment of this application, which is applied to... Figure 1 The terminal 110 or server 120 in the middle, the method may include:
[0053] S110. The pre-trained base model is used to extract features from the descriptive data of the information to obtain the pre-trained features of the information.
[0054] In this application, information may include text information, services, goods, game-related information streams, and multimedia-related information streams, etc.
[0055] For example, information could include literary books, news, short videos, electronic products, games, and domestic services.
[0056] For example, information can be a game information stream, which can include the game and game-related information. Game-related information can include game-related content posted about the game, such as game updates posted by a user's friends, or game updates posted by users within a game's community that the user has joined. Generally, when the game information stream is about the game itself, the descriptive data can be text describing the game's name, publisher, and category. It can also be a video introducing the gameplay, or a video or text showcasing game promotions. Conversely, when the game information stream is about game-related information, the descriptive data can refer to the game information stream itself or a summary of it. For example, game updates posted by a user's friends, or game updates posted by users within a game's community that the user has joined, can also be considered part of the game information stream.
[0057] Similarly, for multimedia information such as images, videos, and music, the information can be the multimedia information itself, or it can be dynamic multimedia content built upon the multimedia information. In this case, the descriptive data of the information can be the dynamic multimedia content itself or a summary of the dynamic multimedia content. Dynamic multimedia content can refer to dynamic content posted by a user that combines text with at least one multimedia element. For example, music dynamic content posted by a user's friend can be considered as the aforementioned information; similarly, if a user joins a video creation community, the various video dynamic content posted within that community can also be considered as the aforementioned information.
[0058] A base model can refer to a neural network model with feature extraction capabilities. For example, a base model can be a pre-trained deep network model, a pre-trained BERT model, a pre-trained Clip model (Contrastive Language-Image Pre-Training, multimodal pre-trained model), and a Large Language Model (LLA), etc.
[0059] Large language models refer to a class of artificial intelligence models with a large number of parameters constructed from artificial neural networks. They are typically pre-trained on massive datasets using self-supervised or semi-supervised learning, and then their performance and capabilities are further optimized through methods such as instruction fine-tuning and human alignment. Large language models are characterized by a large number of parameters, large training data, and large computational resources, and possess the ability to solve general tasks, follow human instructions, and perform complex reasoning. For example, the large language model in this application could be CHAT-GPT. TM Yuanbao TM 1000 Questions on General Meaning TM ,seepseek TM And bean buns TM wait.
[0060] Information descriptive data refers to data used to describe information. Descriptive data can be text, video, images, etc. When the descriptive data is text, it can include the information's name, identifier, encoding, color, information summary, size, publisher, and producer. Similarly, when the descriptive data is video, it can be a video introducing the information or a video with the information as its key content.
[0061] The descriptive data of the information can be directly input into the base model, which will then extract features based on the descriptive data of the information. The resulting feature extraction results of the base model for the descriptive data of the information can be used as the pre-training features of the information. In the case of multiple pieces of information, the base model will extract features for each piece of information to obtain the pre-training features of each piece of information.
[0062] S120. Based on the pre-trained features of the information, determine the confidence level of the information's description data belonging to multiple description categories using a preset encoder.
[0063] A description category refers to the category to which the descriptive data for the information belongs. For example, the description category could be "Rewards" (descriptive data describes various reward activities related to the information), "Introduction" (descriptive data introduces the content of the information), or "Rules" (descriptive data describes various rules related to the information). Generally, different types of information may have different description categories. For example, when the information is about a game, the description category could be "Game Rewards" or "Game Rules," and when the information is about a product, the description category could be "Product Introduction" or "Product Discount," etc.
[0064] For any description category, the higher the confidence level that information belongs to that description category, the higher the probability that information belongs to that description category. Conversely, the lower the confidence level that information belongs to that description category, the lower the probability that information belongs to that description category. Thus, confidence level indicates the probability that information belongs to each description category.
[0065] The pre-defined encoder can be a neural network capable of encoding pre-trained features of information. For example, the encoder can be a pre-trained BERT model, a text encoder in a pre-trained Snap model, or a pre-trained autoencoder.
[0066] For each piece of information, the pre-trained features of that information can be input into the encoder to obtain the encoding result corresponding to the information. The encoding result corresponding to the information is then input into a preset classifier for multiple description categories. Since the preset classifier determines the confidence level of the information belonging to multiple description categories based on the encoding result of the information.
[0067] The preset classifier can be trained by using the encoding results of the pre-trained features of the third sample information (obtained by feature extraction of the descriptive data of the third sample information by the base model) and the sample labels corresponding to the descriptive data of the third sample information (the sample labels indicate the descriptive category to which the descriptive data of the third sample information belongs). The third sample information can refer to the information of the samples used to train the preset classifier.
[0068] Specifically, the parameter-initialized classifier determines the confidence level of the description data of the third sample information belonging to multiple description categories based on the encoding result of the sample pre-training features of the third sample information (obtained by the aforementioned encoder after encoding the sample pre-training features of the third sample information). Then, based on the confidence level of the description data of the third sample information belonging to multiple description categories and the differences between sample labels, a loss value is determined. The classifier is then adjusted using this loss value to train the classifier and obtain the aforementioned preset classifier.
[0069] In some other implementations, the aforementioned encoder can determine the confidence level of the information belonging to multiple descriptive categories based on the pre-trained features of the information and the object category features; wherein, the object category features are obtained by extracting features from the object identity information of the object, and the object identity information is used to indicate the object category to which the object belongs.
[0070] The target audience refers to the intended recipient of the information, which can be a user, an electronic device, or a virtual character. For example, when the information is an advertisement, the target audience can be users who can view the advertisement. Similarly, when the information is a virtual product, the target audience can be the product that the virtual character can purchase.
[0071] Different objects have different object categories. For example, if the object is a user, the object category can be white-collar workers, internet workers, women, men, minors, or the elderly. Or, if the object is a virtual character, the object category can be infantry, cavalry, archers, mages, or raiders.
[0072] Object identity information indicates the object category to which an object belongs. It includes the object category to which the object belongs, and may also include the object's name and ID.
[0073] In this application, the object identity information can be encoded using an autoencoder to extract features from the object identity information and obtain the object category features. Alternatively, the object identity information can be embedded using an embedding layer to extract features from the object identity information and obtain the object category features. The embedding layer can be an independent embedding layer with feature extraction capabilities, or it can be an embedding layer within a pre-defined classifier for the information; this application does not impose any limitations on this.
[0074] Thus, for each piece of information, the pre-trained features and object category features of the information can be input into the aforementioned encoder. The encoder outputs the encoding results of the pre-trained features and the object category. The encoding results of the pre-trained features and the object category are then input into a preset classifier for multiple descriptive categories. The preset classifier determines the confidence level of the information belonging to multiple descriptive categories based on the encoding results of the pre-trained features and the object category.
[0075] Here, the preset classifier can be trained by the encoding results of the sample pre-training features of the third sample information, the sample labels corresponding to the third sample information, and the encoding results of the object category features of the object pushed by the third sample information (which are obtained by the aforementioned encoder after encoding the object category features of the object pushed by the third sample information).
[0076] Specifically, the parameter-initialized classifier determines the confidence level of the third sample information belonging to multiple descriptive categories based on the encoding results of the sample pre-training features of the third sample information and the encoding results of the object category features of the objects to which the third sample information is pushed. Then, based on the confidence level of the third sample information belonging to multiple descriptive categories and the differences between sample labels, a loss value is determined. The classifier is then adjusted using this loss value to train the classifier and obtain the aforementioned preset classifier.
[0077] In some other implementations, the pre-trained features of the information and the object category features can be fused and encoded by an encoder to obtain the information description data encoding result; the object category features are obtained by extracting features from the object identity information of the object; the object identity information is used to indicate the object category to which the object belongs; based on the information description data encoding result and the cluster centers of each of the multiple description categories, the confidence level of the information description data belonging to the multiple description categories is determined.
[0078] Each descriptive category corresponds to its own cluster center, and each descriptive category is indicated by its respective cluster center. For each descriptive category, clustering can be performed based on the reference encoding results of multiple fourth sample information belonging to that descriptive category to obtain the cluster center for that descriptive category. The reference encoding results of the fourth sample information are obtained by encoding the pre-trained features of the fourth sample information by the encoder. The pre-trained features of the fourth sample information are obtained by the base model after extracting features from the descriptive data of the fourth sample information. The fourth sample information can refer to the information needed to determine the cluster centers of each descriptive category.
[0079] First, for each piece of information, its pre-trained features and object category features are input into an encoder. The encoder simultaneously encodes these features to extract the hidden representations from both sets of features, achieving fusion encoding and obtaining the description data encoding result for each piece of information. At this point, the description data encoding result for each piece of information indicates the hidden representations of its pre-trained features and the object category features. Then, for each piece of information, based on the difference between its description data encoding result and the cluster centers of multiple description categories, the confidence level of whether the information belongs to multiple description categories is determined.
[0080] In some implementations, for each description category, the relative distance (e.g., Euclidean distance or Manhattan distance) between the information's description data encoding result and the cluster center of that description category can be calculated, and the confidence level of the information's description data belonging to that description category can be determined based on the preset distance. For example, the relative distance between the information's description data encoding result and the cluster center of that description category can be obtained as the confidence level of the information's description data belonging to that description category. Alternatively, the relative distance between the information's description data encoding result and the cluster center of that description category can be calculated, and the product of the relative distance and a preset coefficient can be calculated as the confidence level of the information's description data belonging to that description category. In this application, the preset coefficient is not limited; for example, the preset coefficient can be 0.5 or 0.3.
[0081] In some other implementations, for each description category, the probability that the information's description data belongs to the description category is determined based on the distance between the information's description data encoding result and the cluster center of the description category; the frequency of the cluster center of the description category is determined based on the probabilities that the description data of each piece of information belongs to the description category; and the confidence level that the description data of each piece of information belongs to the description category is determined based on the probability that the description data of each piece of information belongs to the description category and the frequency of the cluster center of the description category. Here, the frequency of the cluster center of the description category can be obtained by summing or weighted summing the probabilities that the description data of each piece of information belongs to the description category.
[0082] First, determine the distance between the encoded descriptive data of the information and the cluster centers of the descriptive categories, and determine the probability that the descriptive data of the information belongs to the descriptive category based on this distance. This distance can be Euclidean distance or Manhattan distance, etc. Then, for each descriptive category, sum (or weighted sum) the probabilities that the descriptive data of multiple pieces of information belong to that category to obtain the frequency of the cluster centers of each descriptive category. At this point, the frequency of the cluster centers of the descriptive category indicates the magnitude of the difference between the overall descriptive data of multiple pieces of information and that descriptive category. Finally, based on the probability that the descriptive data of each piece of information belongs to the descriptive category and the frequency of the cluster centers of the descriptive category, determine the confidence level that the descriptive data of each piece of information belongs to the descriptive category.
[0083] For example, for each description category, based on the distance between the encoding result of the description data of each piece of information and the cluster center of the description category, the probability that the description data of each piece of information belongs to the description category is determined according to Formula 1, where Formula 1 is as follows:
[0084]
[0085] Where, q ij h is the probability that the descriptive data of information i belongs to the descriptive category j. i μ is the encoding result of the descriptive data for information i. j To describe the cluster centers of category j, α represents the degrees of freedom of the student distribution (also called the t-distribution). In this application, α can take the value 1. |h i ―μ j |The encoding result h of the descriptive data for information i i Cluster center μ describing category j j The distance between them.
[0086] That is, in the aforementioned example, for each descriptive category, based on the distance between the encoding result of the descriptive data for each piece of information and the cluster center of that descriptive category, the similarity between the hidden layer representation and the cluster center is measured using the student t-distribution, thus determining the student distribution result of the descriptive data for that descriptive category. Then, the student distribution results of the information's descriptive data across multiple descriptive categories are summed to obtain the summed student distribution result of the information. The ratio of the student distribution result of the information's descriptive data under that descriptive category to the summed student distribution result of the information is then calculated as the probability that the information's descriptive data belongs to that descriptive category.
[0087] Iterate through multiple pieces of information and multiple description categories, determining the probability that the description data of each piece of information belongs to each description category. Then, for each description category, sum the probabilities that the description data of multiple pieces of information belong to that description category to obtain the frequency of the cluster centers of that description category, that is, the cluster center μ of description category j. j frequency f j =∑ i q ij .
[0088] For example, for each description category, the confidence level of each piece of information's description data belonging to the description category can be calculated according to Formula 2, based on the probability that the description data of each piece of information belongs to the description category and the frequency of the cluster centers of the description category. Formula 2 is as follows:
[0089]
[0090] Where, p ij Let i be the confidence level that information i belongs to description category j.
[0091] That is, in the aforementioned example, for each description category, the frequency of each piece of information's description data in that description category is determined based on the square of the probability that the description data belongs to that description category and the frequency of the cluster centers of that description category. For each piece of information, the frequency calculation results of the information's descriptive data across multiple descriptive categories are summed to obtain the information's summed frequency calculation result. Then, for each descriptive category, the confidence level of the information's descriptive data belonging to that descriptive category is determined based on the ratio of the information's descriptive data's frequency calculation result in that category to the information's summed frequency calculation result.
[0092] In the aforementioned example, if the information is classified according to the probability of its descriptive data belonging to the descriptive category determined by Formula 1, the classification result is as follows: Figure 3As shown, circles represent the probability distribution of information description data belonging to different description categories, and stars represent the probability distribution of cluster centers for each description category. Filling with the same color indicates belonging to the same category. It is evident that the difference between the probability distribution of some information description data and the probability distribution of cluster centers for different description categories is not significant. For example... Figure 3 The difference between 31 and the three cluster centers is not significant, which means that the distance difference between the descriptive data represented by 31 and the three cluster centers is small.
[0093] Therefore, to increase the positional difference between the encoding result of the information's descriptive data and the cluster centers of different descriptive categories, a confidence level for the information's descriptive data belonging to a descriptive category is introduced. Then, the probability of the information's descriptive data belonging to a descriptive category is determined according to Formula 2, and the information is classified accordingly. The resulting classification result is as follows: Figure 4 As shown. In Figure 4 In the diagram, circles represent the confidence distribution of information description data belonging to different description categories, and pentagrams represent the confidence distribution of cluster centers of description categories. It can be seen that the difference between the confidence distribution of multiple information description data and the confidence distribution of cluster centers of different description categories is relatively obvious, which means that description data belonging to a certain description category is closer to the cluster center of its description category.
[0094] In other words, based on the probability that the information's descriptive data belongs to a descriptive category, the confidence level of the information's descriptive data belonging to a descriptive category is determined. Compared to the probability distribution of the information's descriptive data belonging to a descriptive category, the confidence distribution of the information's descriptive data belonging to a descriptive category (referred to as the target distribution in this application) is sharper, for example... Figure 5 As shown, the solid line indicates the confidence distribution of the information's descriptive data belonging to the descriptive category, while the dashed line indicates the probability distribution of the information's descriptive data belonging to the descriptive category. The middle part of the confidence distribution of the information's descriptive data belonging to the descriptive category is more prominent. Therefore, the target distribution can more clearly indicate the descriptive category to which different pieces of information's descriptive data belong, thus the confidence level of the information's descriptive data belonging to the descriptive category more accurately indicates the likelihood of the information's descriptive data belonging to that category.
[0095] S130. Encode the confidence levels of the information's descriptive data belonging to multiple descriptive categories to obtain the information's descriptive data category codes.
[0096] The confidence level P of obtaining information i's descriptive data belonging to multiple descriptive categories. i =[p i1 ,p i2 ,…,p ik After that, it can be based on P i Determine the description data category code for information i, where pij Let k be the confidence level that information i belongs to description category j, and k be the number of description categories.
[0097] In some implementations, the position codes of each of the multiple description categories are first determined. These position codes indicate the order in which each description category is arranged among the multiple description categories. For example, if description category j is the third description category, then the position code for description category j is 3. Then, based on the position codes of each of the multiple description categories and the confidence level of each piece of information's description data belonging to each of the multiple description categories, the description data category code corresponding to each piece of information is determined.
[0098] This can be achieved by concatenating the confidence score of the information's descriptive data belonging to each descriptive category and the positional encoding of each descriptive category into an array k_p. ik (k is the location code describing the category, p) ik Given the confidence that the description data of information i belongs to description category k, we obtain multiple arrays of description data for multiple description categories. Then, we merge the multiple arrays of description data of information into a vector, which serves as the description data category code of information.
[0099] For example, if there are 5 description categories, and the confidence levels of the description data of information a1 belonging to the 5 description categories are 0.1, 0.1, 0.4, 0.2 and 0.2 respectively, then the category code of the description data of information a1 can be [1_0.1,2_0.1,3_0.4,4_0.2,5_0.2].
[0100] In some implementations, S130 may further include: rounding the confidence that the information's description data belongs to multiple description categories to obtain the rounded confidence that the information's description data belongs to multiple description categories; obtaining the position codes corresponding to each of the multiple description categories; and for each piece of information, concatenating the rounded confidence that the information's description data belongs to each description category with the corresponding position code to obtain the information's description data category code.
[0101] Rounding can refer to converting the confidence level of information description data belonging to the description category into an integer. Generally, rounding can be done by multiplying the confidence level by an integer multiple of 10. For example, if the confidence level is 0.05, it is multiplied by 100 to achieve rounding, and the rounded confidence level is 5.
[0102] This can be achieved by concatenating the rounded confidence scores of the information's descriptive data belonging to each descriptive category and the positional codes corresponding to each descriptive category into an array k_p. ik ′(k is the location code describing the category, p ikLet ′ be the integer confidence level of information i belonging to description category k. The description data of the information is obtained from multiple arrays for multiple description categories. The multiple arrays corresponding to the description data of the information are merged into a vector, which is used as the description data category code of the information.
[0103] For example, if there are 5 description categories, and the confidence levels of the description data of information a1 belonging to the 5 description categories are 0.1, 0.1, 0.4, 0.2 and 0.2 respectively, then by multiplying by 10 to achieve rounding, the rounded confidence levels are 1, 1, 4, 2 and 2. Accordingly, the category codes of the description data of information a1 can be [1_1,2_1,3_4,4_2,5_2].
[0104] S140. Select target information for an object from multiple pieces of information based on the description data category codes and information identity information of each of the multiple pieces of information, and / or, based on the description data category codes and object identity information of each of the multiple pieces of information, and / or, based on object identity information, description data category codes and information identity information of each of the multiple pieces of information.
[0105] Among them, object identity information is used to indicate the object category to which the object belongs, and information identity information is used to indicate the information category to which the corresponding information belongs.
[0106] Information category refers to the category to which information belongs. Different information can have different information categories. For example, when information is news, the information category can be entertainment news, political news, and legal news. Similarly, when information is about products, the information category can be clothing, electronic products, and furniture products. Furthermore, when information is a game information stream, the information category can be strategy guide, introduction, or entertainment.
[0107] Object identity information indicates the object category of an object, while information identity information indicates the information category of information. Information identity information may include the information category to which the information belongs, as well as the information's identifier, name, and number.
[0108] In some implementations, the information identity information and the description data category code of the information can be encoded by the feature encoder in the information recommendation model to obtain the information identity encoding feature corresponding to the information identity information and the description data category encoding feature corresponding to the description data category code of the information. The information identity encoding feature and the description data category encoding feature are then fused (summing, concatenating, or weighted summing, etc.) to obtain the information fusion feature. Based on the information fusion feature, the information recommendation model outputs the probability of the information being selected by the object. Then, the information with the highest probability of being selected by the object is selected as the target information, or the information with the probability of being selected by the object is selected as the target information (e.g., the probability threshold is 0.7 or 0.75, etc.), or a specified number of information (e.g., 20 or 15, etc.) are selected as the target information according to the probability of being selected by the object from high to low.
[0109] The feature encoder can be a variational autoencoder or a text encoder in a clip model, or it can be an embedding layer. The information recommendation model can refer to existing classification models that classify information. For example, in the field of advertising recommendation, an information recommendation model can be a classification model that predicts the probability of a user viewing an advertisement; similarly, in the field of product recommendation, an information recommendation model can be a classification model that predicts the probability of a user viewing an advertisement.
[0110] Similarly, the object identity information and the description data category code of the information can be encoded by the feature encoder in the information recommendation model to obtain the object identity encoding feature corresponding to the object information and the description data category code feature corresponding to the description data category code of the information. The object identity encoding feature and the description data category code feature are then fused (summing, concatenating, or weighted summing, etc.) to obtain the information fusion feature. Based on the information fusion feature, the information recommendation model outputs the probability of the information being selected by the object. Then, the information with the highest probability of being selected by the object is selected as the target information, or the information with the probability of being selected by the object is selected as the target information, or a specified number of information are selected as the target information according to the probability of being selected by the object from high to low.
[0111] Alternatively, the information identity information, the description data category encoding of the information, and the object identity information of the object can be encoded using the feature encoder in the information recommendation model. This yields the information identity encoding features corresponding to the information identity information, the description data category encoding features corresponding to the information description data category encoding features, and the object identity encoding features corresponding to the object object identity information. These information identity encoding features, description data category encoding features, and object identity encoding features are then fused (by summing, concatenating, or weighted summing, etc.) to obtain the information fusion features. Based on these fusion features, the information recommendation model outputs the probability that the information is selected by the object. Then, the information with the highest probability of being selected by the object is selected as the target information, or the information with a probability higher than the probability threshold is selected as the target information, or a specified number of information are selected as the target information according to the probability of being selected by the object from high to low.
[0112] In some implementations, the object identity encoding features of the object involved in the aforementioned S120 can also be obtained by embedding the object identity information of the object through the embedding layer in the information recommendation model here. The object category features in the aforementioned S120 can be directly obtained as the object identity encoding features of the object. Therefore, when executing S140, it is not necessary to extract features from the object identity information of the object, and the object category features in S120 can be directly used as the object identity encoding features.
[0113] In some other implementations, the description data category encoding of the information can be embedded to obtain the category embedding feature corresponding to the information; the information identity information of the information can be embedded to obtain the identity embedding feature of the information; the object identity information of the object can be embedded to obtain the object identity embedding feature of the object; the category embedding feature and the identity embedding feature corresponding to the information can be fused with the object identity embedding feature to obtain the fused feature of the information; and the target information for the object can be selected from the multiple information based on the fused features of each of the multiple information.
[0114] The object identity information, the description data category encoding of the information, and the information identity information can be embedded through the embedding layer in existing neural network models (such as the base model, BERT model, and Clip model). Alternatively, the object identity information, the description data category encoding of each information, and the information identity information can be embedded through the embedding layer in the information recommendation model in the aforementioned example. This will not be elaborated further here.
[0115] For each piece of information, the category embedding feature, identity embedding feature, and object identity embedding feature of the information are concatenated, summed, or dot productd to achieve the fusion of the category embedding feature, identity embedding feature, and object identity embedding feature of the information, and the fused feature of the information is obtained. Then, the information recommendation model outputs the probability that the information is selected by the object based on the fused feature of the information.
[0116] For example, an information recommendation model includes an embedding layer and a prediction layer. The embedding layer embeds the object's identity information, the category codes corresponding to multiple pieces of information, and the identity information to obtain the category embedding features, identity embedding features, and object identity embedding features. The category embedding features, identity embedding features, and object identity embedding features are then concatenated to obtain the information's fusion features. Finally, the information's fusion features are input into the prediction layer of the information recommendation model to obtain the probability that the information is selected by the object.
[0117] As mentioned earlier, for each piece of information, the information identity information indicates the information category to which the information belongs, and it only involves one information category. The object identity information indicates the object category, and it also only involves one object category. Therefore, the object identity information and the information identity information of each piece of information can be directly embedded through the embedding layer to obtain the identity embedding features of each piece of information. As for the category encoding of the information's description data, it is determined based on the probability that the information's description data belongs to multiple description categories, and it involves multiple description categories. That is, the category encoding includes the sub-encoding features of each description category. Therefore, the aforementioned embedding process of the description data category encoding of each piece of information to obtain the category embedding features corresponding to each piece of information includes: embedding the sub-encoding features of each description category in the description data category encoding of the information to obtain the embedding result of the information for each description category; and fusing the embedding results of the information for multiple description categories to obtain the category embedding features corresponding to the information.
[0118] First, the sub-encoded features of the information's description data belonging to each description category can be embedded through the embedding layer to obtain the embedding result of the information for each description category. Then, the embedding results of the information for multiple description categories are summed to achieve the fusion of the embedding results of the information for multiple description categories through sum pooling (a pooling method of summation) to obtain the category embedding feature of the information.
[0119] The embedding process in the embedding layer involves mapping the sub-encoded features of each description category to low-dimensional embedding features based on the learned embedding table. The mapping result is then used as the embedding result for each description category.
[0120] In some implementations, the object category features involved in the aforementioned S120 can also be obtained by embedding the object identity information of the object through the embedding layer in the information recommendation model. Similarly, the category embedding features of each piece of information, the identity embedding features of each piece of information, and the object identity embedding features of the object are also obtained by embedding through the embedding layer in the information recommendation model. Therefore, the object category features in the aforementioned S120 can be directly used as the object identity embedding features of the object. Thus, when executing S140, it is not necessary to embed the object identity information of the object again, and the object category features in S120 can be directly used as the object identity embedding features of the object.
[0121] Of course, after selecting target information, you can also push the target information to the object so that the object can view the target information, or push the description data corresponding to the target information to the object so that the object can view and understand the target information through the description data of the target information, and obtain the target information through the description data of the target information (at this time, it is necessary to associate the target information and its corresponding description data so that the corresponding target information can be obtained through the description data of the target information). Alternatively, you can push both the target information and its corresponding description data to the object so that the object can view and understand the target information through the description data of the target information, and directly obtain the pushed target information.
[0122] In this embodiment, firstly, feature extraction is performed on the information description data using a base model to obtain pre-trained features of the information. Then, based on the pre-trained features, the confidence level of the information description data belonging to multiple description categories is determined. This confidence level indicates the description category to which the information description data belongs. Next, the confidence level of the information description data belonging to multiple description categories is encoded to obtain the information description data category code. Thus, the information description data category code actually indicates the description category to which the information description data belongs. The information identity information indicates the information category to which the corresponding information belongs, and the object identity information indicates the object category to which the object belongs. The information description data category code, information identity information, and object identity information are all information ID-type information of the information. Therefore, the pre-trained features of the information are transformed into... By switching to the information space containing the information identity information and the object identity information, and using at least one of the information identity information and the object identity information, along with the information's description data category code, when selecting information, it is possible to efficiently and accurately fuse the information identity information and / or the object identity information with the information's description data category code. This results in the selected target information being more aligned with the object's needs, and the accuracy of the target information being higher. This avoids situations where the pre-trained features extracted by the base model are not in the same space as the information identity information, leading to poor fusion effects between the pre-trained features and the information identity information, or vice versa, resulting in the selected information not matching the object's needs and having poor accuracy.
[0123] Secondly, compared to the probability distribution of information description data belonging to a description category, the confidence distribution of information description data belonging to a description category (referred to as the target distribution in this application) is sharper. The target distribution can more clearly indicate the description category to which different information description data belongs. Thus, the confidence of information description data belonging to a description category more accurately indicates the probability that information description data belongs to a description category. Therefore, the information description data category coding obtained by encoding based on the confidence of information description data belonging to multiple information categories is more accurate, thereby improving the accuracy of target information selected based on information description data category coding, and improving the information selection effect and information recommendation effect.
[0124] Please see Figure 6 , Figure 6 A flowchart illustrating a training method for an encoder according to an embodiment of this application is shown. This method is applied to... Figure 1 The terminal 110 or server 120 in the middle, the method may include:
[0125] S210. Extract features from the sample description data of the sample information using the base model to obtain the pre-trained sample features of the sample information.
[0126] Here, sample information refers to the information used as samples for training the encoder in this embodiment. Sample description data refers to the descriptive data of the sample information. The sample description data of the sample information can be input into the base model for feature extraction, and the extracted results serve as the pre-trained sample features of each sample information.
[0127] S220. The pre-trained sample features and sample object category features of the sample information are fused and encoded by the encoder to obtain the sample description data encoding result of the sample information.
[0128] The sample object category feature is obtained by extracting features from the sample object identity information of the sample object. The sample object identity information indicates the object category to which the sample object belongs. The sample object can be an object that is targeted by the sample information. In other words, the sample object is the object to which the sample information is pushed. The sample object identity information of the sample object refers to the identity information of the sample object. The process of determining the sample object category feature is similar to the process of determining the object category feature in the previous embodiment, and will not be repeated here.
[0129] In this embodiment, the encoder in S220 can be an autoencoder or a variational autoencoder, etc., which refers to the encoder to be trained. The encoder can be a parameter-initialized encoder, or it can be an encoder with a certain encoding capability. After the encoder in this embodiment is trained, it can be used in the information selection process in the aforementioned embodiments.
[0130] When there are multiple sample information, for each sample information, the pre-trained sample features and sample object category features of the sample information are input into the encoder so that the encoder can directly fuse and encode the pre-trained sample features and sample object category features of the sample information. The encoding result output by the encoder is used as the encoding result of the sample description data of the sample information.
[0131] S230. Based on the encoding results of the sample description data of the sample information and the cluster centers of each of the multiple description categories, determine the probability that the sample description data of the sample information belongs to each of the multiple description categories; for each description category, based on the probability that the sample description data of each of the multiple sample information belongs to the description category, determine the sample frequency of the cluster center of the description category; based on the probability that the sample description data of the sample information belongs to the description category and the sample frequency of the cluster center of the description category, determine the confidence level that the sample description data of the sample information belongs to the description category.
[0132] Here, the cluster center for each description category refers to the cluster center initialized for the description category. It can be that a cluster center is randomly initialized for each description category. Through the training process in this embodiment, the cluster center of each description category is updated so that the updated cluster center of each description category can be used to determine the confidence of the description data of the information in the aforementioned embodiment.
[0133] In this embodiment, the process of determining the probability that the sample description data of the sample information belongs to multiple description categories, the sample frequency of the cluster center of each description category, and the confidence level that the sample description data of each sample information belongs to the description category is similar to that described in the aforementioned embodiment S120, and will not be repeated here.
[0134] S240. Determine the encoding loss based on the confidence and probability that the sample description data of each sample information belongs to multiple description categories.
[0135] Based on the difference between the confidence level and the probability of a sample description data belonging to description category j, we can calculate cross-entropy loss, mean squared error loss, and L1 loss, which are used as the loss of sample information i for description category j. The encoding loss is obtained by summing the losses of multiple sample information for multiple description categories.
[0136] Alternatively, the encoding loss can be determined by analyzing the confidence and probability of each sample's description data belonging to multiple description categories, and then using the relative entropy between the probabilities and confidence levels of these multiple sample information items. In this case, the calculation process for the encoding loss follows Formula 3, as follows:
[0137]
[0138] Where L1 is the coding loss, p ij ' is the confidence score of sample description data of sample information i belonging to description category j, q ij ′ represents the probability that the sample description data of sample information i belongs to the description category j.
[0139] S250, Adjust encoder parameters by encoding loss.
[0140] Once the encoding loss is obtained, the encoder parameters can be adjusted based on the encoding loss using methods such as gradient descent to train the encoder.
[0141] Of course, in this embodiment, the cluster centers of multiple description categories can also be updated based on the sample description data encoding results of multiple sample information, thereby updating the initial cluster centers of the description categories, so that the updated cluster centers of the description categories more accurately indicate each description category.
[0142] Simultaneously, the distances (which can be Manhattan distance or Euclidean distance) between the encoded sample description data of each sample information and the cluster centers of multiple description categories can be determined. This allows the encoded sample description data of each sample information to be assigned to the description category represented by the nearest cluster center, serving as the predicted category of the sample description data for each sample information. Then, for each description category, the average value of the encoded sample description data corresponding to the sample description data of the sample information belonging to that description category is determined as the updated cluster center for that description category. This achieves the updating of the cluster centers for the description categories.
[0143] As mentioned earlier, the cluster center of the description category is actually an abstract cluster center. Therefore, different cluster centers can actually indicate different subclasses under the same concrete description category. For example, when the information is a game, the description category can include game strategy class 1, game strategy class 2, and game strategy class 3. In this case, the three game strategy classes are three different description categories for the description data of the game, and the three game strategy classes can be considered as three subclasses under the concrete description category "game strategy class".
[0144] It is worth mentioning that during the encoder training process, the feature encoder in the information recommendation model can also encode the sample identity information (including at least one of the sample object identity information and the sample information identity information) and the sample description data category code of the sample information. This yields the sample identity encoding features corresponding to the sample identity information and the sample description data category code features corresponding to the sample description data category code of the sample information. These features are then fused (by summing, concatenating, or weighted summing, etc.) to obtain the sample fusion features. Based on these fusion features, the information recommendation model outputs the probability that the sample information is selected by the sample object. Furthermore, based on the difference between the probability of the sample information being selected and the sample information label (indicating whether the sample information is selected by the sample object; generally, if the sample information is selected, the label is 1; if not, the label is 0), cross-entropy loss, mean squared error loss, and L1 loss are calculated as prediction losses. These prediction losses are then used to adjust the parameters of the information recommendation model (including the feature encoder) to train the model.
[0145] In this embodiment, the encoder is trained and has a high encoding capability. As a result, the confidence of the description data based on the information determined by the encoder belonging to multiple description categories is more accurate, making the category encoding of the description data corresponding to each piece of information more accurate. Thus, the target information selected based on the category encoding of the description data corresponding to each piece of information is more accurate, thereby achieving the goal of improving the accuracy of the selected target information.
[0146] Furthermore, when determining the encoding loss, KL divergence is used to make the probability of the information description data belonging to the description category approximate the target distribution step by step (that is, the distribution of the confidence of the information description data belonging to the description category), thereby enhancing the information representation. This allows the encoding loss to more accurately indicate the quality of the encoder's encoding ability. Training the encoder based on the encoding loss can further improve the encoding ability of the trained encoder, making the confidence of the information description data belonging to multiple description categories more accurate, and thus further improving the accuracy of the selected target information.
[0147] In some embodiments, such as Figure 7 As shown, prior to S250, the method further includes:
[0148] S310. Based on the pre-trained sample features of each of the multiple sample information, determine the first interest similarity between the multiple sample information; based on the identity information of each of the multiple sample information, determine the second interest similarity between the multiple sample information.
[0149] The sample information identity information is used to indicate the information category to which the corresponding sample information belongs. For example, the sample information identity information may include the description category to which the sample information belongs.
[0150] For any two sets of sample information, cosine similarity, Euclidean distance, or Manhattan distance can be calculated based on the pre-trained sample features of the two sets of sample information as the first interest similarity between the two sets of sample information, so as to indicate the difference between the pre-trained sample features of the sample information. Similarly, for any two sets of sample information, cosine similarity, Euclidean distance, or Manhattan distance can be calculated based on the sample information identity information of the two sets of sample information as the second interest similarity between the two sets of sample information, so as to indicate the difference between the sample information identity information of the sample information.
[0151] In some implementations, the sample information's identity information is the information category to which the sample information belongs. Therefore, it's not possible to directly calculate cosine similarity, Euclidean distance, or Manhattan distance for the identity information of different sample information. Instead, feature extraction can be performed on the sample information's identity information to obtain its identity features. Then, based on the corresponding identity features of the two sample information's identity information, cosine similarity, Euclidean distance, or Manhattan distance can be calculated as the second interest similarity between the two sample information pieces. This can be achieved by encoding the sample information's identity information using an autoencoder or variational autoencoder, or by embedding the sample information's identity information using an embedding layer. The embedding layer can also be the same as the embedding layer in the information recommendation model mentioned earlier.
[0152] In some implementations, the process of determining the first interest similarity includes: converting the distance between the pre-trained sample features of any two sample information from multiple sample information into a probability value to obtain the pre-trained feature similarity probability between the two sample information; summing the pre-trained feature similarity probabilities between the first sample information and each of the other sample information to obtain the total pre-trained feature similarity probability corresponding to the first sample information; the first sample information is any one of the multiple sample information, and the other sample information is the sample information other than the first sample information from the multiple sample information; determining the first interest similarity between the first sample information and the second sample information based on the pre-trained feature similarity probability between the first sample information and the second sample information and the total pre-trained feature similarity probability corresponding to the first sample information; the second sample information is any one of the other sample information.
[0153] Similarly, the process of determining the second interest similarity includes: converting the distance between the identity information of any two sample information from multiple sample information (as mentioned above, when the identity information of the sample information is the description category to which the sample information belongs, the distance here is actually the distance between the identity features of the sample information corresponding to the identity information) into a probability value to obtain the identity information similarity probability between the two sample information; summing the identity information similarity probabilities between the first sample information and all other sample information to obtain the total identity information similarity probability corresponding to the first sample information; and determining the second interest similarity between the first sample information and the second sample information based on the identity information similarity probability between the first sample information and the second sample information and the total identity information similarity probability corresponding to the first sample information.
[0154] In this embodiment, the distance can be converted into a probability value through the student distribution (i.e., the t-distribution). For example, the determination process for the first interest similarity can be summarized as Formula 4, which is as follows:
[0155]
[0156] in, Let y be the first interest similarity between sample information i and sample information j. i For the pre-trained sample features of sample information i, ||y i ―y j || 2 Let α be the distance (Euclidean distance) between the pre-trained sample features of sample information i and the pre-trained sample features of sample information j, and let α be the degrees of freedom of the student distribution, which can be 1.
[0157] Similarly, the determination process for the second interest similarity can be summarized as Formula 5, which is as follows:
[0158]
[0159] in, Let s be the second interest similarity between sample information i and sample information j. i For the pre-trained sample features of sample information i, ||s i ―s j || 2 Let α be the distance between the identity information of sample information i and the identity information of sample information j (as mentioned above, when the identity information of sample information is the information category to which the sample information belongs, the distance here is actually the Euclidean distance between the identity features of the corresponding identity information), and α is the degree of freedom of the student distribution, which can be taken as 1.
[0160] S320. Based on the first interest similarity and the second interest similarity among multiple sample information, determine the alignment loss.
[0161] In this embodiment, cross-entropy loss, mean squared error loss, and absolute value loss can be calculated based on the difference between the first interest similarity and the second interest similarity between sample information to obtain the similarity loss corresponding to the sample information. The alignment loss is obtained by summing the similarity losses of multiple sample information.
[0162] Alternatively, the alignment loss can be determined based on the first interest similarity and the second interest similarity among multiple sample information, using the relative entropy between these two similarities as the alignment loss. In this case, the alignment loss calculation process is as shown in Formula 6, which is as follows:
[0163]
[0164] in, For alignment loss, KL divergence is used as the loss function to minimize the difference between the first interest similarity and the second interest similarity among multiple sample information, so that when training the encoder, the encoder can encode the pre-trained features into features that fit the identity information.
[0165] Because different pieces of information have varying degrees of personalization, their similarity can vary significantly. Some pieces of information have high distinguishability (i.e., large personalization differences but potentially small content differences), resulting in low similarity. Conversely, some pieces of information have low distinguishability (i.e., small personalization differences but potentially large content differences), resulting in high similarity. Therefore, directly aligning similarity values is affected by the nature of the domain and cannot accurately reflect the content similarity between pieces of information. Consequently, this application uses the aforementioned method of converting distance into probability to calculate the first interest similarity and the second interest similarity, thereby achieving an accurate measurement of the differences between sample information.
[0166] Accordingly, the S250 includes:
[0167] S330: Adjust the encoder parameters by using encoding loss and alignment loss.
[0168] In other words, this application adjusts the encoder parameters based on both the encoding loss and the alignment loss. Specifically, this can be achieved by summing or weighted summing the encoding loss and alignment loss to obtain the total loss, which is then used to adjust the encoder parameters. When weighted summing the encoding loss and alignment loss, their weights can be set based on requirements; for example, the weight of the encoding loss can be higher or lower than the weight of the alignment loss.
[0169] In this embodiment, a first interest similarity and a second interest similarity between sample information are also introduced to determine the alignment loss. By minimizing the first interest similarity and the second interest similarity between sample information, the encoder learns the ability to encode the pre-trained features, so that the trained encoder can encode the pre-trained features of the information into features that match the information identity information, thereby improving the encoder's encoding ability and improving the accuracy of the selected target information.
[0170] In some embodiments, such as Figure 8 As shown, before S330, the method further includes:
[0171] S410. The sample information is reconstructed by the decoder based on the sample description data encoding result and the sample object category features to obtain the reconstructed features of the sample information.
[0172] In other words, a decoder corresponding to the encoder also needs to be set up. The decoder reconstructs the sample information based on the encoder's sample description data encoding results and sample object category features. The reconstruction result serves as the reconstruction feature of the sample information.
[0173] S420. Determine the reconstruction loss based on the reconstruction features of each sample and the differences between the features of the pre-trained samples.
[0174] For each sample information, cross-entropy loss, mean squared error loss, and absolute value loss can be calculated based on the reconstruction features of the sample information and the differences between the features of the pre-trained samples. These can be used as the individual reconstruction loss for that sample information. The reconstruction loss is obtained by summing the individual reconstruction losses of multiple sample information.
[0175] Accordingly, S330 may include:
[0176] S430: Adjust the parameters of the encoder and decoder by using reconstruction loss, encoding loss, and alignment loss.
[0177] In other words, this application adjusts the encoder and decoder parameters based on the encoding loss, alignment loss, and reconstruction loss. Specifically, this can be achieved by summing or weighted summing the encoding loss, alignment loss, and reconstruction loss to obtain the total loss, which is then used to adjust the encoder and decoder parameters. When weighted summing the encoding loss, alignment loss, and reconstruction loss, their weights can be set based on requirements. For example, the encoding loss may have the highest weight, and the reconstruction loss the lowest weight; conversely, the encoding loss may have the lowest weight, and the alignment loss the highest weight.
[0178] It is worth mentioning that the trained decoder may not be used in the inference process (i.e., steps S110-S140 in the aforementioned embodiment). The decoder is mainly used to participate in the encoder training process to introduce reconstruction loss during the encoder training process, so that the encoder after training can achieve better encoding performance.
[0179] It is worth mentioning that, in this embodiment, the method used to extract features from the sample object identity information of the sample object to obtain the sample object category features can be the embedding layer of the information extraction model. Similarly, the method used in S310 to extract features from the sample information identity information to obtain the sample information identity features corresponding to the sample information identity information can also be the embedding layer of the information extraction model. Thus, through the embedding layer of the information extraction model, feature extraction is achieved on the sample object identity information and the sample information identity information of the sample object. After they are embedded in the same embedding layer, the sample object category features and the sample information identity features obtained have high correlation and high fit, resulting in higher accuracy. This improves the correlation between the determined alignment loss and reconstruction loss, making the alignment loss and reconstruction loss more accurate, and thereby improving the encoding and decoding capabilities of the trained encoder and decoder.
[0180] Since each object has different levels of liking and understanding of the information content, using a uniform encoder may be inappropriate. Therefore, in this embodiment, the encoder and decoder are upgraded. By utilizing the object category features of the objects, the encoder and decoder are personalized. In this way, for the same input content, the hidden layer representation obtained by the encoder will be inconsistent when the objects are different, resulting in personalized category assignments. This allows the trained encoder to combine the object category features of the objects to encode the pre-trained features of each information. Thus, when determining the confidence of the information's description data belonging to multiple description categories based on the information's pre-trained features, the object category of the object is taken into account, making the determined confidence of the information's description data belonging to multiple description categories more accurate and improving the accuracy of the selected target information.
[0181] To more clearly explain the solution of this application, the information selection method of this application will be explained below with reference to an example. In this example, the information is a game advertisement, and the target is a user.
[0182] like Figure 9 As shown, the recommendation model (equivalent to an information recommendation model) used for game information flow recommendation includes an embedding layer (equivalent to the feature encoder in the information recommendation model in the aforementioned embodiment), a concatenation layer, and a deep neural network. The information selection method of this application involves an encoder, a decoder, and a pre-trained base model. Here, the game information flow can include the game itself, game videos, and game benefits.
[0183] The training process is as follows:
[0184] The base model is used to describe the sample description data of each of the multiple sample game information streams (that is, to use the sample description data of each of the multiple sample game information streams as...). Figure 9The input is used to extract features to obtain the pre-trained sample features of each sample game information stream. Then, the pre-trained sample features of each sample game information stream and the sample user category features of the sample user (the user to whom the sample game information stream is pushed) are fused and encoded by the encoder to extract the hidden layer representation and obtain the sample encoding result of each sample game information stream. The aforementioned sample user's user identity information indicates the user category to which the sample user belongs.
[0185] Subsequently, based on the sample encoding results of each sample game information stream and the cluster centers initialized for multiple preset game information stream description categories, the probability and confidence level of the sample description data of the sample game information stream belonging to different preset game information stream description categories are determined. The encoding loss is then determined using the probability and confidence level of the sample description data belonging to different preset game information stream description categories. Here, the game information stream description category refers to the category to which the description data of the game information stream belongs. For example, when the game information stream is the game itself, the game information stream description category could be game strategy, game reward, or game introduction, etc. Of course, as mentioned above, the game description category is indicated by the initialized cluster centers; therefore, the game description category may include game introduction category 1, game introduction category 2, and game introduction category 3, etc.
[0186] Simultaneously, a first interest similarity can be determined based on the differences in features between pre-trained samples of different game information streams, and a second interest similarity can be determined based on the differences in identity features between sample game information streams of different samples. The alignment loss is then determined based on both the first and second interest similarities. Here, the identity features of the sample game information streams are obtained by embedding the game information stream identity information of the sample game information streams through the embedding layer of the game information stream recommendation model. The game information stream identity information of the sample game information stream indicates the category to which the sample game information stream belongs. For example, when the game information stream is a game video, the game information stream category could be strategy game videos, entertainment game videos, etc.
[0187] Furthermore, the reconstruction features of each sample game information stream are obtained by reconstructing the data based on the sample encoding results of each sample game information stream and the sample user category features of the sample users through the decoder; the reconstruction loss is determined based on the differences between the reconstruction features of each sample game information stream and the pre-trained sample features.
[0188] Thus, the reconstruction loss, encoding loss, and alignment loss are obtained. Then, the parameters of the encoder and decoder are adjusted by summing these losses, thereby training the encoder and decoder. Simultaneously, the cluster centers of multiple preset game information flow description categories can be updated.
[0189] Of course, during the training of the decoder (and encoder), the sample user category features, sample game information flow identity features, and sample category embedding features can be concatenated using the game information flow recommendation model to obtain sample concatenated features. Then, the deep neural network of the game information flow recommendation model predicts the probability that the sample game information flow will be selected by the sample user based on the sample concatenated features. Based on the difference between the probability that the sample game information flow will be selected by the sample user and the sample label (indicating whether the sample game information flow has been selected by the sample user), the prediction loss is determined, and the game information flow recommendation model is trained using the prediction loss.
[0190] After completing the training process, the information selection process can be referenced. Figure 10 .
[0191] The base model extracts features from the descriptive data of multiple candidate game feeds, resulting in pre-trained features for each feed. A trained encoder then fuses these pre-trained features with the user category features (of which the game feeds are pushed) to extract hidden layer representations, yielding the encoding result for each game feed. Based on the encoder results for each feed, the confidence level of each feed's descriptive data belonging to multiple preset game feed descriptive categories is determined. Finally, this confidence level is encoded to obtain the corresponding descriptive data category encoding for each game feed. The user category features are obtained by embedding user identity information into the embedding layer of the game feed recommendation model; this user identity information indicates the user's category.
[0192] Next, the category encoding of the game information stream description data is input into the embedding layer of the game information stream recommendation model for embedding processing to obtain the category embedding features of each game information stream. The game information stream category of the game information stream is then embedded through the embedding layer of the game information stream recommendation model to obtain the game information stream identity features. Then, the category embedding features, game information stream identity features, and user category features (since the user category features have already been embedded by the embedding layer, they are used directly without needing to be re-embedded) are concatenated to achieve the fusion of the category embedding features, game information stream identity features, and user category features, resulting in the fused features of the game information stream. Finally, the fused features of the game information stream are input into the deep neural network of the game information stream recommendation model to obtain the probability that the deep neural network predicts the game information stream will be selected by the user.
[0193] Then, based on the probability of each game being selected by the user, the target game is determined, and the target game and / or its descriptive data are displayed to the user.
[0194] For example, when the game store is a mini-program within a social application, the discovery page of the social application looks like this: Figure 11 As shown, the discovery page 10 includes a control 11. In response to a selection operation on the control 11, the user enters the game store's recommendation page to display the selected target game information stream.
[0195] The game store's recommendation page, such as Figure 12 As shown, the recommendation page 12 displays two target game information streams. In the first display area 121 of the recommendation page 12, one target game information stream is displayed, which consists of videos and text about promotional activities for game 1. In the second display area 122 of the recommendation page 12, another target game information stream is displayed, which consists of videos and text about game strategies for game 2.
[0196] The recommendation page 12 also includes a trigger control 13 for the game store homepage. In response to a selection operation on the trigger control 13, the game store homepage 13 is displayed. The game store homepage 13 is as follows... Figure 13 As shown, the game store homepage 13 can display multiple games or in-game interfaces.
[0197] The game store homepage 131 displays a game video (shown in display area 132 within the game store homepage 131) and six games. Among them, Game 1, which has been installed by the user, has a corresponding launch control. Thus, responding directly to the operation of the launch control, Game 1 is launched. Games 3 and 5, which have been released but not yet installed by the user, have corresponding download controls. Thus, responding directly to the operation of the download control, the game is downloaded and installed. Games 2, 4, and 6, which have not been released, have corresponding reservation controls. Responding directly to the operation of the reservation control, the user is notified to download when the game is released.
[0198] Among them, the games 3 and 5 that have been released but not installed by users, as well as the unreleased games 2, 4 and 6, which are displayed on the homepage of the game store, can all be target games determined in the aforementioned manner.
[0199] The game store homepage 131 also displays a trigger control 16 corresponding to the recommended page 12, which can respond to the operation of the trigger control 16 and return to display the recommended page 12.
[0200] Continue to refer to Figure 12 The recommendation page 12 also includes a trigger control 14 for the game video page and a trigger control 15 for game benefits. In response to the selection operation of the trigger control 14, the game video page is displayed, which shows the game video selected by the user; in response to the selection operation of the trigger control 15, the game benefits page is displayed, which shows the game benefits selected by the user.
[0201] It is worth mentioning that during the training of the encoder and decoder, the game recommendation model can also be trained simultaneously. That is, the game recommendation model predicts the probability that a sample game will be selected by a sample user based on the fusion features of the sample games determined by the encoder during training (the fusion features of the sample games are determined based on the pre-training sample features of the sample games, the sample category features of the sample users, and the sample game identity features of the sample games; the specific process is the same as the determination process of the fusion features of the information in the aforementioned embodiment, which will not be repeated here). Then, based on the probability that a sample game will be selected by a sample user and the sample label of the sample game (indicating whether the sample game has been selected by the sample user), the game recommendation model is trained to achieve synchronous training of the game recommendation model and the encoder and decoder.
[0202] The game recommendation model is trained based on the loss value determined by the sample labels of the sample games and the probability that the sample games are selected by the sample users. The encoding loss, alignment loss, and reconstruction loss used to train the codec do not participate in the training process of the game recommendation model.
[0203] Compared to directly using pre-trained features from the game, the method in this application has significant advantages, as detailed in Table 1. Table 1 is as follows:
[0204] Table 1
[0205] Downloads Reservation volume Daily active users Page click-through rate Increase +3.543% +5.196% +2.065% +2.775%
[0206] It is evident that when using the solution proposed in this application for game push notifications, the pushed games are more easily received and liked by users, resulting in a better push effect.
[0207] Please see Figure 14 , Figure 14 This illustration shows a block diagram of an information selection device according to an embodiment of this application. The information selection device 800 includes:
[0208] The first feature extraction module 810 is used to extract features from the descriptive data of the information through a pre-trained base model to obtain the pre-trained features of the information.
[0209] The first determining module 820 is used to determine the confidence level of the description data of the information belonging to multiple description categories based on the pre-trained features of the information using a preset encoder.
[0210] The encoding module 830 is used to encode the confidence level of the information's description data belonging to multiple description categories, thereby obtaining the description data category code of the information;
[0211] The selection module 840 is used to select target information for an object from multiple pieces of information based on the description data category codes and information identity information of each of the multiple pieces of information, and / or, based on the description data category codes and object identity information of each of the multiple pieces of information, and / or, based on object identity information, description data category codes and information identity information of each of the multiple pieces of information; the object identity information is used to indicate the object category to which the object belongs, and the information identity information is used to indicate the information category to which the corresponding information belongs.
[0212] Optionally, the first determining module 820 is further configured to fuse and encode the pre-trained features of the information and the object category features through an encoder to obtain the information description data encoding result; the object category features are obtained after feature extraction of the object identity information; based on the information description data encoding result and the cluster centers of each of the multiple description categories, determine the confidence level of the information description data belonging to multiple description categories respectively.
[0213] Optionally, the first determining module 820 is further configured to, for each description category, determine the probability that the description data of the information belongs to the description category based on the distance between the description data encoding result of the information and the cluster center of the description category; determine the frequency of the cluster center of the description category based on the probability that the description data of each piece of information belongs to the description category; and determine the confidence level that the description data of each piece of information belongs to the description category based on the probability that the description data of each piece of information belongs to the description category and the frequency of the cluster center of the description category.
[0214] Optionally, the encoding module 830 is further configured to round down the confidence level of the information's description data belonging to multiple description categories to obtain the rounded confidence level of the information's description data belonging to multiple description categories; obtain the position codes corresponding to each of the multiple description categories; and for each piece of information, concatenate the rounded confidence level of the information's description data belonging to each description category with the corresponding position code to obtain the description data category code of the information.
[0215] Optionally, the selection module 840 is further configured to perform embedding processing on the description data category encoding of the information to obtain the category embedding feature corresponding to the information; perform embedding processing on the information identity information of the information to obtain the identity embedding feature of the information; perform embedding processing on the object identity information to obtain the object identity embedding feature of the object; fuse the category embedding feature and the identity embedding feature corresponding to the information with the object identity embedding feature to obtain the fusion feature of the information; and select the target information for the object from the multiple information based on the fusion features of the multiple information.
[0216] Optionally, the description data category coding includes sub-coding features of each of the multiple description categories; the selection module 840 is also used to perform embedding processing on the sub-coding features of each description category in the description data category coding of the information to obtain the embedding result of the information for each description category; and to fuse the embedding results of the information for multiple description categories to obtain the category embedding feature corresponding to the information.
[0217] Please see Figure 15 , Figure 15 This illustration shows a block diagram of an encoder training apparatus according to an embodiment of this application. The encoder training apparatus 900 includes:
[0218] The second feature extraction module 910 is used to extract features from the sample description data of the sample information through the base model to obtain the pre-trained sample features of the sample information.
[0219] The second determining module 920 is used to fuse and encode the pre-trained sample features and sample object category features of the sample information through the encoder to obtain the sample description data encoding result of the sample information; the sample object category features are obtained by extracting features from the sample object identity information of the sample object, and the sample object identity information is used to indicate the object category to which the sample object belongs.
[0220] The third determining module 930 is used to determine the probability that the sample description data of the sample information belongs to multiple description categories based on the sample description data encoding result of the sample information and the cluster centers of each of the multiple description categories.
[0221] The fourth determining module 940 is used to determine the sample frequency of the cluster center of each description category based on the probability that the sample description data of each of the multiple sample information belongs to the description category.
[0222] The fifth determining module 950 is used to determine the confidence level of the sample description data belonging to the description category based on the probability that the sample description data of the sample information belongs to the description category and the sample frequency of the cluster center of the description category.
[0223] The loss determination module 960 is used to determine the encoding loss based on the confidence and probability that the sample description data of each sample information belongs to multiple description categories;
[0224] The parameter adjustment module 970 is used to adjust the encoder parameters by means of encoding loss.
[0225] Optionally, the loss determination module 960 is further configured to determine the relative entropy between the probability and confidence of multiple sample information based on the confidence and probability of the sample description data belonging to multiple description categories for each sample information, and use this entropy as the encoding loss.
[0226] Optionally, the parameter adjustment module 970 is further configured to determine a first interest similarity between multiple sample information based on the pre-trained sample features of each of the multiple sample information; determine a second interest similarity between multiple sample information based on the sample information identity information of each of the multiple sample information; the sample information identity information is used to indicate the information category to which the corresponding sample information belongs; determine an alignment loss based on the first interest similarity and the second interest similarity between multiple sample information; and adjust the encoder parameters through the encoding loss and the alignment loss.
[0227] Optionally, the parameter adjustment module 970 is further configured to convert the distance between the pre-trained sample features of any two sample information from multiple sample information into a probability value to obtain the pre-trained feature similarity probability between the two sample information; sum the pre-trained feature similarity probabilities between the first sample information and each of the other sample information to obtain the total pre-trained feature similarity probability corresponding to the first sample information; the first sample information is any one of the multiple sample information, and the other sample information is the sample information other than the first sample information from the multiple sample information; based on the pre-trained feature similarity probability between the first sample information and the second sample information and the total pre-trained feature similarity probability corresponding to the first sample information, determine the first interest similarity between the first sample information and the second sample information; the second sample information is any one of the other sample information.
[0228] Optionally, the parameter adjustment module 970 is further configured to determine the relative entropy between the first interest similarity and the second interest similarity of multiple sample information based on the first interest similarity and the second interest similarity between multiple sample information, as an alignment loss.
[0229] Optionally, the parameter adjustment module 970 is further configured to reconstruct the sample information based on the sample description data encoding result and sample object category features of the decoder to obtain the reconstructed features of the sample information; determine the reconstruction loss based on the reconstructed features of each sample information and the difference between the pre-trained sample features; and adjust the parameters of the encoder and the decoder through the reconstruction loss, encoding loss and alignment loss.
[0230] Optionally, the parameter adjustment module 970 is also used to update the cluster centers of multiple descriptive categories based on the sample description data encoding results of multiple sample information.
[0231] It should be noted that the device embodiments in this application correspond to the aforementioned method embodiments. The specific principles in the device embodiments can be found in the content of the aforementioned method embodiments, and will not be repeated here.
[0232] Figure 16 A structural block diagram of an electronic device for performing an information selection method according to an embodiment of this application is shown. The electronic device may be... Figure 1 The terminal 110 or server 120, it should be noted that Figure 16 The computer system 1200 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0233] like Figure 16As shown, the computer system 1200 includes a Central Processing Unit (CPU) 1201, which can perform various appropriate actions and processes, such as executing the methods described in the above embodiments, based on programs stored in Read-Only Memory (ROM) 1202 or programs loaded from storage portion 1208 into Random Access Memory (RAM) 1203. The RAM 1203 also stores various programs and data required for system operation. The CPU 1201, ROM 1202, and RAM 1203 are interconnected via a bus 1204. An Input / Output (I / O) interface 1205 is also connected to the bus 1204.
[0234] The following components are connected to I / O interface 1205: an input section 1206 including a keyboard, mouse, etc.; an output section 1207 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 1208 including a hard disk, etc.; and a communication section 1209 including a network interface card such as a LAN (Local Area Network) card, modem, etc. The communication section 1209 performs communication processing via a network such as the Internet. A drive 1210 is also connected to I / O interface 1205 as needed. Removable media 1211, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 1210 as needed so that computer programs read from them can be installed into storage section 1208 as needed.
[0235] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 1209, and / or installed from removable medium 1211. When the computer program is executed by central processing unit (CPU) 1201, it performs various functions defined in the system of this application.
[0236] It should be noted that the computer-readable medium shown in the embodiments of this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such transmitted data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.
[0237] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. Each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0238] The units described in the embodiments of this application can be implemented in software or hardware, and the described units can also be located in a processor. The names of these units do not necessarily limit the specific unit itself.
[0239] In another aspect, this application also provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiments; or it may exist independently and not assembled into the electronic device. The aforementioned computer-readable storage medium carries computer-readable instructions that, when executed by a processor, implement the methods in any of the above embodiments.
[0240] According to one aspect of the embodiments of this application, a computer program product is provided, the computer program product including computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium, and executes the computer instructions, causing the electronic device to perform the methods of any of the above embodiments.
[0241] In the embodiments of this application, the terms "module" or "unit" refer to a part of a computer program with a predetermined function, which works together with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (e.g., processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that functions as a whole.
[0242] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of this application, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0243] Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause an electronic device (such as a personal computer, server, touch terminal, or network device, etc.) to execute the methods according to the embodiments of this application.
[0244] Other embodiments of this application will readily conceive of by those skilled in the art upon consideration of the specification and practice of the embodiments disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. It should be understood that this application is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
[0245] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. An information selection method, characterized in that, The method includes: The pre-trained base model is used to extract features from the descriptive data of the information to obtain the pre-trained features of the information. The confidence level of the description data of the information belonging to multiple description categories is determined by a preset encoder based on the pre-trained features of the information; The confidence scores of the information's description data belonging to multiple description categories are encoded to obtain the description data category codes of the information. Based on the description data category codes and information identity information of each of the multiple pieces of information, and / or based on the description data category codes and object identity information of each of the multiple pieces of information, and / or based on the object identity information, the description data category codes and information identity information of each of the multiple pieces of information, target information for the object is selected from the multiple pieces of information; the object identity information is used to indicate the object category to which the object belongs, and the information identity information is used to indicate the information category to which the corresponding information belongs.
2. The method according to claim 1, characterized in that, The step of determining the confidence level of the description data of the information belonging to multiple description categories based on the pre-trained features of the information using a preset encoder includes: The encoder fuses and encodes the pre-trained features and object category features of the information to obtain the description data encoding result of the information; the object category features are obtained by extracting features from the object identity information. Based on the encoding results of the description data of the information and the cluster centers of each of the multiple description categories, the confidence level of the description data of the information belonging to each of the multiple description categories is determined.
3. The method according to claim 2, characterized in that, The confidence level of the description data belonging to the multiple description categories is determined based on the encoding result of the description data of the information and the cluster centers of each of the multiple description categories, including: For each of the description categories, the probability that the description data of the information belongs to the description category is determined based on the distance between the description data encoding result of the information and the cluster center of the description category; Based on the probability that the description data of each of the multiple pieces of information belongs to the description category, the frequency of the cluster center of the description category is determined; Based on the probability that the description data of each piece of information belongs to the description category and the frequency of the cluster centers of the description category, the confidence level of the description data of each piece of information belonging to the description category is determined.
4. The method according to claim 1, characterized in that, The step of encoding the confidence levels of the description data of the information to belong to multiple description categories to obtain the description data category code of the information includes: The confidence scores of the information's description data belonging to multiple description categories are rounded down to obtain the rounded confidence scores of the information's description data belonging to multiple description categories. Obtain the location code corresponding to each of the multiple description categories; For each piece of information, the floor function confidence score of the description data of the information belonging to each description category is concatenated with the corresponding position code to obtain the description data category code of the information.
5. The method according to claim 1, characterized in that, The step of selecting target information for the object from the plurality of information based on the object identity information, the description data category codes of each of the plurality of information, and the information identity information includes: The category encoding of the information is embedded to obtain the category embedding feature corresponding to the information; The information identity information of the information is embedded to obtain the identity embedding feature of the information; The object identity information is embedded to obtain the object identity embedding feature; The category embedding feature and identity embedding feature corresponding to the information are fused with the object identity embedding feature to obtain the fused feature of the information; Based on the fusion features of the various pieces of information, target information for the object is selected from the various pieces of information.
6. The method according to claim 5, characterized in that, The description data category encoding includes multiple sub-encoding features for each of the description categories; The embedding process of the description data category encoding of the information to obtain the category embedding features corresponding to the information includes: Embedding processing is performed on the sub-encoding features of each description category in the description data category encoding of the information to obtain the embedding result of the information for each description category; The embedding results of the information for multiple description categories are fused to obtain the category embedding features corresponding to the information.
7. A method for training an encoder, characterized in that, The method includes: The pre-trained sample features of the sample information are obtained by extracting features from the sample description data of the sample information using the base model; The encoder fuses and encodes the pre-trained sample features and sample object category features of the sample information to obtain the sample description data encoding result of the sample information; the sample object category feature is obtained by extracting features from the sample object identity information of the sample object, and the sample object identity information is used to indicate the object category to which the sample object belongs. Based on the sample description data encoding result of the sample information and the cluster centers of each of the multiple description categories, the probability that the sample description data of the sample information belongs to each of the multiple description categories is determined. For each of the description categories, the sample frequency of the cluster center of the description category is determined based on the probability that the sample description data of each of the multiple sample information belongs to the description category; Based on the probability that the sample description data of the sample information belongs to the description category and the sample frequency of the cluster center of the description category, the confidence level of the sample description data of the sample information belonging to the description category is determined. The encoding loss is determined based on the confidence and probability that the sample description data of each sample information belongs to multiple description categories; The encoder parameters are adjusted using the encoding loss.
8. The method according to claim 7, characterized in that, The determination of encoding loss based on the confidence and probability that the sample description data for each sample information belongs to multiple description categories includes: Based on the confidence and probability of each sample description data belonging to multiple description categories, the relative entropy between the probability and confidence of multiple sample information is determined as the encoding loss.
9. The method according to claim 7, characterized in that, Before adjusting the encoder parameters using the encoding loss, the method further includes: Based on the pre-trained sample features of each of the multiple sample information, a first interest similarity is determined among the multiple sample information; Based on the individual sample information identity information of the multiple sample information pieces, a second interest similarity is determined among the multiple sample information pieces; the sample information identity information is used to indicate the information category to which the corresponding sample information belongs. The alignment loss is determined based on the first interest similarity and the second interest similarity among the multiple sample information. The adjustment of the encoder parameters by the encoding loss includes: The encoder parameters are adjusted using the encoding loss and the alignment loss.
10. The method according to claim 9, characterized in that, The step of determining the first interest similarity among the multiple sets of sample information based on their respective pre-trained sample features includes: The distance between the pre-trained sample features of any two sample information from the plurality of sample information is converted into a probability value to obtain the pre-trained feature similarity probability between the two sample information. The total pre-trained feature similarity probability corresponding to the first sample information is obtained by summing the pre-trained feature similarity probabilities between the first sample information and each of the other sample information; the first sample information is any one of the plurality of sample information, and the other sample information is the sample information other than the first sample information among the plurality of sample information. Based on the pre-trained feature similarity probability between the first sample information and the second sample information, and the total pre-trained feature similarity probability corresponding to the first sample information, a first interest similarity between the first sample information and the second sample information is determined; the second sample information is any of the other sample information.
11. The method according to claim 9, characterized in that, The step of determining the alignment loss based on the first interest similarity and the second interest similarity among multiple sample information includes: Based on the first interest similarity and the second interest similarity among the multiple sample information, the relative entropy between the first interest similarity and the second interest similarity among the multiple sample information is determined as the alignment loss.
12. The method according to claim 9, characterized in that, Before adjusting the encoder parameters using the encoding loss and the alignment loss, the method further includes: The reconstructed features of the sample information are obtained by reconstructing the sample information using the sample description data encoding result based on the sample information and the sample object category features by the decoder; The reconstruction loss is determined based on the reconstruction features of each sample and the differences between the features of the pre-trained samples. The step of adjusting the encoder parameters using the encoding loss and the alignment loss includes: The parameters of the encoder and the decoder are adjusted using the reconstruction loss, the encoding loss, and the alignment loss.
13. The method according to claim 7, characterized in that, The method further includes: Based on the sample description data encoding results of multiple sample information, the cluster centers of multiple description categories are updated.
14. An information selection device, characterized in that, The device includes: The first feature extraction module is used to extract features from the descriptive data of the information through a pre-trained base model to obtain the pre-trained features of the information. The first determining module is used to determine the confidence level of the description data of the information belonging to multiple description categories based on the pre-trained features of the information using a preset encoder; An encoding module is used to encode the confidence levels of the description data of the information to belong to multiple description categories, thereby obtaining the description data category code of the information; The selection module is used to select target information for the object from the multiple pieces of information based on the description data category codes and information identity information of each of the multiple pieces of information, and / or based on the description data category codes and object identity information of each of the multiple pieces of information, and / or based on the object identity information, the description data category codes and information identity information of each of the multiple pieces of information; the object identity information is used to indicate the object category to which the object belongs, and the information identity information is used to indicate the information category to which the corresponding information belongs.
15. A training device for an encoder, characterized in that, The device includes: The second feature extraction module is used to extract features from the sample description data of the sample information through the base model to obtain the pre-trained sample features of the sample information. The second determining module is used to fuse and encode the pre-trained sample features and sample object category features of the sample information through the encoder to obtain the sample description data encoding result of the sample information; the sample object category feature is obtained by extracting features from the sample object identity information of the sample object, and the sample object identity information is used to indicate the object category to which the sample object belongs. The third determining module is used to determine the probability that the sample description data of the sample information belongs to multiple description categories based on the sample description data encoding result of the sample information and the cluster centers of each of the multiple description categories; The fourth determining module is used to determine the sample frequency of the cluster center of each description category based on the probability that the sample description data of each of the multiple sample information belongs to the description category. The fifth determining module is used to determine the confidence level of the sample description data belonging to the description category based on the probability that the sample description data of the sample information belongs to the description category and the sample frequency of the cluster center of the description category. The loss determination module is used to determine the encoding loss based on the confidence and probability that the sample description data of each sample information belongs to multiple description categories; A parameter adjustment module is used to adjust the parameters of the encoder based on the encoding loss.
16. An electronic device, characterized in that, include: processor; A memory storing computer-readable instructions that, when executed by the processor, implement the method as described in any one of claims 1-13.
17. A computer-readable storage medium, characterized in that, It stores computer-readable instructions that, when executed by a processor, implement the method as described in any one of claims 1-13.
18. A computer program product, characterized in that, Includes computer instructions that, when executed by a processor, implement the method of any one of claims 1-13.