Sparse feature completion method and device and electronic equipment

By generating reference information to complete the missing features of the sparse matrix, the problem of sparsity of user features in big data scenarios is solved, and the accuracy of model training and the effect of user occupation identification are improved.

CN118535864APending Publication Date: 2024-08-23VIVO MOBILE COMM CO LTD

Patent Information

Application Number
CN202410499428.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-24
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

In big data scenarios, user feature dimensions are huge and feature completeness is low, resulting in sparse matrix problems, which affects model training resource utilization and result accuracy. Existing zero-filling or full-sample mean completion methods cannot effectively distinguish differences in user behavior characteristics. , resulting in inaccurate model inference results.

Method used

By generating the original sparse matrix of seed users, using similarity, content correlation and temporal correlation to generate reference information, complete the missing features of the sparse matrix, including clustering, generative pre-training converter fine-tuning and eigenvalue mean operation. Ensure feature completeness.

Benefits of technology

Effectively complete the missing features in the sparse matrix, improve the accuracy of model training results, and improve the accuracy of user occupation identification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118535864A
    Figure CN118535864A
Patent Text Reader

Abstract

The invention discloses a sparse feature completion method and device and electronic equipment, and belongs to the technical field of artificial intelligence, and the method comprises the steps: generating an original sparse matrix of each seed user according to the identification information, occupational type information and user information of each seed user in a sample set; reference information is generated according to existing features in each original sparse matrix, and the reference information comprises at least one of the following items: the similarity between different seed users, the content correlation degree between different features and the time sequence correlation degree between different features; and complementing missing features in each original sparse matrix based on the reference information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of artificial intelligence technology, and specifically relates to a sparse feature completion method, device and electronic device. Background Art

[0002] With the development of big data, the dimension and scale of user data are growing rapidly. In actual business scenarios, it is often difficult to directly obtain a full set of user portrait labels, such as occupations, which are important representations of user identities and have a significant impact on business development and performance growth. The industry's usual practice is to use big data modeling methods to learn and predict using the behavioral feature modeling methods of existing seed users. However, in real big data scenarios, the user's feature dimensions are usually very large, such as thousands or tens of thousands of dimensions. Limited by factors such as user habits and information collection, the completeness of features is usually very low, and data missing is very serious. Therefore, the result of the feature matrix will be a very large sparse matrix. This sparse matrix problem will not only cause a waste of training resources during model prediction, but also make it difficult for the training results to meet business expectations.

[0003] In the related art, the solution for sparse matrices is usually to fill the eigenvalues ​​of the missing features in the sparse matrix with zeros or fill them with the mean of all samples. However, on the one hand, the zero-filling method does not input any information, which is of no help in improving the accuracy of training and results. On the other hand, the method of filling with the mean of all samples cannot effectively distinguish the differences in behavioral characteristics between different users. It can be seen that the related art only "fills" the values, and does not effectively "fill" the missing features. There is no input of new valid information, which leads to inaccurate inference results of the trained model when the sparse matrix is ​​used for subsequent model training. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a sparse feature completion method, device, and electronic device that can effectively complete the missing features in a sparse matrix and improve the feature completeness, thereby improving the accuracy of the reasoning results of the trained model when the sparse matrix is ​​subsequently used for model training.

[0005] In a first aspect, an embodiment of the present application provides a sparse feature completion method, comprising:

[0006] Generate an original sparse matrix of each seed user according to the identification information, occupation type information and user information of each seed user in the sample set;

[0007] Generate reference information based on the existing features in each original sparse matrix, wherein the reference information includes at least one of the following: similarity between different seed users, content relevance between different features, and temporal relevance between different features;

[0008] Based on the reference information, the missing features in each original sparse matrix are completed.

[0009] In a second aspect, an embodiment of the present application provides a sparse feature completion device, comprising:

[0010] A processing module, used to generate an original sparse matrix of each seed user according to the identification information, occupation type information and user information of each seed user in the sample set;

[0011] Generate reference information based on the existing features in each original sparse matrix, wherein the reference information includes at least one of the following: similarity between different seed users, content relevance between different features, and temporal relevance between different features;

[0012] The completion module is used to complete the missing features in each original sparse matrix based on the reference information.

[0013] According to a second aspect of an embodiment of the present application, the user information includes at least one of the following: user physiological information, geographic location information, program usage information, and interest preference information.

[0014] According to a second aspect of the embodiment of the present application, the reference information includes: similarities between different seed users;

[0015] The processing module is specifically used for:

[0016] According to the number of existing features in each original sparse matrix, the sample set is divided into a feature-complete user subset and a feature-missing user subset, wherein the feature-complete user subset includes: at least one seed user whose feature completeness is higher than a first threshold, and the feature-missing user subset includes: at least one seed user whose feature completeness is lower than or equal to the first threshold;

[0017] Generating a professional description behavior pattern feature vector of each seed user in the feature-complete user subset according to the original sparse matrix of each seed user in the feature-complete user subset;

[0018] Clustering the occupation description behavior pattern feature vectors of all seed users in the feature-complete user subset to obtain a clustering model, wherein the clustering model is used to output a clustering category and a center point feature vector corresponding to the clustering category;

[0019] Generate a career description behavior pattern feature vector for each seed user in the feature-missing user subset according to the original sparse matrix of each seed user in the feature-missing user subset;

[0020] Inputting the occupation description behavior pattern feature vector of each seed user in the sample set into the clustering model respectively, and outputting the cluster category to which each seed user in the sample set belongs and the center point feature vector corresponding to each cluster category;

[0021] According to the occupational description behavior pattern feature vector of each seed user in the sample set, the cluster category to which each seed user belongs and the center point feature vector corresponding to the cluster category to which each seed user belongs, the similarity score of the cluster category to which each seed user in the sample set belongs is calculated.

[0022] According to a second aspect of the embodiment of the present application, the processing module is further used to:

[0023] For each original sparse matrix, the number of existing features of the original sparse matrix is ​​divided by the total number of features of the original sparse matrix to obtain the feature completeness of the seed user corresponding to each original sparse matrix.

[0024] According to the second aspect of the embodiment of the present application, the processing module is specifically used to:

[0025] Based on the first prompt word Prompt rule and the original sparse matrix of at least one seed user in the feature-complete user subset, the generative pre-trained converter is fine-tuned to obtain a first model; wherein the first Prompt rule includes: the data input format of the original sparse matrix and the data output format of the occupation description behavior pattern feature vector;

[0026] Inputting the first prompt word Prompt and the original sparse matrix of at least one seed user in the feature-complete user subset into a generative pre-trained converter, fine-tuning the generative pre-trained converter, and obtaining a first model; wherein the first Prompt includes: the data input format of the original sparse matrix and the data output format of the occupation description behavior pattern feature vector;

[0027] Inputting the original sparse matrix of each seed user in the feature-complete user subset into the first model, and outputting a feature vector of the occupation description behavior pattern of each seed user in the feature-complete user subset;

[0028] The original sparse matrix of each seed user in the feature-missing user subset is input into the first model, and the occupation description behavior pattern feature vector of each seed user in the feature-missing user subset is output.

[0029] According to the second aspect of the embodiment of the present application, the processing module is specifically used to:

[0030] For each occupation type of all seed users in the feature-complete user subset, according to at least two occupational sub-classifications, feature clustering is performed on the occupation description behavior pattern feature vectors of the seed users under each occupation type to obtain a clustering model;

[0031] The clustering model is used to output N*K clustering categories, where N is the total number of occupational types, K is the number of subcategories of each occupational type, and N and M are both integers greater than 1.

[0032] According to a second aspect of the embodiment of the present application, the completion module is specifically used to:

[0033] Performing structured numerical encoding on each original sparse matrix to obtain each encoded original sparse matrix, wherein each existing feature in the encoded original sparse matrix corresponds to an eigenvalue;

[0034] For each cluster category to which all seed users in the feature-complete user subset belong, perform an eigenvalue mean operation on each feature dimension of the encoded original sparse matrix of the seed users whose similarity scores under the cluster category are ranked in descending order in the top Z positions, to obtain the mean of the eigenvalues ​​corresponding to each feature dimension, where Z is an integer greater than 1;

[0035] The eigenvalue of the missing feature in each original sparse matrix is ​​determined according to the mean of the eigenvalue corresponding to each feature dimension and the similarity score under the cluster category to which each seed user in the sample set belongs.

[0036] According to a second aspect of the embodiment of the present application, the completion module is specifically used to:

[0037] For each missing feature of the original sparse matrix of each seed user in the sample set, a product operation is performed on the similarity score of the cluster category to which the seed user corresponding to the missing feature belongs and the mean of the eigenvalue corresponding to the feature dimension where the missing feature is located, and the product value is determined as the eigenvalue of the missing feature.

[0038] According to a second aspect of the embodiment of the present application, the reference information includes: content associations between different features;

[0039] The processing module is specifically used for:

[0040] For each occupation type of all seed users in the sample set, generating a correlation matrix corresponding to each occupation type for characterizing the correlation between a pair of feature dimensions according to the names of all features in the original sparse matrix of all seed users under the occupation type;

[0041] The correlation matrix corresponding to each occupation type is numerically processed to obtain a correlation coefficient matrix corresponding to each occupation type; wherein the correlation coefficient matrix is ​​used to characterize the content correlation between the different features.

[0042] According to the second aspect of the embodiment of the present application, the processing module is specifically used to:

[0043] For each occupation type of all seed users in the sample set, the second Prompt and the names of all features in the original sparse matrix of at least one seed user under the occupation type are input into a generative pre-trained converter, and the generative pre-trained converter is fine-tuned to obtain a second model corresponding to each occupation type; wherein the second Prompt includes: a data input format of the names of all features in the original sparse matrix and a data output format of the correlation information between the pair of feature dimensions; the correlation information includes: a correlation attribute between every two feature dimensions and a correlation degree between every two feature dimensions for which the correlation attribute is true;

[0044] Input the original sparse matrix of each seed user under each occupation type into the second model corresponding to each occupation type, and output the correlation information between a pair of feature dimensions of each seed user under each occupation type;

[0045] According to the correlation information between a pair of feature dimensions of all seed users under each occupation type, a correlation matrix corresponding to each occupation type is generated.

[0046] According to the second aspect of the embodiment of the present application, the processing module is specifically used to:

[0047] According to the correlation information between a pair of feature dimensions of all seed users under each occupation type, the user correlation features of the top T positions in descending order under each occupation type are screened out, where T is an integer greater than 1;

[0048] According to the user association features in the top T positions in descending order under each occupation type, a correlation matrix corresponding to each occupation type is generated.

[0049] According to the second aspect of the embodiment of the present application, the processing module is specifically used to:

[0050] According to the number of seed users whose features in the association matrix corresponding to each occupation type are existing features in all original sparse matrices, the association matrix corresponding to each occupation type is numerically processed to obtain the association coefficient matrix corresponding to each occupation type.

[0051] According to the second aspect of the embodiment of the present application, the processing module is specifically used to:

[0052] Performing structured numerical encoding on each original sparse matrix to obtain each encoded original sparse matrix, wherein each existing feature in the encoded original sparse matrix corresponds to an eigenvalue;

[0053] Normalizing the correlation coefficient matrix corresponding to each occupation type to obtain a normalized correlation coefficient matrix corresponding to each occupation type;

[0054] According to the normalized correlation coefficient matrix corresponding to each occupation type and each encoded original sparse matrix, the eigenvalues ​​of the missing features in each original sparse matrix are determined.

[0055] According to a second aspect of the embodiment of the present application, the completion module is specifically used to:

[0056] For each missing feature in the original sparse matrix corresponding to each occupation type, a weighted sum operation is performed on the eigenvalue of the feature associated with the missing feature in the corresponding encoded original sparse matrix and the coefficient value of the corresponding coefficient in the normalized association coefficient matrix of the corresponding occupation type, and the weighted sum value is determined as the eigenvalue of the missing feature.

[0057] According to a second aspect of the embodiment of the present application, the reference information includes: a temporal correlation between different features;

[0058] The processing module is specifically used for:

[0059] A behavior feature sequence for each seed user in the sample set is generated based on all behavior features in the original sparse matrix of each seed user in the sample set and the timestamps corresponding to all behavior features, wherein the behavior feature sequence includes at least two behavior features that are associated in time sequence.

[0060] According to the second aspect of the embodiment of the present application, the processing module is specifically used to:

[0061] Inputting the third Prompt, all the behavioral features in the original sparse matrix of at least one seed user in the sample set, and the timestamps corresponding to all the behavioral features into the generative pre-trained converter, and fine-tuning the generative pre-trained converter to obtain a third model; wherein the third Prompt includes: the data input format of all the behavioral features in the original sparse matrix and the timestamps corresponding to all the behavioral features, and the data output format of the behavioral feature sequence;

[0062] All behavior features in the original sparse matrix of each seed user in the sample set and the timestamps corresponding to all behavior features are input into the third model, and a behavior feature sequence of each seed user in the sample set is output.

[0063] According to a second aspect of the embodiment of the present application, the completion module is specifically used to:

[0064] According to the behavior feature sequence of each seed user in the sample set, converting the original sparse matrix of each seed user in the sample set into a numerical sparse matrix;

[0065] Determine the eigenvalue of the missing feature in each original sparse matrix according to the weight coefficient corresponding to each behavior feature in each behavior feature sequence, the time decay factor and the numeralized sparse matrix corresponding to each seed user;

[0066] The weight coefficient corresponding to the behavior feature is negatively correlated with the timestamp corresponding to the behavior feature, and the time attenuation factor corresponding to the behavior feature is negatively correlated with the timestamp corresponding to the behavior feature.

[0067] According to a second aspect of the embodiment of the present application, the completion module is specifically used to:

[0068] For each missing feature of the original sparse matrix of each seed user in the sample set, a weighted sum operation is performed on the eigenvalue of the feature associated with the missing feature in the corresponding numerated sparse matrix and the corresponding weight coefficient, the weighted sum value is multiplied by the corresponding time attenuation factor, and the product value is determined as the eigenvalue of the missing feature.

[0069] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the program or instructions are executed by the processor, the steps of the method described in the first aspect are implemented.

[0070] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.

[0071] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the steps of the method described in the first aspect.

[0072] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the steps of the method described in the first aspect.

[0073] In an embodiment of the present application, the original sparse matrix of each seed user is generated based on the identification information, occupation type information and user information of each seed user in the sample set; reference information is generated based on the existing features in each original sparse matrix, wherein the reference information includes at least one of the following: similarity between different seed users, content relevance between different features, and temporal relevance between different features; based on the reference information, the missing features in each original sparse matrix are completed. Since the missing features in the sparse matrix are completed with reference to the existing features in the sparse matrix when the eigenvalues ​​of the missing features are completed, the missing features in the sparse matrix can be effectively completed and the feature completeness can be improved, thereby improving the accuracy of the inference results of the trained model when the sparse matrix is ​​used for model training in the future. BRIEF DESCRIPTION OF THE DRAWINGS

[0074] Figure 1 is a flow chart of a sparse feature completion method provided by some embodiments of the present application;

[0075] Figure 2 is a flowchart of an implementation of step 102 provided in some embodiments of the present application;

[0076] Figure 3 is a flowchart of an implementation of step 103 provided in some embodiments of the present application;

[0077] Figure 4 is a flowchart of an implementation of step 102 provided in some embodiments of the present application;

[0078] Figure 5 is a flowchart of an implementation of step 103 provided in some embodiments of the present application;

[0079] Figure 6 is a flowchart of an implementation of step 102 provided in some embodiments of the present application;

[0080] Figure 7 is a flowchart of an implementation of step 103 provided in some embodiments of the present application;

[0081] Figure 8 is a structural block diagram of a sparse feature completion device provided in some embodiments of the present application;

[0082] Fig. 9 is a schematic diagram of the structure of an electronic device provided by some embodiments of the present application;

[0083] Fig.10 It is a schematic diagram of the hardware structure of an electronic device provided in some embodiments of the present application. DETAILED DESCRIPTION

[0084] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.

[0085] The terms "first", "second", etc. in the specification and claims of this application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable when appropriate, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated before and after are in an "or" relationship. The logo in this application is a text, symbol, image, etc. used to indicate information, and a control or other container can be used as a carrier for displaying information, including but not limited to a text logo, a symbol logo, and an image logo.

[0086] First, some terms involved in the embodiments of the present application are explained.

[0087] Generative Pre-trained Transformer (GPT): is a natural language processing model that can learn the structure and rules of language through a large amount of text training data to generate high-quality text.

[0088] Prompt Engineering (PE) is the process of constructing text that can be interpreted and understood by generative AI models.

[0089] Prompt is a natural language text that describes the task that the artificial intelligence should perform.

[0090] Embedding, in computer science and machine learning, generally refers to the process of converting categories, vocabulary, or other types of data into real number vectors.

[0091] Fine-tuning, which usually occurs on the basis of a pre-trained model, is a subsequent training step that aims to adapt this general pre-trained model to a specific task or dataset.

[0092] The International Mobile Equipment IDentity (IMEI) is commonly known as the mobile phone "serial number". It is used to identify each independent mobile phone and other mobile communication devices in the mobile phone network. It is equivalent to the ID card of the mobile phone. The serial number has a total of 15 digits, and the first 6 digits are the model approval number, which represents the type of mobile phone.

[0093] The sparse feature completion method provided in the embodiment of the present application is described in detail below through specific embodiments and their application scenarios in conjunction with the accompanying drawings.

[0094] It should be noted that the sparse feature completion method provided in the embodiments of the present application can be executed by electronic devices such as mobile phones, tablet computers, laptop computers, PDAs, and vehicle-mounted electronic devices. In some embodiments of the present application, the sparse feature completion method is executed by an electronic device as an example to illustrate the sparse feature completion method provided in the embodiments of the present application.

[0095] The sparse feature completion method provided in the embodiment of the present application can be applied to real big data scenarios. A specific application scenario is to construct a sparse matrix of seed users by analyzing the behavior of massive user mobile phone big data. For example, for 1 million users in a real scenario, 10,000 users are selected from the 1 million users as seed users, and a sparse matrix of each seed user is constructed based on the mobile phone big data of each seed user. The existing features in each sparse matrix are used to complete the missing features in each sparse matrix, thereby improving the sparse matrix of the seed users. After that, a profession recognition model is trained based on the completed sparse matrix of 10,000 seed users, and the trained profession recognition model is used to identify the profession types of the remaining 990,000 users among the 1 million users. This can effectively solve the user profession recognition problem in the big data sparse feature scenario.

[0096] Figure 1 is a flow chart of a sparse feature completion method provided by some embodiments of the present application, such as Figure 1 As shown, the method comprises at least the following steps: step 101, step 102 and step 103;

[0097] In step 101, an original sparse matrix of each seed user is generated according to the identification information, occupation type information and user information of each seed user in the sample set.

[0098] In some embodiments of the present application, there are a large number of users of electronic devices, for example, there are 1 million users. For some scenarios, it is necessary to predict the occupational types of these users. At this time, a part of the users can be taken out from the massive users as seed users. For example, 10,000 users are selected from the above 1 million users. These 10,000 users constitute a sample set. Each user in this sample set is called a seed user. Since some features in the original sparse matrix of the seed users are usually missing, it is necessary to complete the missing features in the original sparse matrix to obtain a sparse matrix with complete features. Then, the occupational recognition model is trained based on the sparse matrix with complete features of all seed users. Finally, the trained occupational recognition model is used to identify the occupational types of the remaining massive users.

[0099] In some embodiments of the present application, the sample set includes multiple seed users.

[0100] In some embodiments of the present application, the identification information refers to an identity document (IDentity Document, ID). In practical applications, the identification information may be an IMEI.

[0101] In some embodiments of the present application, occupation type information refers to an occupation, for example, teacher, student, salesperson, etc.

[0102] In some embodiments of the present application, user information includes at least one of the following: user physiological information, geographic location information, program usage information, and interest preference information; wherein user physiological information includes but is not limited to: gender, age, etc., geographic location information includes but is not limited to: place of origin information, current location information and other city area information, program usage information includes but is not limited to: user behavior, such as browsing behavior, purchase information, evaluation behavior, viewing behavior, etc. at what time and where, interest preference information includes but is not limited to: videos that users are accustomed to watching, audio that they like to listen to, goods that they like to buy, etc.

[0103] In some embodiments of the present application, the user information of the seed user may include information of multiple dimensions, thereby ensuring that the feature information of the generated original sparse matrix is ​​more comprehensive, thereby ensuring that the trained occupation recognition model is more accurate.

[0104] In some embodiments of the present application, in a real electronic device big data scenario, since the user feature missing situation is usually serious, the feature matrix of each seed user generated based on the original features such as identification information, occupation type information and user information of each seed user in the sample set is a sparse matrix, so it is called the original sparse matrix.

[0105] For example, firstly, a group of seed users are selected from a large number of users, which need to include user ID and occupation type label value. At the same time, based on the big data of users' electronic device behavior, collect users' physiological information such as age, gender, etc., geographic location information such as city, region, etc., program usage information such as what was done when and where, and interest preference information such as application download, installation, use, function use, etc. Through formatting processing, a large database table of "user identification + feature matrix + occupation type label value" is generated.

[0106] Take single user a, user b and user c as an example. User a's ID is represented by IMEI, which is 86723412376, and his occupation type is doctor. User b's ID is also represented by IMEI, which is 86832912354, and his occupation type is teacher. User c's ID is also represented by IMEI, which is 86777612356, and his occupation type is student. The physiological information, geographic location information, program usage information, interest preference information and other feature information of user a, user b and user c are summarized to generate the big data table shown in Table 1 below:

[0107] Table 1

[0108]

[0109] Based on the data in Table 1, the original sparse matrix of each seed user is generated. Each original sparse matrix is ​​represented by U, and each original sparse matrix U contains N feature dimensions. Among them, the feature dimension N usually ranges from [100, 10000]. In actual application scenarios, the dimension of information that can be obtained shall prevail. Some eigenvalues ​​in the original sparse matrix U are numbers between [0, 1]. The closer it is to 1, the more prominent the feature preference is. Some eigenvalues ​​are displayed as Null, indicating that the user's feature information is missing. The matrix from feature 1 to feature N is the original sparse matrix U mentioned above. It can also be found that the features of U are missing and it is a sparse matrix. Usually, it is necessary to learn and train the model through the feature matrix and the occupation type label value to generate the final occupation identification model. However, the model training of sparse matrices is very difficult, so it is necessary to solve the problem of model training difficulties by completing the missing features.

[0110] In step 102, reference information is generated according to the existing features in each original sparse matrix, wherein the reference information includes at least one of the following: similarity between different seed users, content relevance between different features, and temporal relevance between different features.

[0111] In some embodiments of the present application, each original sparse matrix can be processed to generate reference information with the help of the powerful contextual text understanding and generative induction capabilities of large models such as GPT.

[0112] In some embodiments of the present application, in the scenario of big data behavior of electronic devices, the original sparse matrix of each seed user can be constructed by analyzing the behavior of the big data of seed users, and through the large model capability and data generation capability, similar users can be matched to complete or behavior sequence prediction to complete the missing features in the original sparse matrix, thereby improving the sparse matrix of each seed user. The user's occupation type can be effectively identified in the big data sparse feature scenario, thereby solving the problem of cold start or information missing.

[0113] In some embodiments of the present application, for all seed users in the sample set, the understanding and text summarization generation capabilities of the large model can be used to generate user feature patterns, and similar users can be clustered. Then, the feature completion method between similar users can be used to complete the features of the same user group after clustering for users with missing features, thereby solving the problem that user behavior is difficult to predict in big data scenarios because it is a sparse matrix, and ultimately achieving effective identification of user occupation types.

[0114] In some embodiments of the present application, for all seed users in the sample set, the correlation between the user's features can be understood and generated with the help of the understanding and text summarization generation capabilities of the large model, and a correlation matrix can be output. Through the correlation matrix, the missing features can be supplemented according to the user's existing features, so as to achieve the purpose of using existing features and associating and supplementing missing features. For example, if a user browses a lot of sports products, the large model may predict that the user is also interested in health products. If the user's "health" feature is missing, the "sports" feature can be used to supplement the "health" feature.

[0115] In some embodiments of the present application, for all seed users in the sample set, the user's historical behavior can be processed as sequence data, and the behavior features to be predicted can be used as the feature prediction method of the target sequence. The sequence-to-sequence generation task is performed with the help of a large model, and the user's feature prediction completion is finally achieved. For example, the user behavior of the next or subsequent steps is predicted based on the existing behavior sequence in the user behavior sequence, and the missing features in the user behavior sequence are completed.

[0116] In some embodiments of the present application, for all seed users in the sample set, based on the rich information of the users and with the help of the powerful contextual text understanding and generative induction capabilities of the large model, the missing features in the sparse matrix can be completed according to the similarities between users or the correlations between users' features, etc., so that the features can be effectively completed and the feature completeness can be improved, thereby effectively solving the problem of missing features in the sparse matrix.

[0117] In step 103, the missing features in each original sparse matrix are completed based on the reference information.

[0118] In some embodiments of the present application, when the reference information includes the similarities between different seed users, in the process of feature completion, the missing features in each original sparse matrix are completed by the similarities between different seed users.

[0119] In some embodiments of the present application, when the reference information includes content correlation between different features, in the process of feature completion, the existing features of the seed user are used to complete the missing features of the seed user based on the correlation between the different features of the seed user himself.

[0120] In some embodiments of the present application, when the reference information includes the temporal correlation between different features, in the process of feature completion, the behavioral characteristics of the seed user are processed as a continuous sequence, and the missing features in the same behavioral sequence are predicted through the seed user's own existing characteristics. For example, there is a temporal relationship between feature 1, feature 2, feature 3, feature 4 and feature 5. The existing features 1, 2 and 3 are used to predict the subsequent missing feature 4 or the missing feature 4 and feature 5, and finally the missing features are completed.

[0121] In some embodiments of the present application, based on the feature matrix after completion of all seed users, after conventional feature processing, such as normalization processing, numerical coding processing, etc., and then training through machine learning or deep learning models, the final occupation recognition model can be obtained to complete user occupation recognition.

[0122] In some embodiments of the present application, an original sparse matrix of each seed user is generated based on the identification information, occupation type information and user information of each seed user in the sample set; reference information is generated based on the existing features in each original sparse matrix, wherein the reference information includes at least one of the following: similarity between different seed users, content relevance between different features, and temporal relevance between different features; based on the reference information, the missing features in each original sparse matrix are completed. Since the missing features in the sparse matrix are completed with reference to the existing features in the sparse matrix when the eigenvalues ​​of the missing features are completed, the missing features in the sparse matrix can be effectively completed and the feature completeness can be improved, thereby improving the accuracy of the inference results of the trained model when the sparse matrix is ​​used for model training in the future.

[0123] Figure 2 is a flowchart of an implementation of step 102 provided in some embodiments of the present application. At this time, the reference information includes: similarities between different seed users, and accordingly, Figure 2 As shown, the above step 102 may include the following steps: step 201, step 202, step 203, step 204, step 205 and step 206;

[0124] In step 201, the sample set is divided into a feature-complete user subset and a feature-missing user subset according to the number of existing features in each original sparse matrix; wherein the feature-complete user subset includes: at least one seed user whose feature completeness is higher than a first threshold, and the feature-missing user subset includes: at least one seed user whose feature completeness is lower than or equal to the first threshold.

[0125] In some embodiments of the present application, the sparse matrix completion method provided may also include the following steps: for each original sparse matrix, the number of existing features of the original sparse matrix is ​​divided by the total number of features of the original sparse matrix to obtain the feature completeness of the seed user corresponding to each original sparse matrix.

[0126] In some embodiments of the present application, the number of existing features is the sum of the number of features with non-zero features and the number of features with non-null values ​​in the original sparse matrix.

[0127] Exemplarily, the number of existing features in the original sparse matrix is ​​m, the total number of features of the original sparse matrix is ​​n, and the feature completeness is recorded as α. At this time, the calculation formula of the feature completeness is: α = m / n. Considering that the higher the feature completeness of the user in the real scene, the fewer the number of seed users, the first threshold can be set to 80%, and the seed users with α>=80% are divided into the feature complete user subset, recorded as set A, and the seed users with α<80% are divided into the feature missing user subset, recorded as set B.

[0128] In some embodiments of the present application, since the feature completeness is calculated based on the number of existing features and the total feature data in the original sparse matrix, it is directly related to the feature conditions of the original sparse matrix. Therefore, the calculated feature completeness is more in line with the actual situation and can accurately characterize the feature completeness of the seed user.

[0129] For example, the sample set collects 10,000 seed users of various occupations, 20 occupation types, and the number of seed users of each occupation type is 10,000 / 20=500. For each seed user, the feature results of the seed user can be found in Table 1. Assuming that the feature dimension N is 6, the feature results of user a, user b and user c can be shown in Table 2 below.

[0130] Table 2

[0131]

[0132] It can be seen from Table 2 that 4 of the 6 features of user a have data, and 2 features are null values, so the feature completeness of user a is 4 / 6=66%. Similarly, the feature completeness of user b and user c can be calculated, which are 5 / 6=83% ​​and 6 / 6=100% respectively. By analogy, the feature completeness of all seed users can be calculated. Then, the seed users are divided by the first threshold, such as 80%. Since the feature completeness of user b and user c is greater than 80%, they are divided into set A, and the user occupation type label value and original feature matrix of set A are used as the information input for the next step; since the feature completeness of user a is less than 80%, it is divided into set B.

[0133] In step 202, a characteristic vector of the occupation description behavior pattern of each seed user in the feature-complete user subset is generated according to the original sparse matrix of each seed user in the feature-complete user subset.

[0134] In some embodiments of the present application, the occupational description behavior pattern feature vector is used to describe the occupational behavior pattern of the seed user, including but not limited to: [what occupation] + [when] + [what scenario] + [what to do] + [frequency of time] + [what needs are met].

[0135] In some embodiments of the present application, through the occupational description behavior pattern feature vector, each isolated feature in the original sparse matrix of the seed user is converted into a feature vector with certain logic and capable of representing occupational characteristics.

[0136] For example, the occupation description behavior pattern is: [a young female teacher in the third line] + [on weekends] + [favorites being outdoors] + [to relax] + [also pays attention to physical health].

[0137] Exemplarily, the occupational description behavior pattern is: [first-tier 18-24 year old college student] + [daily] + [love sports and outdoor activities] + [for making friends and adventure] + [less concerned about physical health].

[0138] In some embodiments of the present application, the above step 202 may include the following steps: step 2021 and step 2022;

[0139] In step 2021, the first prompt word Prompt and the original sparse matrix of at least one seed user in the feature-complete user subset are input into the generative pre-trained converter, and the generative pre-trained converter is fine-tuned to obtain a first model; wherein the first Prompt includes: the data input format of the original sparse matrix and the data output format of the occupation description behavior pattern feature vector.

[0140] In some embodiments of the present application, the first Prompt may be a rule pre-designed by a developer, and the rule is fixedly stored in the electronic device. When the first model needs to be trained, the electronic device reads the first Prompt locally.

[0141] In some embodiments of the present application, when designing the first prompt, first, the input data can be imported, that is, the original sparse matrix data of the professional user on the electronic device in the recent period of time; then, in the output of the result content, the most prominent typical behaviors of the professional user group should be summarized and generated, and the description results of the professional description behavior pattern should be output in text form; finally, the output rules of the professional description behavior pattern should be unified.

[0142] In some embodiments of the present application, the data input format of the first Prompt is: [user, (feature 1, feature value), (feature 2, feature value), ..., (feature n, feature value)].

[0143] Exemplarily, the data input format of the first Prompt is: [User b, (age, 25-30), (gender female), (sports, empty), (health, 0.8), (outdoors, 0.9), (city level, third-tier), teacher].

[0144] Exemplarily, the data input format of the first Prompt is: [User c, (age, 18-24), (gender female), (sports, 0.95), (health, 0.6), (outdoors, 0.95), (city level, first-tier), student].

[0145] In some embodiments of the present application, the data output format of the first Prompt is: [what occupation] + [when] + [what scenario] + [what to do] + [frequency of time] + [what needs to be met].

[0146] Exemplarily, the data output format of the first Prompt is: [a young female teacher from a third-tier city]+[on weekends]+[favorite being outdoors]+[to relax the body and mind]+[also concerned about physical health].

[0147] Exemplarily, the data output format of the first Prompt is: [first-tier college students aged 18-24] + [daily] + [love sports and outdoor activities] + [for making friends and adventures] + [less concerned about physical health].

[0148] In some embodiments of the present application, large models such as GPT are fine-tuned on some seed users in the feature-complete user subset. Specifically, the occupational category labels and original sparse matrices of some seed users are formatted and input, and the first prompt and input and output examples are attached so that it can understand and generate the required relevant text description features, thereby obtaining the trained GPT behavior measurement model, i.e., the first model.

[0149] In step 2022, the original sparse matrix of each seed user in the feature-complete user subset is input into the first model, and the occupation description behavior pattern feature vector of each seed user in the feature-complete user subset is output.

[0150] In some embodiments of the present application, the original sparse matrix of each seed user in the feature-complete user subset is input into the first model, and the output result is converted into a vector form, for example, converted into a vector using embedding encoding, to obtain a feature vector of the occupational description behavior pattern of each seed user in the feature-complete user subset.

[0151] For example, taking user b and user c as examples, as shown in Table 3, the original sparse matrices of user b and user c are input into the first model respectively, and the summary description text of the occupational user behavior preference of user b and user c can be obtained. Then, these texts are embedded and encoded, and the text content is converted into a mathematical feature vector representation, and finally the embedding feature vector of each user is generated.

[0152] Table 3

[0153]

[0154] In order to better demonstrate the subsequent algorithm process, as shown in Table 4 below, a new teacher user d is added here, and the data feature generation process is the same as above. It should be noted that the numbers in the feature vector have no specific meaning, and the result of the feature vector represents a behavior result pattern. Therefore, the numbers here are "artificially set" for demonstration. In actual application, embedding encoding will generate "real" feature vectors.

[0155] Table 4

[0156]

[0157] In some embodiments of the present application, the first model can be trained with the help of the GPT large model, and the original sparse matrix of the seed user can be processed based on the first model to obtain the seed user's career description behavior pattern feature vector. Since GPT has strong contextual text understanding and generation and induction capabilities, the first model obtained through training can obtain accurate career description behavior pattern feature vectors.

[0158] In step 203, the occupational description behavior pattern feature vectors of all seed users in the feature-complete user subset are clustered to obtain a clustering model, wherein the clustering model is used to output clustering categories and center point feature vectors corresponding to the clustering categories.

[0159] In some embodiments of the present application, the clustering category refers to occupation type.

[0160] In some embodiments of the present application, the clustering method can utilize models such as KNN, and by calculating the nearest neighbor distance or cosine similarity between user feature vectors, a clustering model based on the description of professional user behavior characteristics can be finally obtained.

[0161] In some embodiments of the present application, in order to improve the accuracy of the clustering result, the above step 203 may include the following steps: step 2031;

[0162] In step 2031, for each occupation type of all seed users in the feature-complete user subset, the occupation description behavior pattern feature vectors of the seed users under each occupation type are respectively clustered according to at least two occupational sub-classifications to obtain a clustering model; wherein the clustering model is used to output N*K clustering categories, N is the total number of occupation types, K is the number of sub-classifications of each occupation type, and N and M are both integers greater than 1.

[0163] For example, the profession of teacher can be further clustered into multiple subcategories such as math teacher, Chinese teacher, English teacher, geography teacher, etc.

[0164] For example, the occupation of student can be further clustered into multiple subcategories such as kindergarten students, first-grade students, second-grade students, and third-grade students.

[0165] In some embodiments of the present application, the clustering method can use a model such as KNN, and by calculating the nearest neighbor distance or cosine similarity between user feature vectors, each occupational group can obtain K clustering results, and finally obtain a clustering model based on the description of the occupational user behavior characteristics, for example, denoted as KNN-career. At the same time, the feature vector representation of the center point of each clustering result can also be obtained, wherein the feature vector of the center point is generated by the clustering model.

[0166] In some embodiments of the present application, detailed clustering can be performed for each occupation type to obtain multiple subcategories under each occupation type, thereby improving the accuracy of the clustering results.

[0167] In step 204, a characteristic vector of the occupation description behavior pattern of each seed user in the feature-missing user subset is generated according to the original sparse matrix of each seed user in the feature-missing user subset.

[0168] In some embodiments of the present application, the original sparse matrix of each seed user in the feature-missing user subset may be input into the first model, and a professional description behavior pattern feature vector of each seed user in the feature-missing user subset may be output.

[0169] In step 205, the occupation description behavior pattern feature vectors of each seed user in the sample set are respectively input into the clustering model, and the cluster category to which each seed user in the sample set belongs and the center point feature vector corresponding to each cluster category are output.

[0170] In some embodiments of the present application, the output format of the clustering category is (i, j), where i represents the occupation type and j represents the sub-category under the occupation type i.

[0171] In step 206, the similarity score of each seed user in the sample set under the cluster category to which each seed user in the sample set belongs is calculated based on the occupation description behavior pattern feature vector of each seed user in the sample set, the cluster category to which each seed user belongs, and the center point feature vector corresponding to the cluster category to which each seed user belongs.

[0172] In some embodiments of the present application, the similarity score of the cluster category to which the seed user belongs is calculated based on the occupational description behavior pattern feature vector of the seed user and the center point feature vector corresponding to the cluster category to which he belongs, which has a small amount of calculation and a fast calculation speed.

[0173] Exemplarily, when calculating clustering categories and similarity scores, the feature vectors are similarly calculated and clustered, and each seed user is clustered into the corresponding occupation* category, denoted as category (i, j), i∈[1,N]; j∈[1,K]. At the same time, the similarity result score corresponding to each user is retained, denoted as score, score∈(0,1]. For example, as shown in Table 5 below, user b and user d are both classified into the same clustered category of teacher, and their similarity scores with the feature vector of the center point of the category are 0.98 and 0.87 respectively, which means that in the clustering result, the behavior of user b is more typical than that of user d.

[0174] Table 5

[0175]

[0176] For two given vectors, vector A and vector B, the calculation formula for the cosine similarity θ is as follows:

[0177]

[0178] Among them, A i and B i Represent the components of vector A and vector B respectively, and the similarity ranges from -1 to 1, where -1 means that the two vectors point in opposite directions, 1 means that their directions are exactly the same, 0 usually means that they are independent, and the values ​​in between represent intermediate similarities or differences.

[0179] For example, vector A is (3, 2, 1, 5, 5), vector B is (3, 2, 3, 5, 5), and the cosine similarity θ of vector A and vector B is:

[0180]

[0181] Similarly, the similarity score between each user and the clustered center point feature vector can be calculated.

[0182] In some embodiments of the present application, when there is a limited number of seed users and sparse features, the large model can be used to understand and summarize the rich text-based behavioral preferences generated by users, calculate the similarity between users, and identify similar users, so that the generated reference information is more accurate.

[0183] Corresponding to Figure 2 The embodiment shown, Figure 3 is a flowchart of an implementation of step 103 provided in some embodiments of the present application, such as Figure 3 As shown, the above step 103 may include the following steps: step 301, step 302 and step 303;

[0184] In step 301, each original sparse matrix is ​​structured numerically encoded to obtain each encoded original sparse matrix, wherein each existing feature in the encoded original sparse matrix corresponds to an eigenvalue.

[0185] In some embodiments of the present application, the original sparse matrix can be structured numerically encoded to eliminate the impact of different feature scales, make the features comparable, accelerate the convergence speed of model training, and make it easier to find the optimal solution for gradient descent.

[0186] Exemplarily, the original sparse matrix is ​​denoted as U, and the original sparse matrix U is structured numerically encoded to obtain an encoded feature matrix, which is denoted as U1.

[0187] In step 302, for each cluster category to which all seed users in the feature-complete user subset belong, the encoded original sparse matrix of the seed users whose similarity scores under the cluster category are ranked in descending order is subjected to an eigenvalue mean operation on each feature dimension to obtain the mean of the eigenvalues ​​corresponding to each feature dimension, where Z is an integer greater than 1.

[0188] Exemplarily, the encoded feature matrix is ​​recorded as U1, the feature-complete user subset is recorded as set A, and the user subset that best represents the behavioral characteristics of the occupational group is screened. For set A, the top Z seed users with the highest similarity scores in each category (i, j) are used as set A1. The total number of users in set A1 is Z*N*K. For example, Z=50, the number of clusters for each occupation is set to 5, and there are 20 occupations in total, then there are 20*5=100 categories in total. In each clustering result, the top 50 seed users with the highest similarity scores are selected, and finally set A1 is obtained, where the number of users of A1 is 50*100=5000. Afterwards, the mean results of each feature of user subset A1 on the feature matrix U1 are calculated, and the mean result is recorded as U1_A1. In contrast to the mean result U1_A1, according to the similarity score score of the seed user, the features with empty values ​​are completed, where the completion rule can be set to: score*U1_A1. Finally, we can use the existing features of highly complete seed users to complete the features of users with missing features based on the similarity between seed users, and obtain the feature matrix U_all of all seed users. At the same time, the feature matrix of the model changes from the initial sparse matrix U to the completed feature matrix U_all.

[0189] For example, after clustering by feature vector similarity, the first sub-category under the teacher occupation contains 3 seed users, among which user b and user d are seed users with high feature completeness, and finally enter the head seed user set A1 with the highest similarity score; while the missing proportion of user e's feature dimension data is relatively large, exceeding 50%. After the original sparse matrices of user b, user d, and user e are structured numerically encoded, for ease of description and understanding, the eigenvalues ​​of each feature in their feature matrix U1 can be expressed in the form of the following Table 6.

[0190] Table 6

[0191]

[0192] Exemplarily, firstly, the mean value result U1_A1 of each feature on the head seed user set A1 with the highest similarity score is calculated. For example, in U1_A1 shown in Table 7 below, the feature mean value of feature 1 is: (0.9+0.8) / 2=0.85; the feature mean value of feature 2 is: (0.8+0.7) / 2=0.75, the feature mean value of feature 3 is: (0.8+0.7) / 2=0.75, the feature mean value of feature 4 is: (1.0+0.8) / 2=0.9, the feature mean value of feature 5 is: (1.0+0.9) / 2=0.95, the feature value of feature 6 is: (0.3+0) / 2=0.15, wherein, for Null features, the feature value is set to 0.

[0193] Table 7

[0194]

[0195] In step 303, the eigenvalue of the missing feature in each original sparse matrix is ​​determined according to the mean of the eigenvalue corresponding to each feature dimension and the similarity score under the cluster category to which each seed user in the sample set belongs.

[0196] In some embodiments of the present application, the above step 303 may include the following steps: step 3031;

[0197] In step 3031, for each missing feature of the original sparse matrix of each seed user in the sample set, a product operation is performed on the similarity score of the cluster category to which the seed user corresponding to the missing feature belongs and the mean of the eigenvalue corresponding to the feature dimension where the missing feature is located, and the product value is determined as the eigenvalue of the missing feature.

[0198] In some embodiments of the present application, for existing features in the original sparse matrix, the eigenvalues ​​of the existing features are kept unchanged; for missing features in the original sparse matrix, the similarity score of the clustering category to which the seed user corresponding to the missing feature belongs is multiplied by the mean of the eigenvalue corresponding to the feature dimension where the missing feature is located, and the product value is determined as the eigenvalue of the missing feature, thereby completing the missing features in the original sparse matrix.

[0199] In some embodiments of the present application, the eigenvalues ​​of the missing features in the original sparse matrix are determined by multiplying the similarity scores of the clustering categories to which the seed users corresponding to the missing features belong with the mean of the eigenvalues ​​corresponding to the feature dimensions where the missing features are located. Only a simple multiplication operation is required to calculate the eigenvalues ​​of the missing features. This reduces the amount of calculation, increases the speed of calculation, occupies fewer computing resources, and improves the efficiency of the calculation.

[0200] For example, for user d, the similarity score is 0.87, and the feature value of feature 6 after completion is: 0.87*0.15=0.13.

[0201] For example, for user e, whose similarity score is 0.70, the eigenvalue of feature 1 after completion is: 0.70*0.85=0.595; the eigenvalue of feature 2 after completion is: 0.70*0.75=0.525; the eigenvalue of feature 4 after completion is: 0.70*0.9=0.63. Other features are processed in the same way, and the final completed feature matrix U_all can be obtained, as shown in Table 8 below.

[0202] Table 8

[0203]

[0204] In some embodiments of the present application, when there is a limited number of seed users and sparse features, the large model can be used to understand and summarize the rich text-like behavioral preferences generated by users, calculate the similarity between users, and achieve feature completion between similar users. Not only does it achieve the result of feature completion, but it also adds the understanding of high-level semantic habits between users, thereby improving the completeness of the features and solving the problem of difficult coefficient matrix training. At the same time, it also adds correlation information between user groups to the features, increasing the understanding of high-level semantics, which will not only make the training of the user identity recognition model faster, but also make the effect more robust, stable and effective.

[0205] Figure 4 is a flowchart of an implementation of step 102 provided in some embodiments of the present application, wherein the reference information includes: content relevance between different features, correspondingly, such as Figure 4As shown, the above step 102 may include the following steps: step 401 and step 402;

[0206] In step 401, for each occupation type of all seed users in the sample set, a correlation matrix corresponding to each occupation type is generated for characterizing the correlation between a pair of feature dimensions according to the names of all features in the original sparse matrix of all seed users under the occupation type.

[0207] In some embodiments of the present application, a pair of features may be any two different features in the original sparse matrix.

[0208] For example, for the profession of teacher, a pair of related features may be: exercise and health.

[0209] For example, for the profession of teacher, a pair of related features may be: sports and outdoor.

[0210] In some embodiments of the present application, the correlation matrix includes multiple pairs of correlated features.

[0211] In some embodiments of the present application, the above step 401 may include the following steps: step 4011, step 4012 and step 4013;

[0212] In step 4011, for each occupation type of all seed users in the sample set, the second Prompt and the names of all features in the original sparse matrix of at least one seed user under the occupation type are input into the generative pre-trained converter, and the generative pre-trained converter is fine-tuned to obtain a second model corresponding to each occupation type; wherein the second Prompt includes: the data input format of the names of all features in the original sparse matrix and the data output format of the correlation information between a pair of feature dimensions; the correlation information includes: the correlation attribute between every two feature dimensions and the correlation degree between every two feature dimensions for which the correlation attribute is true.

[0213] In some embodiments of the present application, the second Prompt may be a rule pre-designed by a developer, and the rule is fixedly stored in the electronic device. When the second model needs to be trained, the electronic device reads the second Prompt locally.

[0214] In some embodiments of the present application, when setting the second prompt, first, the input data can be imported, and the original sparse matrix data of the professional user in the recent period on the electronic device can be input; then, in the output of the result content, it is necessary to summarize and generate the results of the correlation between the various features of the professional user group, and output the results in a structured text form; finally, in terms of rule requirements: first, the output rules must be unified; second, the generated feature names must be feature names already in the feature matrix.

[0215] In some embodiments of the present application, the data input format of the second Prompt is: [user, (feature 1, feature value), (feature 2, feature value), ..., (feature n, feature value)].

[0216] Exemplarily, the data input format of the second Prompt is: [User b, (age, 25-30), (gender female), (sports, empty), (health, 0.8), (outdoors, 0.9), (city level, third-tier), teacher].

[0217] Exemplarily, the data input format of the second Prompt is: [User c, (age, 18-24), (gender female), (sports, 0.95), (health, 0.6), (outdoors, 0.95), (city level, first-tier), student].

[0218] In some embodiments of the present application, the data output format of the second Prompt is: (feature name 1, feature name 2, correlation ranking).

[0219] Exemplarily, the data output format of the second Prompt is: (feature 1, feature 3, correlation top 1), (feature 1, feature 5, correlation top 2).

[0220] Exemplarily, the data output format of the second Prompt is: (sports, health, top 1 relevance), (sports, outdoor, top 2 relevance).

[0221] In some embodiments of the present application, for each occupation type, GPT is fine-tuned on some seed users under that occupation type. Specifically, the occupational category labels and the original sparse matrix of some seed users are formatted and input, and a second prompt and input and output examples are attached so that it can understand and generate the required relevant text description features, thereby obtaining the trained GPT association measurement model, i.e., the second model.

[0222] In step 4012, the original sparse matrix of each seed user under each occupation type is input into the second model corresponding to each occupation type, and the correlation information between a pair of feature dimensions of each seed user under each occupation type is output.

[0223] In some embodiments of the present application, the second model can be trained with the help of the GPT large model, and the original sparse matrix of the seed user can be processed based on the second model to obtain the correlation between every two feature dimensions. Since GPT has strong contextual text understanding and generative induction capabilities, the second model obtained based on the training can obtain accurate feature correlation information.

[0224] If a user browses a lot of sports products, the second model may predict that the user is also interested in health products, so the second model can associate the two feature dimensions of sports and health. At this time, through the correlation between the two features, the existing features can be used to complete the missing features.

[0225] For example, taking user b as an example, user b’s occupation is teacher. By inputting the original sparse matrix of user b into the second model corresponding to the teacher’s occupation, a textual output result about the “sports” feature can be obtained, for example, (sports, health, top 1 correlation), (sports, outdoor, top 2 correlation).

[0226] In step 4013, a correlation matrix corresponding to each occupation type is generated based on the correlation information between a pair of feature dimensions of all seed users under each occupation type.

[0227] Exemplarily, a correlation matrix corresponding to the teacher profession is generated based on the correlation information between a pair of feature dimensions of all seed users under the teacher profession type.

[0228] Exemplarily, a correlation matrix corresponding to the student occupation is generated based on the correlation information between a pair of feature dimensions of all seed users under the student occupation type.

[0229] In some embodiments of the present application, the above step 4013 may include the following steps: step 40131;

[0230] In step 40131, based on the correlation information between a pair of feature dimensions of all seed users under each occupation type, the user association features ranked in the top T positions in descending order under each occupation type are screened out, where T is an integer greater than 1; based on the user association features ranked in the top T positions in descending order under each occupation type, a correlation matrix corresponding to each occupation type is generated.

[0231] Exemplarily, the number of features of the correlation generated by each feature cannot exceed a specific threshold value T. For example, T=5, and the original sparse matrix contains a total of 100 features. In theory, each feature can have a correlation with at most 99 other features. In actual situations, for the convenience of calculation, the top 5 features in the correlation ranking can be selected, and the actual number of features less than 5 can be calculated. Therefore, a correlation matrix between features can be obtained. Taking the "sports" feature of the teacher occupation in Table 1 as an example, the feature correlation of the correlation matrix is ​​shown in Table 9 below.

[0232] Table 9

[0233] Profession feature TOP1 TOP2 TOP3 TOP4 TOP5 teacher sports healthy outdoor (null) (null) (null)

[0234] In some embodiments of the present application, a correlation matrix corresponding to each occupation type is generated based on the user association features in the top T positions in descending order under each occupation type, which can reduce the amount of calculation while meeting the calculation accuracy.

[0235] In step 402, the correlation matrix corresponding to each occupation type is numerically processed to obtain a correlation coefficient matrix corresponding to each occupation type; wherein the correlation coefficient matrix is ​​used to characterize the content correlation between different features.

[0236] In some embodiments of the present application, the correlation matrix is ​​numerically processed to better and quantitatively evaluate the correlation degree between features.

[0237] In some embodiments of the present application, the above step 402 may include the following steps: step 4021;

[0238] In step 4021, the correlation matrix corresponding to each occupation type is numerically processed according to the number of seed users whose each feature in the correlation matrix corresponding to each occupation type is an existing feature in all original sparse matrices to obtain a correlation coefficient matrix corresponding to each occupation type.

[0239] In some embodiments of the present application, after obtaining the correlation ranking results between features, the correlation coefficients between features can be calculated through the statistical results of the association between every two features in the feature matrix of the same occupation seed user, and numerical processing can be performed to generate the final correlation coefficient matrix.

[0240] Exemplarily, taking the "sports" feature as an example, the probability of simultaneous occurrence of data features in the original sparse matrix in Table 1 is needed here to evaluate the correlation between features. The calculation process is as follows: the number of seed users with "sports" feature values ​​in the teacher profession is 300, the number of seed users with "health" feature values ​​is 350, the number of seed users with "outdoor" feature values ​​is 250, the number of seed users with both "sports" and "health" features being non-empty is 280, and the number of seed users with both "sports" and "outdoor" features being non-empty is 200. The calculated result of the correlation between the features of "sports" and "health" is: 280 / (300+350-280)=0.75; the calculated result of the correlation between the features of "sports" and "outdoor" is: 200 / (300+250-200)=0.57. Therefore, the correlation results between multiple pairs of features as shown in Table 10 below can be obtained: (sports, health, 0.75), (sports, outdoor, 0.57).

[0241] Table 10

[0242]

[0243] For other professions, please refer to the calculation process of the teacher profession. The above examples are only for demonstration purposes. Finally, a correlation coefficient matrix of professional user behaviors can be generated. For ease of description and understanding, the values ​​in the correlation coefficient matrix are presented in a table, as shown in Table 11 below.

[0244] Table 11

[0245] Profession feature sports healthy outdoor City … Feature N teacher sports (null) 0.75 0.57 (null) (null) (null) teacher healthy 0.75 (null) 0.60 0.40 (null) (null) … … … … … … … … Occupation K Feature N … … … … … (null)

[0246] In some embodiments of the present application, the association matrix corresponding to each occupation type can be digitized according to the number of seed users whose each feature in the association matrix corresponding to each occupation type is an existing feature in all original sparse matrices, so as to obtain a correlation coefficient matrix corresponding to each occupation type. Since the number of seed users of the above types can truly reflect the actual distribution between any two features, the digitized correlation coefficient matrix is ​​more accurate.

[0247] In some embodiments of the present application, when there is a limited number of seed users and sparse features, the large model can be used to understand and summarize the rich text-based behavioral preferences generated by users, understand the high-level semantics between various user features, complete the correlation evaluation and numerical processing between features, and the numerical processing is relatively accurate.

[0248] Corresponding to Figure 4 The embodiment shown, Figure 5 is a flowchart of an implementation of step 103 provided in some embodiments of the present application, such as Figure 5 As shown, the above step 103 may include the following steps: step 501, step 502 and step 503;

[0249] In step 501, each original sparse matrix is ​​structured numerically encoded to obtain each encoded original sparse matrix, wherein each existing feature in the encoded original sparse matrix corresponds to an eigenvalue.

[0250] In some embodiments of the present application, the original sparse matrix can be structured numerically encoded to eliminate the impact of different feature scales, make the features comparable, accelerate the convergence speed of model training, and make it easier to find the optimal solution for gradient descent.

[0251] Exemplarily, the original sparse matrix is ​​denoted as U, and the original sparse matrix U is structured numerically encoded to obtain an encoded feature matrix, which is denoted as U1.

[0252] In step 502, the correlation coefficient matrix corresponding to each occupation type is normalized to obtain a normalized correlation coefficient matrix corresponding to each occupation type.

[0253] In some embodiments of the present application, the correlation coefficient matrix corresponding to each occupation type can be normalized to obtain a normalized correlation coefficient matrix corresponding to each occupation type, so that the preprocessed data is limited to a certain range, such as [0,1] or [-1,1], thereby reducing the adverse effects caused by singular sample data.

[0254] For example, taking the sports of the teacher profession in Table 11 as an example, there are two related features, namely health and outdoor, whose correlation coefficients are 0.75 and 0.57 respectively, and their normalized correlation coefficients are: 0.75 / (0.75+0.57)=0.57, 0.57 / (0.75+0.57)=0.43. Similarly, according to the normalized correlation value contribution ratio of each feature, the normalized correlation coefficient matrix can be obtained. For the convenience of description and understanding, the values ​​in the normalized correlation coefficient matrix are presented in a tabular form, as shown in Table 12 below.

[0255] Table 12

[0256] Profession feature sports healthy outdoor City … Feature N teacher sports (null) 0.57 0.43 (null) (null) (null) teacher healthy 0.43 (null) 0.34 0.23 (null) (null)

[0257] In step 503, the eigenvalues ​​of the missing features in each original sparse matrix are determined based on the normalized correlation coefficient matrix corresponding to each occupation type and each encoded original sparse matrix.

[0258] In some embodiments of the present application, the above step 503 may include the following steps: step 5031;

[0259] In step 5031, for each missing feature in the original sparse matrix corresponding to each occupation type, a weighted sum operation is performed on the eigenvalue of the feature associated with the missing feature in the corresponding encoded original sparse matrix and the coefficient value of the corresponding coefficient in the normalized correlation coefficient matrix of the corresponding occupation type, and the weighted sum value is determined as the eigenvalue of the missing feature.

[0260] In some embodiments of the present application, for existing features in the original sparse matrix, the eigenvalues ​​of the existing features are kept unchanged; for missing features in the original sparse matrix, the eigenvalues ​​of the features associated with the missing features in the corresponding encoded original sparse matrix and the coefficient values ​​of the corresponding coefficients in the normalized association coefficient matrix of the corresponding occupation type are weighted summed, and the weighted sum value is determined as the eigenvalue of the missing feature, thereby completing the missing features in the original sparse matrix.

[0261] In some embodiments of the present application, the eigenvalues ​​of the missing features in the original sparse matrix are determined by performing a weighted sum operation on the eigenvalues ​​of the features associated with the missing features in the corresponding encoded original sparse matrix and the coefficient values ​​of the corresponding coefficients in the normalized association coefficient matrix of the corresponding occupation type. Only a simple weighted sum operation is required to calculate the eigenvalues ​​of the missing features, which has a relatively small amount of calculation, a fast calculation speed, and fewer computing resources occupied, thereby improving the efficiency of the calculation.

[0262] For example, when the missing feature is "sports", it can be weightedly completed by the feature values ​​of "health" and "outdoor". For example, the relationship coefficient between "sports" and "health" is 0.57, the relationship coefficient between "sports" and "outdoor" is 0.57, the feature value of "health" is 0.8, and the feature value of "outdoor" is 0.5, then the completed "sports" feature is: 0.8*0.57+0.5*0.43=0.671.

[0263] For example, the relationship coefficient between "sports" and "health" is 0.57, and the relationship coefficient between "sports" and "outdoor" is 0.57. After the original sparse matrices of user b, user d and user e are structured numerically encoded, the eigenvalues ​​are shown in Table 13 below.

[0264] Table 13

[0265]

[0266] The value of the "sports" feature of user d after completion with the associated features "health" and "outdoor" is: 0.7*0.57+0.7*0.43=0.7. The value of the "sports" feature of user e after completion is: 0*0.57+0.77*0.43=0.33. The other missing features are also completed in the same way as the "sports" feature, and finally a feature matrix after feature completion can be obtained. Taking the "sports" feature of the doctor profession as an example, the feature results after completion are shown in Table 14. It can be seen that users with missing features of the "Feature 1: Sports" feature have completed the feature completion using other existing features.

[0267] Table 14

[0268]

[0269] The completion process of other feature dimensions of other professions is carried out in the same way. Finally, according to the correlation matrix between the features, the feature values ​​of the existing features can be used for completion, and finally the completion of the user's sparse features is completed to generate the final feature matrix.

[0270] In some embodiments of the present application, when there is a limited number of seed users and sparse features, the large model can be used to understand and summarize the rich text-based behavioral preferences generated by users, understand the high-level semantics between various features of the user, complete the correlation evaluation and numerical processing between features, and complete the sparse feature matrix through the method of completing missing features with existing features. This not only effectively improves the feature completion, but also adds high-level semantic understanding information between various features, thereby increasing the robustness of the model and improving the model effect.

[0271] Figure 6 is a flowchart of an implementation of step 102 provided in some embodiments of the present application, wherein the reference information includes: the temporal correlation between different features, and accordingly, Figure 6 As shown, the above step 102 may include the following steps: step 601;

[0272] In step 601, a behavior feature sequence of each seed user in the sample set is generated based on all behavior features in the original sparse matrix of each seed user in the sample set and the timestamps corresponding to all behavior features, wherein the behavior feature sequence includes at least two behavior features that are associated in time sequence.

[0273] For example, taking user a and user b as examples, the ID of user a is 867234xxxxxxx76, and the occupation is doctor; the ID of user b is 868329xxxxxxx54, and the occupation is teacher; the user's behavior information and other features are summarized to generate a big data table as shown in Table 15 below.

[0274] Table 15

[0275]

[0276] In some embodiments of the present application, the above step 601 may include the following steps: step 6011 and step 6012;

[0277] In step 6011, the third Prompt, all behavioral features in the original sparse matrix of at least one seed user in the sample set, and the timestamps corresponding to all behavioral features are input into the generative pre-trained converter, and the generative pre-trained converter is fine-tuned to obtain a third model; wherein the third Prompt includes: the data input format of all behavioral features in the original sparse matrix and the timestamps corresponding to all behavioral features, and the data output format of the behavioral feature sequence.

[0278] In some embodiments of the present application, the third Prompt may be a rule pre-designed by a developer, and the rule is fixedly stored in the electronic device. When the third model needs to be trained, the electronic device reads the third Prompt locally.

[0279] In some embodiments of the present application, when designing the third prompt, first, serialized historical behavior data is input: the user's historical behavior sequence is input in chronological order, and these historical behaviors may include product browsing, purchase, user rating, search history, or social media interaction, etc. Then, in the output of the result content, it is necessary to summarize and generate a format in which the features are arranged in chronological order, and output the behavior feature sequence in text form; finally, the output rules of the behavior feature sequence are required to be unified.

[0280] In some embodiments of the present application, the data input format of the third Prompt is: [{behavior 1, timestamp}, {behavior 2, timestamp}, ..., {behavior N, timestamp}].

[0281] Exemplarily, the data input format of the third prompt is: [{'behavior':'search','category':'books','timestamp':'2023-01-01T11:00:00Z'},{'behavior':'browse','category':'books','timestamp':'2023-01-01T12:00:00Z'},{'behavior':'purchase','category':'books','timestamp':'2023-01-01T12:01:00Z'},{'behavior':'user rating','category':'books','timestamp':'2023-01-03T12:00:00Z'}].

[0282] Exemplarily, the data input format of the third prompt is: [{'behavior':'search','category':'video','timestamp':'2024-01-01T11:00:00Z'},{'behavior':'select','category':'video','timestamp':'2024-01-01T12:00:00Z'},{'behavior':'watch','category':'video','timestamp':'2024-01-01T12:01:00Z'},{'behavior':'user rating','category':'video','timestamp':'2024-01-03T12:00:00Z'}].

[0283] In some embodiments of the present application, the data output format of the third Prompt is: [behavior 1, behavior 2, ..., behavior M].

[0284] For example, the historical behavior features of user a include product browsing, purchase, user rating, search history, or social media interaction. Through the order of behavior categories and timestamps of behavior occurrence, with the help of the understanding and generation capabilities of the GPT large model, the sequence activities are summarized and summarized. At the same time, it is required that the format of the output behavior feature sequence is: [product search, product browsing, add to shopping cart, purchase, user rating].

[0285] For example, the historical behavior features of user b include video search, selection, viewing, user rating, etc. Through the order of the behavior categories and the timestamps of the behaviors, the sequence activities are summarized and summarized with the help of the understanding and generation capabilities of the GPT large model. At the same time, it is required that the format of the output behavior feature sequence is: [video search, video selection, video viewing, user rating].

[0286] In some embodiments of the present application, GPT is fine-tuned on some seed users in the sample set. Specifically, all behavioral features in the original sparse matrix of some seed users and the timestamps corresponding to all behavioral features are formatted and input, and a third prompt and input and output examples are attached so that it can understand and generate the required related text description features, thereby obtaining the trained GPT feature sequence measurement model, i.e., the third model.

[0287] In step 6012, all behavioral features in the original sparse matrix of each seed user in the sample set and the timestamps corresponding to all behavioral features are input into the third model, and the behavioral feature sequence of each seed user in the sample set is output.

[0288] In some embodiments of the present application, the third model can be trained with the help of the GPT large model, and the original sparse matrix of the seed user can be processed based on the third model to obtain the behavioral feature sequence of the seed user. Since GPT has strong contextual text understanding and generative induction capabilities, the third model obtained based on the training can obtain an accurate behavioral feature sequence of the seed user.

[0289] In some embodiments of the present application, when there is a limited number of seed users and sparse features, the large model can be used to understand and summarize the rich text-based behavior preferences generated by users, and the next or subsequent steps of user behavior can be predicted based on the user's partial behavior sequence. Multiple user behavior sequence features can be effectively combined to predict new possible characteristic behaviors, and the prediction results are relatively accurate.

[0290] Corresponding to Figure 6 The embodiment shown, Figure 7 is a flowchart of an implementation of step 103 provided in some embodiments of the present application, such as Figure 7As shown, the above step 103 may include the following steps: step 701 and step 702;

[0291] Step 701: converting the original sparse matrix of each seed user in the sample set into a numerical sparse matrix according to the behavioral feature sequence of each seed user in the sample set.

[0292] In some embodiments of the present application, a context embedding algorithm can be used to convert the behavioral feature sequence of each seed user into an embedding vector space, so that the relationship between different behavioral features can be quantified more clearly to facilitate subsequent processing. Among them, the embedding method can use a pre-trained embedding model, such as Word2Vec.

[0293] After the feature sequence rule arrangement of GPT and the word embedding method, the original sparse matrix can be converted into a numerical feature matrix, where the eigenvalues ​​in the numerical feature matrix can be shown in Table 16 below.

[0294] Table 16

[0295]

[0296] Step 702, based on the weight coefficient corresponding to each behavior feature in each behavior feature sequence, the time decay factor and the numerated sparse matrix corresponding to each seed user, determine the eigenvalue of the missing feature in each original sparse matrix; wherein the weight coefficient corresponding to the behavior feature is negatively correlated with the timestamp corresponding to the behavior feature, and the time decay factor corresponding to the behavior feature is negatively correlated with the timestamp corresponding to the behavior feature.

[0297] In some embodiments of the present application, the weight coefficient and the time attenuation factor may be parameter values ​​pre-designed by R&D personnel, and the values ​​are solidly stored in the electronic device. When the values ​​need to be used, the electronic device reads the values ​​locally.

[0298] In some embodiments of the present application, the earlier the behavior feature in the behavior feature sequence occurs, the greater the value of the weight coefficient.

[0299] In some embodiments of the present application, behaviors are weighted, and different weights are assigned to different types of behavioral features to reflect their importance to user preference prediction, and the weights are determined based on the correlation between historical behaviors and future preferences.

[0300] Exemplarily, the weight coefficients are in the following order: purchase > adding product to shopping cart > browsing product detail page > browsing home page products.

[0301] Taking user a as an example, we can use the reverse arithmetic progression to set the weight. For its behavior feature sequence: [product search, product browsing, add to cart, purchase, user rating], we can see that the feature sequence has a total of 5 steps of behavior. The arithmetic progression of the behavior weights in the sequence can be generated in the range of [0.5, 1]. Set the weight of the first behavior to 1.0 and the weight of the last behavior to 0.5, then the tolerance is (1.0-0.5) / 4=0.125. Finally, the generated behavior weight vector is: [1.0, 0.875, 0.75, 0.625, 0.5]. If a behavior sequence has only three behaviors, the generated behavior weight vector is: [1.0, 0.75, 0.5].

[0302] In some embodiments of the present application, the earlier the behavior feature in the behavior feature sequence occurs, the greater the value of the time decay factor.

[0303] In some embodiments of the present application, a time decay factor is set so that recent behavior has a higher relevance than past behavior.

[0304] For example, with a month as the cycle, a corresponding time decay constant is set, and then the feature weight of the current behavior is solved by exponential decay. The difference between the time when the user behavior occurs and the current month is recorded as time t, where t is an integer greater than or equal to 0; the decay constant is recorded as λ. The weight decay function can be expressed as:

[0305] N(t)=N0e -λt

[0306] Among them, N0 is the original weight value of the feature.

[0307] For example, suppose that after 3 months, the user's behavior weight decays to half of its original value, that is, in the past 3 months, the user's original weight decays to half of its original value. Substituting the above formula for N(t), the value of λ can be calculated:

[0308] It can be solved that λ=1 / 3ln2.

[0309] The final characteristic attenuation function is:

[0310] Still taking user a as an example, assume that the features in his feature sequence have been three months away from the last occurrence. Among them, the value of N0 is 1.0. After substituting it into the above formula, the weight of feature 1 decays to half of the original weight, and the new weight of feature 1 is 1.0 / 2=0.5. The other features are calculated in the same way, and the behavior weight vector of user a's current behavior sequence is: [0.5, 0.4375, 0.375, 0.3125, 0.25].

[0311] In some embodiments of the present application, the above step 702 may include the following steps: step 7021;

[0312] In step 7021, for each missing feature of the original sparse matrix of each seed user in the sample set, a weighted sum operation is performed on the eigenvalue of the feature associated with the missing feature in the corresponding numerated sparse matrix and the corresponding weight coefficient, the weighted sum value is multiplied by the corresponding time attenuation factor, and the product value is determined as the eigenvalue of the missing feature.

[0313] In some embodiments of the present application, for existing features in the original sparse matrix, the eigenvalues ​​of the existing features are kept unchanged; for missing features in the original sparse matrix, the eigenvalues ​​of the features associated with the missing features in the corresponding numerated sparse matrix are weighted summed with the corresponding weight coefficients, the weighted sum value is multiplied by the corresponding time attenuation factor, and the product value is determined as the eigenvalue of the missing feature, thereby completing the missing features in the original sparse matrix.

[0314] In some embodiments of the present application, the eigenvalues ​​of the missing features in the original sparse matrix are determined by performing a weighted sum operation on the eigenvalues ​​of the features associated with the missing features in the corresponding numerated sparse matrix and the corresponding weight coefficients, and multiplying the weighted sum value with the corresponding time attenuation factor. Only simple multiplication and summation operations are required to calculate the eigenvalues ​​of the missing features. The amount of calculation is relatively small, the calculation speed is fast, and fewer computing resources are occupied, thereby improving the efficiency of the calculation.

[0315] For example, user b in Table 16 has features 1 and 2, but features 3, 4, and 5 are all missing. It is known that from feature 1 to feature 5, there is a behavior sequence feature relationship. At the same time, the weights of each behavior decrease in an equal increment and there is an exponential decay with the occurrence time.

[0316] First, the value of the unknown feature is predicted based on the paradigm between the existing features. Then, the value of the feature is decayed based on the time interval between the existing feature behaviors.

[0317] For example, the occurrence time of user b's feature has exceeded 3 months, that is, the behavior weight has decayed to half of the original. According to the format of the feature sequence "[product search, product browsing, add to cart, purchase, user rating]", the features are sorted and the feature completion starts from the missing feature 3. Then, according to the behavior weight vector "[1.0, 0.875, 0.75, 0.625, 0.5]", the weight ratio distribution mode of each feature can be obtained.

[0318] For user b, the missing features can be obtained by weighted summing of existing features. The calculation process is:

[0319] Feature 3 = Feature 3 weight * (Feature 1 * Feature 1 weight + Feature 2 * Feature 2 weight) / (Feature 1 weight + Feature 2 weight). That is, 0.75 * (0.8 * 1.0 + 0.7 * 0.875) / (1 + 0.875) = 0.565;

[0320] Feature 4 = Feature 4 weight * (Feature 1 * Feature 1 weight + Feature 2 * Feature 2 weight) / (Feature 1 weight + Feature 2 weight). That is, 0.625 * (0.8 * 1.0 + 0.7 * 0.875) / (1 + 0.875) = 0.47;

[0321] Feature 5 = Feature 5 weight * (Feature 1 * Feature 1 weight + Feature 2 * Feature 2 weight) / (Feature 1 weight + Feature 2 weight). That is, 0.5 * (0.8 * 1.0 + 0.7 * 0.875) / (1 + 0.875) = 0.376;

[0322] The final completed feature vector of user b is: [0.8, 0.7, 0.565, 0.47, 0.376].

[0323] For example, feature 1, feature 2, and feature 3 of a user are existing features, and feature 4 and feature 5 are missing features. After feature completion:

[0324] Its feature 4 = feature 4 weight * (feature 1 * feature 1 weight + feature 2 * feature 2 weight + feature 3 * feature 3 weight) / (feature 1 weight + feature 2 weight + feature 3);

[0325] Its feature 5 = feature 5 weight * (feature 1 * feature 1 weight + feature 2 * feature 2 weight + feature 3 * feature 3 weight) / (feature 1 weight + feature 2 weight + feature 3).

[0326] Next, add the time decay factor.

[0327] Since the feature occurrence time of user b has exceeded 3 months, substituting it into the formula, it can be obtained that the behavior weight is attenuated to half of the original. Therefore, all the relevant features after completion need to be attenuated to 1 / 2 of the original. Finally, the feature vector completed by user b is: [0.8, 0.7, 0.28, 0.235, 0.189].

[0328] Other feature sequences of other occupations are also completed using the above method, and the feature matrix after completion of all seed users can be obtained. For ease of understanding and description, the feature results in the completed feature matrix are shown in Table 17.

[0329] Table 17

[0330]

[0331] In some embodiments of the present application, under the condition of limited number of seed users and sparse features, the large model can be used to understand and summarize the rich text-based behavior preferences generated by users, and the next or subsequent user behaviors can be predicted based on the partial behavior sequence of the user. Multiple user behavior sequence features can be effectively combined to predict new possible characteristic behaviors. Not only can the features be effectively completed, but also predictive information about future behavior sequences is added, which increases the robustness of the model and improves the model effect. The calculated feature vectors can also be assigned to the user feature set, and these features can also be used to predict the user's future potential behavior or preferences, and even this feature set can be deployed to scenarios such as recommendation systems to further optimize the prediction results.

[0332] Figure 8 is a structural block diagram of a sparse feature completion device provided in an embodiment of the present application, such as Figure 8 As shown, the sparse feature completion device 800 may include: a processing module 810 and a completion module 820;

[0333] A processing module 810 is used to generate an original sparse matrix of each seed user according to the identification information, occupation type information and user information of each seed user in the sample set;

[0334] Generate reference information based on the existing features in each original sparse matrix, wherein the reference information includes at least one of the following: similarity between different seed users, content relevance between different features, and temporal relevance between different features;

[0335] The completion module 820 is used to complete the missing features in each original sparse matrix based on the reference information.

[0336] In some embodiments of the present application, an original sparse matrix of each seed user is generated based on the identification information, occupation type information and user information of each seed user in the sample set; reference information is generated based on the existing features in each original sparse matrix, wherein the reference information includes at least one of the following: similarity between different seed users, content relevance between different features, and temporal relevance between different features; based on the reference information, the missing features in each original sparse matrix are completed. Since the missing features in the sparse matrix are completed with reference to the existing features in the sparse matrix when the eigenvalues ​​of the missing features are completed, the missing features in the sparse matrix can be effectively completed and the feature completeness can be improved, thereby improving the accuracy of the inference results of the trained model when the sparse matrix is ​​used for model training in the future.

[0337] Optionally, in some embodiments of the present application, the user information includes at least one of the following: user physiological information, geographic location information, program usage information, and interest preference information.

[0338] Optionally, in some embodiments of the present application, the reference information includes: similarities between different seed users;

[0339] The processing module 810 is specifically used for:

[0340] According to the number of existing features in each original sparse matrix, the sample set is divided into a feature-complete user subset and a feature-missing user subset, wherein the feature-complete user subset includes: at least one seed user whose feature completeness is higher than a first threshold, and the feature-missing user subset includes: at least one seed user whose feature completeness is lower than or equal to the first threshold;

[0341] Generating a professional description behavior pattern feature vector of each seed user in the feature-complete user subset according to the original sparse matrix of each seed user in the feature-complete user subset;

[0342] Clustering the occupation description behavior pattern feature vectors of all seed users in the feature-complete user subset to obtain a clustering model, wherein the clustering model is used to output a clustering category and a center point feature vector corresponding to the clustering category;

[0343] Generate a career description behavior pattern feature vector for each seed user in the feature-missing user subset according to the original sparse matrix of each seed user in the feature-missing user subset;

[0344] Inputting the occupation description behavior pattern feature vector of each seed user in the sample set into the clustering model respectively, and outputting the cluster category to which each seed user in the sample set belongs and the center point feature vector corresponding to each cluster category;

[0345] According to the occupational description behavior pattern feature vector of each seed user in the sample set, the cluster category to which each seed user belongs and the center point feature vector corresponding to the cluster category to which each seed user belongs, the similarity score of the cluster category to which each seed user in the sample set belongs is calculated.

[0346] Optionally, in some embodiments of the present application, the processing module 810 is further configured to:

[0347] For each original sparse matrix, the number of existing features of the original sparse matrix is ​​divided by the total number of features of the original sparse matrix to obtain the feature completeness of the seed user corresponding to each original sparse matrix.

[0348] Optionally, in some embodiments of the present application, the processing module 810 is specifically used to:

[0349] Based on the first prompt word Prompt rule and the original sparse matrix of at least one seed user in the feature-complete user subset, the generative pre-trained converter is fine-tuned to obtain a first model; wherein the first Prompt rule includes: the data input format of the original sparse matrix and the data output format of the occupation description behavior pattern feature vector;

[0350] Inputting the first prompt word Prompt and the original sparse matrix of at least one seed user in the feature-complete user subset into a generative pre-trained converter, fine-tuning the generative pre-trained converter, and obtaining a first model; wherein the first Prompt includes: the data input format of the original sparse matrix and the data output format of the occupation description behavior pattern feature vector;

[0351] Inputting the original sparse matrix of each seed user in the feature-complete user subset into the first model, and outputting a feature vector of the occupation description behavior pattern of each seed user in the feature-complete user subset;

[0352] The original sparse matrix of each seed user in the feature-missing user subset is input into the first model, and the occupation description behavior pattern feature vector of each seed user in the feature-missing user subset is output.

[0353] Optionally, in some embodiments of the present application, the processing module 810 is specifically used to:

[0354] For each occupation type of all seed users in the feature-complete user subset, according to at least two occupational sub-classifications, feature clustering is performed on the occupation description behavior pattern feature vectors of the seed users under each occupation type to obtain a clustering model;

[0355] The clustering model is used to output N*K clustering categories, where N is the total number of occupational types, K is the number of subcategories of each occupational type, and N and M are both integers greater than 1.

[0356] Optionally, in some embodiments of the present application, the completion module 820 is specifically used to:

[0357] Performing structured numerical encoding on each original sparse matrix to obtain each encoded original sparse matrix, wherein each existing feature in the encoded original sparse matrix corresponds to an eigenvalue;

[0358] For each cluster category to which all seed users in the feature-complete user subset belong, perform an eigenvalue mean operation on each feature dimension of the encoded original sparse matrix of the seed users whose similarity scores under the cluster category are ranked in descending order in the top Z positions, to obtain the mean of the eigenvalues ​​corresponding to each feature dimension, where Z is an integer greater than 1;

[0359] The eigenvalue of the missing feature in each original sparse matrix is ​​determined according to the mean of the eigenvalue corresponding to each feature dimension and the similarity score under the cluster category to which each seed user in the sample set belongs.

[0360] Optionally, in some embodiments of the present application, the completion module 820 is specifically used to:

[0361] For each missing feature of the original sparse matrix of each seed user in the sample set, a product operation is performed on the similarity score of the cluster category to which the seed user corresponding to the missing feature belongs and the mean of the eigenvalue corresponding to the feature dimension where the missing feature is located, and the product value is determined as the eigenvalue of the missing feature.

[0362] Optionally, in some embodiments of the present application, the reference information includes: content relevance between different features;

[0363] The processing module 810 is specifically used for:

[0364] For each occupation type of all seed users in the sample set, generating a correlation matrix corresponding to each occupation type for characterizing the correlation between a pair of feature dimensions according to the names of all features in the original sparse matrix of all seed users under the occupation type;

[0365] The correlation matrix corresponding to each occupation type is numerically processed to obtain a correlation coefficient matrix corresponding to each occupation type; wherein the correlation coefficient matrix is ​​used to characterize the content correlation between the different features.

[0366] Optionally, in some embodiments of the present application, the processing module 810 is specifically used to:

[0367] For each occupation type of all seed users in the sample set, the second Prompt and the names of all features in the original sparse matrix of at least one seed user under the occupation type are input into a generative pre-trained converter, and the generative pre-trained converter is fine-tuned to obtain a second model corresponding to each occupation type; wherein the second Prompt includes: a data input format of the names of all features in the original sparse matrix and a data output format of the correlation information between the pair of feature dimensions; the correlation information includes: a correlation attribute between every two feature dimensions and a correlation degree between every two feature dimensions for which the correlation attribute is true;

[0368] Input the original sparse matrix of each seed user under each occupation type into the second model corresponding to each occupation type, and output the correlation information between a pair of feature dimensions of each seed user under each occupation type;

[0369] According to the correlation information between a pair of feature dimensions of all seed users under each occupation type, a correlation matrix corresponding to each occupation type is generated.

[0370] Optionally, in some embodiments of the present application, the processing module 810 is specifically used to:

[0371] According to the correlation information between a pair of feature dimensions of all seed users under each occupation type, the user correlation features of the top T positions in descending order under each occupation type are screened out, where T is an integer greater than 1;

[0372] According to the user association features in the top T positions in descending order under each occupation type, a correlation matrix corresponding to each occupation type is generated.

[0373] Optionally, in some embodiments of the present application, the processing module 810 is specifically used to:

[0374] According to the number of seed users whose features in the association matrix corresponding to each occupation type are existing features in all original sparse matrices, the association matrix corresponding to each occupation type is numerically processed to obtain the association coefficient matrix corresponding to each occupation type.

[0375] Optionally, in some embodiments of the present application, the processing module 810 is specifically used to:

[0376] Performing structured numerical encoding on each original sparse matrix to obtain each encoded original sparse matrix, wherein each existing feature in the encoded original sparse matrix corresponds to an eigenvalue;

[0377] Normalizing the correlation coefficient matrix corresponding to each occupation type to obtain a normalized correlation coefficient matrix corresponding to each occupation type;

[0378] According to the normalized correlation coefficient matrix corresponding to each occupation type and each encoded original sparse matrix, the eigenvalues ​​of the missing features in each original sparse matrix are determined.

[0379] Optionally, in some embodiments of the present application, the completion module 820 is specifically used to:

[0380] For each missing feature in the original sparse matrix corresponding to each occupation type, a weighted sum operation is performed on the eigenvalue of the feature associated with the missing feature in the corresponding encoded original sparse matrix and the coefficient value of the corresponding coefficient in the normalized association coefficient matrix of the corresponding occupation type, and the weighted sum value is determined as the eigenvalue of the missing feature.

[0381] Optionally, in some embodiments of the present application, the reference information includes: a temporal correlation between different features;

[0382] The processing module 810 is specifically used for:

[0383] A behavior feature sequence for each seed user in the sample set is generated based on all behavior features in the original sparse matrix of each seed user in the sample set and the timestamps corresponding to all behavior features, wherein the behavior feature sequence includes at least two behavior features that are associated in time sequence.

[0384] Optionally, in some embodiments of the present application, the processing module 810 is specifically used to:

[0385] Inputting the third Prompt, all the behavioral features in the original sparse matrix of at least one seed user in the sample set, and the timestamps corresponding to all the behavioral features into the generative pre-trained converter, and fine-tuning the generative pre-trained converter to obtain a third model; wherein the third Prompt includes: the data input format of all the behavioral features in the original sparse matrix and the timestamps corresponding to all the behavioral features, and the data output format of the behavioral feature sequence;

[0386] All behavior features in the original sparse matrix of each seed user in the sample set and the timestamps corresponding to all behavior features are input into the third model, and a behavior feature sequence of each seed user in the sample set is output.

[0387] Optionally, in some embodiments of the present application, the completion module 820 is specifically used to:

[0388] According to the behavior feature sequence of each seed user in the sample set, converting the original sparse matrix of each seed user in the sample set into a numerical sparse matrix;

[0389] Determine the eigenvalue of the missing feature in each original sparse matrix according to the weight coefficient corresponding to each behavior feature in each behavior feature sequence, the time decay factor and the numeralized sparse matrix corresponding to each seed user;

[0390] The weight coefficient corresponding to the behavior feature is negatively correlated with the timestamp corresponding to the behavior feature, and the time attenuation factor corresponding to the behavior feature is negatively correlated with the timestamp corresponding to the behavior feature.

[0391] Optionally, in some embodiments of the present application, the completion module 820 is specifically used to:

[0392] For each missing feature of the original sparse matrix of each seed user in the sample set, a weighted sum operation is performed on the eigenvalue of the feature associated with the missing feature in the corresponding numerated sparse matrix and the corresponding weight coefficient, the weighted sum value is multiplied by the corresponding time attenuation factor, and the product value is determined as the eigenvalue of the missing feature.

[0393] The electronic device in the embodiments of the present application may be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a mobile Internet device (MID), an augmented reality (AR) / virtual reality (VR) device, a robot, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc. It may also be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), a teller machine or a self-service machine, etc., and the embodiments of the present application are not specifically limited.

[0394] The electronic device in the embodiment of the present application may be a terminal with an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0395] The electronic device provided in the embodiment of the present application can achieve Figure 1To avoid repetition, the various processes implemented by the method embodiment will not be described again here.

[0396] Alternatively, if Fig. 9 As shown, an embodiment of the present application further provides an electronic device 900, including a processor 901 and a memory 902, wherein the memory 902 stores a program or instruction that can be executed on the processor 901, and when the program or instruction is executed by the processor 901, each step of the above-mentioned sparse feature completion method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0397] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.

[0398] Fig.10 It is a schematic diagram of the hardware structure of an electronic device provided in various embodiments of the present application.

[0399] The electronic device 1000 includes but is not limited to: a radio frequency unit 1001, a network module 1002, an audio output unit 1003, an input unit 1004, a sensor 1005, a display unit 1006, a user input unit 1007, an interface unit 1008, a memory 1009 and a processor 1010 and other components.

[0400] Those skilled in the art will appreciate that the electronic device 1000 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 1010 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Fig.10 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.

[0401] Processor 1010 is used to generate an original sparse matrix for each seed user based on the identification information, occupation type information and user information of each seed user in the sample set; generate reference information based on the existing features in each original sparse matrix, wherein the reference information includes at least one of the following: the similarity between different seed users, the content correlation between different features, and the temporal correlation between different features; based on the reference information, complete the missing features in each original sparse matrix.

[0402] In some embodiments of the present application, since the eigenvalues ​​of missing features in a sparse matrix are completed by referring to the existing features in the sparse matrix, the missing features in the sparse matrix can be effectively completed and the feature completeness can be improved, thereby improving the accuracy of the inference results of the trained model when the sparse matrix is ​​subsequently used for model training.

[0403] Optionally, in some embodiments of the present application, the user information includes at least one of the following: user physiological information, geographic location information, program usage information, and interest preference information.

[0404] Optionally, in some embodiments of the present application, the reference information includes: similarities between different seed users;

[0405] The processor 1010 is specifically configured to:

[0406] According to the number of existing features in each original sparse matrix, the sample set is divided into a feature-complete user subset and a feature-missing user subset, wherein the feature-complete user subset includes: at least one seed user whose feature completeness is higher than a first threshold, and the feature-missing user subset includes: at least one seed user whose feature completeness is lower than or equal to the first threshold;

[0407] Generating a professional description behavior pattern feature vector of each seed user in the feature-complete user subset according to the original sparse matrix of each seed user in the feature-complete user subset;

[0408] Clustering the occupation description behavior pattern feature vectors of all seed users in the feature-complete user subset to obtain a clustering model, wherein the clustering model is used to output a clustering category and a center point feature vector corresponding to the clustering category;

[0409] Generate a career description behavior pattern feature vector for each seed user in the feature-missing user subset according to the original sparse matrix of each seed user in the feature-missing user subset;

[0410] Inputting the occupation description behavior pattern feature vector of each seed user in the sample set into the clustering model respectively, and outputting the cluster category to which each seed user in the sample set belongs and the center point feature vector corresponding to each cluster category;

[0411] According to the occupational description behavior pattern feature vector of each seed user in the sample set, the cluster category to which each seed user belongs and the center point feature vector corresponding to the cluster category to which each seed user belongs, the similarity score of the cluster category to which each seed user in the sample set belongs is calculated.

[0412] Optionally, in some embodiments of the present application, the processor 1010 is further configured to:

[0413] For each original sparse matrix, the number of existing features of the original sparse matrix is ​​divided by the total number of features of the original sparse matrix to obtain the feature completeness of the seed user corresponding to each original sparse matrix.

[0414] Optionally, in some embodiments of the present application, the processor 1010 is specifically configured to:

[0415] Inputting the first prompt word Prompt and the original sparse matrix of at least one seed user in the feature-complete user subset into a generative pre-trained converter, fine-tuning the generative pre-trained converter, and obtaining a first model; wherein the first Prompt includes: the data input format of the original sparse matrix and the data output format of the occupation description behavior pattern feature vector;

[0416] Inputting the original sparse matrix of each seed user in the feature-complete user subset into the first model, and outputting a feature vector of the occupation description behavior pattern of each seed user in the feature-complete user subset;

[0417] The step of generating a characteristic vector of the occupation description behavior pattern of each seed user in the feature-missing user subset according to the original sparse matrix of each seed user in the feature-missing user subset comprises:

[0418] The original sparse matrix of each seed user in the feature-missing user subset is input into the first model, and the occupation description behavior pattern feature vector of each seed user in the feature-missing user subset is output.

[0419] Optionally, as an embodiment, the processor 1010 is specifically configured to:

[0420] For each occupation type of all seed users in the feature-complete user subset, according to at least two occupational sub-classifications, feature clustering is performed on the occupation description behavior pattern feature vectors of the seed users under each occupation type to obtain a clustering model;

[0421] The clustering model is used to output N*K clustering categories, where N is the total number of occupational types, K is the number of subcategories of each occupational type, and N and M are both integers greater than 1.

[0422] Optionally, in some embodiments of the present application, the processor 1010 is specifically configured to:

[0423] Performing structured numerical encoding on each original sparse matrix to obtain each encoded original sparse matrix, wherein each existing feature in the encoded original sparse matrix corresponds to an eigenvalue;

[0424] For each cluster category to which all seed users in the feature-complete user subset belong, perform an eigenvalue mean operation on each feature dimension of the encoded original sparse matrix of the seed users whose similarity scores under the cluster category are ranked in descending order in the top Z positions, to obtain the mean of the eigenvalues ​​corresponding to each feature dimension, where Z is an integer greater than 1;

[0425] The eigenvalue of the missing feature in each original sparse matrix is ​​determined according to the mean of the eigenvalue corresponding to each feature dimension and the similarity score under the cluster category to which each seed user in the sample set belongs.

[0426] Optionally, in some embodiments of the present application, the processor 1010 is specifically configured to:

[0427] For each missing feature of the original sparse matrix of each seed user in the sample set, a product operation is performed on the similarity score of the cluster category to which the seed user corresponding to the missing feature belongs and the mean of the eigenvalue corresponding to the feature dimension where the missing feature is located, and the product value is determined as the eigenvalue of the missing feature.

[0428] Optionally, in some embodiments of the present application, the reference information includes: content relevance between different features;

[0429] The processor 1010 is specifically configured to:

[0430] For each occupation type of all seed users in the sample set, generating a correlation matrix corresponding to each occupation type for characterizing the correlation between a pair of feature dimensions according to the names of all features in the original sparse matrix of all seed users under the occupation type;

[0431] The correlation matrix corresponding to each occupation type is numerically processed to obtain a correlation coefficient matrix corresponding to each occupation type; wherein the correlation coefficient matrix is ​​used to characterize the content correlation between the different features.

[0432] Optionally, in some embodiments of the present application, the processor 1010 is specifically configured to:

[0433] For each occupation type of all seed users in the sample set, the second Prompt and the names of all features in the original sparse matrix of at least one seed user under the occupation type are input into a generative pre-trained converter, and the generative pre-trained converter is fine-tuned to obtain a second model corresponding to each occupation type; wherein the second Prompt includes: a data input format of the names of all features in the original sparse matrix and a data output format of the correlation information between the pair of feature dimensions; the correlation information includes: a correlation attribute between every two feature dimensions and a correlation degree between every two feature dimensions for which the correlation attribute is true;

[0434] Input the original sparse matrix of each seed user under each occupation type into the second model corresponding to each occupation type, and output the correlation information between a pair of feature dimensions of each seed user under each occupation type;

[0435] According to the correlation information between a pair of feature dimensions of all seed users under each occupation type, a correlation matrix corresponding to each occupation type is generated.

[0436] Optionally, in some embodiments of the present application, the processor 1010 is specifically configured to:

[0437] According to the correlation information between a pair of feature dimensions of all seed users under each occupation type, the user correlation features of the top T positions in descending order under each occupation type are screened out, where T is an integer greater than 1;

[0438] According to the user association features in the top T positions in descending order under each occupation type, a correlation matrix corresponding to each occupation type is generated.

[0439] Optionally, in some embodiments of the present application, the processor 1010 is specifically configured to:

[0440] According to the number of seed users whose features in the association matrix corresponding to each occupation type are existing features in all original sparse matrices, the association matrix corresponding to each occupation type is numerically processed to obtain the association coefficient matrix corresponding to each occupation type.

[0441] Optionally, in some embodiments of the present application, the processor 1010 is specifically configured to:

[0442] Performing structured numerical encoding on each original sparse matrix to obtain each encoded original sparse matrix, wherein each existing feature in the encoded original sparse matrix corresponds to an eigenvalue;

[0443] Normalizing the correlation coefficient matrix corresponding to each occupation type to obtain a normalized correlation coefficient matrix corresponding to each occupation type;

[0444] According to the normalized correlation coefficient matrix corresponding to each occupation type and each encoded original sparse matrix, the eigenvalues ​​of the missing features in each original sparse matrix are determined.

[0445] Optionally, in some embodiments of the present application, the processor 1010 is specifically configured to:

[0446] For each missing feature in the original sparse matrix corresponding to each occupation type, a weighted sum operation is performed on the eigenvalue of the feature associated with the missing feature in the corresponding encoded original sparse matrix and the coefficient value of the corresponding coefficient in the normalized association coefficient matrix of the corresponding occupation type, and the weighted sum value is determined as the eigenvalue of the missing feature.

[0447] Optionally, in some embodiments of the present application, the reference information includes: a temporal correlation between different features;

[0448] The processor 1010 is specifically configured to:

[0449] A behavior feature sequence for each seed user in the sample set is generated based on all behavior features in the original sparse matrix of each seed user in the sample set and the timestamps corresponding to all behavior features, wherein the behavior feature sequence includes at least two behavior features that are associated in time sequence.

[0450] Optionally, in some embodiments of the present application, the processor 1010 is specifically configured to:

[0451] Inputting the third Prompt, all the behavioral features in the original sparse matrix of at least one seed user in the sample set, and the timestamps corresponding to all the behavioral features into the generative pre-trained converter, and fine-tuning the generative pre-trained converter to obtain a third model; wherein the third Prompt includes: the data input format of all the behavioral features in the original sparse matrix and the timestamps corresponding to all the behavioral features, and the data output format of the behavioral feature sequence;

[0452] All behavior features in the original sparse matrix of each seed user in the sample set and the timestamps corresponding to all behavior features are input into the third model, and a behavior feature sequence of each seed user in the sample set is output.

[0453] Optionally, in some embodiments of the present application, the processor 1010 is specifically configured to:

[0454] According to the behavior feature sequence of each seed user in the sample set, converting the original sparse matrix of each seed user in the sample set into a numerical sparse matrix;

[0455] Determine the eigenvalue of the missing feature in each original sparse matrix according to the weight coefficient corresponding to each behavior feature in each behavior feature sequence, the time decay factor and the numeralized sparse matrix corresponding to each seed user;

[0456] The weight coefficient corresponding to the behavior feature is negatively correlated with the timestamp corresponding to the behavior feature, and the time attenuation factor corresponding to the behavior feature is negatively correlated with the timestamp corresponding to the behavior feature.

[0457] Optionally, in some embodiments of the present application, the processor 1010 is specifically configured to:

[0458] For each missing feature of the original sparse matrix of each seed user in the sample set, a weighted sum operation is performed on the eigenvalue of the feature associated with the missing feature in the corresponding numerated sparse matrix and the corresponding weight coefficient, the weighted sum value is multiplied by the corresponding time attenuation factor, and the product value is determined as the eigenvalue of the missing feature.

[0459] It should be understood that in the embodiment of the present application, the input unit 1004 may include a graphics processor (Graphics Processing Unit, GPU) 10041 and a microphone 10042, and the graphics processor 10041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 1006 may include a display panel 10061, and the display panel 10061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 1007 includes a touch panel 10071 and at least one of other input devices 10072. The touch panel 10071 is also called a touch screen. The touch panel 10071 may include two parts: a touch detection device and a touch controller. Other input devices 10072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.

[0460] The memory 1009 can be used to store software programs and various data. The memory 1009 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 1009 may include a volatile memory or a non-volatile memory, or the memory 1009 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 1009 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.

[0461] The processor 1010 may include one or more processing units; optionally, the processor 1010 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 1010.

[0462] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned sparse feature completion method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0463] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.

[0464] An embodiment of the present application also provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned sparse feature completion method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0465] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0466] An embodiment of the present application also provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned sparse feature completion method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0467] It should be noted that, in this article, the term "comprises", "includes" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "including one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the method in the embodiment of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0468] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for enabling a terminal (such as a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0469] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. A sparse feature completion method, characterized in that: include: Generate an original sparse matrix of each seed user according to the identification information, occupation type information and user information of each seed user in the sample set; Generate reference information based on the existing features in each original sparse matrix, wherein the reference information includes at least one of the following: similarity between different seed users, content relevance between different features, and temporal relevance between different features; Based on the reference information, the missing features in each original sparse matrix are completed.

2. The method according to claim 1, characterized in that The user information includes at least one of the following: user physiological information, geographic location information, program usage information, and interest preference information.

3. The method according to claim 1 or 2, characterized in that: The reference information includes: similarities between different seed users; The step of generating reference information according to the existing features in each original sparse matrix includes: According to the number of existing features in each original sparse matrix, the sample set is divided into a feature-complete user subset and a feature-missing user subset, wherein the feature-complete user subset includes: at least one seed user whose feature completeness is higher than a first threshold, and the feature-missing user subset includes: at least one seed user whose feature completeness is lower than or equal to the first threshold; Generating a professional description behavior pattern feature vector of each seed user in the feature-complete user subset according to the original sparse matrix of each seed user in the feature-complete user subset; Clustering the occupation description behavior pattern feature vectors of all seed users in the feature-complete user subset to obtain a clustering model, wherein the clustering model is used to output a clustering category and a center point feature vector corresponding to the clustering category; Generate a career description behavior pattern feature vector for each seed user in the feature-missing user subset according to the original sparse matrix of each seed user in the feature-missing user subset; Inputting the occupation description behavior pattern feature vector of each seed user in the sample set into the clustering model respectively, and outputting the cluster category to which each seed user in the sample set belongs and the center point feature vector corresponding to each cluster category; According to the occupational description behavior pattern feature vector of each seed user in the sample set, the cluster category to which each seed user belongs and the center point feature vector corresponding to the cluster category to which each seed user belongs, the similarity score of the cluster category to which each seed user in the sample set belongs is calculated.

4. The method according to claim 3, characterized in that The method further comprises: For each original sparse matrix, the number of existing features of the original sparse matrix is ​​divided by the total number of features of the original sparse matrix to obtain the feature completeness of the seed user corresponding to each original sparse matrix.

5. The method according to claim 3, characterized in that: The step of generating a characteristic vector of a career description behavior pattern of each seed user in the feature-complete user subset according to the original sparse matrix of each seed user in the feature-complete user subset comprises: Inputting the first prompt word Prompt and the original sparse matrix of at least one seed user in the feature-complete user subset into a generative pre-trained converter, fine-tuning the generative pre-trained converter, and obtaining a first model; wherein the first Prompt includes: the data input format of the original sparse matrix and the data output format of the occupation description behavior pattern feature vector; Inputting the original sparse matrix of each seed user in the feature-complete user subset into the first model, and outputting a feature vector of the occupation description behavior pattern of each seed user in the feature-complete user subset; The step of generating a characteristic vector of the occupation description behavior pattern of each seed user in the feature-missing user subset according to the original sparse matrix of each seed user in the feature-missing user subset comprises: The original sparse matrix of each seed user in the feature-missing user subset is input into the first model, and the occupation description behavior pattern feature vector of each seed user in the feature-missing user subset is output.

6. The method according to claim 3, characterized in that The step of clustering the occupation description behavior pattern feature vectors of all seed users in the feature-complete user subset to obtain a clustering model includes: For each occupation type of all seed users in the feature-complete user subset, according to at least two occupational sub-classifications, feature clustering is performed on the occupation description behavior pattern feature vectors of the seed users under each occupation type to obtain a clustering model; The clustering model is used to output N*K clustering categories, where N is the total number of occupational types, K is the number of subcategories of each occupational type, and N and M are both integers greater than 1.

7. The method according to claim 3, characterized in that The method of completing the missing features in each original sparse matrix based on the reference information includes: Performing structured numerical encoding on each original sparse matrix to obtain each encoded original sparse matrix, wherein each existing feature in the encoded original sparse matrix corresponds to an eigenvalue; For each cluster category to which all seed users in the feature-complete user subset belong, perform an eigenvalue mean operation on each feature dimension of the encoded original sparse matrix of the seed users whose similarity scores under the cluster category are ranked in descending order in the top Z positions, to obtain the mean of the eigenvalues ​​corresponding to each feature dimension, where Z is an integer greater than 1; The eigenvalue of the missing feature in each original sparse matrix is ​​determined according to the mean of the eigenvalue corresponding to each feature dimension and the similarity score under the cluster category to which each seed user in the sample set belongs.

8. The method according to claim 7, characterized in that The determining the eigenvalue of the missing feature in each original sparse matrix according to the mean of the eigenvalue corresponding to each feature dimension and the similarity score under the cluster category to which each seed user in the sample set belongs includes: For each missing feature of the original sparse matrix of each seed user in the sample set, a product operation is performed on the similarity score of the cluster category to which the seed user corresponding to the missing feature belongs and the mean of the eigenvalue corresponding to the feature dimension where the missing feature is located, and the product value is determined as the eigenvalue of the missing feature.

9. The method according to claim 1 or 2, characterized in that: The reference information includes: content relevance between different features; The step of generating reference information according to the existing features in each original sparse matrix includes: For each occupation type of all seed users in the sample set, generating a correlation matrix corresponding to each occupation type for characterizing the correlation between a pair of feature dimensions according to the names of all features in the original sparse matrix of all seed users under the occupation type; The correlation matrix corresponding to each occupation type is numerically processed to obtain a correlation coefficient matrix corresponding to each occupation type; wherein the correlation coefficient matrix is ​​used to characterize the content correlation between the different features.

10. The method according to claim 9, characterized in that For each occupation type of all seed users in the sample set, according to the names of all features in the original sparse matrix of all seed users under the occupation type, a correlation matrix corresponding to each occupation type for characterizing the correlation between a pair of feature dimensions is generated, including: For each occupation type of all seed users in the sample set, the second Prompt and the names of all features in the original sparse matrix of at least one seed user under the occupation type are input into a generative pre-trained converter, and the generative pre-trained converter is fine-tuned to obtain a second model corresponding to each occupation type; wherein the second Prompt includes: a data input format of the names of all features in the original sparse matrix and a data output format of the correlation information between the pair of feature dimensions; the correlation information includes: a correlation attribute between every two feature dimensions and a correlation degree between every two feature dimensions for which the correlation attribute is true; Input the original sparse matrix of each seed user under each occupation type into the second model corresponding to each occupation type, and output the correlation information between a pair of feature dimensions of each seed user under each occupation type; According to the correlation information between a pair of feature dimensions of all seed users under each occupation type, a correlation matrix corresponding to each occupation type is generated.

11. The method according to claim 10, characterized in that The method generates a correlation matrix corresponding to each occupation type according to the correlation information between a pair of feature dimensions of all seed users under each occupation type, including: According to the correlation information between a pair of feature dimensions of all seed users under each occupation type, the user correlation features of the top T positions in descending order under each occupation type are screened out, where T is an integer greater than 1; According to the user association features in the top T positions in descending order under each occupation type, a correlation matrix corresponding to each occupation type is generated.

12. The method according to claim 9, characterized in that The correlation matrix corresponding to each occupation type is numerically processed to obtain a correlation coefficient matrix corresponding to each occupation type, including: According to the number of seed users whose features in the association matrix corresponding to each occupation type are existing features in all original sparse matrices, the association matrix corresponding to each occupation type is numerically processed to obtain the association coefficient matrix corresponding to each occupation type.

13. The method according to claim 9, characterized in that The method of completing the missing features in each original sparse matrix based on the reference information includes: Performing structured numerical encoding on each original sparse matrix to obtain each encoded original sparse matrix, wherein each existing feature in the encoded original sparse matrix corresponds to an eigenvalue; Normalizing the correlation coefficient matrix corresponding to each occupation type to obtain a normalized correlation coefficient matrix corresponding to each occupation type; According to the normalized correlation coefficient matrix corresponding to each occupation type and each encoded original sparse matrix, the eigenvalues ​​of the missing features in each original sparse matrix are determined.

14. The method according to claim 13, characterized in that The step of determining the eigenvalue of the missing feature in each original sparse matrix according to the normalized correlation coefficient matrix corresponding to each occupation type and each encoded original sparse matrix includes: For each missing feature in the original sparse matrix corresponding to each occupation type, a weighted sum operation is performed on the eigenvalue of the feature associated with the missing feature in the corresponding encoded original sparse matrix and the coefficient value of the corresponding coefficient in the normalized association coefficient matrix of the corresponding occupation type, and the weighted sum value is determined as the eigenvalue of the missing feature.

15. The method according to claim 1 or 2, characterized in that: The reference information includes: the temporal correlation between different features; The step of generating reference information according to the existing features in each original sparse matrix includes: A behavior feature sequence for each seed user in the sample set is generated based on all behavior features in the original sparse matrix of each seed user in the sample set and the timestamps corresponding to all behavior features, wherein the behavior feature sequence includes at least two behavior features that are associated in time sequence.

16. The method according to claim 15, characterized in that The step of generating a behavior feature sequence for each seed user in the sample set according to all behavior features in the original sparse matrix of each seed user in the sample set and the timestamps corresponding to all behavior features comprises: Inputting the third Prompt, all the behavioral features in the original sparse matrix of at least one seed user in the sample set, and the timestamps corresponding to all the behavioral features into the generative pre-trained converter, and fine-tuning the generative pre-trained converter to obtain a third model; wherein the third Prompt includes: the data input format of all the behavioral features in the original sparse matrix and the timestamps corresponding to all the behavioral features, and the data output format of the behavioral feature sequence; All behavior features in the original sparse matrix of each seed user in the sample set and the timestamps corresponding to all behavior features are input into the third model, and a behavior feature sequence of each seed user in the sample set is output.

17. The method according to claim 15, characterized in that The method of completing the missing features in each original sparse matrix based on the reference information includes: According to the behavior feature sequence of each seed user in the sample set, converting the original sparse matrix of each seed user in the sample set into a numerical sparse matrix; Determine the eigenvalue of the missing feature in each original sparse matrix according to the weight coefficient corresponding to each behavior feature in each behavior feature sequence, the time decay factor and the numeralized sparse matrix corresponding to each seed user; The weight coefficient corresponding to the behavior feature is negatively correlated with the timestamp corresponding to the behavior feature, and the time attenuation factor corresponding to the behavior feature is negatively correlated with the timestamp corresponding to the behavior feature.

18. The method according to claim 17, characterized in that The step of determining the eigenvalue of the missing feature in each original sparse matrix according to the weight coefficient of each behavior feature in each behavior feature sequence, the time decay factor, and the numerated sparse matrix corresponding to each seed user includes: For each missing feature of the original sparse matrix of each seed user in the sample set, a weighted sum operation is performed on the eigenvalue of the feature associated with the missing feature in the corresponding numerated sparse matrix and the corresponding weight coefficient, the weighted sum value is multiplied by the corresponding time attenuation factor, and the product value is determined as the eigenvalue of the missing feature.

19. A sparse feature completion device, characterized in that: include: A processing module, used to generate an original sparse matrix of each seed user according to the identification information, occupation type information and user information of each seed user in the sample set; Generate reference information based on the existing features in each original sparse matrix, wherein the reference information includes at least one of the following: similarity between different seed users, content relevance between different features, and temporal relevance between different features; The completion module is used to complete the missing features in each original sparse matrix based on the reference information.

20. An electronic device, characterized in that: It includes a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the sparse feature completion method according to any one of claims 1 to 18 are implemented.

Citation Information

Patent Citations

  • Data open output method and device and computing equipment

    CN111950015A

  • Image detection method, device and equipment and readable storage medium

    CN114693624A

  • Path loss data enhancement method and system based on matrix completion

    CN115314133A

  • Indoor fingerprint positioning-oriented sparse feature completion method

    CN115426710A

  • Resource recommendation method and apparatus, electronic device and storage medium

    WO2021068610A1

Cited By

  • Generation of user occupation labels based on sensor events

    EP4838388A1