Information selection model training method, information selection method and device

By dynamically determining the target feature vectors of each feature domain in the deep learning model, the memory waste problem caused by the consistent length of the feature vector in the prior art is solved, and more efficient and accurate information selection is achieved.

CN115130549BActive Publication Date: 2025-05-13TSINGHUA UNIVERSITY +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210580225.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-25
Publication Date
2025-05-13
Estimated Expiration
2042-05-25

AI Technical Summary

Technical Problem

Existing deep learning models allocate the same feature vector length to different feature IDs during training, resulting in inconsistent information amounts of different feature domains and different frequency of feature IDs, resulting in memory waste.

Method used

By obtaining the candidate eigenvectors in the sample set and feature domains, the target candidate eigenvectors for each feature domain are determined, and the initial eigenvectors are obtained based on these target candidate eigenvectors. Then, based on these initial eigenvectors, the eigenvectors are updated until converge, and the final target eigenvector and target model are obtained.

Benefits of technology

It realizes the allocation of reasonable feature vectors for each feature, improves the accuracy and computing efficiency of the information selection model, saves memory overhead, makes the target model occupy smaller memory resources on the device, and obtains more accurate and efficient target information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115130549B_ABST
    Figure CN115130549B_ABST
Patent Text Reader

Abstract

The present application discloses a training method, an information selection method and a device for an information selection model, the method comprising: determining the target candidate feature vector of each feature domain from multiple candidate feature vectors corresponding to each feature domain according to a sample set, obtaining the initial feature vector of each feature under the feature domain according to the target candidate feature vector of each feature domain; training the initial model based on the sample set and the initial feature vector of each feature, and updating the initial feature vector of each feature during the training process to obtain the target feature vector of each feature; training the initial model based on the sample set and the target feature vector of each feature to obtain the target model, so as to select the target information from multiple information to be selected based on the target model. By adopting the above method, a reasonable feature vector is assigned to each feature, so that the target model obtained by training the feature vectors assigned to each feature occupies less memory, thereby effectively saving memory overhead.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and more specifically, to a training method for an information selection model, an information selection method and a device. Background Art

[0002] At present, mainstream information selection systems use large-scale deep learning models to select content that users are interested in. The input of these models consists of hundreds of feature domains, such as "gender", "age", "information ID", "information generating author", etc. Since each feature domain contains a different number of feature IDs, some feature domains contain several feature IDs, such as the feature domain of "gender" which only contains 3 feature IDs: {male, female, unknown}, while some feature domains may contain tens of millions of feature IDs, such as "information ID". When using the above feature domains to train deep learning models, it is necessary to assign a feature vector of a certain length to each feature ID in the feature domain.

[0003] The inventors have found through research that most deep learning models will assign the same feature vector length to different feature IDs. However, different feature domains contain different amounts of information, and feature IDs under the same feature domain appear at different frequencies in the model. Therefore, if a uniform vector length is set for each feature ID to train the information selection model, the information selection model obtained by the training will occupy a large amount of memory, thus causing memory waste. Summary of the invention

[0004] In view of the above problems, the embodiments of the present application propose a training method for an information selection model, an information selection method and a device to improve the above problems.

[0005] In a first aspect, an embodiment of the present application provides a training method for an information selection model, the method comprising: obtaining a sample set, a feature domain corresponding to the sample set, and multiple candidate feature vectors corresponding to each feature domain, wherein the training samples in the sample set include label information of whether to be selected and multiple sample features, each sample feature belongs to one of the feature domains, and the vector lengths of the candidate feature vectors are different; determining a target candidate feature vector of the feature domain from multiple candidate feature vectors corresponding to each feature domain according to the sample set, and obtaining an initial feature vector of each feature under the feature domain according to the target candidate feature vector of each feature domain; training an initial model based on the sample set and the initial feature vector of each feature, and updating the initial feature vector of each feature during the training process to obtain the target feature vector of each feature; training the initial model based on the sample set and the target feature vector of each feature to obtain a target model, so as to select target information from multiple information to be selected based on the target model.

[0006] In a second aspect, an embodiment of the present application provides an information selection method, the method comprising: obtaining a plurality of information to be selected; and selecting target information from the plurality of information to be selected based on a target model obtained by the training method of the above-mentioned information selection model.

[0007] In a third aspect, an embodiment of the present application provides a training device for an information selection model, the device comprising a data acquisition module, a first feature vector acquisition module, a second feature vector acquisition module and a model training module. The data acquisition module is used to acquire a sample set, a feature domain corresponding to the sample set and a plurality of candidate feature vectors corresponding to each feature domain, wherein the training sample in the sample set includes label information of whether it is selected and a plurality of sample features, each sample feature belongs to a feature domain respectively, and the vector lengths of the candidate feature vectors are different; the first feature vector acquisition module is used to determine the target candidate feature vector of the feature domain from the plurality of candidate feature vectors corresponding to each feature domain according to the sample set, and obtain the initial feature vector of each feature under the feature domain according to the target candidate feature vector of each feature domain; the second feature vector acquisition module is used to train the initial model based on the sample set and the initial feature vector of each feature, and update the initial feature vector of each feature to obtain the target feature vector of each feature during the training process; the model training module is used to train the initial model based on the sample set and the target feature vector of each feature to obtain the target model, so as to select the target information from the plurality of information to be selected based on the target model.

[0008] In one possible implementation, each candidate feature vector corresponds to an initial weight parameter, and the first feature vector acquisition module includes: a weight parameter updating submodule and a feature vector acquisition submodule. The weight parameter updating submodule is used to train the initial model based on the first sample set in the sample set, the multiple candidate feature vectors corresponding to each feature domain, and the initial weight parameters of each candidate feature vector, and update the weight parameters of each candidate feature vector corresponding to each feature domain during the training process; the feature vector acquisition submodule is used to determine the target candidate feature vector of the feature domain from the multiple candidate feature vectors corresponding to the feature domain according to the weight parameters of each updated candidate feature vector corresponding to each feature domain.

[0009] In one possible implementation, the second feature vector acquisition module is also used to train the initial model based on the second sample set in the sample set and the initial feature vector of each feature, and update the model parameters of the initial model during the training process to obtain an updated initial model, and update the initial feature vector of each feature based on the feature vector selection algorithm during the training process; if the updated initial model converges, the updated initial feature vector of each feature is determined as the target feature vector of the feature; if the updated initial model does not converge, return to execute the initial model training based on the training samples, multiple candidate feature vectors corresponding to each feature domain and the initial weight parameters of each candidate feature vector, update the weight parameters of each candidate feature vector corresponding to each feature domain during the training process, until the updated initial model converges, and the updated initial feature vector of each feature is determined as the target feature vector of the feature.

[0010] In one possible implementation, the weight parameter updating submodule is further used to perform linear change processing on each of the candidate feature vectors to obtain a candidate feature vector after the linear change processing, wherein the vector lengths of the candidate feature vectors after the linear change processing are the same; based on the first sample set in the sample set, the multiple candidate feature vectors after the linear change processing corresponding to each feature domain, and the initial weight parameters of each candidate feature vector, the initial model is trained, and during the training process, the weight parameters of each candidate feature vector corresponding to each feature domain are updated based on a neural network search algorithm.

[0011] In one possible implementation, the feature vector acquisition submodule is further used to acquire the candidate feature vector corresponding to the maximum weight parameter among the updated weight parameters of the candidate feature vectors corresponding to each feature domain as the target candidate feature vector of the feature domain.

[0012] In one possible implementation, the model training module includes a vector conversion submodule and a model training submodule. The vector conversion submodule is used to perform vector conversion on the sample features of the training samples in the sample set according to the feature vector of each feature to obtain the sample feature vector of each training sample; the model training submodule is used to input the sample feature vector of each training sample and the label information of each training sample into the initial model for training until the target model is obtained when the model converges.

[0013] In one possible implementation, the first feature vector acquisition module is further configured to use the target candidate feature vector of each feature domain as the initial feature vector of each feature in the feature domain.

[0014] In a fourth aspect, an embodiment of the present application provides an information selection device, the device comprising: an information acquisition module and an information selection module. The information acquisition module is used to acquire a plurality of information to be selected; the information selection module is used to select target information from the plurality of information to be selected based on the target model obtained by the above-mentioned information selection model training device.

[0015] In one possible implementation, the information selection module includes a vector conversion submodule, a probability acquisition submodule and an information selection submodule. The vector conversion submodule is used to perform vector conversion on the features of multiple information to be selected according to the target feature vector of each feature to obtain the feature vector of each information to be selected; the probability acquisition submodule is used to input the feature vectors of each information to be selected into the target model to obtain the selection probability of each information to be selected; the information selection submodule is used to select the target information from the multiple information to be selected based on the selection probability of each information to be selected.

[0016] In a fifth aspect, an embodiment of the present application further provides an electronic device, comprising: a processor; a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the training method of the information selection model or the information selection method as described above is implemented.

[0017] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium having computer-readable instructions stored thereon. When the computer-readable instructions are executed by a processor, a training method for an information selection model or an information selection method as described above is implemented.

[0018] In a seventh aspect, an embodiment of the present application provides a computer program product or a computer program, the computer program product or the computer program including computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device obtains the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the above method.

[0019] The present application provides a training method, information selection method and device for an information selection model, the method comprising: determining the target candidate feature vector of the feature domain from multiple candidate feature vectors corresponding to each feature domain according to a sample set, obtaining the initial feature vector of each feature under the feature domain according to the target candidate feature vector of each feature domain; training the initial model based on the sample set and the initial feature vector of each feature, and updating the initial feature vector of each feature during the training process to obtain the target feature vector of each feature; training the initial model based on the sample set and the target feature vector of each feature to obtain the target model, so as to select the target information from multiple information to be selected based on the target model. By adopting the above method, it is realized to assign a reasonable feature vector to each feature, so that when the target model is obtained by training based on the information sample and the feature vector assigned to each feature, the accuracy of the target information selected by the target model can be effectively improved while improving the computational efficiency and saving memory overhead, that is, the target model can be deployed on the device to occupy less memory resources for information selection, and the target information obtained by the target model can be more accurate and more efficient. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present application, and together with the specification are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0021] Figure 1 A schematic diagram showing an exemplary system architecture to which the technical solution of the embodiments of the present application can be applied;

[0022] Figure 2 It is a flowchart of a training method of an information selection model provided according to an embodiment of the present application;

[0023] Figure 3 is another flow chart of a training method for an information selection model provided according to an embodiment of the present application;

[0024] Figure 4 It is a flowchart of a training method for an information selection model provided according to an embodiment of the present application;

[0025] Figure 5 is a schematic diagram of a process for selecting a target candidate feature vector according to an embodiment of the present application;

[0026] Figure 6 is another flowchart of a training method for an information selection model provided in an embodiment of the present application;

[0027] Figure 7 It is a flowchart of an information selection method provided according to an embodiment of the present application;

[0028] Figure 8 It is a flowchart of an information selection method provided according to an embodiment of the present application;

[0029] Fig. 9 It is a schematic diagram of the interface display of target information provided according to an embodiment of the present application.

[0030] Fig.10 A connection block diagram of a training device for an information selection model provided in an embodiment of the present application is shown;

[0031] Fig.11 A connection block diagram of an information selection device provided in an embodiment of the present application is shown;

[0032] Fig.12 A schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present application is shown. DETAILED DESCRIPTION

[0033] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this application will be more comprehensive and complete and fully convey the concept of the example embodiments to those skilled in the art.

[0034] In addition, described feature, structure or characteristic can be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present application. However, those skilled in the art will appreciate that the technical scheme of the present application can be put into practice without one or more of the specific details, or other methods, components, devices, steps, etc. can be adopted. In other cases, known methods, devices, realizations or operations are not shown or described in detail to avoid blurring the various aspects of the application.

[0035] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0036] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.

[0037] It should be noted that the “plurality” mentioned in this article refers to two or more.

[0038] With the research and advancement of artificial intelligence technology, it has been studied and applied in many fields and is playing an increasingly important role.

[0039] Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Take the application of artificial intelligence in machine learning as an example:

[0040] Among them, Machine Learning (ML) is a multi-disciplinary interdisciplinary subject involving probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and other disciplines. It specializes in studying how computers simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications are spread across all fields of artificial intelligence. The solution of this application mainly uses machine learning to select information.

[0041] Before going into detail, the terms used in this application are explained as follows:

[0042] Feature domain, feature domain is used to represent the features of a certain category. In the embodiment of the present application, the feature domain can be three major categories, and the three major categories can specifically include the features of multiple subcategories. Among them, the three major categories can specifically include object class features (such as specific feature information of a certain user), information class features and context features, wherein the object class features can include one or more of "gender", "age" and "historical operation behavior", etc., the information class features can include one or more of "information browsing time", "information identification", "information category" and "information creator", etc., and the context features can include one or more of "information delivery platform", "device operating system type" and "information location in the delivery platform", etc. A feature domain usually contains multiple features, and the number of features included in different feature domains is different. For example, the feature domain of "gender" includes three features of "male", "female" and "unknown", the feature of "age" includes 131 features of "0 to 130 years old", and the feature domain of "information source" can include "platform A", "platform B", etc. It should be understood that in order to more conveniently process the features in the above feature domains, the features can also be discretized and identified with a unique ID.

[0043] Information samples, which can be items, commodities, pictures, videos or articles, etc., include multiple sample features and identification information of whether the information sample is selected. Each sample feature belongs to one of the above-mentioned feature domains.

[0044] Feature vector: In machine learning (the recommendation model or selection model used in machine learning), high-dimensional features are generally mapped to a low-dimensional vector. This vector is called an Embedding vector (also known as a feature vector).

[0045] Target model: refers to the use of deep learning models (such as convolutional neural network models) to perform end-to-end training on a large number of labeled information samples to obtain a fully trained target model that can accurately select target information from massive amounts of information. For example, it can accurately select videos, images, texts, and products.

[0046] The implementation details of the technical solution of the embodiment of the present application are described in detail below:

[0047] Figure 1 is a schematic diagram of an application scenario according to an embodiment of the present application, such as Figure 1 As shown, the application scenario includes a terminal device 10 and a server 20 connected to the terminal device 10 through a network, and the network can be a wide area network or a local area network, or a combination of the two. The terminal device 10 can be a smart phone, a tablet computer, a computer or the like. Figure 1Only a schematic diagram showing that the terminal device 10 is a smart phone is shown.

[0048] The user can send an information acquisition instruction to the server 20 through the terminal device 10 .

[0049] The server 20 can respond to the information acquisition instruction to obtain a sample set, a feature domain corresponding to the sample set, and multiple candidate feature vectors corresponding to each feature domain, wherein the training sample in the sample set includes label information of whether it is selected and multiple sample features, each sample feature belongs to a feature domain, and the vector lengths of the candidate feature vectors are different; determine the target candidate feature vector of the feature domain from the multiple candidate feature vectors corresponding to each feature domain according to the sample set, and obtain the initial feature vector of each feature under the feature domain according to the target candidate feature vector of each feature domain; train an initial model based on the sample set and the initial feature vector of each feature, and update the initial feature vector of each feature during the training process to obtain the target feature vector of each feature; train the initial model based on the sample set and the target feature vector of each feature to obtain the target model, so as to select the target information from the multiple information to be selected based on the target model, and feed the target information back to the terminal device 10, so that the user can browse the target information on the terminal device 10.

[0050] By adopting the above method, it is achieved to assign a reasonable feature vector to each feature, so that when the target model is trained based on the information sample and the feature vector assigned to each feature, the accuracy of the target information selected by the target model can be effectively improved while improving the computing efficiency and saving memory overhead. That is, the target model deployed on the server can occupy less memory resources and the target information obtained by the target model can be more accurate.

[0051] It should be understood that the above-mentioned information selection model training method and information selection method process can be executed on the server 20 as well as on the terminal device 10. They will not be described one by one here.

[0052] Figure 2 This is a flowchart of a training method for an information selection model according to an embodiment of the present application. The method can be executed by an electronic device with processing capabilities, such as a server, a terminal device, or a server and a terminal device interacting to implement the present solution, etc., which is not specifically limited here. Figure 2 As shown, the method at least includes steps S110 to S140, which are described in detail as follows:

[0053] Step S110: Obtain a sample set, a feature domain corresponding to the sample set, and a plurality of candidate feature vectors corresponding to each feature domain.

[0054] The training samples in the sample set include label information of whether they are selected and multiple sample features, each sample feature belongs to a feature domain, and the vector lengths of the candidate feature vectors are different.

[0055] The training samples included in the sample set may be features of one or more samples such as videos, advertisements, texts, pictures, and commodities, and identification information of whether each sample is selected, wherein each sample feature of the sample belongs to a different feature domain, that is, the sample set corresponds to multiple feature domains, and each sample feature can be identified by a feature ID in the corresponding feature domain. The multiple feature domains may specifically include but are not limited to one or more of the target object's gender, age, and historical operation behavior, and may also include one or more of information browsing time, information identification, information category, and information creator, and may also include one or more of the sample information request time generated by the target object, the sample's information delivery platform, and the sample's location in the delivery platform.

[0056] The method of obtaining the sample set may be to obtain the sample set from the electronic device, to receive the sample set input by the user, or to obtain the sample set from a storage device or database associated with the electronic device. It should be understood that the above-mentioned method of obtaining the sample set is only illustrative and is not specifically limited in this embodiment. It should also be understood that after the sample set is determined, the feature domain corresponding to the sample set is also determined, that is, after the sample set is obtained, the feature domain corresponding to the sample set can be obtained according to the sample features of the training samples in the sample set.

[0057] The multiple candidate feature vectors corresponding to each feature domain may be pre-set, and the vector lengths of different candidate feature vectors are different. The multiple candidate feature vectors corresponding to each feature domain may also be determined based on the pre-set vector lengths of each feature included in the feature domain. Accordingly, there may be multiple ways to obtain the multiple candidate vectors corresponding to each feature domain.

[0058] In one possible implementation, a method of obtaining multiple candidate feature vectors corresponding to each feature domain may be to obtain multiple candidate feature vectors corresponding to each feature domain that are pre-stored.

[0059] In another possible implementation, taking into account that each feature domain includes multiple different features, for example, the feature domain of "age" includes three features, namely "male", "female" and "unknown", and the feature domain of "information source" includes multiple features such as "platform A" and "platform B", therefore, the vector lengths of the feature vectors corresponding to each feature in the same feature domain may be different, and therefore the candidate feature vectors of each feature domain can be determined according to the lengths of the feature vectors corresponding to the multiple features.

[0060] It should be understood that the feature vectors of the features corresponding to the same candidate feature vector are the same. For example, if the vector length of the candidate feature vector is n bits, the vector length of the feature vectors of the features corresponding to the candidate feature vector is also n bits, where n is a positive integer.

[0061] Step S120: determining a target candidate feature vector of each feature domain from a plurality of candidate feature vectors corresponding to each feature domain according to the sample set, and obtaining an initial feature vector of each feature under the feature domain according to the target candidate feature vector of each feature domain.

[0062] There are many ways to determine the target candidate feature vector of each feature domain from multiple candidate feature vectors corresponding to the feature domain according to the sample set.

[0063] In one possible implementation, a specified number of information samples can be selected from a sample set, vector conversion can be performed on each feature in the information samples belonging to the same feature domain, and the frequency of occurrence of each feature in the selected information samples can be counted. A target candidate feature vector can be determined from multiple candidate feature vectors based on the length of the feature vector of each feature included in each feature domain after the conversion and the frequency of occurrence of each feature.

[0064] Among them, when the feature is converted into a vector, the conversion can be performed according to the correspondence between the pre-set feature and the vector length. When a target candidate feature vector is determined from multiple candidate feature vectors according to the length of the feature vector of each feature included in each feature domain after the conversion and the frequency of occurrence of each feature, the weight coefficient of each feature can be determined according to the frequency of occurrence of each feature, and a target vector length can be determined according to the weight coefficient of each feature and the vector length corresponding to the feature, so as to select the target candidate feature vector from multiple candidate feature vector lengths based on the target vector length.

[0065] In another optional implementation, an initial weight parameter may be set for each candidate feature vector, a specified number of information samples may be selected from the sample set, and the initial model may be trained based on the selected information samples and multiple candidate feature vectors corresponding to each feature domain. The weight parameters of each candidate feature vector corresponding to each feature domain may be updated during the training process, and based on the updated weight parameters of each candidate feature vector, the target candidate feature vector of the feature domain may be determined from the multiple candidate feature vectors corresponding to the feature domain.

[0066] The initial model can be a convolutional neural network model. Specifically, the convolutional neural network can be ResNet (Residual Neural Network), DenseNet (Densely Connected Convolutional Networks), SENet (Squeeze-and-Extraction Networks), etc. It is not limited here and can be selected according to actual needs.

[0067] When updating the weight parameters of each candidate feature vector corresponding to each feature domain during the training process, specifically, a Softmax function or a neural network search algorithm may be added to the middle layer of the initial model to adjust the weight parameters during the model training process, so that the larger the adjusted weight parameter, the more accurate the corresponding candidate feature vector, thereby making it more accurate to select the target candidate feature vector based on the adjusted weight parameter.

[0068] It should be noted that, since each candidate vector of each feature domain is specifically composed of feature vectors of multiple features, after the target candidate feature vector of each feature domain is obtained, the initial feature vector of the features included in each feature domain can also be determined. In addition, since the vector length of the target candidate feature vector of each feature domain is usually represented by bits, it can be used to represent the memory space occupied by the initial feature vector of each feature in the feature domain. Correspondingly, the vector length of the target candidate feature vector of the feature domain is the vector length of the initial feature vector of each feature in the feature domain. That is, the initial feature vector of each feature in the feature domain is obtained according to the target candidate feature vector of each feature domain, and specifically, the vector length of the target candidate feature vector of each feature domain can be used as the vector length of the initial feature vector of each feature in the feature domain.

[0069] Step S130: Based on the sample set and the initial feature vector of each feature, an initial model is trained, and during the training process, the initial feature vector of each feature is updated to obtain a target feature vector of each feature.

[0070] When training the initial model based on the sample set and the initial feature vector of each feature, the initial model can be trained based on only partial information samples in the sample set and the initial feature vector of each feature. During the training of the initial model, the initial feature vector of each feature can be updated based on the feature vector selection algorithm.

[0071] In one possible implementation of the present application, the above step S130 may specifically be to train the initial model based on the sample set and the initial feature vector of each feature, and update the initial feature vector of each feature based on the feature vector selection algorithm during the training process.

[0072] Specifically, according to the vector length of the initial feature vector of each feature, the features of each information sample in the sample set can be vectorized to obtain the feature vector of each information sample, and the initial model can be trained according to the label of each information sample and the feature vector of the feature of the information sample. During the training process, the feature vector of each feature is updated using the feature vector selection algorithm to obtain the target vector of each feature.

[0073] Among them, the above-mentioned feature vector selection algorithm can specifically be a pruning algorithm (PEP algorithm), an AMTL algorithm, a DNIS algorithm or an auto embedding algorithm, etc., as long as the feature vector selection algorithm can be used to update the feature vector of each feature in the process of training the initial model based on the sample set and the initial feature vector of each feature.

[0074] For example, if the pruning algorithm is used to update the feature vector of each feature during the training process, it can be achieved that the initial feature vector of each feature is less than the threshold parameter s i The positions are forced to be zero, and the other parts retain the original values ​​to obtain the target feature vector of each feature. When storing the feature vector of the target feature of each feature, the sparse storage counting method can be used to save memory space. If the AMTL algorithm is used to update the feature vector of each feature during the training process, the breakpoint position can be determined in the feature vector of each feature, and the feature vector after the breakpoint position is discarded to obtain the updated feature vector. If the DNIS algorithm is used to update the feature vector of each feature during the training process, the weight can be calculated for each position of the feature vector of each feature, and the vector position with the maximum weight greater than the preset value is retained (or the vector position with the weight sorted before the preset value is retained), so as to obtain the updated feature vector of each feature. If the auto embedding algorithm is used to update the feature vector of each feature, this can achieve the selection of the optimal feature vector through a DN network structure.

[0075] Step S140: Based on the sample set and the target feature vector of each feature, the initial model is trained to obtain a target model, so as to select target information from a plurality of information to be selected based on the target model.

[0076] In one possible implementation of the present application, the above-mentioned step S140 may specifically be, according to the target feature vector of each feature, respectively performing vector conversion on the features of each information sample in the sample set to obtain the target feature vector of the features of each information sample, and respectively inputting the label information of each information sample and the target feature vector of the features of the information sample into the target model for training, until the model converges to obtain the target model.

[0077] It should be understood that by using the loss function of the model to calculate the sample labels of the information samples and the prediction results of the training samples, the prediction loss value corresponding to the information sample is obtained. When the prediction loss value does not meet the preset convergence conditions, the model parameters in the initial model can be adjusted until the prediction loss value obtained using the adjusted model meets the preset convergence conditions. The training is stopped and the model at the end of the training is determined as the target model.

[0078] After the target model is obtained, the target model can be used to select target information from a large amount of information to be selected so as to display the target information.

[0079] By adopting the training method of the information selection model of the present application, it is possible to use a two-layer search space to search for the feature vector of each feature in the sample set: the first layer is in the feature domain dimension, and a target candidate feature vector is selected for each feature domain. At this time, the vector length of the initial feature vector corresponding to all the features in the feature domain uses the vector length of the target candidate feature vector; the second layer is in the feature dimension, and on the basis of the first layer search, the initial feature vector corresponding to each feature in the sample set is adjusted to achieve the allocation of a better feature vector for each feature corresponding to the information sample in the sample set, that is, when a high-frequency feature appears many times, a larger feature vector is allocated to fully learn the feature, and when a low-frequency feature appears few times, a smaller feature vector is allocated to learn the feature, so that when the target model is obtained by training the target feature vectors and samples of each feature obtained by the above allocation, the accuracy of information selection of the target model is effectively improved. This avoids the problem of wasting memory when the feature vectors assigned to low-frequency features are too large when the features appear infrequently, and the problem of insufficient training affecting the model effect when the feature vectors assigned to high-frequency features are small when the features appear infrequently. That is, by adopting the method of the present application, a better feature vector can be assigned to each feature, which can effectively improve the accuracy of information selection of the target model while saving memory consumption.

[0080] See also Figure 3 The present application also provides a method for training an information selection model, which can be applied to an electronic device. The method includes:

[0081] Step S210: Obtain a sample set, a feature domain corresponding to the sample set, and a plurality of candidate feature vectors corresponding to each feature domain.

[0082] The training samples in the sample set include label information of whether they are selected and multiple sample features, each sample feature belongs to a feature domain, and the vector lengths of the candidate feature vectors are different.

[0083] Step S220: Based on the first sample set in the sample set, multiple candidate feature vectors corresponding to each feature domain and initial weight parameters of each candidate feature vector, train the initial model, and update the weight parameters of each candidate feature vector corresponding to each feature domain during the training process.

[0084] The initial weight parameter of each candidate feature vector may be preset, and the initial weight parameter of each candidate feature vector may also be set according to the vector length of each candidate feature vector, and the initial weight parameter of each candidate feature vector may also be the same.

[0085] In one possible implementation, the initial weight parameters of each candidate feature vector are preset, and before executing step S220, the method further includes: normalizing the initial weight parameters of each candidate feature vector to obtain the normalized initial weight parameters of each candidate feature vector.

[0086] Exemplarily, for the i-th feature domain, there are a total of N candidate feature vectors): They are different vector lengths (Embedding Size), and each candidate feature vector corresponds to an initial weight parameter The softmax function can be used to normalize the weight parameters, and the initial weight parameters of each candidate feature vector after normalization are obtained as follows:

[0087] The above step S220 may specifically include:

[0088] Step S222: performing linear change processing on each candidate feature vector to obtain a candidate feature vector after the linear change processing, wherein the vector lengths of each candidate feature vector after the linear change processing are the same.

[0089] Wherein, each candidate feature vector is subjected to a change process, specifically, each candidate feature vector is multiplied by a unit matrix to complete a linear change of each candidate feature vector, and the candidate feature vector after the linear change process can be obtained according to the result of the multiplication. Wherein, the vector length of the candidate feature vector after the linear change process can be greater than or equal to the vector length of the candidate feature vector with the longest vector length before the linear change process.

[0090] Step S224: Based on the first sample set in the sample set, the candidate feature vectors corresponding to each feature domain after multiple linear changes and the initial weight parameters of each candidate feature vector, train the initial model, and update the weight parameters of each candidate feature vector corresponding to each feature domain based on the neural network search algorithm during the training process.

[0091] Among them, based on the first sample set in the sample set, the multiple candidate feature vectors processed by linear changes corresponding to each feature domain and the initial weight parameters of each candidate feature vector, when training the initial model, specifically, the multiple candidate feature vectors processed by linear changes corresponding to each feature domain and the initial weight parameters of each candidate feature vector are respectively input into the initial model, so that during the training process of the initial model, the weight parameters of each candidate feature vector corresponding to each feature domain are updated based on the neural network search algorithm.

[0092] Step S230: According to the updated weight parameters of the candidate feature vectors corresponding to each feature domain, a target candidate feature vector of the feature domain is determined from the multiple candidate feature vectors corresponding to the feature domain.

[0093] The above step S230 may be to obtain the candidate feature vector corresponding to the maximum weight parameter among the weight parameters of the updated candidate feature vectors corresponding to each feature domain as the target candidate feature vector of the feature domain. That is, the vector length of the target candidate feature vector of the feature domain is the vector length of the candidate feature vector corresponding to the maximum weight parameter after the update in the feature domain.

[0094] The above-mentioned step S230 can also be, obtaining the weight parameters of each updated candidate feature vector corresponding to each feature domain, sorting the weight parameters in order from large to small to obtain the specified candidate feature vectors corresponding to the first specified number of weight parameters, and performing weighted summation on the vector lengths of the specified candidate feature vectors according to the corresponding weight parameters to obtain the vector length of the target candidate feature vector of the feature domain.

[0095] Step S240: Based on the second sample set in the sample set and the initial feature vector of each feature, train the initial model, update the model parameters of the initial model during the training process to obtain an updated initial model, and update the initial feature vector of each feature based on the feature vector selection algorithm during the training process.

[0096] Step S250: Determine whether the updated initial model converges.

[0097] Among them, the method for judging whether the updated initial model converges is to judge whether the loss function of the updated initial model is less than the preset loss value. If it is less than, it can be determined that the updated initial model converges; if not, it can be determined that the updated initial model does not converge.

[0098] If the updated initial model converges, step S260 is executed: the updated initial feature vector of each feature is determined as the target feature vector of the feature.

[0099] If the updated initial model has not converged, the process returns to step S220 and executes step S260 when the updated initial model converges.

[0100] It should be noted that in step S220, the initial model is trained based on the first sample set in the sample set, the candidate feature vectors processed by multiple linear changes corresponding to each feature domain, and the initial weight parameters of each candidate feature vector, and the weight parameters of each candidate feature vector corresponding to each feature domain are updated based on the neural network search algorithm during the training process, so that the optimal candidate feature vector (target candidate feature vector of the feature domain) can be searched in the feature domain dimension. In steps S240-S260, the initial model is trained based on the second sample set in the sample set and the initial feature vector of each feature, and the model parameters of the initial model are updated during the training process to obtain the updated initial model, and the initial feature vector of each feature is updated based on the feature vector selection algorithm during the training process. It can be realized that the optimal feature vector of each feature (target feature vector of the feature) can be searched in the feature dimension. If the updated initial model converges, the updated initial feature vector of each feature is determined as the target feature vector of the feature. By adopting steps S220-S250, the feature vector size can be alternately searched for the feature domain dimension and the feature dimension to obtain the optimal feature vector (target feature vector) of each feature.

[0101] It should also be noted that if the above-mentioned feature vector selection algorithm is a pruning algorithm, then in steps S220-S260, there are three groups of parameters to be learned, one group is the deep learning model parameters, including candidate feature vectors, network cross-layer parameters, etc., which are uniformly marked as W; the other group is the feature sparsification threshold parameter s i ,i∈{1,2,…,M}, marked as S, S can be solved together with W, so we also count this part of the parameters into W; there is also a set of feature domain Embedding candidate set weight parameters Marked as a, this parameter and W are solved by the DARTS algorithm. The optimization problem to be solved is:

[0102]

[0103]

[0104] in, represents the cross entropy loss function of the first sample set, represents the cross entropy loss function of the second sample set. In the process of executing step S220, the parameter a can be adjusted; in the process of executing steps S240-S260, the parameter W can be adjusted.

[0105] Step S270: Based on the sample set and the target feature vector of each feature, the initial model is trained to obtain a target model, so as to select target information from a plurality of information to be selected based on the target model.

[0106] By adopting the training method of the information selection model described above, using steps S220-S260, it is possible to alternately search for the feature vector of each feature in the sample set using the feature domain dimension and the feature dimension, so as to allocate the optimal feature vector to each feature, thereby effectively improving the accuracy of information selection of the target model when the target feature vector of each feature obtained by the above allocation and the sample training are used to obtain the target model. This avoids the problem that when the low-frequency feature has a small number of occurrences and the allocated feature vector is too large, which wastes memory, and when the high-frequency feature has a large number of occurrences and the allocated feature vector is small, which leads to insufficient training and affects the model effect. That is, by adopting the method of the present application, a better feature vector can be allocated to each feature, which can effectively improve the accuracy of information selection of the target model while saving memory consumption.

[0107] Please refer to Figure 4 , Figure 5 as well as Figure 6 As shown, an embodiment of the present application provides a training method for an information selection model and takes the information samples included in the sample set used in the method as video samples as an example for explanation. The specific training process can be divided into two stages, the first stage is the parameter search stage, and the second stage is the retraining stage, wherein the parameter search stage specifically includes the search of the feature vector size of the feature domain dimension and the search of the vector size of the feature dimension, so as to obtain the optimal feature vector of each sample feature in the video sample by alternating the search of the feature domain dimension and the feature dimension, so as to train the initial model based on the optimal feature vector of the sample features of each video sample in the retraining stage to obtain the target model. The specific training process is as follows.

[0108] In the parameter search phase, firstly, a video sample set, a feature domain corresponding to the video sample set, and a plurality of candidate feature vectors corresponding to each feature domain are obtained.

[0109] Among them, the video sample set includes multiple video samples, and the video sample includes label information of whether the video sample is selected, and the feature type (feature domain) of the video sample can specifically include three major categories: object class features, video information feature classes and context features, and the object class features specifically include one or more of gender features, age features, and historical operation behavior features, etc., the video information feature class specifically includes one or more of video playback duration features, video type features, and video creators, etc., and the context feature class specifically includes one or more of the playback platform, the system adopted by the device, and the location and time when the video sample is requested to be selected.

[0110] Exemplarily, each video sample includes M feature domains, namely {x 1 ,x 2 ,…,x M}, x i Represents the original feature of the i-th feature domain (the original feature vector can be represented by a one-hot encoding vector), and M is an integer greater than or equal to 2. For the i-th feature domain, design N candidate feature vectors: The vector lengths corresponding to the N candidate feature vectors are d 1 ,d 2 ,…,d N , and d 1 <d 2 <… <d N .in n i represents the number of features contained in the i-th feature domain, d j Represents the vector length of the j-th candidate feature vector. Each row in represents the feature domain x i The feature vector corresponding to each feature ID is Therefore, the candidate feature vector corresponding to the i-th feature domain can be expressed as:

[0111]

[0112] For the i-th feature domain, there are a total of N candidate feature vectors: The vector length of each candidate feature vector is different, and a weight parameter is set for each candidate feature vector And use the softmax function to normalize the weight parameters, and the normalized weight parameters are (That is, obtaining the initial weight parameters of each candidate feature vector).

[0113] After obtaining the video sample set, the feature domain corresponding to the video sample set, and a plurality of candidate feature vectors corresponding to each feature domain, feature vector selection in the feature domain dimension may be specifically performed.

[0114] The specific feature vector search process of the feature domain dimension is as follows:

[0115] Based on the first sample set in the video sample set, multiple candidate feature vectors corresponding to each feature domain and initial weight parameters of each candidate feature vector, an initial model is trained, and the weight parameters of each candidate feature vector corresponding to each feature domain are updated during the training process.

[0116] Exemplarily, in the process of training the initial model based on the first sample set in the sample set, multiple candidate feature vectors corresponding to each feature domain, and initial weight parameters of each candidate feature vector, the feature vector of the i-th feature domain may be obtained by weighted summing all candidate feature vectors:

[0117]

[0118] in Is After linear transformation, It refers to the jth eigenvector of the i-th feature domain; Yes By linear transformation, Linear change processing is performed to ensure that all vector dimensions are consistent after processing (the vector dimensions of the candidate feature vectors in the same feature domain are consistent) to facilitate summation. At this point, the problem has been transformed into a classic DARTS algorithm problem. The DARTS algorithm is subsequently used to train the weight parameters together with the model parameters, that is, when the video samples, the candidate feature vectors of each feature domain, and the initial weight parameters corresponding to each candidate feature vector are input for training, the weight parameters of each candidate feature vector corresponding to each feature domain can be updated during the training process based on the neural network search algorithm (that is, the DARTS algorithm). After the training is completed, for each feature domain, the candidate feature vector corresponding to the maximum weight parameter among the updated weight parameters of each candidate feature vector corresponding to each feature domain will be selected as the target candidate feature vector of the feature domain, and the rest will be discarded, that is:

[0119]

[0120] After completing the vector search in the feature domain dimension, you can perform a vector search in the feature dimension. The specific feature vector search process in the feature domain dimension is as follows:

[0121] Based on the second sample set in the video sample set and the initial feature vector of each feature, the initial model is trained, and the model parameters of the initial model are updated during the training process to obtain an updated initial model, and the initial feature vector of each feature is updated based on the feature vector selection algorithm during the training process. If the updated initial model converges, the updated initial feature vector of each feature is determined as the target feature vector of the feature; and if the updated initial model does not converge, the training of the initial model based on the training samples, multiple candidate feature vectors corresponding to each feature domain, and the initial weight parameters of each candidate feature vector are returned, and the weight parameters of each candidate feature vector corresponding to each feature domain are updated during the training process until the updated initial model converges, and the updated initial feature vector of each feature is determined as the target feature vector of the feature.

[0122] For example, if the vector space of the target candidate vector corresponding to the i-th feature domain is V i , the vector space is represented in the form of a matrix, and each row of the matrix represents the eigenvector of each feature in this feature domain. i Perform feature vector sparse constraints so that V i The unimportant coordinate positions in the Figure 6 The blank area in the image is the coordinate position after the sparse constraint is not applied) to indirectly realize the Embedding Size selection of the feature dimension. That is, the present application uses the feature vector selection algorithm (i.e., PEP algorithm) to select V during the initial model training process. i To convert:

[0123]

[0124] Among them, the sign function is the function of taking the element sign of the matrix, s i is a threshold parameter, which can be trained together with the model parameters during the training of the initial model. g(.) is a normalization function, and Relu is a piecewise function used to make V i The absolute value is less than g(s i ) is forced to 0, and the other parts retain their original values ​​to achieve V i The number of non-zero elements in the feature vector is constrained. This enables the selection of the vector size of the feature vector in the feature dimension. After selecting the size of the feature vector, sparse storage technology can be used to save memory overhead.

[0125] It should be noted that when the initial model has not converged after the parameter update, it is necessary to alternately search in the feature domain dimension and the feature dimension to obtain the optimal feature vector of each sample feature in the video sample. Specifically, by using the non-converged initial model and selecting the candidate feature vectors of each feature domain again, and again updating the model parameters of the initial model and updating each initial vector based on the candidate feature vectors of each feature domain and the video sample set, so as to select more and more accurate candidate feature vectors using more and more accurate initial models, and determining the updated initial feature vectors of each feature obtained when the model converges as the target feature vectors of each feature after multiple cycles of iterative training until the model converges, the accuracy of each target feature vector obtained can be effectively guaranteed.

[0126] After the optimal feature vector of each sample feature is determined, the retraining phase begins. The specific process of the retraining phase is as follows:

[0127] The initial model is trained based on the sample set and the target feature vector of each feature to obtain the target model. When the initial model is trained to obtain the target model, the sample features of the training samples in the sample set are vectorized according to the feature vector of each feature to obtain the sample feature vector of each training sample; the sample feature vector of each training sample and the label information of each training sample are input into the initial model for training until the target model is obtained when the model converges.

[0128] Please refer again Figure 6 When the initial model is trained based on each sample set and the target feature vector of each feature, if a sample includes multiple features belonging to the same feature domain dimension, then after the sample is vectorized to obtain the sample feature vector of each training sample, it is necessary to simultaneously compress the multiple sample feature vectors belonging to the same feature domain to obtain the feature domain embedding, and then input the sample feature vector of each training sample and the label information of each training sample into the network cross layer of the initial model for training to obtain the target model.

[0129] See also Figure 7 As shown, an embodiment of the present application provides an information selection method, the method comprising:

[0130] Step S310: Acquire multiple pieces of information to be selected.

[0131] Step S320: Select target information from multiple pieces of information to be selected based on the target model.

[0132] Among them, the target model is obtained based on the training method of the information selection model in the above embodiment.

[0133] The number of target information selected from multiple pieces of information to be selected based on the target model can be one or more. If the number of selected target information is multiple, the multiple target information can be sorted according to the probability of each target information being selected, and the sorting results can be displayed.

[0134] The method of selecting target information from multiple pieces of information to be selected based on the target model includes:

[0135] Step S322: performing vector conversion on the features of the plurality of information to be selected according to the target feature vector of each feature to obtain a feature vector of each information to be selected.

[0136] Step S324: input the feature vectors of each information to be selected into the target model respectively to obtain the selection probability of each information to be selected.

[0137] Step S326: Select target information from the plurality of pieces of information to be selected based on the selection probability of each piece of information to be selected.

[0138] It should be understood that the features of the information to be selected should include target object class features, information class features and context features. By converting the features of each piece of information to be selected into vectors according to the target feature vector of each feature, the vector length of the feature vector of each piece of information to be selected input into the target model can be made more accurate, thus avoiding excessive memory consumption when selecting target information from each piece of information to be selected using the target model when the vector length of the feature vector is unreasonable.

[0139] In order to better understand the above information selection method, take the information to be selected as the media resources in the information interaction platform as an example and combine Figure 8 and Fig. 9 The specific embodiments shown are further explained.

[0140] As an alternative example, Figure 8 As shown, if a user needs to view media resources through an information interaction platform, it is usually necessary to screen them from a candidate media resource library (for example, a video library) of tens of millions. The process of screening media resources is also the information selection process of the present application, wherein the information selection process generally includes two stages. The first stage is called recall, in which a number (thousands) of candidate sets are selected from a tens of millions advertising library through a recall algorithm; the second stage is called sorting, in which a sorting model is used to accurately sort the recalled candidate media resources, and finally the best one or more target media resources are selected and pushed to the user's corresponding account.

[0141] For example, Fig. 9As shown, the recall algorithm and the sorting model can specifically be the target model in the above embodiment, so as to push the target media resources that meet the push conditions to the application where the user's account is located, and display the thumbnail information of the target resource (for example, one or more of a link, a title, and a picture, etc.) on the application page. The user can view the specific information of the target media resource by touching the corresponding interface.

[0142] The following describes an apparatus embodiment of the present application, which can be used to execute the method in the above-mentioned embodiment of the present application. For details not disclosed in the apparatus embodiment of the present application, please refer to the above-mentioned method embodiment of the present application.

[0143] See also Fig.10 The embodiment of the present application also provides a training device 400 for an information selection model, and the device 400 includes a data acquisition module 410, a first feature vector acquisition module 420, a second feature vector acquisition module 430 and a model training module 440.

[0144] The data acquisition module 410 is used to obtain a sample set, a feature domain corresponding to the sample set, and multiple candidate feature vectors corresponding to each feature domain, wherein the training sample in the sample set includes label information of whether it is selected and multiple sample features, each sample feature belongs to a feature domain, and the vector lengths of each candidate feature vector are different; the first feature vector acquisition module 420 is used to determine the target candidate feature vector of the feature domain from the multiple candidate feature vectors corresponding to each feature domain according to the sample set, and obtain the initial feature vector of each feature under the feature domain according to the target candidate feature vector of each feature domain; the second feature vector acquisition module 430 is used to train the initial model based on the sample set and the initial feature vector of each feature, and update the initial feature vector of each feature during the training process to obtain the target feature vector of each feature; the model training module 440 is used to train the initial model based on the sample set and the target feature vector of each feature to obtain the target model, so as to select the target information from the multiple information to be selected based on the target model.

[0145] In one possible implementation, each candidate feature vector corresponds to an initial weight parameter, and the first feature vector acquisition module 420 includes: a weight parameter updating submodule and a feature vector acquisition submodule. The weight parameter updating submodule is used to train the initial model based on the first sample set in the sample set, the multiple candidate feature vectors corresponding to each feature domain, and the initial weight parameters of each candidate feature vector, and update the weight parameters of each candidate feature vector corresponding to each feature domain during the training process; the feature vector acquisition submodule is used to determine the target candidate feature vector of the feature domain from the multiple candidate feature vectors corresponding to the feature domain according to the weight parameters of each updated candidate feature vector corresponding to each feature domain.

[0146] In one possible implementation, the weight parameter updating submodule is also used to perform linear change processing on each candidate feature vector to obtain a candidate feature vector after the linear change processing, wherein the vector lengths of each candidate feature vector after the linear change processing are the same; based on the first sample set in the sample set, multiple candidate feature vectors after the linear change processing corresponding to each feature domain, and the initial weight parameters of each candidate feature vector, an initial model is trained, and during the training process, the weight parameters of each candidate feature vector corresponding to each feature domain are updated based on a neural network search algorithm.

[0147] In one possible implementation, the feature vector acquisition submodule is further used to acquire the candidate feature vector corresponding to the maximum weight parameter among the updated weight parameters of the candidate feature vectors corresponding to each feature domain as the target candidate feature vector of the feature domain.

[0148] In one possible implementation, the first feature vector acquisition module 420 is further configured to use the target candidate feature vector of each feature domain as the initial feature vector of each feature in the feature domain.

[0149] In one possible implementation, the second feature vector acquisition module 430 is also used to train the initial model based on the second sample set in the sample set and the initial feature vector of each feature, and to update the model parameters of the initial model during the training process to obtain an updated initial model, and to update the initial feature vector of each feature based on the feature vector selection algorithm during the training process; if the updated initial model converges, the updated initial feature vector of each feature is determined as the target feature vector of the feature; if the updated initial model does not converge, return to execute the initial model training based on the training samples, multiple candidate feature vectors corresponding to each feature domain, and the initial weight parameters of each candidate feature vector, and update the weight parameters of each candidate feature vector corresponding to each feature domain during the training process until the updated initial model converges, and the updated initial feature vector of each feature is determined as the target feature vector of the feature.

[0150] In one possible implementation, the model training module 440 includes a vector conversion submodule and a model training submodule. The vector conversion submodule is used to perform vector conversion on the sample features of the training samples in the sample set according to the feature vector of each feature to obtain the sample feature vector of each training sample; the model training submodule is used to input the sample feature vector of each training sample and the label information of each training sample into the initial model for training until the target model is obtained when the model converges.

[0151] See also Fig.11 The embodiment of the present application also provides an information selection device 500 , which includes: an information acquisition module 510 and an information selection module 520 .

[0152] The information acquisition module 510 is used to acquire multiple pieces of information to be selected; the information selection module 520 is used to select target information from the multiple pieces of information to be selected based on the target model.

[0153] In one possible implementation, the information selection module 520 includes a vector conversion submodule, a probability acquisition submodule, and an information selection submodule. The vector conversion submodule is used to perform vector conversion on the features of multiple information to be selected according to the target feature vector of each feature to obtain the feature vector of each information to be selected; the probability acquisition submodule is used to input the feature vector of each information to be selected into the target model respectively to obtain the selection probability of each information to be selected; the information selection submodule is used to select the target information from the multiple information to be selected based on the selection probability of each information to be selected.

[0154] It should be noted that the device embodiment in the present application corresponds to the aforementioned method embodiment. The specific principles in the device embodiment can be found in the contents of the aforementioned method embodiment and will not be repeated here.

[0155] The following will be combined Fig.12 An electronic device 100 provided in the present application is described.

[0156] See also Fig.12 Based on the information selection model training method and information selection method provided in the above embodiments, the embodiment of the present application also provides another electronic device 100 including a processor 102 that can execute the above method. The electronic device 100 can be a server 10 or a terminal device, and the terminal device can be a smart phone, tablet computer, computer, portable computer or other device.

[0157] It should also be understood that when the electronic device 100 is used to execute the training method of the information selection model and the information selection method of the present application, it can be used in a variety of different operating environments, for example, in a node environment or a browser environment. Since the protobuf file content may be imported into other protobuf packages, it is necessary to parse the import field and read the imported target file content for program conversion. The specific conversion process can refer to the specific description of the aforementioned information selection model training method and information selection method embodiment, which will not be repeated here.

[0158] The electronic device 100 further includes a memory 104 . The memory 104 stores a program that can execute the contents of the aforementioned embodiments, and the processor 102 can execute the program stored in the memory 104 .

[0159] Among them, the processor 102 may include one or more cores for processing data and a message matrix unit. The processor 102 uses various interfaces and lines to connect various parts of the entire electronic device 100, and executes various functions and processes data of the electronic device 100 by running or executing instructions, programs, code sets or instruction sets stored in the memory 104, and calling data stored in the memory 104. Optionally, the processor 102 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 102 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 102, but may be implemented separately through a communication chip.

[0160] The memory 104 may include a random access memory (RAM) or a read-only memory (ROM). The memory 104 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 104 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function, instructions for implementing the following various method embodiments, etc. The data storage area may also store data (e.g., training samples and verification samples) acquired by the electronic device 100 during use, etc.

[0161] The electronic device 100 may also include a network module and a screen. The network module is used to receive and send electromagnetic waves, realize the mutual conversion between electromagnetic waves and electrical signals, and thus communicate with a communication network or other devices, such as communicating with an audio playback device. The network module may include various existing circuit components for performing these functions, such as antennas, radio frequency transceivers, digital signal processors, encryption / decryption chips, user identity modules (SIM) cards, memories, etc. The network module may communicate with various networks such as the Internet, corporate intranets, wireless networks, or communicate with other devices via wireless networks. The above-mentioned wireless networks may include cellular telephone networks, wireless local area networks, or metropolitan area networks. The screen may display interface content and perform data interaction.

[0162] In some embodiments, the electronic device 100 may further include: a peripheral interface 106 and at least one peripheral device. The processor 102, the memory 104 and the peripheral interface 106 may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral interface via a bus, a signal line or a circuit board. Specifically, the peripheral device includes: at least one of a radio frequency component 108, a camera 114, a display screen 118 and a power supply 122.

[0163] The peripheral interface 106 may be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 102 and the memory 104. In some embodiments, the processor 102, the memory 104, and the peripheral interface 106 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 102, the memory 104, and the peripheral interface 106 may be implemented on a separate chip or circuit board, which is not limited in the embodiments of the present application.

[0164] The radio frequency component 108 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency component 108 communicates with the communication network and other communication devices through electromagnetic signals. The radio frequency component 108 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. Optionally, the radio frequency component 108 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and the like. The radio frequency component 108 can communicate with other terminals through at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: the World Wide Web, a metropolitan area network, an intranet, various generations of mobile communication networks (2G, 3G, 4G and 5G), a wireless local area network and / or a WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency component 108 may also include circuits related to NFC (Near Field Communication), which is not limited in this application.

[0165] The display screen 118 is used to display the UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 118 is a touch display screen, the display screen 118 also has the ability to collect touch signals on the surface or above the surface of the display screen 118. The touch signal can be input to the processor 102 as a control signal for processing. At this time, the display screen 118 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, the display screen 118 can be one, and the front panel of the electronic device 100 is set; in other embodiments, the display screen 118 can be at least two, which are respectively set on different surfaces of the electronic device 100 or are folded; in some other embodiments, the display screen 118 can be a flexible display screen, which is set on the curved surface or folded surface of the electronic device 100. Even, the display screen 118 can also be set as a non-rectangular irregular shape, that is, a special-shaped screen. The display screen 118 can be made of materials such as LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode, machine light-emitting diode).

[0166] The power supply 122 is used to power various components in the electronic device 100. The power supply 122 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 122 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery that is charged through a wired line, and a wireless rechargeable battery is a battery that is charged through a wireless coil. The rechargeable battery can also be used to support fast charging technology.

[0167] The embodiment of the present application also provides a computer-readable storage medium. The computer-readable medium stores program codes, which can be called by a processor to execute the method described in the above method embodiment.

[0168] The computer-readable storage medium may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk, or a ROM. Optionally, the computer-readable storage medium includes a non-transitory computer-readable storage medium. The computer-readable storage medium has storage space for program codes that execute any of the method steps in the above method. These program codes can be read from or written to one or more computer program products. The program code can be compressed, for example, in an appropriate form.

[0169] The embodiment of the present application also provides a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device performs the method described in the above various optional implementations.

[0170] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.

[0171] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the implementation methods of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the implementation methods of the present application.

[0172] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the embodiments disclosed herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary technical means in the art that are not disclosed in the present application.

[0173] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A training method for an information selection model, characterized in that: include: Obtaining a sample media resource set, a feature domain corresponding to the sample media resource set, and a plurality of candidate feature vectors corresponding to each feature domain, wherein the training sample in the sample media resource set includes label information of whether it is selected and a plurality of sample features, each sample feature belongs to one of the feature domains, and the vector lengths of the candidate feature vectors are different; Determine a target candidate feature vector of each feature domain from a plurality of candidate feature vectors corresponding to each feature domain according to the sample media resource set, and obtain an initial feature vector of each feature under the feature domain according to the target candidate feature vector of each feature domain; Based on the sample media resource set and the initial feature vector of each feature, an initial model is trained, and during the training process, the initial feature vector of each feature is updated to obtain a target feature vector of each feature; The initial model is trained based on the sample media resource set and the target feature vector of each feature to obtain a target model, so as to select a target media resource from a plurality of media resources to be selected based on the target model.

2. The method according to claim 1, characterized in that Each candidate feature vector corresponds to an initial weight parameter, and a target candidate feature vector of the feature domain is determined from a plurality of candidate feature vectors corresponding to each feature domain according to the sample media resource set, including: Based on the first sample set in the sample media resource set, a plurality of candidate feature vectors corresponding to each feature domain, and initial weight parameters of each candidate feature vector, the initial model is trained, and the weight parameters of each candidate feature vector corresponding to each feature domain are updated during the training process; According to the updated weight parameters of the candidate feature vectors corresponding to each feature domain, a target candidate feature vector of the feature domain is determined from the multiple candidate feature vectors corresponding to the feature domain.

3. The method according to claim 2, characterized in that Based on the sample media resource set and the initial feature vector of each feature, the initial model is trained, and during the training process, the initial feature vector of each feature is updated to obtain a target feature vector of each feature, including: Based on the second sample set in the sample media resource set and the initial feature vector of each feature, the initial model is trained, and during the training process, the model parameters of the initial model are updated to obtain an updated initial model, and during the training process, the initial feature vector of each feature is updated based on a feature vector selection algorithm; If the updated initial model converges, the updated initial feature vector of each feature is determined as the target feature vector of the feature; If the updated initial model does not converge, return to execute the initial model training based on the first sample set, multiple candidate feature vectors corresponding to each feature domain and initial weight parameters of each candidate feature vector, update the weight parameters of each candidate feature vector corresponding to each feature domain during the training process, until the updated initial model converges, and determine the updated initial feature vector of each feature as the target feature vector of the feature.

4. The method according to claim 2, characterized in that: Based on the first sample set, a plurality of candidate feature vectors corresponding to each feature domain, and initial weight parameters of each candidate feature vector, the initial model is trained, and the weight parameters of each candidate feature vector corresponding to each feature domain are updated during the training process, including: Performing linear change processing on each of the candidate feature vectors to obtain a candidate feature vector after the linear change processing, wherein the vector lengths of each candidate feature vector after the linear change processing are the same; The initial model is trained based on the first sample set in the sample media resource set, multiple candidate feature vectors processed by linear changes corresponding to each feature domain, and initial weight parameters of each candidate feature vector, and the weight parameters of each candidate feature vector corresponding to each feature domain are updated during the training process based on a neural network search algorithm.

5. The method according to claim 2, characterized in that: According to the weight parameters of each updated candidate feature vector corresponding to each feature domain, a target feature vector of the feature domain is determined from a plurality of candidate feature vectors corresponding to the feature domain, including: A candidate feature vector corresponding to the maximum weight parameter among the updated weight parameters of the candidate feature vectors corresponding to each feature domain is obtained as the target candidate feature vector of the feature domain.

6. The method according to claim 1, characterized in that The initial model is trained based on the sample media resource set and the target feature vector of each feature to obtain a target model, including: Performing vector conversion on the sample features of the training samples in the sample media resource set according to the feature vector of each feature to obtain the sample feature vector of each training sample; The sample feature vectors of each training sample and the label information of each training sample are input into the initial model for training until the target model is obtained when the model converges.

7. The method according to claim 1, characterized in that According to the target candidate feature vector of each feature domain, the initial feature vector of each feature in the feature domain is obtained, including: The vector length of the target candidate feature vector of each feature domain is used as the vector length of the initial feature vector of each feature under the feature domain.

8. An information selection method, characterized in that: The method comprises: Obtain multiple media resources to be selected; A target media resource is selected from the plurality of media resources to be selected based on the target model obtained in any one of claims 1 to 7.

9. The method according to claim 8, characterized in that A target media resource is selected from a plurality of media resources to be selected based on the target model, including: Performing vector conversion on the features of the plurality of media resources to be selected according to the target feature vector of each feature to obtain a feature vector of each media resource to be selected; Inputting the feature vectors of each of the to-be-selected media resources into the target model respectively to obtain the selection probability of each of the to-be-selected media resources; A target media resource is selected from a plurality of media resources to be selected based on the selection probability of each of the media resources to be selected.

10. A training device for an information selection model, characterized in that: The device comprises: A data acquisition module is used to acquire a sample media resource set, a feature domain corresponding to the sample media resource set, and a plurality of candidate feature vectors corresponding to each feature domain, wherein the training sample in the sample media resource set includes label information of whether it is selected and a plurality of sample features, each sample feature belongs to one of the feature domains, and the vector lengths of the candidate feature vectors are different; A first feature vector acquisition module is used to determine a target candidate feature vector of each feature domain from a plurality of candidate feature vectors corresponding to each feature domain according to the sample media resource set, and obtain an initial feature vector of each feature under the feature domain according to the target candidate feature vector of each feature domain; A second feature vector acquisition module is used to train an initial model based on the sample media resource set and the initial feature vector of each feature, and update the initial feature vector of each feature during the training process to obtain a target feature vector of each feature; The model training module is used to train the initial model based on the sample media resource set and the target feature vector of each feature to obtain a target model, so as to select a target media resource from multiple media resources to be selected based on the target model.

11. An information selection device, characterized in that: The device comprises: An information acquisition module, used to acquire multiple media resources to be selected; An information selection module is used to select a target media resource from a plurality of media resources to be selected based on the target model obtained in claim 10.

12. An electronic device, characterized in that: include: one or more processors; Memory; One or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the method as described in any one of claims 1-7 or 8-9.

13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program code, and the program code can be called by a processor to execute the method as claimed in any one of claims 1-7 or 8-9.

14. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 or 8 to 9 are implemented.

Citation Information

Patent Citations

  • Training sample selection method and device, computer device and storage medium

    CN110910864A

  • Training method and device, text generation method and device and electronic equipment

    CN111738437A