User portrait construction method and device, equipment and medium
By extracting and mapping features from structured and unstructured data, and combining attention mechanisms and an extensible labeling system, an integrated user feature vector is generated. This solves the problem of rigidity in the fusion process of existing user profile construction methods, and realizes flexible adaptation and real-time response capabilities for user profiles.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-09
- Publication Date
- 2026-03-10
AI Technical Summary
Existing user profiling methods struggle to flexibly adapt to changing application scenarios and real-time business needs when integrating different features to form a unified user model. Furthermore, existing strategies are rigid and fail to meet the demands of diverse application scenarios and real-time business requirements.
By extracting features from structured and unstructured data and mapping them to a unified feature space, and using an attention mechanism to calculate fusion weights, an integrated user feature vector is generated. Combined with an scalable tagging system, user profile tags are generated, including basic tags and dynamically generated derivative tags.
It achieves effective integration of structured and unstructured data, and the generated user profiles can accurately match the real-time needs of different application scenarios, have the ability to quickly respond to business changes, and enhance the practical value of the profiles.
Smart Images

Figure CN121637422A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of big data, in particular to a user portrait construction method and device, equipment and medium. BACKGROUND
[0002] In the field of data processing, user portrait construction is the core link to realize personalized service and accurate decision. At present, the typical user portrait construction method usually involves collecting, cleaning and feature extraction of user data from multiple sources, and forming a unified user representation through a certain fusion strategy on this basis, and finally outputting a label set describing user features according to a preset rule or model. This kind of method can realize the abstraction and characterization of user features to a certain extent.
[0003] However, the related method still faces many challenges in practical application. Especially in the process of fusing different features to form a unified user model, the existing strategy is relatively rigid and difficult to adapt to changing application scenarios and real-time business needs. SUMMARY
[0004] In view of the above problems, the present application provides a user portrait construction method, device, equipment and medium, which at least solves one of the above problems.
[0005] According to a first aspect of the present application, a user portrait construction method is provided, comprising: respectively extracting features of structured data and unstructured data to obtain multi-dimensional features; mapping the multi-dimensional features to a unified feature space to obtain mapped features; calculating the fusion weight of each feature by attention mechanism for the mapped multi-dimensional features using the current business scenario identifier; weighting and fusing the mapped multi-dimensional features based on the fusion weight to generate an integrated user feature vector; generating a user portrait label through an extensible label system based on the integrated user feature vector, the extensible label system including basic labels and dynamically generated derivative labels.
[0006] In some embodiments, the respective extraction of features of structured data and unstructured data to obtain multi-dimensional features includes: performing parallel dual-channel feature extraction on structured data to obtain user value quantification features and behavior pattern association features; performing lightweight feature extraction on unstructured data to obtain text semantic features and image visual features.
[0007] In some embodiments, the performing parallel dual-channel feature extraction on the structured data to obtain user value quantification features and behavior pattern association features comprises: quantifying user consumption behavior by using an RFM analysis framework with a time decay function; weighting the quantification results by using a category value coefficient matrix to generate user value quantification features; mining association rules from user behavior sequences based on an Apriori algorithm with a join time decay factor; and extracting association rules with a confidence higher than a preset threshold as the behavior pattern association features.
[0008] In some embodiments, the performing lightweight feature extraction on the unstructured data to obtain text semantic features and image visual features comprises: loading a pre-trained Sentence-BERT model, fine-tuning a fully connected layer added at the end of the model by using business corpus to obtain a domain-adapted semantic model; inputting user text data into the domain-adapted semantic model to output a text semantic feature vector; loading an image model based on a ResNet-18 architecture, the image model being optimized by channel pruning and having a convolution channel number compressed to a preset number; and inputting user image data into the image model optimized by channel pruning to output an image visual feature vector.
[0009] In some embodiments, the calculating fusion weights of each feature by using the current business scenario identification comprises: splicing the mapped multi-dimensional features and an identification code of the current business scenario identification to form a fusion input vector; inputting the fusion input vector into an attention calculation network to calculate initial attention weights corresponding to each original multi-dimensional feature; querying a corresponding scene bias term from a predefined bias term matrix according to the identification code of the business scenario identification; and applying the scene bias term to the initial attention weights to generate fusion weights of each multi-dimensional feature.
[0010] In some embodiments, the weighting and fusing the mapped multi-dimensional features based on the fusion weights to generate an integrated user feature vector comprises: normalizing the fusion weights into weight distribution, wherein the sum of each weight coefficient is 1; constructing a feature matrix with the mapped multi-dimensional features; and performing weighted summation operation on the normalized fusion weights and the feature matrix to generate the integrated user feature vector.
[0011] In some embodiments, the generating, based on the integrated user feature vector, a user portrait label through an extensible label system comprises: generating a basic label by directly querying and mapping from a user static attribute database; dynamically generating a derived label based on the integrated user feature vector by at least one of the following: inputting the integrated user feature vector into a pre-trained XGBoost classification model, mapping a classification probability result output by the model into a discrete predicted label, and / or matching the integrated user feature vector with a pre-defined SQL rule condition, and triggering and generating a corresponding rule label when the condition is met; merging the basic label and the derived label to output a final user portrait label set.
[0012] According to a second aspect of the present application, a user portrait construction method is provided, comprising: a feature extraction module for extracting features from structured data and unstructured data respectively to obtain multi-dimensional features; a mapping module for mapping the multi-dimensional features to a unified feature space to obtain mapped features; a calculation module for calculating fusion weights of each feature through an attention mechanism using the current business scenario identifier; a fusion module for weighting and fusing the mapped multi-dimensional features based on the fusion weights to generate an integrated user feature vector; and a generation module for generating a user portrait label based on the integrated user feature vector through an extensible label system, wherein the extensible label system comprises a basic label and a dynamically generated derived label.
[0013] According to a third aspect of the present application, an electronic device is provided, comprising: one or more processors; a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the method according to the first aspect.
[0014] According to a fourth aspect of the present application, a computer readable storage medium is provided, which stores a computer program or instructions, wherein the computer program or instructions are executed by a processor to implement the steps of the method according to the first aspect. BRIEF DESCRIPTION OF DRAWINGS
[0015] The above and other objects, features and advantages of the present application will become more apparent from the following description of embodiments of the present application, taken in conjunction with the accompanying drawings, in which:
[0016] Figure 1 A flowchart of a user portrait construction method according to an embodiment of the present application is schematically shown;
[0017] Figure 2 A flowchart of another user portrait construction method according to an embodiment of the present application is schematically shown;
[0018] Figure 3 This schematic diagram illustrates the structure of a user profile building apparatus according to an embodiment of this application;
[0019] Figure 4 A schematic diagram of an electronic device according to an embodiment of this application is shown. Detailed Implementation
[0020] The embodiments of this application will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of this application. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of this application for ease of explanation. However, it will be apparent that one or more embodiments may be implemented without these specific details. Furthermore, descriptions of well-known structures and technologies are omitted in the following description to avoid unnecessarily obscuring the concepts of this application.
[0021] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of this application. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0022] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.
[0023] When using expressions such as "at least one of A, B and C", they should generally be interpreted in accordance with the meaning that is commonly understood by those skilled in the art (e.g., "a system having at least one of A, B and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B and C, etc.).
[0024] In the technical solution disclosed herein, the user information (including but not limited to user personal information, user image information, user transaction record information, user device information such as location information) and data (including but not limited to data used for analysis, stored data, and displayed data) involved are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, storage, use, processing, transmission, provision, disclosure, and application of related data all comply with relevant laws, regulations, and standards, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entry points for users to choose to authorize or refuse.
[0025] In scenarios involving automated decision-making using personal information, the methods, devices, and systems provided in this disclosure all offer users corresponding entry points for choosing to agree to or reject the automated decision-making results. If the user chooses to reject, the process proceeds to the expert decision-making stage. Here, "automated decision-making" refers to the activity of automatically analyzing and evaluating an individual's behavioral habits, interests, or economic, health, and credit status through computer programs, and then making a decision. Here, "expert decision-making" refers to the activity of making decisions by personnel who specialize in a particular field, possess specialized experience, knowledge, and skills, and have reached a certain level of professional expertise.
[0026] Figure 1 The flowchart illustrating a user profile construction method according to an embodiment of this application is shown schematically. Figure 2 A flowchart illustrating another user profile construction method according to an embodiment of this application is shown schematically.
[0027] like Figure 1 As shown, the user profile construction method includes operations S110-S150.
[0028] In operation S110, feature extraction is performed on both structured and unstructured data to obtain multi-dimensional features.
[0029] According to embodiments of the present invention, structured data includes, but is not limited to, user transaction records and behavior logs. Unstructured data includes, but is not limited to, user comment text and uploaded images.
[0030] According to embodiments of the present invention, feature extraction can be used to extract feature representations from raw data that can characterize high-level semantics such as user attributes, behaviors, interests, and intentions.
[0031] In operation S120, multi-dimensional features are mapped to a unified feature space to obtain mapped multi-dimensional features.
[0032] According to embodiments of the present invention, feature vectors from different sources, with different dimensions, and different units can be transformed into a vector space with the same dimension and unit through techniques such as linear transformation and neural network projection, laying the foundation for subsequent feature fusion. A unified feature space ensures that all features are comparable, enabling the attention mechanism to perform effective weight calculation.
[0033] In operation S130, the current business scenario identifier is used to calculate the fusion weight of each feature through an attention mechanism on the mapped multi-dimensional features.
[0034] According to embodiments of the present invention, a business scenario identifier is a code or signal used to distinguish different application scenarios. Examples of application scenarios include precision marketing, risk control, and personalized recommendations.
[0035] According to embodiments of the present invention, the attention mechanism is a mechanism that simulates the allocation of human cognitive resources, capable of automatically assessing the importance of different features in a specific business scenario. By using the business scenario identifier as an input to the attention mechanism, it can be guided to dynamically and selectively calculate feature weights. For example, in a risk control scenario, the weights of features related to abnormal behavior will be automatically increased.
[0036] In operation S140, the mapped multi-dimensional features are weighted and fused based on the fusion weights to generate an integrated user feature vector.
[0037] According to an embodiment of the present invention, by summing or concatenating the weighted features of each dimension, a unified and dense vector is formed, which can represent the user's overall status in the current business scenario.
[0038] In operation S150, user profile tags are generated based on the integrated user feature vector through an extensible tag system, which includes basic tags and dynamically generated derivative tags.
[0039] According to an embodiment of the present invention, the basic tags are directly derived from the user's static attribute information, such as age, gender, and region.
[0040] According to embodiments of the present invention, derived tags are dynamically and in real-time generated based on integrated user feature vectors, used to describe the complex and dynamic states of users, such as "high-value customers," "users at risk of churn," and "new product enthusiasts." The generation of derived tags can be achieved through a rule engine (e.g., parsing SQL logical conditions) or a machine learning model (e.g., using an XGBoost classifier for prediction).
[0041] According to embodiments of the present invention, it is scalable to dynamically inject new tag definition rules or models during system operation through standard interfaces (such as RESTful APIs) without downtime reconstruction, thereby enabling the tag system to continuously evolve with business needs.
[0042] According to embodiments of the present invention, on the one hand, through a unified feature space mapping and attention mechanism, effective fusion of structured and unstructured data is achieved, fully leveraging the complementarity of multi-source information. On the other hand, the introduction of business scenario identifiers to intervene in the fusion process enables the generated user profiles to accurately match the real-time needs of different application scenarios, significantly enhancing the practical value of the profiles. Furthermore, through the combination of basic and derived tags, and the support for dynamically injected extension interfaces, the user profiles can quickly respond to business changes and possess the ability to continuously evolve.
[0043] In some embodiments of the present invention, parallel dual-channel feature extraction can be performed on structured data to obtain user value quantification features and behavioral pattern association features.
[0044] Two parallel, specially optimized channels are employed to conduct in-depth analysis from two core dimensions: user value and behavioral patterns. User value quantification features can quantify a user's economic contribution and level from data such as transactions. Behavioral pattern correlation features can uncover a user's habits, preferences, and the inherent logic between behaviors from behavioral sequences. This parallel dual-channel design solves the problem of insufficient feature coverage in a single model, enabling a more comprehensive and refined characterization of users.
[0045] In one example, the RFM analysis framework, which incorporates a time decay function, can be used to quantify user consumption behavior; the quantification results can be weighted using a category value coefficient matrix to generate user value quantification features; based on the Apriori algorithm with added time decay factors, association rules can be mined from user behavior sequences; and association rules with confidence scores higher than a preset threshold can be extracted as behavioral pattern association features.
[0046] This invention introduces a time-sensitivity decay function, making recent behavior contribute more to the final value score than long-term behavior, thus more accurately reflecting the user's current value status. The original consumption amount is weighted and corrected using a category value coefficient matrix (e.g., a coefficient of 1.0 for ordinary fast-moving consumer goods and 1.5 for luxury goods), thereby achieving differentiated and more accurate user value assessment.
[0047] This invention incorporates a time decay factor, giving higher weight to recently occurring combinations of related behaviors when calculating support. This makes the mined rules more reflective of users' recent behavioral preferences, resulting in a more timely rule set.
[0048] In some embodiments of the present invention, lightweight feature extraction can be performed on unstructured data to obtain textual semantic features and image visual features. While ensuring feature quality, lightweight feature extraction can significantly reduce computational overhead through model optimization techniques, enabling complex deep learning models to be applicable to large-scale, high-concurrency real-world production environments. By processing text and images separately, high-level semantic information and visual pattern information can be accurately extracted.
[0049] In one example, a pre-trained Sentence-BERT model can be loaded, and the fully connected layer added to the last layer of the model can be fine-tuned using business corpus to obtain a domain-adapted semantic model. User text data can be input into the domain-adapted semantic model, and the text semantic feature vector can be output. An image model based on the ResNet-18 architecture can be loaded. The image model is optimized by channel pruning, and the number of convolution channels is compressed to a preset number. User image data can be input into the image model optimized by channel pruning, and the image visual feature vector can be output.
[0050] Sentence-BERT (SBERT) is a pre-trained model that can directly generate sentence-level embedding vectors, which can be used to calculate text semantic similarity. This invention adds a fully connected layer at the end of the model and fine-tunes this layer and a few layers near the end of the model using only business-related corpora. This allows the model to quickly adapt to the semantic space of specific business scenarios, enhancing its ability to capture key features in areas such as "price sensitivity" and "after-sales complaints." Finally, the processed text is transformed into a low-dimensional, dense floating-point vector, which is a numerical representation of its deep semantics.
[0051] The preset number of channels can be determined experimentally, striking a balance between model accuracy and computational efficiency. For example, the number of channels in all convolutional layers can be uniformly compressed to 50%-70% of the original number.
[0052] The optimized model performs forward propagation on the input image and finally extracts a feature vector from the end of the network. This vector contains abstract visual information about the image.
[0053] In some embodiments of the present invention, the mapped multi-dimensional features can be concatenated with the identifier code of the current business scenario to form a fusion input vector; the fusion input vector is input into the attention calculation network to calculate the initial attention weights corresponding to each original multi-dimensional feature; according to the identifier code of the business scenario, the corresponding scenario bias term is queried from the predefined bias term matrix; the scenario bias term is applied to the initial attention weights to generate the fusion weights of each multi-dimensional feature.
[0054] The mapped multidimensional features can refer to various features that have been projected to the same dimension (e.g., all converted into 128-dimensional vectors) through linear transformation layers or other means, including but not limited to user value quantification features, behavioral pattern association features, text semantic feature vectors, and image visual feature vectors.
[0055] In practice, the current business scenario identifier can be a one-hot encoded vector or a learnable embedding vector. For example, if the system presets marketing scenario = [1,0] and risk control scenario = [0,1], this is an identifier in the form of a one-hot encoded vector.
[0056] The predefined bias term matrix is a configurable parameter matrix that stores fusion preferences for different scenarios. The number of rows in this matrix can equal the number of business scenarios supported by the system, and the number of columns can equal the number of features. Each value in the matrix represents the bias amount for a specific feature under a specific scenario.
[0057] Based on the input business scenario identifier (such as one-hot encoding), it is used as an index to extract the corresponding row vector from the bias term matrix. This vector is the scenario bias term for all features in this scenario. For example, when the identifier is risk control scenario = [0,1], the second row is extracted from the matrix. The bias term corresponding to the "abnormal behavior pattern" feature position in this row vector may be a high positive value.
[0058] After the addition operation, the initial weights can be directionally increased or decreased. For example, in a risk control scenario, the initial weights of abnormal behavior features are given a positive bias, which significantly improves their final fusion weights, allowing them to dominate in subsequent fusion processes. These bias-corrected weights are the final fusion weights used for feature fusion. This approach considers both the attributes of the features themselves and strongly incorporates the decision-making intent of the business scenario.
[0059] In some embodiments of the present invention, the multi-dimensional features after mapping can be weighted and fused based on the fusion weights to generate an integrated user feature vector, including: normalizing the fusion weights into a weight distribution, wherein the sum of each weight coefficient is 1; constructing a feature matrix from the mapped multi-dimensional feature vectors; and performing a weighted summation operation on the normalized fusion weights and the feature matrix to generate an integrated user feature vector.
[0060] Understandably, the integrated user feature vector is a dense, low-dimensional numerical representation that integrates information from all original multi-dimensional features and dynamically highlights key features while weakening secondary features based on the business scenario, thus forming an accurate and comprehensive digital representation of the user's state in that scenario.
[0061] In some embodiments of the present invention, basic tags can be generated by directly querying and mapping from a user static attribute database; based on the integrated user feature vector, derived tags can be dynamically generated in at least one of the following ways: inputting the integrated user feature vector into a pre-trained XGBoost classification model, mapping the classification probability results output by the model to discrete predicted tags, and / or matching the integrated user feature vector with predefined SQL rule conditions, triggering and generating corresponding rule tags when the conditions are met; merging the basic tags and derived tags to output the final user profile tag set.
[0062] A user static attribute database refers to a structured database that stores relatively stable and unchanging core attribute information of users, such as a user profile table. Typical fields in a user static attribute database include, but are not limited to, user ID, registration time, age, gender, city of residence, and membership level.
[0063] In some implementations, the corresponding static attribute records can be retrieved from the database based on the user ID. Then, using a predefined mapping rule, the values of these database fields are directly converted into a tag language. For example, when the "Age" field value is 25, it is directly mapped to the tag "Age:25"; when the "Membership Level" field is "VIP", it is mapped to the tag "VIP User".
[0064] In some implementations, inputting the current user's unified user feature vector into a pre-trained XGBoost classification model outputs one or more classification probability results, such as [churn probability: 0.85, retention probability: 0.15]. The continuous probability values are then converted into discrete predicted labels based on a preset probability threshold (e.g., churn probability > 0.7). In the example above, this would generate the label "high-risk churn user".
[0065] In some implementations, a rule matching engine can be executed. This engine compares the information contained in the integrated user feature vector (such as "number of logins in the last 30 days" and "total order amount") with all predefined rule conditions. When all conditions of a rule are met, the rule is triggered, and a corresponding rule label (such as "dormant user") is generated.
[0066] In some implementations, all tags from the basic tag generation step, along with all tags from the derived tag generation step, can be aggregated into a unified data structure (such as a JSON object, a list, or a collection of tag key-value pairs). The merged result is the final user profile tag set. This set can describe the user's static attributes and dynamic states, for example: {"Age": "25", "Membership Level": "VIP", "Spending Potential": "High", "Chuckling Risk": "Low"}. This set is the final output of the user profile and can be directly used by downstream applications such as precision marketing and personalized recommendations.
[0067] Based on the above-described user profile construction method, this application also provides a user profile construction apparatus. The following will combine... Figure 3 The device is described in detail.
[0068] Figure 3 The diagram illustrates a structural block diagram of a user profile building apparatus according to an embodiment of this application.
[0069] likeFigure 3 As shown, the user profile building device in this embodiment includes a feature extraction module 310, a mapping module 320, a calculation module 330, a fusion module 340, and a generation module 350.
[0070] The feature extraction module 310 is used to extract features from structured and unstructured data respectively to obtain multi-dimensional features. In one embodiment, the feature extraction module 310 can be used to perform the operation S110 described above, which will not be repeated here.
[0071] The mapping module 320 is used to map multi-dimensional features to a unified feature space to obtain the mapped features. In one embodiment, the mapping module 320 can be used to perform the operation S120 described above, which will not be repeated here.
[0072] The calculation module 330 is used to calculate the fusion weights of each feature by utilizing the current business scenario identifier and the mapped multi-dimensional features through an attention mechanism. In one embodiment, the calculation module 330 can be used to perform the operation S130 described above, which will not be repeated here.
[0073] The fusion module 340 is used to perform weighted fusion of the mapped multi-dimensional features based on fusion weights to generate an integrated user feature vector. In one embodiment, the fusion module 340 can be used to perform the operation S140 described above, which will not be repeated here.
[0074] The generation module 350 is used to generate user profile tags based on the integrated user feature vector through an extensible tagging system. The extensible tagging system includes basic tags and dynamically generated derived tags. In one embodiment, the generation module 350 can be used to perform the operation S150 described above, which will not be repeated here.
[0075] In some embodiments, feature extraction is performed on structured data and unstructured data respectively to obtain multi-dimensional features, including: performing parallel dual-channel feature extraction on structured data to obtain user value quantification features and behavioral pattern association features; and performing lightweight feature extraction on unstructured data to obtain text semantic features and image visual features.
[0076] In some embodiments, performing parallel dual-channel feature extraction on structured data to obtain user value quantification features and behavioral pattern association features includes: quantifying user consumption behavior using an RFM analysis framework that incorporates a time decay function; weighting the quantification results using a category value coefficient matrix to generate user value quantification features; mining association rules from user behavior sequences based on the Apriori algorithm with an added time decay factor; and extracting association rules with confidence levels higher than a preset threshold as behavioral pattern association features.
[0077] In some embodiments, performing lightweight feature extraction on unstructured data to obtain text semantic features and image visual features includes: loading a pre-trained Sentence-BERT model, fine-tuning the fully connected layer added to the last layer of the model using business corpus to obtain a domain-adapted semantic model; inputting user text data into the domain-adapted semantic model and outputting text semantic feature vectors; loading an image model based on the ResNet-18 architecture, wherein the image model is optimized by channel pruning and the number of convolutional channels is compressed to a preset number; inputting user image data into the channel-pruned optimized image model and outputting image visual feature vectors.
[0078] In some embodiments, using the current business scenario identifier, calculating the fusion weights of each feature through an attention mechanism on the mapped multi-dimensional features includes: concatenating the mapped multi-dimensional features with the identifier code of the current business scenario identifier to form a fusion input vector; inputting the fusion input vector into an attention computing network to calculate the initial attention weights corresponding to each original multi-dimensional feature; querying the corresponding scenario bias term from a predefined bias term matrix according to the identifier code of the business scenario identifier; and applying the scenario bias term to the initial attention weights to generate the fusion weights of each multi-dimensional feature.
[0079] In some embodiments, the process of generating an integrated user feature vector by weighted fusion of mapped multi-dimensional features based on fusion weights includes: normalizing the fusion weights into a weight distribution, wherein the sum of each weight coefficient is 1; constructing a feature matrix from the mapped multi-dimensional feature vectors; and performing a weighted summation operation on the normalized fusion weights and the feature matrix to generate an integrated user feature vector.
[0080] In some embodiments, generating user profile tags based on an integrated user feature vector and an extensible tagging system includes: directly querying and mapping from a user static attribute database to generate basic tags; dynamically generating derived tags based on the integrated user feature vector through at least one of the following methods: inputting the integrated user feature vector into a pre-trained XGBoost classification model, mapping the classification probability results output by the model to discrete predicted tags, and / or matching the integrated user feature vector with predefined SQL rule conditions, triggering and generating corresponding rule tags when the conditions are met; merging the basic tags and derived tags to output the final user profile tag set.
[0081] According to embodiments of this application, any multiple modules among the feature extraction module 310, mapping module 320, calculation module 330, fusion module 340, and generation module 350 can be combined into one module, or any one of these modules can be split into multiple modules. Alternatively, at least some of the functions of one or more of these modules can be combined with at least some of the functions of other modules and implemented in one module. According to embodiments of this application, at least one of the feature extraction module 310, mapping module 320, calculation module 330, fusion module 340, and generation module 350 can be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit (ASIC), or implemented in hardware or firmware by any other reasonable means of integrating or packaging circuitry, or implemented in software, hardware, or firmware, or in any suitable combination of any of these three implementation methods. Alternatively, at least one of the feature extraction module 310, mapping module 320, calculation module 330, fusion module 340 and generation module 350 may be implemented at least partially as a computer program module, which can perform corresponding functions when the computer program module is run.
[0082] Figure 4 A block diagram schematically illustrates an electronic device suitable for implementing a user profile construction method according to an embodiment of this application.
[0083] like Figure 4 As shown, an electronic device according to an embodiment of this application includes a processor 401, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 402 or a program loaded from a storage portion 408 into a random access memory (RAM) 403. The processor 401 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 401 may also include onboard memory for caching purposes. The processor 401 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of this application.
[0084] RAM 403 stores various programs and data required for the operation of the electronic device. Processor 401, ROM 402, and RAM 403 are interconnected via bus 404. Processor 401 executes various operations of the method flow according to embodiments of this application by executing programs in ROM 402 and / or RAM 403. It should be noted that programs may also be stored in one or more memories other than ROM 402 and RAM 403. Processor 401 may also execute various operations of the method flow according to embodiments of this application by executing programs stored in said one or more memories.
[0085] According to embodiments of this application, the electronic device may further include an input / output (I / O) interface 405, which is also connected to a bus 404. The electronic device may also include one or more of the following components connected to the input / output (I / O) interface 405: an input section 406 including a keyboard, mouse, etc.; an output section 407 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 408 including a hard disk, etc.; and a communication section 409 including a network interface card such as a LAN card, modem, etc. The communication section 409 performs communication processing via a network such as the Internet. A drive 410 is also connected to the input / output (I / O) interface 405 as needed. A removable medium 411, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 410 as needed so that computer programs read from it can be installed into the storage section 408 as needed.
[0086] This application also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs, which, when executed, implement the method according to the embodiments of this application.
[0087] According to embodiments of this application, the computer-readable storage medium can be a non-volatile computer-readable storage medium, such as including but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this application, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to embodiments of this application, the computer-readable storage medium may include ROM 402 and / or RAM 403 and / or one or more memories other than ROM 402 and RAM 403 described above.
[0088] Embodiments of this application also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowchart. When the computer program product is run on a computer system, the program code is used to enable the computer system to implement the user profile construction method provided in the embodiments of this application.
[0089] When the computer program is executed by the processor 401, it performs the functions defined in the system / apparatus of this application embodiment. According to the embodiments of this application, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0090] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and downloaded and installed via communication section 409, and / or installed from removable medium 411. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.
[0091] In such an embodiment, the computer program can be downloaded and installed from a network via communication section 409, and / or installed from removable medium 411. When the computer program is executed by processor 401, it performs the functions defined in the system of this application embodiment. According to embodiments of this application, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0092] According to embodiments of this application, program code for executing the computer programs provided in the embodiments of this application can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, Python, "C", or similar programming languages. The program code can be executed entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0093] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0094] Those skilled in the art will understand that the features described in the various embodiments of this application can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in this application. In particular, the features described in the various embodiments of this application can be combined and / or combined in various ways without departing from the spirit and teachings of this application. All such combinations and / or combinations fall within the scope of this application.
Claims
1. A user portrait construction method, characterized in that, The method comprises: respectively extracting features of structured data and unstructured data to obtain multi-dimensional features; mapping the multi-dimensional features to a unified feature space to obtain mapped multi-dimensional features; using the current business scenario identifier, calculating the fusion weight of each feature through an attention mechanism based on the mapped multi-dimensional features; based on the fusion weight, weighting and fusing the mapped multi-dimensional features to generate an integrated user feature vector; based on the integrated user feature vector, generating a user portrait label through an extensible label system, wherein the extensible label system comprises a basic label and a dynamically generated derivative label.
2. The method of claim 1, wherein, The method of respectively extracting features of structured data and unstructured data to obtain multi-dimensional features comprises: performing parallel dual-channel feature extraction on structured data to obtain user value quantification features and behavior pattern association features; performing lightweight feature extraction on unstructured data to obtain text semantic features and image visual features.
3. The method of claim 2, wherein, The method of performing parallel dual-channel feature extraction on structured data to obtain user value quantification features and behavior pattern association features comprises: using an RFM analysis framework with a time decay function to quantify user consumption behavior; using a category value coefficient matrix to weight the quantification results to generate user value quantification features; based on an Apriori algorithm with a time decay factor, mining association rules from user behavior sequences; extracting association rules with a confidence level higher than a preset threshold as the behavior pattern association features.
4. The method of claim 2, wherein, The method of performing lightweight feature extraction on unstructured data to obtain text semantic features and image visual features comprises: loading a pre-trained Sentence-BERT model, fine-tuning the fully connected layer added at the end of the model using business corpus to obtain a domain-adapted semantic model; inputting user text data into the domain-adapted semantic model to output a text semantic feature vector; loading an image model based on ResNet-18 architecture, the image model is optimized by channel pruning, and the number of convolution channels is compressed to a preset number; inputting user image data into the image model optimized by channel pruning to output an image visual feature vector.
5. The method of claim 1, wherein, The method of using the current business scenario identifier to calculate the fusion weight of each feature through an attention mechanism based on the mapped multi-dimensional features comprises: concatenating the mapped multi-dimensional features with the identifier code of the current business scenario identifier to form a fusion input vector; inputting the fusion input vector into an attention calculation network to calculate the initial attention weight corresponding to each original multi-dimensional feature; querying the corresponding scene bias term from the pre-defined bias term matrix according to the identifier code of the business scenario identifier; applying the scene bias term to the initial attention weight to generate the fusion weight of each multi-dimensional feature.
6. The method according to claim 1 or 5, characterized in that, The method of weighting and fusing the mapped multi-dimensional features based on the fusion weight to generate an integrated user feature vector comprises: normalizing the fusion weight into a weight distribution, wherein the sum of each weight coefficient is 1; constructing a feature matrix with the mapped multi-dimensional features. The normalized fusion weight is weighted and summed with the feature matrix to generate the integrated user feature vector.
7. The method of claim 1, wherein, The user portrait label is generated based on the integrated user feature vector through an extensible label system, which includes: Basic labels are generated by directly querying and mapping from a user static attribute database. Derivative labels are dynamically generated based on the integrated user feature vector through at least one of the following methods: inputting the integrated user feature vector into a pre-trained XGBoost classification model, mapping the classification probability result output by the model into discrete prediction labels, and / or matching the integrated user feature vector with pre-defined SQL rule conditions, and triggering and generating corresponding rule labels when the conditions are met. The basic labels and the derivative labels are merged to output a final set of user portrait labels. 8.A user profiling apparatus, characterized by comprising: It includes: A feature extraction module for extracting features from structured data and unstructured data respectively to obtain multi-dimensional features; A mapping module for mapping the multi-dimensional features to a unified feature space to obtain mapped multi-dimensional features; A calculation module for calculating the fusion weight of each feature based on the current business scenario identifier through an attention mechanism; A fusion module for weighting and fusing the mapped multi-dimensional features based on the fusion weight to generate an integrated user feature vector; A generation module for generating a user portrait label based on the integrated user feature vector through an extensible label system, which includes basic labels and dynamically generated derivative labels.
9. An electronic device comprising: One or more processors; Memory for storing one or more computer programs, characterized in that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1-7.
10. A computer readable storage medium having stored thereon a computer program or instructions, characterized in that, The computer program or instructions are executed by the processor to implement the steps of the method according to any one of claims 1-7.