A user portrait classification method and system based on behavior data analysis

Through the user portrait classification method based on behavioral data analysis, using weakly guided learning errors and open set knowledge templates, the problems of high cost and poor adaptability of labeled data acquisition in traditional methods are solved, and high-quality training and accurate classification of user portraits are achieved. , improving the personalized operation effect.

CN118378152BActive Publication Date: 2024-09-13ZHEJIANG JUMIWEIGU INFORMATION TECH CO LTD
View PDF 15 Cites 0 Cited by

Patent Information

Application Number
CN202410814951.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-24
Publication Date
2024-09-13
Estimated Expiration
2044-06-24

AI Technical Summary

Technical Problem

Traditional user portrait classification methods rely on a large amount of labeled data, which is costly and time-consuming to obtain, and is difficult to adapt to the diverse changes in user behavior. Existing supervised learning methods have performance and adaptability challenges in utilizing unlabeled data, and are especially difficult for new users to consume. Portraits for high-quality training.

Method used

A user portrait classification method based on behavioral data analysis is adopted. By obtaining consumption behavior record logs, the behavior vector extraction component in the user portrait classification network is used to extract the behavior representation vector, and the user portrait classification network is optimized based on the weak guidance learning error. Set knowledge templates for weakly supervised learning to ensure high-quality training of consumption profiles of known and new users.

Benefits of technology

It improves the classification accuracy and granularity of the user portrait classification network, enhances the classification granularity of consumption behavior data of different behavior types, improves the personalized operation conversion rate and user experience, and improves customer acquisition resources and quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118378152B
    Figure CN118378152B
Patent Text Reader

Abstract

The present application provides a user portrait classification method and system based on behavior data analysis. When tuning the user portrait classification network, an open set knowledge template is used to perform weakly supervised similarity learning on the user portrait classification network, which not only enables the user portrait classification network to perform high-quality training on known user consumption portraits, but also enables the user portrait classification network to perform high-quality training on new user consumption portraits, so as to ensure the classification accuracy of the user portrait classification network for multiple user consumption portraits and expand the classification granularity of user consumption portraits of the user portrait classification network. At the same time, the knowledge template of the embodiment of the present application is the consumption behavior data corresponding to different behavior types, which increases the log classification granularity of the user portrait classification network to increase the classification quality of the user portrait classification network, help the conversion rate of targeted operations based on user portraits, improve user experience, and improve customer acquisition resources and customer acquisition quality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to but is not limited to the field of data processing technology, and in particular to a user portrait classification method and system based on behavioral data analysis. Background Art

[0002] With the rapid development of the Internet and the widespread application of big data technology, user portrait classification has become an indispensable technical means in many fields, especially in e-commerce, advertising and finance. The goal of user portrait classification is to divide users into different groups based on their behaviors, interests, preferences and other characteristics, so that companies can provide more accurate personalized services and marketing, and improve the scale and quality of customer acquisition.

[0003] However, traditional user profile classification methods often rely on a large amount of labeled data for supervised learning. In practical applications, the acquisition of labeled data is expensive and time-consuming, and it is difficult to cover all possible user consumption profiles. In addition, with the continuous development of the Internet and the diversification of user behavior, new user consumption profiles are constantly emerging, which makes it difficult for traditional classification methods based on fixed labeled data to adapt to such changes. In order to solve the above problems, in recent years, researchers have begun to explore methods for learning with unlabeled data, such as semi-supervised learning, unsupervised learning, and weakly supervised learning. However, existing supervised learning methods still face some challenges in user profile classification tasks. First, how to effectively use unlabeled data to improve the performance of the classifier is a key issue. Secondly, how to ensure that the classifier can perform high-quality training on new user consumption profiles while performing high-quality training on known user consumption profiles, thereby expanding the granularity of user profile classification, is also an urgent problem to be solved. Summary of the invention

[0004] In view of this, the embodiment of the present application at least provides a user portrait classification method and system based on behavior data analysis. The technical solution of the embodiment of the present application is implemented as follows:

[0005] On the one hand, an embodiment of the present application provides a user portrait classification method based on behavioral data analysis, including: obtaining a consumption behavior record log to be analyzed; extracting a behavior representation vector of the consumption behavior record log based on a behavior vector extraction component in a user portrait classification network; determining, based on the behavior representation vector, a prediction confidence coefficient that the consumption behavior record log belongs to Q user consumption profiles, where Q is a natural number not less than 2; wherein the user portrait classification network is obtained based on weakly guided learning error tuning, and the weakly guided learning error is determined based on the overall behavior representation vectors of G first non-prior labeling templates among s non-prior labeling templates and the overall behavior representation vector of the corresponding second knowledge template, and the first non-prior labeling template is a non-prior labeling template that is the same as the corresponding first knowledge template and the corresponding second knowledge template.

[0006] In some embodiments, the training process of the user portrait classification network specifically includes: obtaining w knowledge templates included in the current batch of debugging samples, and extracting the first behavior representation vector of each of the w knowledge templates based on the behavior vector extraction component in the user portrait classification network; performing local and overall behavior vector extraction on the first behavior representation vector of each of the knowledge templates to obtain the local behavior representation vector and the overall behavior representation vector of each of the knowledge templates; for the eth non-prior labeled template among the s non-prior labeled templates, based on the local behavior representation vector and the overall behavior representation vector, Among the w knowledge templates, among the v knowledge templates except the e-th non-prior labeled template, determine the first knowledge template with the largest local matching coefficient with the e-th non-prior labeled template, and the second knowledge template with the largest overall matching coefficient with the e-th non-prior labeled template; select G first non-prior labeled templates from the s non-prior labeled templates, determine the weakly guided learning error of the user portrait classification network based on the overall behavior representation vectors of the G first non-prior labeled templates and the overall behavior representation vectors of the corresponding second knowledge templates, and tune the user portrait classification network based on the weakly guided learning error.

[0007] In some embodiments, the method of determining, based on the local behavior characterization vector and the overall behavior characterization vector, a first knowledge template having the largest local matching coefficient with the e-th non-prior labeled template and a second knowledge template having the largest overall matching coefficient with the e-th non-prior labeled template among v knowledge templates except the e-th non-prior labeled template among the w knowledge templates, includes: determining the local matching coefficient between every two knowledge templates according to the local behavior characterization vectors of each two knowledge templates among the w knowledge templates, and determining the overall matching coefficient between every two knowledge templates according to the overall behavior characterization vectors of each two knowledge templates; determining the first knowledge template having the largest local matching coefficient with the e-th non-prior labeled template among the v knowledge templates according to the local matching coefficient between the e-th non-prior labeled template and each knowledge template of the v knowledge templates; determining the second knowledge template having the largest overall matching coefficient with the e-th non-prior labeled template according to the overall behavior characterization vectors of each two knowledge templates. The overall matching coefficient between the non-prior labeled template and each of the v knowledge templates, and determining the second knowledge template with the largest overall matching coefficient with the e-th non-prior labeled template among the v knowledge templates; determining the weakly guided learning error of the user portrait classification network based on the overall behavior characterization vectors of the G first non-prior labeled templates and the overall behavior characterization vectors of the corresponding second knowledge templates, including: for each of the G first non-prior labeled templates, determining the first difference result of the first non-prior labeled template based on the overall behavior characterization vector of the first non-prior labeled template and the overall behavior characterization vector of the second knowledge template corresponding to the first non-prior labeled template; determining the first generation value based on the first difference result corresponding to each first non-prior labeled template of the G first non-prior labeled templates; and obtaining the weakly guided learning error based on the first generation value.

[0008] In some embodiments, the local matching coefficient between every two knowledge templates is determined based on the local behavior characterization vector of every two knowledge templates among the w knowledge templates, including: for the f-th knowledge template and the a-th knowledge template among the w knowledge templates, the local significance influence coefficient of the f-th knowledge template is determined based on the local behavior characterization vector of the f-th knowledge template, and the local significance influence coefficient of the a-th knowledge template is determined based on the local behavior characterization vector of the a-th knowledge template, wherein 0<f<w; 0<a≤w; the local matching coefficient between the f-th knowledge template and the a-th knowledge template is determined based on the local behavior characterization vector and the local significance influence coefficient of the f-th knowledge template, and the local behavior characterization vector and the local significance influence coefficient of the a-th knowledge template.

[0009] In some embodiments, determining the first generation value based on the first difference result corresponding to each first non-prior labeling template of the G first non-prior labeling templates includes: determining the non-prior labeling difference result based on the first difference result corresponding to each first non-prior labeling template of the G first non-prior labeling templates; determining the a priori labeling difference result based on the overall behavior representation vector of the u a priori labeling templates; obtaining the first generation value based on the non-prior labeling difference result and the a priori labeling difference result; obtaining the weakly guided learning error based on the first generation value includes: processing the first behavior representation vector of each of the w knowledge templates based on the classification component in the user portrait classification network to obtain the first prediction confidence coefficient that each of the w knowledge templates belongs to Q user consumption profiles, determining the second generation value based on the first prediction confidence coefficient of one or more knowledge templates among the w knowledge templates, wherein Q is a natural number not less than 2; determining the weakly guided learning error based on the first generation value and the second generation value.

[0010] In some embodiments, the determining of the prior label difference result based on the overall behavior characterization vector of the u prior label templates includes: for each of the u prior label templates, if among the u prior label templates, t prior label templates other than the prior label template have a third knowledge template with the same prior label as the prior label template, then determining the second difference result of the prior label template based on the overall behavior characterization vector of the prior label template and the overall behavior characterization vector of the third knowledge template, wherein t=u-1; based on one or more prior label templates The second difference result of the marked template is used to determine the prior marked difference result; the second generation value includes the first sub-generation value, and the second generation value is determined based on the first prediction confidence coefficient of one or more knowledge templates among the w knowledge templates, including: self-labeling training is performed on the first prediction confidence coefficient of each non-prior marked template of the s non-prior marked templates to obtain the first self-labeling label of each non-prior marked template of the s non-prior marked templates; the first sub-generation value is obtained based on the first self-labeling label of each non-prior marked template of the s non-prior marked templates and the first prediction confidence coefficient.

[0011] In some embodiments, the first child value is obtained based on the first self-labeled label of each non-prior label template of the s non-prior label templates and the first prediction confidence coefficient, including: determining the first user consumption portrait with the largest confidence coefficient in the first self-labeled label of the e-th non-prior label template; determining the prediction confidence coefficient corresponding to the first user consumption portrait in the first prediction confidence coefficient of the e-th non-prior label template as the influence coefficient of the e-th non-prior label template; determining the third difference result corresponding to the e-th non-prior label template based on the influence coefficient of the e-th non-prior label template, the first self-labeled label of the e-th non-prior label template and the first prediction confidence coefficient; The first child value is obtained according to the third difference result corresponding to each non-prior label template of the s non-prior label templates; wherein, the third difference result corresponding to the e-th non-prior label template is determined based on the influence coefficient of the e-th non-prior label template, the first self-labeled label of the e-th non-prior label template and the first prediction confidence coefficient, including: performing an inner product calculation on the first self-labeled label of the e-th non-prior label template and the first prediction confidence coefficient to obtain a second calculation result; performing a logarithmic solution on the second calculation result, and multiplying the result of the logarithmic solution by the influence coefficient of the e-th non-prior label template to obtain the third difference result corresponding to the e-th non-prior label template.

[0012] In some embodiments, the second generation value includes a second sub-generation value, and the second generation value is determined based on the first prediction confidence coefficient of one or more knowledge templates among the w knowledge templates, including: determining the second sub-generation value based on the first prediction confidence coefficient and the prior label of each prior label template of the u prior label templates; the second generation value also includes a third sub-generation value, and the second generation value is determined based on the first prediction confidence coefficient of one or more knowledge templates among the w knowledge templates, including: determining the mean prediction confidence coefficient of the w knowledge templates based on the first prediction confidence coefficient of each knowledge template of the w knowledge templates; determining the KL difference between the first prediction confidence coefficient of the knowledge template and the mean prediction confidence coefficient for each knowledge template among the w knowledge templates; determining the third sub-generation value based on the KL difference corresponding to each knowledge template of the w knowledge templates.

[0013] In some embodiments, before the behavior vector extraction component based on the user portrait classification network extracts the first behavior representation vector of each of the w knowledge templates, the method also includes: pre-tuning the user portrait classification network based on the u prior labeled templates; the behavior vector extraction component based on the user portrait classification network extracts the first behavior representation vector of each of the w knowledge templates, including: extracting the first behavior representation vector of each of the w knowledge templates based on the behavior vector extraction component in the user portrait classification network after pre-tuning; after tuning the user portrait classification network according to the weakly guided learning error, the method also includes: clustering the s non-prior labeled templates to obtain a second self-labeled label for each of the s non-prior labeled templates; fine-tuning the user portrait classification network trained according to the weakly guided learning error based on the u prior labeled templates, the s non-prior labeled templates and the second self-labeled label.

[0014] On the other hand, the present application provides a computer system, including a memory and a processor, wherein the memory stores a computer program executable on the processor, and the processor implements the steps in the above method when executing the program.

[0015] The beneficial effects of the present application include at least: when tuning the user portrait classification network, the present application extracts the first behavior representation vector of each of the w knowledge templates based on the w knowledge templates included in the current batch of debugging samples and the behavior vector extraction component in the user portrait classification network, and the w knowledge templates include u prior labeling templates and s non-prior labeling templates; extracts local and overall behavior vectors from the first behavior representation vector of each knowledge template respectively to obtain a local behavior representation vector and an overall behavior representation vector of each knowledge template; for the eth non-prior labeling template among the s non-prior labeling templates, extracts the local behavior representation vector of each knowledge template according to the local behavior representation vector of each knowledge template and the overall behavior representation vector, determine the first knowledge template with the largest local matching coefficient with the e-th non-prior label template and the second knowledge template with the largest overall matching coefficient with the e-th non-prior label template among the v knowledge templates; select G first non-prior label templates from the s non-prior label templates, determine the weak guidance learning error of the user portrait classification network based on the overall behavior representation vectors of the G first non-prior label templates and the overall behavior representation vectors of the corresponding second knowledge templates, and tune the user portrait classification network based on the weak guidance learning error, and the first non-prior label template is the same non-prior label template as the corresponding first knowledge template and the corresponding second knowledge template. Based on this, the user portrait classification network is weakly supervised by similarity learning using open set knowledge templates, which not only enables the user portrait classification network to perform high-quality training on known user consumption portraits, but also enables the user portrait classification network to perform high-quality training on new user consumption portraits, so as to ensure the classification accuracy of the user portrait classification network for multiple user consumption portraits and expand the classification granularity of user consumption portraits of the user portrait classification network. At the same time, the knowledge template of the embodiment of the present application is the consumer behavior data corresponding to different behavior types, which increases the log classification granularity of the user portrait classification network to increase the classification quality of the user portrait classification network, help increase the conversion rate of targeted operations based on user portraits, improve user experience, and improve customer acquisition resources and customer acquisition quality. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present application and are used together with the specification to illustrate the technical solution of the present application.

[0017] Figure 1 A schematic diagram of the implementation flow of a user portrait classification method based on behavioral data analysis provided in an embodiment of the present application.

[0018] Figure 2 A hardware entity schematic diagram of a computer system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0019] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application is further elaborated in detail below in conjunction with the accompanying drawings and embodiments. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in this field without making creative work belong to the scope of protection of the present application. In the following description, "some embodiments" are involved, which describe a subset of all possible embodiments, but it can be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments, and can be combined with each other without conflict. The terms "first / second / third" involved are only used to distinguish similar objects and do not represent a specific order for the objects. It can be understood that "first / second / third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described here can be implemented in an order other than that illustrated or described here.

[0020] The embodiment of the present application provides a user portrait classification method based on behavior data analysis, which can be executed by a processor of a computer system, wherein the computer system can refer to a device with data processing capabilities such as a server, a laptop, a tablet computer, and a desktop computer.

[0021] Figure 1 A schematic diagram of the implementation process of a user portrait classification method based on behavior data analysis provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the method includes:

[0022] Step S10: Obtain the consumption behavior record log to be analyzed.

[0023] In step S10, the computer system collects and organizes all the user's interaction data on the platform from a huge database. These data comprehensively record the user's online behavior trajectory and provide basic materials for subsequent user portrait construction and behavior data analysis. For example, a user's activities on a comprehensive e-commerce website: after logging into the website, he first browsed the smartphone section and compared the specifications and prices of several newly released mobile phones. Then he entered the home furnishings section and checked the smart sweeping robot. Finally, he stopped in the book area, carefully read the introductions of several programming books and bought one. This series of behaviors, including browsing time, clicked products, search keywords, purchase decisions, etc., will be recorded in detail by the platform's backend system, forming a specific record of consumer behavior.

[0024] The computer system uses the log collection module to periodically or in real time capture this information from server logs, database transaction records, web page click streams and other sources to ensure the freshness and integrity of the data. These raw data may be unstructured or semi-structured, including but not limited to timestamps, user IDs, product IDs, operation types (such as clicks, add-to-cart, purchases), search keywords, etc. The computer system uses data cleaning and preprocessing techniques, such as removing duplicate records, filling missing values, and standardizing time formats, to convert these raw logs into structured data formats for subsequent processing.

[0025] For example, after being processed, a series of user behaviors may be converted into a series of record entries, each of which contains: timestamp: 2024-05-08 10:15:30; / User ID: LIM001; / Operation type: browsing; / Product category: smartphone; / Specific product ID: SPH007.

[0026] Such data conversion not only makes the original behavior data orderly and easy to manage, but also lays a solid data foundation for the extraction of behavior vectors based on the user portrait classification network in the next step S20. In this way, the computer system can efficiently extract valuable information from massive user activities, further analyze user preferences and behavior patterns, and provide data support for personalized recommendations, market strategy formulation, etc.

[0027] Consumption behavior logs can be collected in a variety of ways. The following is a detailed description of the data collection methods and the structure of consumption behavior logs:

[0028] For data collection methods:

[0029] 1. Collecting data through server logs: This is one of the most basic ways to collect data. Whenever a user interacts with a website or application, such as clicking, browsing, searching, or trading, the server will automatically generate a log file to record the timestamp of these activities, user identifiers, requested URLs, response status codes, and other information. These logs are collected regularly through automated scripts or log management systems (such as Logstash and Fluentd), and then transmitted to central storage or big data platforms for analysis.

[0030] 2. Collect data through client SDK: In order to obtain more detailed user behavior data, developers will integrate data collection SDK (such as Firebase, Mixpanel) in the application. SDK can capture richer user interface interaction details, such as sliding, dwell time, click location, etc., and encrypt these data and send them to the server.

[0031] 3. Collecting through event tracking and tracking: This is an active data collection method. Developers need to set up code snippets (tracking) in key user paths (such as button clicks, page views, form submissions) in advance. When these events are triggered, specific behavioral data will be recorded, such as event name, user attributes, context information, etc. This can be full tracking (automatically recording all predefined events) or visual tracking (configuring collection rules through the interface).

[0032] 4. Integrated collection through API interface: For third-party services or platforms, merchants can import transaction data, user reviews, customer service records, etc. into their own data analysis systems through API interfaces to supplement and improve consumer behavior logs.

[0033] As a typical consumption behavior record log, it contains the following core fields, which organize the data in a structured way to facilitate query and analysis:

[0034] 1. Timestamp: records the specific time when an event occurs, such as 2024-05-09T10:30:45Z, to ensure the temporal nature of the data.

[0035] 2. User ID: uniquely identifies the user, which can be an email address, mobile phone number, or an internally generated unique number, such as U123456.

[0036] 3. Event type: describes the specific behavior that occurred, such as page_view (page view), click (click), purchase (purchase), add_to_cart (add to shopping cart), etc.

[0037] 4. Product / page ID: The product or page ID related to the event, such as P7890 for a certain product.

[0038] 5. Attribute information: additional contextual data, such as user geographic location, device type, browser information, search keywords, user behavior sequence, etc. For example, {"location":"New York","device":"iPhone 13","search_term":"summer dresses"}.

[0039] 6. Transaction details (for purchase events): including order amount, payment method, promotional information, purchase quantity, etc.

[0040] For example:

[0041] {"amount":99.99,"payment_method":"CreditCard","promotion_code":"SUMMER20"}.

[0042] Through these structured log records, companies can deeply analyze user preferences, purchasing habits, conversion funnels, etc., and then optimize key links such as product design, personalized recommendations, and marketing strategies.

[0043] Step S20: extracting the behavior representation vector of the consumption behavior record log based on the behavior vector extraction component in the user portrait classification network.

[0044] The behavior vector extraction component uses natural language processing (NLP), machine learning algorithms, and even deep learning models (such as recurrent neural networks (RNNs) or long short-term memory networks (LSTMs)) to process unstructured log data. For example, the LSTM model can effectively capture the time series characteristics of user behavior and understand the changing trends of user interests over time.

[0045] For example, suppose the system collects the user's behavior records in the past month, including browsing 10 pieces of information about outdoor sports equipment, searching for "hiking shoes" 3 times, adding 2 pairs of sports shoes of different brands to the shopping cart, and finally buying a pair. The computer system will encode these behaviors into feature vectors, such as: [0, 10, 3, 2, 1, 0, ..., 0], where each element of the vector corresponds to a specific behavior category count or feature marker, such as "number of views of outdoor sports equipment", "number of searches for hiking shoes", etc. This encoding method makes complex behavior patterns quantifiable and computable.

[0046] Step S30: Based on the behavior characterization vector, determine the prediction confidence coefficient that the consumption behavior record log belongs to Q user consumption portraits, where Q is a natural number not less than 2.

[0047] Specifically, assume that the system maintains multiple user consumption portraits such as "technology enthusiasts", "healthy life pursuers", "housewives", etc. Behind each portrait is a set of feature vectors representing the typical behavior habits of the group. For example, the feature vector of "technology enthusiasts" may include elements such as [high frequency of browsing electronic products, preference for the latest technology information subscription, high proportion of smart device purchases].

[0048] In order to determine the user profile and confidence level of a consumption record log, the computer system will use advanced machine learning techniques, such as support vector machines (SVM) or probabilistic graphical models such as hidden Markov models (HMM), or even more complex deep learning architectures, such as variational autoencoders (VAE) combined with conditional random fields (CRF). Taking variational autoencoders as an example, it first maps the behavior representation vector to a low-dimensional latent space, and then calculates the distance or similarity between the log and each profile based on the center or distribution of each user profile in this space. This process can be regarded as a probability estimate for classifying the log, that is, the prediction confidence coefficient. For example, when the computer system receives a consumption record about purchasing the latest smart watch, it will compare the behavior vector of this record, such as [browsing smart wearable devices 3 times, searching for a specific brand of smart watches 2 times, and purchasing a smart device 1 time], with the preset user profile feature vector. After the above algorithm model operation, the system finds that the record has the highest match with the "technology enthusiast" profile, and the prediction confidence coefficient reaches 0.92, which means that the system is very confident that this consumption record belongs to the user group of "technology enthusiasts". In the embodiment of the present application, the user portrait classification network is obtained by tuning the weakly guided learning error, where weakly guided learning is semi-supervised learning, and the weakly guided learning error is the corresponding loss, which is determined based on the overall behavior characterization vectors of the G first non-prior labeled templates among the s non-prior labeled templates and the overall behavior characterization vector of the corresponding second knowledge template. The prior labeled template is a training sample that carries a label, and the non-prior labeled template is a knowledge template that has no prior label. The knowledge template is a training sample used to train the user portrait classification network.

[0049] The first non-a priori label template is a non-a priori label template that is the same as the corresponding first knowledge template and the corresponding second knowledge template. For the e-th non-a priori label template among the s non-a priori label templates, the first knowledge template is the knowledge template with the largest local matching coefficient (matching coefficient is the parameter for evaluating similarity) with the e-th non-a priori label template among the v knowledge templates except the e-th non-a priori label template among the w knowledge templates, and the second knowledge template is the knowledge template with the largest overall matching coefficient with the e-th non-a priori label template among the v knowledge templates. The overall behavior representation vector and the local behavior representation vector are obtained by extracting the local and overall behavior vectors of the first behavior representation vector of the knowledge template respectively. The first behavior representation vector is obtained by extracting the behavior vector of the w knowledge templates included in the current batch of debugging samples by the behavior vector extraction component in the user portrait classification network. The w knowledge templates include u a priori label templates and s non-a priori label templates, where u and s are both natural numbers greater than 0, u+s=w, v=w-1.

[0050] The following is the specific training process of the user portrait classification network, which includes the following steps:

[0051] Step S1: Obtain w knowledge templates included in the current batch of debugging samples, and extract the first behavior representation vector of each of the w knowledge templates based on the behavior vector extraction component in the user portrait classification network.

[0052] In step S1, the main task of the computer system is to prepare data for subsequent user profile classification network training. First, the computer system obtains a batch of debugging samples from a large data set, which are called "knowledge templates" or training samples. Each knowledge template represents a specific data instance and may contain various information about the user, such as browsing history, purchase history, search behavior, etc. In the user profile analysis of the e-commerce platform, a knowledge template can be regarded as a collection of shopping behavior data of a user, reflecting the user's shopping preferences, consumption habits, etc. Next, the computer system uses the behavior vector extraction component in the user profile classification network to extract features from each knowledge template. This component is essentially a network layer that can identify and extract key information from the data, and its function is similar to the feature extractor in machine learning. In this process, the original user data (such as text, images or structured data) is converted into a mathematical vector form, which is called the "first behavior representation vector". These vectors capture the key features of user behavior and are the basis for subsequent classification and prediction. Taking the e-commerce platform as an example, assume that a knowledge template contains a user's browsing and purchase records. The behavior vector extraction component extracts key information from this data, such as the categories of goods browsed by users, purchase frequency, price sensitivity, etc., and encodes this information into the first behavior representation vector. This vector may be a multidimensional array, with each dimension representing a different feature. For example, one dimension in the vector may represent the frequency of users browsing electronic products, and another dimension may represent the user's willingness to buy high-priced goods.

[0053] As an implementation mode, in step S1, before extracting the first behavior representation vector of each of the w knowledge templates based on the behavior vector extraction component in the user portrait classification network, the method also includes: step S1a: pre-tuning the user portrait classification network based on the u prior labeled templates.

[0054] Then, based on this, the step S1, based on the behavior vector extraction component in the user portrait classification network, extracts the first behavior representation vector of each of the w knowledge templates, including: step S11: based on the behavior vector extraction component in the user portrait classification network after pre-tuning, extracts the first behavior representation vector of each of the w knowledge templates.

[0055] In this implementation, in the training phase of the user portrait classification network, in order to improve the training efficiency and accuracy, a pre-tuning step can be introduced before the formal training. Pre-tuning is pre-training. Specifically, in step S1a, the computer system uses the existing prior labeling templates (i.e., those samples that already have clear classification labels) to pre-train the user portrait classification network, so that the network learns some basic knowledge before formal training. Through this process, the network can initially master how to extract useful features from the data and have a certain ability to distinguish different categories of data. Taking the e-commerce platform as an example, the prior labeling template may include a batch of user behavior data that has been clearly labeled with user shopping preferences, consumption habits and other information. The computer system will use these data to perform preliminary training on the user portrait classification network so that the network can learn some basic shopping behavior characteristics and classification rules.

[0056] After the pre-tuning is completed, in step S11, the computer system extracts features from all knowledge templates (including prior labeled templates and non-prior labeled templates) based on the behavior vector extraction component in the pre-tuned user profile classification network, that is, extracts the first behavior representation vector of each knowledge template. Since the user profile classification network has been pre-tuned, in this step, the user profile classification network can more accurately capture the key features in the data, providing stronger support for subsequent classification and prediction.

[0057] This implementation introduces a pre-tuning step so that the user portrait classification network can learn some basic knowledge and classification rules before formal training, thereby improving the efficiency and accuracy of training.

[0058] Step S2: extracting local and overall behavior vectors from the first behavior representation vector of each knowledge template respectively, to obtain a local behavior representation vector and an overall behavior representation vector of each knowledge template.

[0059] In step S2, the computer system performs a deeper feature extraction on the first behavior representation vector of each knowledge template to distinguish local and overall behavior features. This step is crucial for the training of the user portrait classification network, which helps the network understand various aspects of user behavior in more detail.

[0060] Specifically, the computer system further processes the first behavior representation vector extracted in the previous step. The local behavior vector extraction mentioned here can be regarded as feature extraction of a specific aspect of user behavior, such as the user's shopping behavior in a certain period of time, preference for a certain type of goods, etc. The overall behavior vector extraction is to summarize the user's overall behavior pattern, such as the user's long-term shopping habits, consumption level, etc. In order to achieve this step, the computer system can use a specific feature extraction module (such as pooling operator, pooling, that is, a downsampling network layer) to perform feature extraction. For example, local behavior vector extraction can use a 3×3 pooling operator, which can focus on smaller areas in the vector, thereby capturing local features of user behavior. The overall behavior vector extraction can use a 1×1 pooling operator, which performs a global pooling operation on the entire vector to extract the overall behavior features of the user.

[0061] Taking the e-commerce platform as an example, suppose a knowledge template represents a user's shopping record. When extracting local behavior vectors, the computer system can focus on the user's shopping behavior during a promotional event, or the purchase history of a certain type of goods (such as electronic products). These local features can reflect the user's behavioral preferences in a specific situation. The overall behavior vector extraction will consider the user's long-term shopping habits, such as purchase frequency, average consumption amount, etc., to fully understand the user's consumption behavior and purchasing power.

[0062] These pooling operators are pre-trained and will not change during subsequent tuning, which means they have learned how to effectively extract features from vectors. In this way, step S2 can generate a more refined representation of user behavior, providing a more accurate data basis for subsequent classification and prediction.

[0063] Step S3: For the e-th non-prior labeled template among the s non-prior labeled templates, based on the local behavior characterization vector and the overall behavior characterization vector, among the w knowledge templates, among the v knowledge templates except the e-th non-prior labeled template, determine the first knowledge template with the largest local matching coefficient with the e-th non-prior labeled template, and the second knowledge template with the largest overall matching coefficient with the e-th non-prior labeled template.

[0064] In step S3, the computer system processes the non-a priori labeled template (i.e., unlabeled training sample) to find the most similar labeled training sample, thereby providing a reference for subsequent classification or annotation. This step associates unlabeled data with labeled data in the training of the user portrait classification network, thereby expanding the training data set and improving the accuracy of classification.

[0065] Specifically, for each non-a priori labeled template, the computer system searches for the two most matching labeled templates among all knowledge templates based on its local behavior representation vector and overall behavior representation vector: one is the first knowledge template with the largest local matching coefficient (i.e., local similarity), and the other is the second knowledge template with the largest overall matching coefficient.

[0066] Computer systems can use metrics such as cosine similarity, Euclidean distance, etc. to calculate the similarity between vectors. For example, both the local behavior representation vector and the overall behavior representation vector can be regarded as points in a high-dimensional space, and the similarity between them can be determined by calculating the distance or angle between these points.

[0067] In this way, step S3 can help the computer system establish the connection between the non-priori labeled template and the labeled knowledge template, providing strong support for subsequent classification and prediction. At the same time, this method also helps to discover potential patterns and associations in the data set, thereby further improving the performance and accuracy of the user portrait classification network.

[0068] As an implementation mode, in the step S3, based on the local behavior characterization vector and the overall behavior characterization vector, determining the first knowledge template having the largest local matching coefficient with the e-th non-a priori labeled template and the second knowledge template having the largest overall matching coefficient with the e-th non-a priori labeled template from the v knowledge templates except the e-th non-a priori labeled template among the w knowledge templates may specifically include:

[0069] Step S31: Determine the local matching coefficient between each two knowledge templates according to the local behavior characterization vector of each two knowledge templates among the w knowledge templates, and determine the overall matching coefficient between each two knowledge templates according to the overall behavior characterization vector of each two knowledge templates.

[0070] In step S31, the computer system performs similarity calculations on the given w knowledge templates. The purpose of this step is to quantify the similarity between each two knowledge templates and provide a basis for the subsequent determination of the knowledge template that best matches the non-prior labeled template. Specifically, the computer system first focuses on the local behavior representation vector of each knowledge template. These vectors capture the characteristics of specific aspects of the knowledge template and may represent a specific behavior or attribute. The computer system calculates the similarity of the local behavior representation vectors between each two knowledge templates to determine the degree of match between them in certain specific behaviors or characteristics and obtain a local matching coefficient. Taking the e-commerce platform as an example, the local behavior representation vector may represent the user's purchasing behavior in a specific commodity category (such as electronic products). By comparing the purchasing behavior of different users (i.e., different knowledge templates) in the same commodity category, the system can calculate the similarity of these users in this behavior.

[0071] In addition to local similarity, the computer system also calculates the similarity between the overall behavior representation vectors, that is, the overall matching coefficient or global similarity. The overall behavior representation vector reflects the overall characteristics or behavior pattern of the knowledge template. By calculating the similarity of these vectors, the system can evaluate the similarity between two knowledge templates at the global or overall level.

[0072] In the example of an e-commerce platform, the overall behavior representation vector may represent the user's overall shopping habits, including shopping frequency, consumption amount, types of goods purchased, etc. By comparing these overall behavior characteristics, the system can evaluate the similarity of overall shopping behaviors between different users.

[0073] To achieve this step, the computer system can use metrics such as cosine similarity, Pearson correlation coefficient, Euclidean distance metric, etc. to calculate the similarity between vectors. These methods can effectively quantify the similarity between vectors, thereby providing accurate data support for subsequent classification and prediction.

[0074] Step S32: According to the local matching coefficient between the e-th non-a priori label template and each of the v knowledge templates, determine the first knowledge template with the largest local matching coefficient with the e-th non-a priori label template among the v knowledge templates;

[0075] Step S33: Based on the overall matching coefficient between the e-th non-a priori label template and each of the v knowledge templates, determine the second knowledge template with the largest overall matching coefficient with the e-th non-a priori label template among the v knowledge templates.

[0076] In steps S32 and S33, the computer system determines two knowledge templates that are most similar to the non-prior labeled template through comparison and calculation, one based on the similarity of local behavior (step S32) and the other based on the similarity of overall behavior (step S33).

[0077] Step S32 focuses on the similarity of local behaviors. In this step, the computer system first calculates the local matching coefficient between the e-th non-a priori label template and each of the v knowledge templates. This coefficient reflects the similarity between the two in specific behaviors or features. Step S33 focuses on the similarity of overall behaviors. The computer system calculates the overall matching coefficient between the e-th non-a priori label template and each of the v knowledge templates. This coefficient reflects the similarity between the two in overall behaviors or features.

[0078] The output of these two steps is the two most similar knowledge templates: one is most similar to the non-prior labeled template in local behavior, and the other is most similar in overall behavior. This information is crucial for subsequent tasks such as classification, recommendation, or prediction, because they provide reference templates that are closest to the new user's behavior, thereby helping the system understand and serve new users more accurately.

[0079] As an implementation manner, in the step S31, determining the local matching coefficient between each two knowledge templates according to the local behavior representation vectors of each two knowledge templates in the w knowledge templates may specifically include:

[0080] Step S311: For the f-th knowledge template and the a-th knowledge template among the w knowledge templates, determine the local significance influence coefficient of the f-th knowledge template based on the local behavior characterization vector of the f-th knowledge template, and determine the local significance influence coefficient of the a-th knowledge template based on the local behavior characterization vector of the a-th knowledge template, wherein 0<f<w; 0<a≤w.

[0081] In step S311, the key to the computer system processing is to determine the local significance influence coefficient of each knowledge template, also known as the attention weight. This influence coefficient reflects the importance of local behavior in the knowledge template and is crucial for the subsequent similarity calculation and matching process.

[0082] Taking the analysis of user behavior data on an e-commerce platform as an example, assuming that there are w users' behavior data as knowledge templates, each user's behavior data is converted into a local behavior representation vector. These vectors may contain information such as the number of views, purchases, and purchase amounts of users in different product categories. Now, the computer system needs to process each pair of users (i.e., the f-th knowledge template and the a-th knowledge template). For the f-th user, the computer system calculates a local significant influence coefficient based on each eigenvalue in its local behavior representation vector (such as the number of views of the electronic product category, the number of purchases of the clothing category, etc.). The local significant influence coefficient is used to quantify the importance or significance of the user in a specific local behavior. The specific calculation method is not limited. For example, it can be calculated by a softmax function, or by calculating the second-order norm of the corresponding local behavior representation vector, or by calculating based on the attention mechanism (query, key, value).

[0083] Similarly, for the ath user, the computer system also performs the same operation to determine its local significance influence coefficient. These coefficients will be used in the subsequent local matching coefficient calculation to ensure that the importance differences of different local behaviors can be taken into account when comparing the similarity of two user behaviors.

[0084] For example, if the fth user browses and purchases electronic products frequently, the corresponding local significant impact coefficient will be relatively high. This means that when calculating the local matching coefficient with the ath user later, the behavior data of the electronic products category will have a greater weight.

[0085] In this way, step S311 helps the computer system to more accurately evaluate the similarity between each two knowledge templates in specific local behaviors, thereby improving the accuracy and efficiency of subsequent tasks such as classification, recommendation or prediction.

[0086] Step S312: Determine the local matching coefficient between the fth knowledge template and the ath knowledge template based on the local behavior representation vector and the local significance influence coefficient of the fth knowledge template, and the local behavior representation vector and the local significance influence coefficient of the ath knowledge template.

[0087] In step S312, the computer system uses the previously calculated local behavior representation vector and the local significant influence coefficient to determine the local matching coefficient between the two knowledge templates. The local matching coefficient reflects the similarity between the two templates in a specific local behavior. For example, the computer system can use a similarity calculation method, such as dot product, cosine similarity or Pearson correlation coefficient, to quantify the similarity between the local behavior representation vectors of the two users. At the same time, the computer system takes into account the local significant influence coefficient to ensure that important local behaviors are given greater weight in the similarity calculation.

[0088] As an example, the local significant influence coefficients corresponding to the f-th knowledge template and the a-th knowledge template can be used as weights, and the corresponding local behavior representation vectors can be weighted to obtain the spatial similarity between the weighted local behavior representation vector of the f-th knowledge template and the local behavior representation vector of the a-th knowledge template, such as cosine similarity, and the calculation result is used as the local matching coefficient between the f-th knowledge template and the a-th knowledge template.

[0089] Step S4: Select G first non-prior labeled templates from the s non-prior labeled templates, determine the weakly guided learning error of the user portrait classification network based on the overall behavior characterization vectors of the G first non-prior labeled templates and the overall behavior characterization vectors of the corresponding second knowledge templates, and tune the user portrait classification network based on the weakly guided learning error, wherein the first non-prior labeled template is a non-prior labeled template that is the same as the corresponding first knowledge template and the corresponding second knowledge template.

[0090] In step S4, the computer system selects G first non-a priori labeled templates from the s non-a priori labeled templates. These non-a priori labeled templates are training samples without clear labels, but in this step, the computer system specifically selects those samples whose corresponding first knowledge template (determined based on the local matching coefficient) and second knowledge template (determined based on the overall matching coefficient) are the same. In simple terms, it selects those user samples that are highly similar to a known template in terms of overall behavior or local behavior.

[0091] Next, the computer system uses the overall behavior representation vectors of the G first non-prior labeled templates and the overall behavior representation vectors of their corresponding second knowledge templates to determine the weakly guided learning error of the user portrait classification network, that is, the error generated by the network during the semi-supervised process. This error reflects the accuracy of the network in predicting these similar user behaviors.

[0092] Specifically, the computer system compares the network's predictions for these non-prior labeled templates with their actual corresponding second knowledge templates, and calculates the difference between the two as an error. The smaller this error is, the stronger the network's prediction ability is, that is, it can more accurately identify users with similar behaviors.

[0093] Finally, the computer system tunes the user profile classification network based on this weakly guided learning error. The tuning process may include adjusting the network's weights and parameters to improve the network's ability to identify similar user behaviors. Through continuous iteration and optimization, the network will gradually learn to more accurately predict the user's user profile classification based on the user's overall behavior representation vector.

[0094] The core of step S4 is to optimize the user portrait classification network by using non-prior labeled templates that are highly similar to known templates, so that it can more accurately identify user groups with similar behaviors. This optimization method improves network performance while also enhancing the network's ability to adapt to new users.

[0095] As an implementation manner, in step S4, determining the weakly guided learning error of the user portrait classification network based on the overall behavior representation vectors of the G first non-prior labeled templates and the overall behavior representation vectors of the corresponding second knowledge templates may specifically include:

[0096] Step S41: For each of the G first non-a priori label templates, determine the first difference result of the first non-a priori label template based on the overall behavior characterization vector of the first non-a priori label template and the overall behavior characterization vector of the second knowledge template corresponding to the first non-a priori label template.

[0097] In step S41, the computer system processes each of the G first non-a priori label templates. These non-a priori label templates represent data that have not been clearly classified or labeled, but are similar to existing knowledge templates in some aspects. Specifically, for each first non-a priori label template, the computer system first extracts its overall behavior characterization vector. Similarly, the overall behavior characterization vector of the second knowledge template corresponding to the first non-a priori label template is obtained. Next, the computer system compares the two overall behavior characterization vectors to determine the difference between them. This difference, that is, the first difference result, also called the error, can be calculated in a variety of ways, such as calculating the Euclidean distance, cosine similarity, logarithmic operation result of the inner product between the two vectors as the first difference result. The first difference result reflects the degree of similarity between the first non-a priori label template and its corresponding second knowledge template in overall behavior; the smaller the first difference result, the closer the behavior of the two is.

[0098] Step S42: Determine a first generation value according to a first difference result corresponding to each of the G first non-a priori label templates.

[0099] In step S42, the computer system determines an overall cost value according to the first difference result corresponding to each of the G first non-a priori marked templates calculated in the previous step S41, and this cost value is the first cost value.

[0100] Specifically, the computer system summarizes and analyzes all the first difference results, such as averaging, weighted averaging, summing or other forms of mathematical operations on these difference results to obtain an overall error metric to reflect the overall performance of the user portrait classification network in predicting these non-a priori labeled templates.

[0101] The first generation value is a comprehensive indicator that helps the computer system understand the overall accuracy of the user profile classification network in predicting new user behavior. If this generation value is high, it means that the network has a large error in predicting new user behavior, and it is necessary to further optimize the network parameters or adjust the model structure to improve the prediction accuracy. In this way, step S42 provides a quantitative evaluation indicator for the computer system to measure the performance of the user profile classification network when processing unlabeled data, thereby providing a clear direction and goal for subsequent network tuning.

[0102] Step S43: Obtain the weakly guided learning error according to the first generation value.

[0103] For example, the first generation value is used as the weakly guided learning error, or the weakly guided learning error is determined in combination with other costs, without specific limitation.

[0104] As an implementation manner, the step S42, determining the first generation value according to the first difference result corresponding to each of the G first non-a priori labeling templates, may specifically include:

[0105] Step S421: determining a non-a priori marking difference result according to a first difference result corresponding to each first non-a priori marking template of the G first non-a priori marking templates;

[0106] Step S422: determining a priori marking difference result according to the overall behavior representation vector of the u priori marking templates;

[0107] Step S423: Obtain the first generation value according to the non-a priori label difference result and the a priori label difference result.

[0108] Based on the first difference result corresponding to each of the G first non-a priori mark templates obtained above, the non-a priori mark difference result is determined. For example, the sum of the first difference results corresponding to each of the G first non-a priori mark templates is used as the non-a priori mark difference result. Alternatively, the addition result of the first difference results corresponding to each of the G first non-a priori mark templates is divided by G to obtain the non-a priori mark difference result. In other words, the average value of the first difference results corresponding to each of the G first non-a priori mark templates is used as the non-a priori mark difference result. Alternatively, the addition value of the first difference results corresponding to each of the G first non-a priori mark templates is divided by s to obtain the non-a priori mark difference result.

[0109] In addition, the prior label difference result is determined based on the overall behavior characterization vectors of the u prior label templates. In one embodiment, the prior label difference result can be determined based on the same process as the above determination of the non-prior label difference result. For example, for each prior label template in the u prior label templates, among the w knowledge templates, except for the v knowledge templates of itself, the first knowledge template with the largest local matching coefficient and the second knowledge template with the largest overall matching coefficient are determined. If the first knowledge template is the same as the second knowledge template, a second difference result is determined based on the local behavior characterization vector of the prior label template and the overall behavior characterization vector of the second knowledge template corresponding to the prior label template. For example, the overall behavior characterization vector of the prior label template and the overall behavior characterization vector of the second knowledge template corresponding to the prior label template are inner-producted and then logarithmically solved to obtain the second difference result of the prior label template. In this way, the second difference result corresponding to each prior label template that has the same corresponding first knowledge template and corresponding second knowledge template in the u prior label templates can be determined, and then the prior label difference result is determined based on these second difference results. For example, the sum or mean of these second difference results is used as the priori labeled difference result.

[0110] The first generation value is obtained based on the non-a priori label difference result and the a priori label difference result, for example, by calculating the mean or sum of the two as the first generation value, which is not specifically limited.

[0111] As an implementation manner, the step S422, determining the priori marking difference result according to the overall behavior representation vector of the u priori marking templates, may specifically include:

[0112] Step S4221: For each of the u prior label templates, if among the u prior label templates, t prior label templates other than the prior label template have a third knowledge template with the same prior label as the prior label template, then according to the overall behavior representation vector of the prior label template and the overall behavior representation vector of the third knowledge template, determine the second difference result of the prior label template, wherein t=u-1;

[0113] Step S4222: Determine the priori marking difference result according to the second difference result of one or more priori marking templates.

[0114] For steps S4221~S4222 of the above-mentioned implementation, based on the a priori mark of the a priori mark template, one or more a priori mark templates are determined among u a priori mark templates, and the a priori mark difference result is determined according to the overall behavior characterization vector of the one or more a priori mark templates and the overall behavior characterization vector of the third knowledge template having the same a priori mark as the prior mark of each of the one or more a priori mark templates. For example, taking each a priori mark template among the u a priori mark templates as an example, among the t a priori mark templates other than the a priori mark template among the u a priori mark templates, the a priori mark template having the same a priori mark as the prior mark of the prior mark template is determined and recorded as the third knowledge template. Then, based on the overall behavior characterization vector of the prior mark template and the overall behavior characterization vector of the third knowledge template, the second difference result of the prior mark template is determined. The method for determining the second difference result of the prior mark template is not limited here. For example, the difference between the overall behavior characterization vector of the prior mark template and the overall behavior characterization vector of the third knowledge template corresponding to the prior mark template is taken as the second difference result corresponding to the prior mark template.

[0115] As an implementation scheme, the inner product calculation is performed on the overall behavior characterization vector of the prior marking template and the overall behavior characterization vector of the third knowledge template corresponding to the prior marking template to obtain a second calculation result; the second calculation result is logarithmically solved to obtain a second difference result corresponding to the prior marking template.

[0116] The calculation method of the second difference result may refer to the calculation method of the first difference result, that is, the Euclidean distance, cosine similarity, logarithm operation result of the inner product between the two vectors, etc. may be calculated as the second difference result.

[0117] In this way, the second difference results corresponding to one or more prior label templates with the same prior label can be determined among the u prior label templates, and then the prior label difference result is determined based on the one or more second difference results. For example, the sum of the second difference results corresponding to one or more prior label templates that meet the requirements among the u prior label templates is used as the prior label difference result.

[0118] Alternatively, the average of the second difference results corresponding to one or more priori marking templates that meet the requirements among the u priori marking templates is used as the priori marking difference result.

[0119] As an implementation manner, the step S43, obtaining the weakly guided learning error according to the first generation value, may specifically include:

[0120] Step S431: Based on the classification component in the user portrait classification network, the first behavior representation vector of each of the w knowledge templates is processed to obtain a first prediction confidence coefficient that each of the w knowledge templates belongs to Q user consumption profiles, and the second generation value is determined according to the first prediction confidence coefficient of one or more knowledge templates in the w knowledge templates, where Q is a natural number not less than 2;

[0121] Step S432: Determine the weakly guided learning error according to the first generation value and the second generation value.

[0122] In step S431, the computer system uses the classification component in the user portrait classification network, which is usually a well-trained machine learning model, such as logistic regression, support vector machine or fully connected neural network, to process the first behavior representation vector of each of the existing w knowledge templates. These knowledge templates represent different types and behavior characteristics of users, and each template has a corresponding first behavior representation vector. The first behavior representation vector is a mathematical description of user behavior, which contains multiple characteristics of user behavior, such as purchase frequency, browsing habits, search keywords, etc.

[0123] Take the e-commerce platform as an example. Assume that there are three typical user consumption profiles on the platform: high-frequency shoppers, luxury lovers, and price-sensitive consumers. The platform has collected a large amount of user behavior data and built multiple knowledge templates based on this data. The first behavior representation vector of each knowledge template may contain information such as the number of purchases made by the user in the past period of time, the average amount spent per purchase, and the categories of purchased goods.

[0124] The computer system inputs these first behavior representation vectors into the classification component, which analyzes these vectors and outputs the first prediction confidence coefficient of each knowledge template belonging to Q user consumption profiles. This confidence coefficient is a value between 0 and 1, indicating the degree of match between the knowledge template and a user consumption profile. For example, if the first prediction confidence coefficient of a knowledge template is 0.8 (corresponding to the "high-frequency shopper" profile), it means that there is an 80% probability that the template represents a high-frequency shopper.

[0125] Next, the computer system determines a second-generation value based on these first prediction confidence coefficients. This second-generation value is calculated by comprehensively considering the confidence coefficients of all knowledge templates, which may be obtained by weighted average, maximum, minimum or other mathematical operations. This value reflects the overall prediction performance of the classification component for all knowledge templates.

[0126] For example, if the first prediction confidence coefficients of all knowledge templates are high, it means that the classification component can well match these templates with the corresponding user consumption profiles, and the second-generation value will be relatively high. On the contrary, if many templates have low confidence coefficients, it means that the prediction performance of the classification component needs to be improved, and the second-generation value will be relatively low.

[0127] In step S432, the computer system uses the first-generation value and the second-generation value calculated in step S431 to determine the weakly guided learning error. This error reflects the performance difference between the user portrait classification network when predicting labeled data and unlabeled data. Specifically, the first-generation value represents the performance of the network in predicting unlabeled data (for example, the consumption behavior of new users), while the second-generation value represents the accuracy of the classification component (i.e., the classifier) ​​in predicting known labeled data (for example, the consumption behavior of existing user groups). By comparing these two values, the system can evaluate the performance difference between the classification network on unlabeled data and labeled data.

[0128] Taking the e-commerce platform as an example, assuming that the system has calculated the difference between the shopping behavior of new users (unlabeled data) and the known user group (labeled data) through the previous steps, and obtained the corresponding first-generation value and second-generation value. If the first-generation value is high and the second-generation value is low, it means that the classification network has poor performance in predicting the consumption behavior of new users, and there is a large gap with the prediction performance of the known user group.

[0129] By taking these two values ​​into account, the computer system can calculate the weakly guided learning error. This error is actually a performance indicator used to measure whether the classification network's prediction ability on unlabeled data and labeled data is consistent. If the weakly guided learning error is large, it means that the network's prediction performance on unlabeled data needs to be improved, and it is necessary to further optimize the network parameters or adjust the model structure.

[0130] To be more specific, assume that the first cost value is 0.8 (indicating the prediction performance on unlabeled data) and the second cost value is 0.95 (indicating the prediction performance on labeled data). The system can determine the weakly guided learning error by calculating the difference or ratio between the two. For example, a simple difference method can be used, where the weakly guided learning error is equal to the difference between the second cost value and the first cost value (0.95-0.8=0.15), or other more complex error calculation methods can be used.

[0131] By calculating the weakly guided learning error, the computer system can obtain feedback information, which helps to improve the network's predictive ability and adaptability.

[0132] In an embodiment of the present application, determining the second-generation value based on the first prediction confidence coefficient of one or more knowledge templates among the w knowledge templates includes one or more of the following: a first sub-generation value determined based on the first prediction confidence coefficient of each non-prior label template of the s non-prior label templates, a second sub-generation value determined based on the first prediction confidence coefficient of each prior label template of the u prior label templates, and a third sub-generation value determined based on the first prediction confidence coefficient of each knowledge template of the w knowledge templates.

[0133] As an implementation manner, the second generation value includes the first sub-generation value. In the step S431, determining the second generation value according to the first prediction confidence coefficient of one or more knowledge templates among the w knowledge templates may specifically include:

[0134] Step S4311: Perform self-labeling training on the first prediction confidence coefficient of each of the s non-a priori labeled templates to obtain a first self-labeling label of each of the s non-a priori labeled templates.

[0135] Step S4312: Obtain the first child value according to the first self-labeled label of each non-a priori label template of the s non-a priori label templates and the first prediction confidence coefficient.

[0136] In step S4311, the computer system processes s non-a priori labeled templates (i.e., data without pre-given labels). As mentioned above, non-a priori labeled templates refer to user data that is not clearly labeled in the user portrait classification task. Although these data lack real labels, the computer system can use the classification component (i.e., classifier) ​​to generate first prediction confidence coefficients for these data, which reflect the possibility that the data belongs to each category.

[0137] Take the e-commerce platform as an example. Assume that the platform collects a large number of users' shopping records, but not all records are clearly labeled with the user's consumption profile (such as "price-sensitive consumers", "high-end brand pursuers", etc.). These unlabeled data are non-a priori labeled templates. The computer system will use the trained classification components (such as logistic regression models, support vector machines or neural networks, etc.) to process these unlabeled data and output the first prediction confidence coefficient of each user belonging to different consumption profiles.

[0138] Next, the computer system performs self-labeling training on these first prediction confidence coefficients, also known as pseudo-label learning. Specifically, the computer system assigns a most likely consumer portrait as a pseudo-label to each user data based on the first prediction confidence coefficient. For example, if the confidence of price-sensitive consumers is the highest in the first prediction confidence coefficient of a certain user data, then the computer system will label the user data as a price-sensitive consumer. This process is automatic and does not require human participation, so it is called self-labeling or pseudo-label learning. In this way, the computer system can make full use of unlabeled data and provide more training samples for subsequent classification tasks, thereby improving the accuracy of classification. It should be noted that these pseudo-labels are not real labels, but are generated based on the prediction results of the classification component, so there may be certain errors.

[0139] For the prior labeled templates among the w knowledge templates, the prediction confidence coefficient is supervised according to the prior label of the prior labeled template. On the other hand, for the non-prior labeled template, the user consumption portrait with the largest prediction confidence coefficient is generally used to tune the network. However, for the non-prior labeled templates of difficult samples, in the classification results of the classification component, the results with slightly later prediction confidence coefficients may also have a larger confidence coefficient that can correctly point to the corresponding classification. At this time, if the largest prediction confidence coefficient is selected indiscriminately, it is easy to bring disturbance information, and the result utilization ability is poor. Based on this, the embodiment of the present application provides supervision to the non-prior labeled template based on the adaptive self-labeling label allocation of the confidence coefficient. That is, the first prediction confidence coefficient of each non-prior labeled template of the s non-prior labeled templates is self-labeled and trained to obtain the first self-labeling label of each non-prior labeled template of the s non-prior labeled templates.

[0140] Specifically, the process of performing self-labeling training on the first prediction confidence coefficient of each non-prior label template of the s non-prior label templates and obtaining the first self-labeling label of each non-prior label template of the s non-prior label templates can be any feasible method. For example, as an implementation scheme, based on Concrete Distribution, self-labeling training is performed on the first prediction confidence coefficient of each non-prior label template of the s non-prior label templates to obtain the first self-labeling label of each non-prior label template of the s non-prior label templates. According to the above steps, after determining the first self-labeling label of each non-prior label template of the s non-prior label templates, the first offspring value is obtained based on the first self-labeling label and the first prediction confidence coefficient of each non-prior label template of the s non-prior label templates.

[0141] The embodiment of the present application does not limit the process of obtaining the first child value based on the first self-labeled label and the first prediction confidence coefficient of each non-a priori label template of the s non-a priori label templates.

[0142] As an implementation scheme, a cross entropy cost value is calculated as a first sub-cost value according to a first self-labeled label and a first prediction confidence coefficient of each non-prior label template of the s non-prior label templates.

[0143] As an implementation manner, the step S4312, obtaining the first child value according to the first self-labeled label of each non-a priori label template of the s non-a priori label templates and the first prediction confidence coefficient, may specifically include:

[0144] Step S43121: Determine the first user consumption profile with the largest confidence coefficient in the first self-labeled mark of the e-th non-a priori mark template;

[0145] Step S43122: Determine the prediction confidence coefficient corresponding to the first user consumption profile in the first prediction confidence coefficient of the e-th non-a priori marking template as the influence coefficient of the e-th non-a priori marking template;

[0146] Step S43123: determining a third difference result corresponding to the e-th non-a priori labeled template according to the influence coefficient of the e-th non-a priori labeled template, the first self-labeled label of the e-th non-a priori labeled template, and the first prediction confidence coefficient;

[0147] Step S43124: Obtain the first child value according to the third difference result corresponding to each of the s non-a priori labeled templates.

[0148] Specifically, in order to alleviate the negative impact caused by the perturbed knowledge template, the non-prior labeled template is supervised based on the confidence coefficient as the weight. Specifically, for the e-th non-prior labeled template among the s non-prior labeled templates, because the first self-labeled mark of the e-th non-prior labeled template is also the confidence coefficient of the knowledge template belonging to each of the Q user consumption portraits. Then, in the first self-labeled mark of the e-th non-prior labeled template, the user consumption portrait with the largest confidence coefficient can be determined as the first user consumption portrait. For example, the first self-labeled mark of the e-th non-prior labeled template is: the confidence coefficient of user consumption portrait A is 0.9, the confidence coefficient of user consumption portrait B is 0.2, the confidence coefficient of user consumption portrait C is 0.1... Among the Q user consumption portraits, the confidence coefficient of user consumption portrait A is the largest, so user consumption portrait A is used as the first user consumption portrait. Then, in the first prediction confidence coefficient of the e-th non-prior marking template, the prediction confidence coefficient corresponding to the first user consumption profile (for example, user consumption profile A) is determined, and the prediction confidence coefficient is used as the influence coefficient of the e-th non-prior marking template.

[0149] In this way, the third difference result corresponding to the e-th non-a priori label template can be determined based on the influence coefficient of the e-th non-a priori label template, the first self-annotated label and the first prediction confidence coefficient of the e-th non-a priori label template. The embodiment of the present application does not limit the process of how to determine the third difference result corresponding to the e-th non-a priori label template.

[0150] As an implementation scheme, the difference between the first self-labeled label and the first prediction confidence coefficient of the e-th non-prior label template is calculated, and the difference is multiplied by the influence coefficient of the e-th non-prior label template, and the result is used as the third difference result corresponding to the e-th non-prior label template.

[0151] As an implementation mode, the step S43123 determines the third difference result corresponding to the e-th non-prior label template based on the influence coefficient of the e-th non-prior label template, the first self-labeled label of the e-th non-prior label template and the first prediction confidence coefficient. Specifically, it may include: performing an inner product calculation on the first self-labeled label of the e-th non-prior label template and the first prediction confidence coefficient to obtain a second calculation result; performing a logarithmic solution on the second calculation result, and multiplying the result of the logarithmic solution by the influence coefficient of the e-th non-prior label template to obtain the third difference result corresponding to the e-th non-prior label template.

[0152] Specifically, the computer system determines the third difference result corresponding to the e-th non-a priori labeled template (i.e., the e-th unlabeled user data) through a series of calculations. This difference result is used to measure the degree of consistency between the prediction of the classification component and the self-labeled label (pseudo label). First, the computer system performs an inner product calculation on the first self-labeled label and the first prediction confidence coefficient of the e-th non-a priori labeled template. Inner product calculation is a method for measuring the similarity of two vectors, and is used here to evaluate the consistency between the prediction confidence coefficient and the self-labeled label. Taking the user data of the e-commerce platform as an example, it is assumed that the first prediction confidence coefficient is a vector, which represents the probability distribution of the user belonging to different consumer profiles (such as "price-sensitive consumers", "quality seekers", etc.), and the first self-labeled label is a one-hot encoding vector, indicating that the user is classified into a specific consumer profile. The result of the inner product calculation will reflect the degree of similarity between the two vectors, that is, the degree of match between the prediction of the classification component and the actual consumer profile of the user.

[0153] Next, the computer system performs a logarithmic solution on the result of the inner product calculation (i.e., the second calculation result). The logarithmic solution can smooth the data so that the difference result more sensitively reflects the inconsistency between the prediction and the self-labeled label. After the logarithmic solution, the computer system multiplies this result with the influence coefficient of the e-th non-prior label template (i.e., the weight, which reflects the confidence of the classification component in the prediction of the user data), in order to incorporate the confidence level of the prediction into the calculation of the difference result. If the classification component is very confident in the prediction of a certain user data (high influence coefficient), then the difference result of the user data will have a greater impact on the calculation of the first sub-cost value. Conversely, if the prediction confidence is insufficient (low influence coefficient), then even if there is an inconsistency between the prediction and the self-labeled label, its impact on the first sub-generation value will be reduced accordingly.

[0154] Through the above steps, the computer system can calculate the third difference result corresponding to the e-th non-prior labeled template. This result integrates the prediction confidence of the classification component and the consistency between the prediction and the self-labeling label, providing an important basis for the subsequent evaluation of the prediction performance of the classification component on unlabeled data.

[0155] According to the above steps, the third difference result corresponding to each of the s non-prior marking templates can be determined, and the first child value can be obtained based on the third difference result corresponding to each of the s non-prior marking templates.

[0156] As an implementation method, the sum of the third difference results corresponding to each of the s non-a priori label templates is used as the first sub-generation value. Alternatively, the average of the third difference results corresponding to each of the s non-a priori label templates is used as the first sub-generation value.

[0157] Exemplarily, the formula for the first child value C1 is as follows:

[0158] C1=- ; =o e *l e ;

[0159] Among them, e is the first prediction confidence coefficient of the e-th non-prior labeled template, l e is the first self-labeled label of the e-th non-prior label template, * represents the inner product calculation, and k' is the influence coefficient corresponding to the e-th non-prior label template.

[0160] As another embodiment, the second generation value includes a second sub-generation value. In the step S431, the second generation value is determined based on the first prediction confidence coefficient of one or more knowledge templates among the w knowledge templates, which may include: determining the second sub-generation value based on the first prediction confidence coefficient and the prior label of each prior label template of the u prior label templates.

[0161] For example, according to the first prediction confidence coefficient and the prior label of each of the u prior label templates, a negative log-likelihood cost value is determined and used as the second child cost value.

[0162] For example, the calculation formula based on the second child value C2 is:

[0163] C2=- ;

[0164] in, is the e-th prior label template among u prior label templates, is the label corresponding to the e-th prior labeling template, For the output prediction confidence coefficient corresponding to the e-th priori labeled template, the priori labeled The prediction confidence coefficient corresponding to the classification.

[0165] As another embodiment, the second generation value includes a third sub-generation value. In the step S431, determining the second generation value based on the first prediction confidence coefficient of one or more knowledge templates among the w knowledge templates may include: determining the third sub-generation value based on the first prediction confidence coefficient corresponding to each knowledge template of the w knowledge templates.

[0166] As an implementation manner, determining the third child value according to the first prediction confidence coefficient corresponding to each of the w knowledge templates may specifically include:

[0167] Step S431a: determining the mean value of the prediction confidence coefficients of the w knowledge templates according to the first prediction confidence coefficient of each of the w knowledge templates;

[0168] Step S431b: for each of the w knowledge templates, determining the KL difference between the first prediction confidence coefficient of the knowledge template and the mean of the prediction confidence coefficients;

[0169] Step S431c: Determine the third child value according to the KL difference corresponding to each of the w knowledge templates.

[0170] For example, the calculation formula for the third child value C3 is:

[0171] C3= ;

[0172] Among them, te is the e-th knowledge template among w knowledge templates, p(te) is the first prediction confidence coefficient of the e-th knowledge template, p(m) is the mean prediction confidence coefficient of w knowledge templates, and f() represents KL difference calculation, also called relative entropy calculation.

[0173] According to the above embodiments, the first generation value, the second generation value and the third generation value are determined. Based on this, the weak guidance learning error can be obtained by summing one or more of the first generation value, the second generation value and the third generation value with the first generation value.

[0174] Optionally, if the second-generation value includes the first-generation value, the second-generation value and the third-generation value, then the weakly guided learning error is determined based on the first-generation value and the second-generation value, for example, the weighted sum of the first-generation value, the first-generation value, the second-generation value and the third-generation cost value is used as the weakly guided learning error.

[0175] According to the above steps, after determining the weakly guided learning error of the user portrait classification network, the parameters of the user portrait classification network are adjusted and optimized according to the weakly guided learning error to complete the current generation tuning of the user portrait classification network. The above steps are repeated, and when the network converges, the tuned user portrait classification network is obtained.

[0176] As an implementation manner, in step S4, after optimizing the user portrait classification network according to the weak guidance learning error, the method further includes:

[0177] Step S5: clustering the s non-a priori label templates to obtain a second self-labeling label of each of the s non-a priori label templates.

[0178] The embodiment of the present application does not limit the process of clustering the s non-a priori label templates and obtaining the second self-labeling label of each of the s non-a priori label templates. As an implementation scheme, the s non-a priori label templates are clustered according to the first behavior representation vectors of the s non-a priori label templates to obtain the second self-labeling label of each of the s non-a priori label templates.

[0179] As an implementation scheme, the s non-a priori labeled templates are clustered based on a common clustering algorithm, and a second self-labeling label is assigned. For example, based on the behavior vector extraction component, the third behavior representation vectors of the w knowledge templates are extracted; the u priori labeled templates are used as constraints, and the third behavior representation vectors of the u priori labeled templates and the s non-a priori labeled templates are clustered to obtain the second self-labeling label of each of the s non-a priori labeled templates.

[0180] The goal of clustering in step S5 above is to group a large amount of unlabeled data according to their similarities, so that the data in the same group are as similar as possible, and the data between different groups are as different as possible. In this way, the computer system can automatically generate labels for the originally unlabeled data, which are called second self-labeling labels (i.e., second pseudo labels).

[0181] Take the user behavior data on e-commerce platforms as an example. Suppose a large number of users' shopping records are collected, but a large part of them do not have clear consumption profile labels. Through clustering algorithms such as K-means, hierarchical clustering or DBSCAN, the computer system can automatically divide these unlabeled user data into several clusters. Each cluster represents a specific user behavior pattern or consumption habit.

[0182] Specifically, the clustering algorithm determines the similarity between users based on the features in their shopping records, such as purchase frequency, type of goods purchased, price sensitivity, etc. For example, users who frequently purchase high-value goods and pay attention to brand quality may be clustered into one cluster, while users who seek cost-effectiveness and often participate in promotional activities may be clustered into another cluster. After clustering is completed, the computer system assigns a second self-labeling tag to each cluster. These tags may be "high-end consumers", "economical consumers", etc., which are used to describe the common characteristics of users in the cluster. These second self-labeling tags can then be used to further train and optimize the user portrait classification network to improve its classification accuracy and generalization ability.

[0183] In this way, step S5 not only helps the computer system better understand the intrinsic structure of the unlabeled data, but also provides valuable label information for subsequent user profile classification.

[0184] Step S6: Based on the u prior label templates, the s non-prior label templates and the second self-labeling label, fine-tune the user portrait classification network trained according to the weak guidance learning error.

[0185] As an implementation scheme, an overall cost value is obtained based on the first behavior representation vector and prior information of u prior labeled templates, and the first behavior representation vector and the second self-labeling label of s non-prior labeled templates, and then the user portrait classification network after weakly guided learning error tuning is fine-tuned (that is, tuned again) based on the overall cost value.

[0186] As an implementation scheme, based on the classification component in the user portrait classification network, the third behavior representation vector of each of the w knowledge templates is processed to obtain the third prediction confidence coefficient of each knowledge template belonging to Q user consumption profiles, where Q is a natural number not less than 2; based on the third prediction confidence coefficients and prior labels of u prior labeled templates, and the third prediction confidence coefficients and second self-labeling labels of s non-prior labeled templates, an overall cost value is obtained; based on the overall cost value, the user portrait classification network that has been tuned based on weakly guided learning errors is fine-tuned.

[0187] In the above step S6, the computer system uses the obtained prior label template and non-prior label template and its second self-label label to fine-tune the user portrait classification network. Fine-tuning is a commonly used technique in deep learning. It adjusts the parameters of the trained model to make the model perform better on new data. Specifically, the computer system first loads the user portrait classification network that has been trained by weak guided learning error. This network has already had a certain classification ability in the previous training, but there may still be some shortcomings, which need to be further optimized through fine-tuning.

[0188] Next, we use u prior labeled templates (i.e. user data with real labels) and s non-prior labeled templates with second self-labeled labels (i.e. labels automatically generated after clustering unlabeled user data) as new training data sets. These data will be used for supervised learning in the fine-tuning process to help the network better learn and adapt to the real distribution of the data.

[0189] Taking e-commerce platforms as an example, the prior labeling template may include some user data, which has clearly labeled the user's consumption profile, such as "high-end brand consumers", "price-sensitive consumers", etc. The non-prior labeling template is the user group automatically divided by the clustering algorithm, and given a second self-labeling label, such as "economic consumer group", "brand pursuer group", etc.

[0190] During the fine-tuning process, the computer system uses the back-propagation algorithm to update the weights and parameters of the network. Through continuous iterative training, the network will gradually adapt to the new data set and improve the accuracy and generalization ability of classification.

[0191] Ultimately, the fine-tuned user profile classification network will be able to more accurately identify different types of users and provide more accurate personalized recommendations and services based on their consumption profiles. For example, for users identified as "high-end brand consumers", e-commerce platforms can push more high-end brand product information and promotions; while for "economical consumers", they can recommend cost-effective products and promotions.

[0192] By fine-tuning the user portrait classification network using prior labeling templates and non-prior labeling templates and their second self-labeling labels, the classification performance and accuracy of the network are further improved, providing more accurate user portrait classification services for application scenarios such as e-commerce platforms, helping to increase the conversion rate of targeted operations based on user portraits, improve user experience, and improve customer acquisition resources and quality.

[0193] When tuning the user portrait classification network, the embodiment of the present application extracts the first behavior representation vector of each of the w knowledge templates based on the acquisition of w knowledge templates included in the current batch of debugging samples and the behavior vector extraction component in the user portrait classification network. The w knowledge templates include u prior labeling templates and s non-prior labeling templates; local and overall behavior vectors are extracted for the first behavior representation vector of each knowledge template to obtain the local behavior representation vector and the overall behavior representation vector of each knowledge template; for the eth non-prior labeling template among the s non-prior labeling templates, the local behavior representation vector and the overall behavior representation vector of each knowledge template are extracted. Characterization vector, determine the first knowledge template with the largest local matching coefficient with the e-th non-prior label template and the second knowledge template with the largest overall matching coefficient with the e-th non-prior label template among the v knowledge templates; select G first non-prior label templates from the s non-prior label templates, determine the weak guidance learning error of the user portrait classification network based on the overall behavior characterization vectors of the G first non-prior label templates and the overall behavior characterization vectors of the corresponding second knowledge templates, and tune the user portrait classification network based on the weak guidance learning error, and the first non-prior label template is the same non-prior label template as the corresponding first knowledge template and the corresponding second knowledge template. Based on this, the user portrait classification network is weakly supervised by similarity learning using open set knowledge templates, which not only enables the user portrait classification network to perform high-quality training on known user consumption portraits, but also enables the user portrait classification network to perform high-quality training on new user consumption portraits, so as to ensure the classification accuracy of the user portrait classification network for multiple user consumption portraits and expand the user consumption portrait classification granularity of the user portrait classification network. At the same time, the knowledge template of the embodiment of the present application is the consumer behavior data corresponding to different behavior types, which increases the log classification granularity of the user portrait classification network to increase the classification quality of the user portrait classification network, help increase the conversion rate of targeted operations based on user portraits, improve user experience, and improve customer acquisition resources and customer acquisition quality.

[0194] It should be noted that in the embodiment of the present application, if the above-mentioned user portrait classification method based on behavioral data analysis is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM), a disk or an optical disk. In this way, the embodiment of the present application is not limited to any specific hardware, software or firmware, or any combination of hardware, software, and firmware.

[0195] An embodiment of the present application provides a computer system, including a memory and a processor, wherein the memory stores a computer program that can be executed on the processor, and when the processor executes the program, some or all of the steps in the above method are implemented.

[0196] The embodiment of the present application provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, some or all of the steps in the above method are implemented. The computer-readable storage medium can be transient or non-transient.

[0197] An embodiment of the present application provides a computer program, including a computer-readable code. When the computer-readable code is run in a computer device, a processor in the computer device executes some or all of the steps for implementing the above method.

[0198] The embodiment of the present application provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and when the computer program is read and executed by a computer, some or all of the steps in the above method are implemented. The computer program product can be implemented specifically by hardware, software or a combination thereof. In some embodiments, the computer program product is specifically embodied as a computer storage medium, and in other embodiments, the computer program product is specifically embodied as a software product, such as a software development kit (SDK) and the like.

[0199] It should be noted here that the description of the various embodiments above tends to emphasize the differences between the various embodiments, and the same or similar aspects can be referenced to each other. The description of the above device, storage medium, computer program and computer program product embodiments is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the embodiments of the device, storage medium, computer program and computer program product of this application, please refer to the description of the method embodiment of this application for understanding.

[0200] Figure 2 A hardware entity diagram of a computer system provided in an embodiment of the present application is shown in FIG. Figure 2 As shown, the hardware entity of the computer system 1000 includes: a processor 1001 and a memory 1002, wherein the memory 1002 stores a computer program that can be run on the processor 1001, and the processor 1001 implements the steps in the method of any of the above embodiments when executing the program.

[0201] The memory 1002 stores computer programs that can be run on the processor. The memory 1002 is configured to store instructions and applications executable by the processor 1001. It can also cache data to be processed or processed by the processor 1001 and various modules in the computer system 1000 (for example, image data, audio data, voice communication data, and video communication data). This can be achieved through flash memory (FLASH) or random access memory (Random Access Memory, RAM).

[0202] When the processor 1001 executes the program, the steps of any of the above-mentioned user portrait classification methods based on behavior data analysis are implemented. The processor 1001 generally controls the overall operation of the computer system 1000.

[0203] An embodiment of the present application provides a computer storage medium, which stores one or more programs. The one or more programs can be executed by one or more processors to implement the steps of the user portrait classification method based on behavioral data analysis in any of the above embodiments.

[0204] It should be noted here that the description of the above storage medium and device embodiments is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments. For the technical details not disclosed in the storage medium and device embodiments of the present application, please refer to the description of the method embodiments of the present application for understanding. The above processor can be at least one of a target application integrated circuit (Application Specific Integrated Circuit, ASIC), a digital signal processor (Digital Signal Processor, DSP), a digital signal processing device (Digital Signal Processing Device, DSPD), a programmable logic device (Programmable Logic Device, PLD), a field programmable gate array (Field Programmable Gate Array, FPGA), a central processing unit (Central Processing Unit, CPU), a controller, a microcontroller, and a microprocessor. It can be understood that the electronic device that realizes the above processor function can also be other, and the embodiments of the present application are not specifically limited.

[0205] The above-mentioned computer storage medium / memory can 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), a magnetic random access memory (FRAM), a flash memory (Flash Memory), a magnetic surface memory, an optical disk, or a compact disc read-only memory (CD-ROM) and the like; it can also be various terminals including one or any combination of the above-mentioned memories, such as mobile phones, computers, tablet devices, personal digital assistants, etc.

[0206] It should be understood that the "one embodiment" or "one embodiment" mentioned throughout the specification means that the specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in one embodiment" appearing in various places throughout the specification may not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present application, the size of the sequence number of each step / process mentioned above does not mean the order of execution, and the execution order of each step / process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application. The above-mentioned sequence number of the embodiment of the present application is only for description and does not represent the advantages and disadvantages of the embodiment. It should be noted that, in this article, the term "include", "comprise" 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 that are not explicitly listed, or also includes elements inherent to such process, method, article or device. Without more constraints, an element defined by the phrase "comprising a..." does not exclude the existence of other identical elements in the process, method, article or apparatus comprising the element.

[0207] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0208] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0209] In addition, all functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may be a separate unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0210] A person skilled in the art can understand that all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM), magnetic disks or optical disks, etc., various media that can store program codes.

[0211] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can essentially or in other words, the part that contributes to the relevant technology can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks, or optical disks.

[0212] The above is only an implementation method of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.

Claims

1. A user portrait classification method based on behavior data analysis, characterized in that: include: Obtain the consumption behavior record log to be analyzed; Based on the behavior vector extraction component in the user portrait classification network, extract the behavior representation vector of the consumption behavior record log; Determine, based on the behavior representation vector, a prediction confidence coefficient that the consumption behavior record log belongs to Q user consumption profiles, where Q is a natural number not less than 2; The user portrait classification network is obtained by tuning based on weak guidance learning error, and the weak guidance learning error is determined based on the overall behavior representation vectors of G first non-prior labeling templates among s non-prior labeling templates and the overall behavior representation vector of the corresponding second knowledge template, and the first non-prior labeling template is a non-prior labeling template that is the same as the corresponding first knowledge template and the corresponding second knowledge template; The training process of the user portrait classification network specifically includes: Obtain w knowledge templates included in the current batch of debugging samples, and extract the first behavior representation vector of each of the w knowledge templates based on the behavior vector extraction component in the user portrait classification network; Extracting local and overall behavior vectors from the first behavior representation vector of each knowledge template respectively to obtain a local behavior representation vector and an overall behavior representation vector of each knowledge template; For the e-th non-prior label template among the s non-prior label templates, based on the local behavior characterization vector and the overall behavior characterization vector, among the w knowledge templates, among the v knowledge templates except the e-th non-prior label template, determine the first knowledge template with the largest local matching coefficient with the e-th non-prior label template, and the second knowledge template with the largest overall matching coefficient with the e-th non-prior label template; Select G first non-prior labeled templates from the s non-prior labeled templates, determine the weakly guided learning error of the user portrait classification network based on the overall behavior representation vectors of the G first non-prior labeled templates and the overall behavior representation vectors of the corresponding second knowledge templates, and tune the user portrait classification network based on the weakly guided learning error.

2. The method according to claim 1, characterized in that The method of determining, based on the local behavior characterization vector and the overall behavior characterization vector, a first knowledge template having the largest local matching coefficient with the e-th non-a priori labeled template and a second knowledge template having the largest overall matching coefficient with the e-th non-a priori labeled template from among the v knowledge templates except the e-th non-a priori labeled template among the w knowledge templates, comprises: Determine a local matching coefficient between each two knowledge templates according to a local behavior characterization vector of each two knowledge templates among the w knowledge templates, and determine an overall matching coefficient between each two knowledge templates according to an overall behavior characterization vector of each two knowledge templates; According to the local matching coefficient between the e-th non-a priori label template and each of the v knowledge templates, determine the first knowledge template with the largest local matching coefficient with the e-th non-a priori label template among the v knowledge templates; According to the overall matching coefficient between the e-th non-a priori label template and each of the v knowledge templates, determine a second knowledge template having the largest overall matching coefficient with the e-th non-a priori label template among the v knowledge templates; The determining of the weakly guided learning error of the user portrait classification network according to the overall behavior representation vectors of the G first non-prior labeling templates and the overall behavior representation vectors of the corresponding second knowledge templates includes: For each of the G first non-a priori label templates, determine a first difference result of the first non-a priori label template according to an overall behavior characterization vector of the first non-a priori label template and an overall behavior characterization vector of a second knowledge template corresponding to the first non-a priori label template; Determine a first generation value according to a first difference result corresponding to each first non-a priori labeling template of the G first non-a priori labeling templates; The weakly guided learning error is obtained according to the first generation value.

3. The method according to claim 2, characterized in that The determining of the local matching coefficient between each two knowledge templates according to the local behavior representation vectors of each two knowledge templates in the w knowledge templates includes: For the f-th knowledge template and the a-th knowledge template among the w knowledge templates, the local significant influence coefficient of the f-th knowledge template is determined according to the local behavior representation vector of the f-th knowledge template, and the local significant influence coefficient of the a-th knowledge template is determined according to the local behavior representation vector of the a-th knowledge template, wherein 0<f<w; 0<a≤w; The local matching coefficient between the f-th knowledge template and the a-th knowledge template is determined based on the local behavior representation vector and the local significance influence coefficient of the f-th knowledge template and the local behavior representation vector and the local significance influence coefficient of the a-th knowledge template.

4. The method according to claim 2, characterized in that: The determining the first generation value according to the first difference result corresponding to each first non-a priori labeling template of the G first non-a priori labeling templates includes: Determine a non-a priori label difference result according to a first difference result corresponding to each first non-a priori label template of the G first non-a priori label templates; Determining a priori marking difference result according to the overall behavior representation vector of the u priori marking templates; Obtaining the first generation value according to the non-a priori label difference result and the a priori label difference result; The obtaining the weakly guided learning error according to the first generation value includes: Based on the classification component in the user portrait classification network, the first behavior representation vector of each of the w knowledge templates is processed to obtain a first prediction confidence coefficient that each of the w knowledge templates belongs to Q user consumption profiles, and the second generation value is determined according to the first prediction confidence coefficient of one or more knowledge templates in the w knowledge templates, where Q is a natural number not less than 2; The weakly guided learning error is determined according to the first generation value and the second generation value.

5. The method according to claim 4, characterized in that The determining of the prior marking difference result based on the overall behavior representation vector of the u prior marking templates includes: For each of the u prior label templates, if among the u prior label templates, t prior label templates other than the prior label template have a third knowledge template with the same prior label as the prior label template, then according to the overall behavior representation vector of the prior label template and the overall behavior representation vector of the third knowledge template, determine the second difference result of the prior label template, wherein t=u-1; Determining the a priori marking difference result according to the second difference result of one or more a priori marking templates; The second generation value includes the first sub-generation value, and the second generation value is determined according to the first prediction confidence coefficient of one or more knowledge templates in the w knowledge templates, including: Performing self-labeling training on a first prediction confidence coefficient of each of the s non-a priori label templates to obtain a first self-labeling label of each of the s non-a priori label templates; The first child value is obtained according to the first self-labeled label of each non-a priori label template of the s non-a priori label templates and the first prediction confidence coefficient.

6. The method according to claim 5, characterized in that The step of obtaining the first child value according to the first self-labeled label of each non-a priori label template of the s non-a priori label templates and the first prediction confidence coefficient comprises: Determine a first user consumption profile with the largest confidence coefficient in the first self-labeled label of the e-th non-prior label template; Determine the prediction confidence coefficient corresponding to the first user consumption profile in the first prediction confidence coefficient of the e-th non-a priori marking template as the influence coefficient of the e-th non-a priori marking template; Determining a third difference result corresponding to the e-th non-a priori labeled template according to the influence coefficient of the e-th non-a priori labeled template, the first self-labeled label of the e-th non-a priori labeled template, and the first prediction confidence coefficient; Obtaining the first child value according to the third difference result corresponding to each of the s non-a priori labeled templates; The determining, based on the influence coefficient of the e-th non-a priori labeled template, the first self-labeled label of the e-th non-a priori labeled template, and the first prediction confidence coefficient, of the third difference result corresponding to the e-th non-a priori labeled template includes: Performing an inner product calculation on the first self-labeled label of the e-th non-a priori label template and the first prediction confidence coefficient to obtain a second calculation result; The second calculation result is logarithmically solved, and the result of the logarithmic solution is multiplied by the influence coefficient of the e-th non-a priori label template to obtain a third difference result corresponding to the e-th non-a priori label template.

7. The method according to claim 4, characterized in that The second generation value includes a second sub-generation value, and determining the second generation value according to the first prediction confidence coefficient of one or more knowledge templates among the w knowledge templates includes: Determine the second offspring value according to the first prediction confidence coefficient and the priori label of each of the u priori label templates; The second generation value also includes a third sub-generation value, and the second generation value is determined according to the first prediction confidence coefficient of one or more knowledge templates in the w knowledge templates, including: Determining a mean value of the prediction confidence coefficients of the w knowledge templates according to the first prediction confidence coefficient of each of the w knowledge templates; For each of the w knowledge templates, determining a KL difference between a first prediction confidence coefficient of the knowledge template and a mean of the prediction confidence coefficients; The third child value is determined according to the KL difference corresponding to each of the w knowledge templates.

8. The method according to claim 1, characterized in that Before the behavior vector extraction component based on the user portrait classification network extracts the first behavior representation vector of each of the w knowledge templates, the method further includes: Based on the u priori label templates, pre-tuning the user portrait classification network; The behavior vector extraction component based on the user portrait classification network extracts the first behavior representation vector of each of the w knowledge templates, including: Extracting the first behavior representation vector of each of the w knowledge templates based on the behavior vector extraction component in the user portrait classification network after pre-tuning; After optimizing the user portrait classification network according to the weakly guided learning error, the method further includes: Clustering the s non-a priori label templates to obtain a second self-labeling label for each of the s non-a priori label templates; According to the u priori labeled templates, the s non-prior labeled templates and the second self-labeled labels, the user portrait classification network trained according to the weakly guided learning error is fine-tuned.

9. A computer system comprising a memory and a processor, wherein the memory stores a computer program executable on the processor, wherein: When the processor executes the program, the steps in the method according to any one of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • System for detecting associated records in a record log

    CA3146127A1

  • User depth portrait method and device

    CN108804704A

  • Feature fusion method for entities and user portraits

    CN110245719A

  • Object clustering model obtaining method and object clustering method and device

    CN114358111A

  • Classification method and system integrating graph embedding and structure enhancement in attribute-free network

    CN114565029A