User portrait intelligent speculation method and device, electronic equipment and storage medium

By constructing the home model data set and training the feedforward neural network model, the problem of poor accuracy in user portrait construction in the existing technology is solved, intelligent speculation and precise positioning of user portraits are realized, and marketing effect and user satisfaction are improved.

CN119557284APending Publication Date: 2025-03-04E-SURFING DIGITAL LIFE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411606756.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-11
Publication Date
2025-03-04

AI Technical Summary

Technical Problem

When building user portraits, the existing technology cannot comprehensively consider the actual situation of the user, resulting in poor accuracy in portrait construction.

Method used

By obtaining the collected data of multiple target objects, sorting and preprocessing based on the preset home model data structure, forming a home model data set, and using a feedforward neural network to train it to obtain the target model, and finally deploying the model to the web application architecture for user portrait speculation.

Benefits of technology

It realizes intelligent speculation of user portraits, improves the accuracy and usability of user portraits, and can more accurately locate target groups, improve marketing effectiveness and user satisfaction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119557284A_ABST
    Figure CN119557284A_ABST
Patent Text Reader

Abstract

The invention discloses a user portrait intelligent speculation method and device, electronic equipment and a storage medium, and the method comprises the steps: obtaining collection data of a plurality of target objects, and carrying out the arrangement of the collection data based on a preset home model data structure, and obtaining home model data; preprocessing the family model data to obtain a family model data set; the family model data set comprises feature data and label data; performing model training on a preset feedforward neural network by using the family model data set to obtain a target model; and deploying the target model to a Web application architecture associated with the to-be-speculated object, so that the Web application architecture performs portrait speculation on the to-be-speculated object through the target model. The method constructs the user portraits based on the family level, can more accurately position the target group, can accurately perform intelligent speculation of the user portraits, and can be widely applied to the technical field of data processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a method, device, electronic device and storage medium for intelligent inference of user portraits. Background Art

[0002] With the continuous development of big data technology and the continuous improvement of hardware performance, AI models have also begun to be commercialized on a large scale. In order to better understand and serve users, enterprises build user portraits based on user basic data and behavior data, thereby improving business benefits and user satisfaction. However, most existing user portrait constructions build corresponding models based on user basic data to realize AI model construction, which cannot comprehensively consider the actual situation of users, and the accuracy of portrait construction is poor. Summary of the invention

[0003] The present invention proposes a method, device, electronic device and storage medium for intelligent inference of user portraits, aiming to solve one of the technical problems in the related art at least to a certain extent. The embodiments of the present invention can accurately realize intelligent inference of user portraits.

[0004] On the one hand, an embodiment of the present invention provides a user portrait intelligent inference method, including:

[0005] Acquire collected data of multiple target objects, organize the collected data based on a preset family model data structure, and obtain family model data;

[0006] Preprocessing the family model data to obtain a family model data set; the family model data set includes feature data and label data;

[0007] Use the family model data set to train the preset feedforward neural network model to obtain the target model;

[0008] The target model is deployed to the Web application architecture associated with the object to be inferred, so that the Web application architecture performs a profile inference on the object to be inferred through the target model.

[0009] Optionally, the collected data is sorted based on a preset family model data structure to obtain family model data, including the following steps:

[0010] Based on the preset family model data structure, the collected data is stored in layers and processed and analyzed through data warehouse technology to obtain family model data;

[0011] Among them, the family model data structure includes family layer, user layer, product service layer, device layer and label layer.

[0012] Optionally, the collected data is obtained based on a preset application carrier; based on a preset family model data structure, the collected data is stored in layers and processed and analyzed through data warehouse technology to obtain family model data, including the following steps:

[0013] Extract the household data, primary account, product and service account, device and tag attributes associated with each target object based on the collected data;

[0014] Store family data into the family layer;

[0015] The account information of the main account and its associated sub-accounts is stored in the user layer; according to the target object bound to the same family data, the first relationship data between the family layer and the user layer is established;

[0016] Store product service accounts in the product service layer; store devices in the device layer; store tag attributes in the tag layer;

[0017] According to the main account, product service account, device and tag attributes associated with the same target object, second relationship data of user layer, product service layer, device layer and tag layer are established;

[0018] Based on the family model data structure storing the collected data, the family model data is obtained by combining the first relationship data and the second relationship data.

[0019] Optionally, preprocessing the family model data to obtain a family model data set includes the following steps:

[0020] Based on the family model data, target operations are performed through a preset computing engine to obtain sample data for each target object; the target operations include data format conversion, missing value processing, outlier processing, and standardization or normalization; the sample data includes feature data and label data of the target object;

[0021] The sample data corresponding to multiple target objects are integrated to form a family model dataset.

[0022] Optionally, using the family model data set to perform model training on a preset feedforward neural network to obtain a target model includes the following steps:

[0023] Initializing the network parameters of the feedforward neural network by random values ​​to obtain a first model; the network parameters include weights and biases;

[0024] Use feature data as model input and label data as result comparison label;

[0025] Based on the model input and result comparison labels, the loss is calculated by combining the preset loss function in the forward propagation of the first model, and the network parameters of the first model are optimized and adjusted by back propagation based on the loss calculation result and the preset optimizer to obtain the second model;

[0026] Add 1 to the number of iterations, use the second model as the first model, return to execute the steps of calculating the loss based on the model input and result comparison labels by forward propagation in the first model combined with the preset loss function, until the number of iterations reaches the preset number of training times, and use the second model obtained from the last iteration as the target model; the number of iterations is initialized to 0.

[0027] Optionally, the method further comprises at least one of the following steps:

[0028] Based on the validation set and test set obtained by splitting the family model data set, the training effect of the target model is evaluated by the mean square error;

[0029] In response to the adjustment instructions of the management object, hyper-parameter adjustment is performed on the model training.

[0030] Optionally, deploying the target model to a Web application architecture associated with the object to be inferred includes the following steps:

[0031] Configure web endpoints in the web application architecture;

[0032] The target model calls the HTTP interface exposed by the Web endpoint.

[0033] On the other hand, an embodiment of the present invention provides a user portrait intelligent inference device, including:

[0034] The first module is used to obtain the collected data of multiple target objects, and to organize the collected data based on a preset family model data structure to obtain family model data;

[0035] The second module is used to preprocess the family model data to obtain a family model data set; the family model data set includes feature data and label data;

[0036] The third module is used to train the preset feedforward neural network using the family model data set to obtain the target model;

[0037] The fourth module is used to deploy the target model to the Web application architecture associated with the object to be inferred, so that the Web application architecture can perform portrait inference on the object to be inferred through the target model.

[0038] Optionally, the third module is specifically used for:

[0039] Initializing the network parameters of the feedforward neural network by random values ​​to obtain a first model; the network parameters include weights and biases;

[0040] Use feature data as model input and label data as result comparison label;

[0041] Based on the model input and result comparison labels, the loss is calculated by combining the preset loss function in the forward propagation of the first model, and the network parameters of the first model are optimized and adjusted by back propagation based on the loss calculation result and the preset optimizer to obtain the second model;

[0042] Add 1 to the number of iterations, use the second model as the first model, return to execute the steps of calculating the loss based on the model input and result comparison labels by forward propagation in the first model combined with the preset loss function, until the number of iterations reaches the preset number of training times, and use the second model obtained from the last iteration as the target model; the number of iterations is initialized to 0.

[0043] Furthermore, the device includes at least one of the following:

[0044] The fifth module is used to evaluate the training effect of the target model through the mean square error based on the validation set and test set obtained by segmenting the family model data set;

[0045] The sixth module is used to adjust the hyper-parameters of the model training in response to the adjustment instructions of the management object.

[0046] On the other hand, an embodiment of the present invention provides an electronic device, including: a processor and a memory; the memory is used to store programs; the processor executes the program to implement the above-mentioned user portrait intelligent inference method.

[0047] On the other hand, an embodiment of the present invention provides a computer storage medium, which stores a program executable by a processor. When the program executable by the processor is executed by the processor, it is used to implement the above-mentioned user portrait intelligent inference method.

[0048] The embodiment of the present invention obtains the collected data of multiple target objects, organizes the collected data based on a preset family model data structure to obtain family model data; pre-processes the family model data to obtain a family model data set; the family model data set includes feature data and label data; uses the family model data set to perform model training on a preset feedforward neural network to obtain a target model; deploys the target model to a Web application architecture associated with the object to be inferred, so that the Web application architecture performs portrait inference on the object to be inferred through the target model. The embodiment of the present invention collects scattered basic user data and organizes and analyzes it into a family model hierarchical data structure, which greatly increases the availability and neatness of user data and improves its ability in operational analysis. The present invention can more accurately locate the target group by constructing user portraits based on the family level. The present invention can accurately perform intelligent inference of user portraits. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] The accompanying drawings are used to provide a further understanding of the technical solution of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the technical solution of the present invention and do not constitute a limitation on the technical solution of the present invention.

[0050] Figure 1 A schematic diagram of an implementation environment for intelligent inference of user portraits provided by an embodiment of the present invention;

[0051] Figure 2 A flowchart of a user portrait intelligent inference method provided by an embodiment of the present invention;

[0052] Figure 3 A schematic diagram of a user family data structure provided by an embodiment of the present invention;

[0053] Figure 4 A schematic diagram of the expansion process of step S200 provided in an embodiment of the present invention;

[0054] Figure 5 A schematic diagram of the structure of a family model data set provided by an embodiment of the present invention;

[0055] Figure 6 A schematic diagram of the expansion process of step S300 provided in an embodiment of the present invention;

[0056] Figure 7 A schematic diagram of the hierarchical structure of a feedforward neural network provided by an embodiment of the present invention;

[0057] Figure 8 A schematic diagram of the architecture of a home model Web endpoint provided by an embodiment of the present invention;

[0058] Fig. 9A schematic diagram of the structure of a user portrait intelligent inference device provided by an embodiment of the present invention;

[0059] Fig.10 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0060] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0061] It should be noted that, although the functional modules are divided in the system schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the system or the order in the flowchart. The terms "first / S100", "second / S200", etc. in the specification, claims and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0062] Reference to "embodiments" in the present invention means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described in the present invention may be combined with other embodiments.

[0063] To facilitate the understanding of the technical solution of the present invention, the following is an explanation of the specific names of the technical features that may appear in the technical solution of the present invention:

[0064] ETL: ETL is the abbreviation of Extract-Transform-Load, which is used to describe the process of extracting, transforming, and loading data from the source to the destination. The term ETL is more commonly used in data warehouses, but its objects are not limited to data warehouses. ETL is the process of extracting, cleaning, and transforming the data of the business system and loading it into the data warehouse. The purpose is to integrate the scattered, messy, and non-standard data in the enterprise together to provide an analytical basis for the enterprise's decision-making. ETL is an important part of the BI (Business Intelligence) project.

[0065] Algorithmic model: refers to a combination of algorithms and mathematical models used to solve specific problems or perform specific tasks in the fields of computer science and artificial intelligence. These models are usually based on data input and generate predictions, classifications, decisions or other outputs through a series of computational steps.

[0066] HDFS: Hadoop Distributed File System is a highly fault-tolerant distributed file system designed to run on large-scale data sets. It is part of the Apache Hadoop project and is designed to handle massive amounts of data in a big data environment.

[0067] RDBMS: Relational Database Management System (RDBMS) refers to a set of programs (database management system software) that includes the logical organization and storage of interconnected data. A relational database management system is a system that manages relational databases and organizes data logically.

[0068] Django: A comprehensive and easy-to-use web framework written in Python, suitable for web application development of all sizes. Its design philosophy focuses on rapid development and reusability, allowing developers to efficiently build and maintain web applications.

[0069] It should be understood that all user personal information (such as basic data, behavior data and tracking data) and related information used in the processing flow of the technical solution of the present invention are obtained and used with authorization.

[0070] like Figure 1 FIG. 1 is a schematic diagram of an implementation environment provided by an embodiment of the present invention. Figure 1 The implementation environment includes at least one terminal 102 and a server 101. The terminal 102 and the server 101 can be connected to a network wirelessly or wired to complete data transmission and exchange.

[0071] Server 101 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), as well as big data and artificial intelligence platforms.

[0072] In addition, the server 101 can also be a node server in the blockchain network. Blockchain is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, and encryption algorithm.

[0073] The terminal 102 may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited thereto. The terminal 102 and the server 101 may be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiment of the present invention.

[0074] Based on the example Figure 1 In the implementation environment shown, an embodiment of the present invention provides a method for intelligent inference of user portraits. The following is explained using the example of the method for intelligent inference of user portraits applied in the terminal 102. It can be understood that the method for intelligent inference of user portraits can also be applied in the server 101.

[0075] Reference Figure 2 , Figure 2 The flowchart of the user portrait intelligent inference method applied to the terminal provided by the embodiment of the present invention, the execution subject of the user portrait intelligent inference method can be any of the aforementioned computer devices (including servers or terminals). Figure 2 , the method comprises the following steps:

[0076] S100, acquiring collected data of multiple target objects, and arranging the collected data based on a preset family model data structure to obtain family model data;

[0077] It should be noted that, in some embodiments, the collected data is sorted based on a preset family model data structure to obtain family model data, which may include the following steps: based on the preset family model data structure, the collected data is stored in layers and processed and analyzed through data warehouse technology to obtain family model data; wherein the family model data structure includes a family layer, a user layer, a product service layer, a device layer, and a label layer.

[0078] In some preferred embodiments, the collected data is obtained based on a preset application carrier; based on a preset family model data structure, the collected data is stored in layers and processed and analyzed through data warehouse technology to obtain family model data, which may include the following steps: extracting family data, main account, product service account, device and label attributes associated with each target object based on the collected data; storing the family data in the family layer; storing the account information of the main account and its associated sub-accounts in the user layer; establishing first relationship data between the family layer and the user layer based on the target objects bound to the same family data; storing the product service account in the product service layer; storing the device in the device layer; storing the label attributes in the label layer; establishing second relationship data of the user layer, product service layer, device layer and label layer based on the main account, product service account, device and label attributes associated with the same target object; based on the family model data structure that stores the collected data, combining the first relationship data and the second relationship data to obtain the family model data.

[0079] For example, in some specific implementations, from the upstream point of view, data is landed in the database and local log through the Web application carrier according to the agreed rules. The downstream synchronizes the collected user data to HDFS for storage, and uses big data technology to store it in layers in the form of a data warehouse and perform ETL processing and analysis, which can eventually form Figure 3 The family data structure shown.

[0080] from Figure 3 It can be seen that the data is divided into five hierarchical structures: family layer, user layer, product service layer, device layer, and tag layer. The data foundation is the user layer (Un represents the user's main account, and SUn represents the user's sub-account). According to the corresponding rules, the user layer reversely outputs the family layer data. Fn represents a family, and there can be multiple users in a family. The family layer binds multiple users together and establishes relationship data between users. From the user layer down to the product service layer, Sn represents the product service account, which can be understood as a user is bound to one or more product services, and there is a many-to-many relationship between them. Further down is the device layer (Dn represents a certain device), which is similar to the product service. The only difference is that a user can have multiple devices, but a device can only correspond to one user. The last one is the tag layer (Tn represents a certain tag attribute). User tags (which can come from the tag data determined by the application carrier based on the user's daily usage data records based on the preset mapping rules) are usually used to classify, analyze and personalize services for users. These tags help platforms and enterprises better understand user needs, conduct precision marketing, and improve user experience.

[0081] S200, preprocessing the family model data to obtain a family model data set;

[0082] Among them, the family model dataset includes feature data and label data;

[0083] It should be noted that in some embodiments, Figure 4 As shown, preprocessing the family model data to obtain the family model data set may include the following steps: S201, based on the family model data, performing target operations through a preset computing engine to obtain sample data for each target object; the target operations include data format conversion, missing value processing, outlier processing, and standardization or normalization; the sample data includes feature data and label data of the target object; S202, integrating the sample data corresponding to multiple target objects into a family model data set.

[0084] For example, in some specific implementations, the constructed five-level household data structure can be used as a basis to further transform the user data through the Spark computing engine, such as SparkSQL's DataFrame operation, to handle missing values ​​and outliers in a DSL code style, and to standardize or normalize to ensure that the data is within a similar range. The feature-related values ​​in the basic data are converted into real-valued enumerations. Finally, the generated Figure 5 The data structure in the family model dataset diagram shown.

[0085] Depend on Figure 5 It can be seen that Fn represents a family, where Un represents a user, which is composed of various feature data, such as basic data, user behavior, user embedding, etc. Ln represents the tag value related to the user feature, which is related to the user tag. The user tag is the user behavior preference, device information, user feedback, social attributes and other data obtained through statistical analysis of agreed rules. Then Un+Ln constitutes a sample data, and multiple sample data constitute the data set of the family model.

[0086] S300, using the family model data set to perform model training on a preset feedforward neural network to obtain a target model;

[0087] It should be noted that in some embodiments, Figure 6 As shown, using the family model data set to perform model training on the preset feedforward neural network to obtain the target model can include the following steps: S301, initializing the network parameters of the feedforward neural network by random values ​​to obtain a first model; the network parameters include weights and biases; S302, taking the feature data as the model input, and taking the label data as the result comparison label; S303, based on the model input and the result comparison label, calculating the loss by forward propagation in the first model in combination with a preset loss function, and optimizing and adjusting the network parameters of the first model by back propagation based on the loss calculation result in combination with a preset optimizer to obtain a second model; S304, adding 1 to the number of iterations, using the second model as the first model, returning to execute the step of calculating the loss based on the model input and the result comparison label, by forward propagation in the first model in combination with a preset loss function, until the number of iterations reaches the preset number of training times, and taking the second model obtained in the last iteration as the target model; wherein the number of iterations is initialized to 0.

[0088] For example, in some specific implementations, a feedforward neural network (FNN) can be selected as the training algorithm of the model, which is suitable for tabular data or feature vectors. The network structure includes an input layer, several hidden layers and an output layer, and is often used for classification or regression tasks.

[0089] Depend on Figure 7 It can be seen that it is a simple FNN, which has a hidden layer (4 neurons), an input layer (usually no processing), and an output layer (2 neurons, which means that the final output is a two-dimensional vector). Usually there is also a bias layer in the network, which is the "+1" part in the figure.

[0090] Input layer: receives processed user feature data. Assume that the input data has n features.

[0091] Hidden layer: contains multiple hidden layers, each layer has several neurons. Here, ReLU (Rectified Linear Unit) is used as the activation function: ReLU (x) = max (0, x); for the input x, if x is greater than 0, the ReLU function outputs x; if x is less than or equal to 0, it outputs 0.

[0092] Output layer: Due to the need to predict related user portraits, the present invention can use a linear activation function: Linear(x)=x; the linear activation function is the simplest activation function, and its output is linearly related to the input.

[0093] The training process can be implemented as follows:

[0094] Initialization parameters: Weights W and biases b are initialized with random values.

[0095] Forward propagation: Calculate the output of each layer.

[0096] For the calculation of hidden layer l:

[0097]

[0098]

[0099] in, Represents the weight matrix of the lth layer; represents the linear combination of the lth layer; a (l-1) represents the activation value of the l-1 layer (i.e., the output after being processed by the activation function); b l Represents the bias vector of the lth layer.

[0100] For the calculation of the output layer:

[0101]

[0102] in, Represents the predicted output of the model; Linear means that no activation function is used in the output layer, and as the prediction output.

[0103] Calculate the loss: Use the mean squared error (MSE) loss function.

[0104]

[0105] in, Represents the predicted output of the model for the i-th sample; y i Represents the actual target value for the i-th sample; Represents the squared difference between the predicted value and the true value of each sample; It means to sum up the squared differences of all samples and take the average.

[0106] Backpropagation: Calculate the gradient of the loss function with respect to each parameter.

[0107] For the gradient calculation of the output layer:

[0108]

[0109] Among them, L represents the loss function; represents the linear combination of the output layer; Represents the linear combination of the loss function L on the output layer The partial derivative of .

[0110] The gradient calculation for the hidden layer uses the chain rule:

[0111]

[0112]

[0113]

[0114] Where L represents the loss function; represents the linear combination of the output layer; a (l) represents the activation output of layer l; Represents the weight matrix of the lth layer; ReLU function pair The main function of this set of formulas is to calculate the gradient of weights and biases of each layer in the neural network through the back propagation algorithm.

[0115] Update parameters: Update weights and biases using an optimizer such as gradient descent or Adam.

[0116] Gradient descent update formula:

[0117]

[0118]

[0119] Here, η represents the learning rate.

[0120] Based on the data set example in the previous step, the model training process is further completed here. In PyTorch, the feedforward neural network model is defined by inheriting torch.nn.Module. When defining the model, the Sigmoid activation function is used for multi-label classification. The training process includes defining the loss function, optimizer, and iterating the training data through multiple epochs.

[0121] (1) Data preparation:

[0122] Use PyTorch's Dataset and DataLoader.

[0123] Convert the label to binary format.

[0124] (2) Model construction:

[0125] Use torch.nn.Module to define the model. Use ReLU (Rectified Linear Unit) activation function in the hidden layer to increase the nonlinear expression ability of the model.

[0126] The Sigmoid activation function is used in the output layer to map the output value to the [0,1] interval for multi-label classification.

[0127] (3) Training model:

[0128] Define the BCEWithLogitsLoss loss function and the Adam optimizer. BCEWithLogitsLoss is a loss function for multi-label classification that combines the Sigmoid activation function and the binary cross entropy loss. Adam is a commonly used optimizer that updates model parameters by adaptively adjusting the learning rate.

[0129] Cycle training. The number of cyclic training is defined by setting num_epoch. The training process includes the following steps: forward propagation -> calculation of loss -> back propagation -> optimization.

[0130] In some preferred embodiments, the method may further include at least one of the following steps:

[0131] Based on the validation set and test set obtained by splitting the family model data set, the training effect of the target model is evaluated by the mean square error;

[0132] For example, in some specific implementations, the purpose of model evaluation is to measure the performance of the trained neural network model. The following is an evaluation and comparison of the model from three directions:

[0133] Validation set evaluation: During the training process, the validation set is used to evaluate the performance of the model. After each training cycle (epoch), the MSE loss on the validation set is calculated to observe whether the model is overfitting or underfitting.

[0134] Test set evaluation: After training, use an independent test set to evaluate the final performance of the model. Calculate the MSE loss and other relevant metrics (such as mean absolute error, R 2 scores, etc.).

[0135] Model comparison: You can train multiple models with different structures or hyperparameters, compare them on the test set, and select the model with the best performance.

[0136] Here we continue to evaluate the trained model and evaluate the model on the test set, usually calculating the accuracy or other evaluation indicators. Here we calculate the degree of match between the predicted label and the true label, with the following steps:

[0137] (1) Set the model to evaluation mode.

[0138] (2) Traverse the test set.

[0139] (3) Input feature data into the model to obtain output.

[0140] (4) Convert the output to a predicted label.

[0141] (5) Calculate the matching degree between the predicted label and the true label.

[0142] In response to the adjustment instructions of the management object, hyper-parameter adjustment is performed on the model training.

[0143] For example, in some specific implementations, hyperparameters are key parameters that affect model training effects and performance, but are not learned during the training process and need to be adjusted manually. The specific implementation can be as follows:

[0144] Grid search / random search: Set the value range of hyperparameters (such as learning rate, number of hidden layers, number of neurons in each layer, etc.), and use grid search or random search method to find the best hyperparameter combination.

[0145] Cross-validation: Hyperparameter tuning is performed in conjunction with cross-validation techniques to more accurately evaluate model performance under different hyperparameter combinations.

[0146] Learning rate adjustment strategy: A learning rate decay strategy can be adopted to gradually reduce the learning rate as training progresses to improve the stability and accuracy of model training.

[0147] Early Stopping: Stop training early when the validation set loss no longer decreases significantly to prevent overfitting.

[0148] Model evaluation and hyperparameter tuning are key steps to ensure the performance of machine learning models. Model evaluation helps identify the pros and cons of the model and potential problems by checking the performance of the model on the validation set or test set, ensuring its accuracy and reliability in practical applications. Hyperparameter tuning further improves the performance and generalization ability of the model by optimizing the hyperparameter configuration of the model. The combination of the two ensures that the model can not only achieve good results on the training data, but also maintain excellent performance on unseen data.

[0149] S400, deploying the target model to the Web application architecture associated with the object to be inferred, so that the Web application architecture performs a portrait inference on the object to be inferred through the target model.

[0150] It should be noted that, in some embodiments, deploying the target model to the Web application architecture associated with the object to be inferred may include the following steps: configuring a Web endpoint in the Web application architecture; wherein the target model calls the HTTP interface exposed externally based on the Web endpoint.

[0151] Exemplarily, in some specific implementations, after completing the training of the family model, in order to facilitate the use of the model, the present invention establishes a Web endpoint for the family model, exposes an HTTP interface through the Web endpoint for the use of the model, and performs relevant usage controls on the interface.

[0152] Django is a comprehensive and easy-to-use web framework, especially suitable for projects that require rapid development and high-quality maintenance. Its design and functions make the development of web applications more efficient and secure. The present invention uses Django as the framework of web applications to receive HTTP requests, and after receiving the request, it will add logic code for parameter verification and permission control, then access and call the model through PyTorch, and finally respond to the request with the result returned by the model.

[0153] In order to reduce the load rate of a single node and improve the access efficiency of HTTP requests, the present invention is deployed as a single Agent in multiple nodes according to the Django+PyTorch+ model, and configures the Nginx service to distribute the requests to achieve a load balancing effect, such as Figure 8 As shown in the figure, the Nginx service will play the role of a request proxy in the entire architecture, receiving and responding to requests from various applications.

[0154] In order to explain the principle of the technical solution of the present invention in detail, the overall process of the present invention is described below in combination with some specific embodiments. It is easy to understand that the following is an explanation of the technical principle of the present invention and cannot be regarded as a limitation of the present invention.

[0155] First of all, it should be noted that with the continuous development of big data technology and the continuous improvement of hardware performance, AI models have also begun to be commercialized on a large scale. In order to better understand and serve users, companies build user portraits based on user basic data and behavior data, thereby improving business benefits and user satisfaction. After understanding user behavior patterns and needs, companies can formulate more accurate marketing strategies, reduce the waste of advertising resources, and improve marketing effectiveness.

[0156] In recent years, the large-scale commercialization of AI models has also promoted the development of user portraits. Compared with ordinary user portrait construction, building user portraits based on user family levels can obtain more dimensional information to achieve more accurate prediction of user needs, and can more accurately locate the target group in the market direction. Accurate marketing delivery can also save more resources.

[0157] According to different service application carriers, we can obtain a large amount of user data. In addition to basic user information, this data also includes user behavior, tracking logs, user preferences and other data. Based on these data, we can obtain data sets with higher use value through ETL analysis. Based on large-scale data sets, we can use AI algorithms to produce user portrait prediction models. The model will produce corresponding user portraits for new user data to facilitate enterprises to make more accurate and effective decisions in product development, marketing and customer service.

[0158] In view of this, the present invention provides a user portrait intelligent inference method, which can be implemented as follows:

[0159] 1. Family model data structure:

[0160] From the upstream point of view, data is landed in the database and local log through the Web application carrier according to the agreed rules. Downstream, the collected user data is synchronized to HDFS for storage. Through big data technology, it is stored in layers in the form of data warehouse and ETL processing and analysis is performed, which can eventually form Figure 3 The family data structure shown.

[0161] from Figure 3It can be seen that the data is divided into five hierarchical structures: family layer, user layer, product service layer, device layer, and tag layer. The data foundation is the user layer (Un represents the user's main account, and SUn represents the user's sub-account). According to the corresponding rules, the user layer reversely outputs the family layer data. Fn represents a family, and there can be multiple users in a family. The family layer binds multiple users together and establishes relationship data between users. From the user layer down to the product service layer, Sn represents the product service account, which can be understood as a user is bound to one or more product services, and there is a many-to-many relationship between them. Further down is the device layer (Dn represents a certain device), which is similar to the product service. The only difference is that a user can have multiple devices, but a device can only correspond to one user. The last one is the tag layer (Tn represents a certain tag attribute). User tags (which can come from the tag data determined by the application carrier based on the user's daily usage data records based on the preset mapping rules) are usually used to classify, analyze and personalize services for users. These tags help platforms and enterprises better understand user needs, conduct precision marketing, and improve user experience.

[0162] The overall data structure of the family model is implemented in the big data environment. By storing and using data in the big data environment, there are several advantages, including but not limited to the following:

[0163] Massive data processing capabilities: Big data components (such as Hadoop and Spark) can process and store large amounts of data, supporting data volumes from TB to PB levels, meeting the data processing needs of modern businesses.

[0164] Efficient data storage: These components usually use distributed storage systems (such as HDFS), which can store data on multiple nodes, improve storage elasticity and reliability, and reduce the risk of single point failure.

[0165] Flexible data processing: Big data technologies support various data processing modes, including batch processing, stream processing, and real-time analysis. For example, Apache Spark provides fast in-memory computing, supporting real-time data processing and complex queries.

[0166] Scalability: Big data systems can be scaled out horizontally by adding more nodes to expand computing and storage capabilities to cope with growing data volumes and business needs.

[0167] Therefore, the big data cluster environment is very suitable for the storage, processing and analysis of family model hierarchical data. Compared with the traditional RDBMS, it has better statistical capabilities for massive user data. Figure 3 With the five-layer data structure, we can obtain more user-available data as the training basis for the algorithm model.

[0168] 2. Family model dataset:

[0169] The generation of the family model data set is a key part of the entire family model output. The data set consists of multiple data samples, which in turn consist of feature values ​​and label values. The quality of the algorithm model output is basically determined by the quality of the data set. A good data set has many important advantages in algorithm model training:

[0170] Improve model performance: A good dataset contains rich and representative samples, which can help the model better learn the patterns in the data, thereby improving its performance and accuracy in practical applications.

[0171] Reduce overfitting: A diverse and high-quality dataset can help the model generalize better, reduce overfitting on the training set, and improve the performance of the model on unseen data.

[0172] Improve model robustness: By including different types of data, the model can learn to handle problems in a variety of scenarios, thereby improving its robustness in the face of uncertainty or complexity.

[0173] Optimize training time: High-quality datasets can enable the model to achieve good results in less training time, avoiding wasting computing resources and time on a large amount of invalid data.

[0174] Better data balance: A good dataset is usually carefully designed and processed to ensure that the amount of data for each category or label is balanced to avoid biased performance of the model on certain categories.

[0175] Based on the constructed five-level household data structure, the user data is further transformed through the Spark computing engine, such as SparkSQL's DataFrame operation, which handles missing values ​​and outliers in a DSL code style and performs standardization or normalization to ensure that the data is within a similar range. The feature-related values ​​in the basic data are converted into real-valued enumerations. The final generated Figure 5 The data structure in the family model dataset diagram shown.

[0176] Depend on Figure 5 It can be seen that Fn represents a family, where Un represents a user, which is composed of various feature data, such as basic data, user behavior, user embedding, etc. Ln represents the tag value related to the user feature, which is related to the user tag. The user tag is the user behavior preference, device information, user feedback, social attributes and other data obtained through statistical analysis of agreed rules. Then Un+Ln constitutes a sample data, and multiple sample data constitute the data set of the family model.

[0177] Now we have constructed some family label data for some user information data, as shown in Table 1. At the same time, we have cleaned the following data and used it as a case study for data set construction:

[0178] Table 1

[0179]

[0180] Use Pandas to encode and normalize the data. For example, here we specify gender, occupation, marital status, and home address as category features for encoding, and binarize the label data. Finally, we normalize the feature data to obtain the normalized feature data X_scaled and the binary label data y.

[0181] X_scaled:

[0182] “[[1.33630621 1.34990115 1.41421356 -0.70710678 0.70710678 1.41421356-0.70710678 -0.70710678 -1.41421356 1.41421356 -0.70710678 1.41421356 -0.70710678]

[0183] [-1.06904497 -1.04008777 -0.70710678 1.41421356 -1.41421356 -0.70710678 1.41421356 -0.70710678 0.70710678 -0.70710678 1.41421356 -0.70710678 -0.70710678]

[0184] [-0.26726124 -0.30981338 -0.70710678 -0.70710678 0.70710678 -0.70710678 -0.70710678 1.41421356 0.70710678 -0.70710678 -0.70710678 -0.70710678 1.41421356]]";

[0185] y:

[0186] “[[0 0 1 0 1] [0 1 0 1 0]

[0188] [1 0 0 1 0]]";

[0189] Taking this data as an example, train_test_split is used to split the data set into training set and test set X_train, X_test, y_train, y_test and used for model training. Create DataLoader, which provides an iterator for batch processing of data and supports shuffling the order of data.

[0190] 3. Family model training:

[0191] 3.1. Define the model architecture:

[0192] The present invention selects Feedforward Neural Networks (FNN) as the training algorithm of the model, which is suitable for tabular data or feature vectors. The network structure includes an input layer, several hidden layers and an output layer, and is often used for classification or regression tasks.

[0193] Depend on Figure 7 It can be seen that it is a simple FNN, which has a hidden layer (4 neurons), an input layer (usually no processing), and an output layer (2 neurons, which means that the final output is a two-dimensional vector). Usually there is also a bias layer in the network, which is the "+1" part in the figure.

[0194] Input layer: receives processed user feature data. Assume that the input data has n features.

[0195] Hidden layer: contains multiple hidden layers, each layer has several neurons. Here, ReLU (Rectified Linear Unit) is used as the activation function: ReLU (x) = max (0, x); for the input x, if x is greater than 0, the ReLU function outputs x; if x is less than or equal to 0, it outputs 0.

[0196] Output layer: Due to the need to predict related user portraits, the present invention can use a linear activation function: Linear(x)=x; the linear activation function is the simplest activation function, and its output is linearly related to the input.

[0197] 3.2 Training process:

[0198] Initialization parameters: Weights W and biases b are initialized with random values.

[0199] Forward propagation: Calculate the output of each layer.

[0200] For the calculation of hidden layer l:

[0201]

[0202]

[0203] in, Represents the weight matrix of the lth layer; represents the linear combination of the lth layer; a (l-1) represents the activation value of the l-1 layer (i.e., the output after being processed by the activation function); b l Represents the bias vector of the lth layer.

[0204] For the calculation of the output layer:

[0205]

[0206] in, Represents the predicted output of the model; Linear means that no activation function is used in the output layer, and as the prediction output.

[0207] Calculate the loss: Use the mean squared error (MSE) loss function.

[0208]

[0209] in, Represents the predicted output of the model for the i-th sample; Represents the actual target value for the i-th sample; Represents the squared difference between the predicted value and the true value of each sample; It means to sum up the squared differences of all samples and take the average.

[0210] Backpropagation: Calculate the gradient of the loss function with respect to each parameter.

[0211] For the gradient calculation of the output layer:

[0212]

[0213] Where L represents the loss function; represents the linear combination of the output layer; Represents the linear combination of the loss function L on the output layer The partial derivative of .

[0214] The gradient calculation for the hidden layer uses the chain rule:

[0215]

[0216]

[0217]

[0218] Where L represents the loss function; represents the linear combination of the output layer; a (l) represents the activation output of layer l; Represents the weight matrix of the lth layer; ReLU function pair The main function of this set of formulas is to calculate the gradient of weights and biases of each layer in the neural network through the back propagation algorithm.

[0219] Update parameters: Update weights and biases using an optimizer such as gradient descent or Adam.

[0220] Gradient descent update formula:

[0221]

[0222]

[0223] Here, η represents the learning rate.

[0224] Based on the data set example in the previous step, the model training process is further completed here. In PyTorch, the feedforward neural network model is defined by inheriting torch.nn.Module. When defining the model, the Sigmoid activation function is used for multi-label classification. The training process includes defining the loss function, optimizer, and iterating the training data through multiple epochs.

[0225] (1) Data preparation:

[0226] Use PyTorch's Dataset and DataLoader.

[0227] Convert the label to binary format.

[0228] (2) Model construction:

[0229] Use torch.nn.Module to define the model. Use ReLU (Rectified Linear Unit) activation function in the hidden layer to increase the nonlinear expression ability of the model.

[0230] The Sigmoid activation function is used in the output layer to map the output value to the [0,1] interval for multi-label classification.

[0231] (3) Training model:

[0232] Define the BCEWithLogitsLoss loss function and the Adam optimizer. BCEWithLogitsLoss is a loss function for multi-label classification that combines the Sigmoid activation function and the binary cross entropy loss. Adam is a commonly used optimizer that updates model parameters by adaptively adjusting the learning rate.

[0233] Cycle training. The number of cyclic training is defined by setting num_epoch. The training process includes the following steps: forward propagation -> calculation of loss -> back propagation -> optimization.

[0234] 3.3 Model Evaluation

[0235] The purpose of model evaluation is to measure the performance of a trained neural network model. The following models are evaluated and compared from three aspects:

[0236] Validation set evaluation: During the training process, the validation set is used to evaluate the performance of the model. After each training cycle (epoch), the MSE loss on the validation set is calculated to observe whether the model is overfitting or underfitting.

[0237] Test set evaluation: After training, use an independent test set to evaluate the final performance of the model. Calculate the MSE loss and other relevant metrics (such as mean absolute error, R 2 scores, etc.).

[0238] Model comparison: You can train multiple models with different structures or hyperparameters, compare them on the test set, and select the model with the best performance.

[0239] Here we continue to evaluate the trained model and evaluate the model on the test set, usually calculating the accuracy or other evaluation indicators. Here we calculate the degree of match between the predicted label and the true label, with the following steps:

[0240] (1) Set the model to evaluation mode.

[0241] (2) Traverse the test set.

[0242] (3) Input feature data into the model to obtain output.

[0243] (4) Convert the output into a predicted label.

[0244] (5) Calculate the matching degree between the predicted label and the true label.

[0245] 3.4. Hyperparameter adjustment:

[0246] Hyperparameters are key parameters that affect model training results and performance, but they are not learned during the training process and need to be adjusted manually. The specific implementation can be as follows:

[0247] Grid search / random search: Set the value range of hyperparameters (such as learning rate, number of hidden layers, number of neurons in each layer, etc.), and use grid search or random search method to find the best hyperparameter combination.

[0248] Cross-validation: Hyperparameter tuning is performed in conjunction with cross-validation techniques to more accurately evaluate model performance under different hyperparameter combinations.

[0249] Learning rate adjustment strategy: A learning rate decay strategy can be adopted to gradually reduce the learning rate as training progresses to improve the stability and accuracy of model training.

[0250] Early Stopping: Stop training early when the validation set loss no longer decreases significantly to prevent overfitting.

[0251] Model evaluation and hyperparameter tuning are key steps to ensure the performance of machine learning models. Model evaluation helps identify the pros and cons of the model and potential problems by checking the performance of the model on the validation set or test set, ensuring its accuracy and reliability in practical applications. Hyperparameter tuning further improves the performance and generalization ability of the model by optimizing the hyperparameter configuration of the model. The combination of the two ensures that the model can not only achieve good results on the training data, but also maintain excellent performance on unseen data.

[0252] 4. Family model deployment:

[0253] After completing the training of the family model, in order to facilitate the use of the model, the present invention establishes a Web endpoint for the family model, exposes an HTTP interface through the Web endpoint for the use of the model, and performs relevant use control on the interface.

[0254] Django is a comprehensive and easy-to-use web framework, especially suitable for projects that require rapid development and high-quality maintenance. Its design and functions make the development of web applications more efficient and secure. The present invention uses Django as the framework of web applications to receive HTTP requests, and after receiving the request, it will add logic code for parameter verification and permission control, then access and call the model through PyTorch, and finally respond to the request with the result returned by the model.

[0255] In order to reduce the load rate of a single node and improve the access efficiency of HTTP requests, the present invention is deployed as a single Agent in multiple nodes according to the Django+PyTorch+ model, and configures the Nginx service to distribute the requests to achieve a load balancing effect, such as Figure 8 As shown in the figure, the Nginx service will play the role of a request proxy in the entire architecture, receiving and responding to requests from various applications.

[0256] In some specific application scenarios, the method of intelligently inferring user portraits based on the feedforward neural network model of the present invention mainly includes: ETL processing of user basic data and landing it into family hierarchical structure data, obtaining a data set for training and testing the feedforward neural network model FNN based on the family hierarchical data, and deploying services based on the feedforward neural network model and inferring the target customer group on demand. It mainly includes: family data ETL, data set analysis, FNN model training, and algorithm model deployment, which can be specifically implemented as follows:

[0257] Household data ETL: Analyze and process user basic data, user behavior data, user embedding data, etc. into household-level data, including five levels: household level, user level, application service level, device level, and user tag level, which are used for user data operation analysis and processing based on households to generate model data sets.

[0258] Dataset analysis: Based on household-level data processing, a dataset that can be used by the model is finally generated. A good dataset has the advantages of improving model performance, reducing overfitting, enhancing model robustness, and optimizing training time.

[0259] FNN model training: The feedforward neural network FNN is selected as the training algorithm of the model. Its network structure includes an input layer, several hidden layers and an output layer. Then the processed data set is used for model training, model evaluation and hyperparameter adjustment to finally obtain the data model with the highest applicability.

[0260] Algorithm model deployment: Django+PyTorch+algorithm model is used as a single agent to deploy the model in multiple nodes, and Nginx is used to load balance the nodes and provide an HTTP interface to access the model.

[0261] In summary, unlike traditional basic user data, the present invention builds user portraits based on the family level and is more able to accurately locate the target group. Constructing user portrait models based on families is a trend in the development and use of user data. The establishment of this model can obtain a more comprehensive user perspective, more accurate demand forecasts, precise market positioning, personalized recommendations, optimization of products and services, improved marketing effectiveness, enhanced customer relationship management and other advantages. With the introduction of AI algorithm models, the application of the model can be more deeply empowered, and user portraits can be effectively produced to facilitate the analysis of user needs and the delivery of precision marketing.

[0262] Compared with the prior art, the present invention has at least the following beneficial effects:

[0263] (1) By collecting scattered basic user data and organizing and analyzing it into a family model hierarchical data structure, the availability and neatness of user data are greatly increased, and its ability in operational analysis is enhanced.

[0264] (2) Using large-scale data sets at the household level to train algorithm models to infer user portraits has a very broad development prospect in quickly locating target groups and achieving precise marketing.

[0265] Compared with the prior art, the main advantages of the technical solution of the present invention are:

[0266] 1. A more comprehensive user perspective: The user portrait at the family level not only includes personal information, but also takes into account the age, gender, occupation, etc. of family members, which can provide a more comprehensive understanding of the user's living environment and needs.

[0267] 2. Accurate market positioning: Through family-level information, we can more accurately locate user groups of different family types, such as young families, large families, single-parent families, etc., so as to formulate more targeted market strategies and product positioning.

[0268] 3. Improve marketing effectiveness: Utilizing household-level user portraits, advertising and marketing activities can be carried out more effectively, such as advertising and promotional activities targeting household consumers, reducing resource waste and increasing conversion rates.

[0269] Compared with the prior art, the main technical features of the technical solution of the present invention are:

[0270] 1. Comprehensively construct user household-level data, which can better understand the actual situation of customers and improve the operational analysis capabilities at the household level.

[0271] 2. Using the feedforward neural network algorithm model to predict household-level user portraits can provide a more comprehensive and in-depth understanding of users, helping companies make more accurate and effective decisions in product development, marketing, and customer service.

[0272] On the other hand, Fig. 9 As shown, an embodiment of the present invention provides a user portrait intelligent inference device 900, including:

[0273] The first module 901 is used to obtain the collected data of multiple target objects, and to organize the collected data based on a preset family model data structure to obtain family model data;

[0274] The second module 902 is used to pre-process the family model data to obtain a family model data set; the family model data set includes feature data and label data;

[0275] The third module 903 is used to perform model training on a preset feedforward neural network using the family model data set to obtain a target model;

[0276] The fourth module 904 is used to deploy the target model to the Web application architecture associated with the object to be inferred, so that the Web application architecture performs a portrait inference on the object to be inferred through the target model.

[0277] In some embodiments, the third module may be specifically used for:

[0278] Initializing the network parameters of the feedforward neural network by random values ​​to obtain a first model; the network parameters include weights and biases;

[0279] Use feature data as model input and label data as result comparison label;

[0280] Based on the model input and result comparison labels, the loss is calculated by combining the preset loss function in the forward propagation of the first model, and the network parameters of the first model are optimized and adjusted by back propagation based on the loss calculation result and the preset optimizer to obtain the second model;

[0281] Add 1 to the number of iterations, use the second model as the first model, return to execute the steps of calculating the loss based on the model input and result comparison labels by forward propagation in the first model combined with the preset loss function, until the number of iterations reaches the preset number of training times, and use the second model obtained from the last iteration as the target model; the number of iterations is initialized to 0.

[0282] Furthermore, the device may also include at least one of the following:

[0283] The fifth module is used to evaluate the training effect of the target model through the mean square error based on the validation set and test set obtained by segmenting the family model data set;

[0284] The sixth module is used to adjust the hyper-parameters of the model training in response to the adjustment instructions of the management object.

[0285] The contents of the method embodiments of the present invention are all applicable to the device embodiments. The functions specifically implemented by the device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0286] On the other hand, an embodiment of the present invention further provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above sensitive information method when executing the computer program. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.

[0287] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0288] like Fig.10 As shown, Fig.10 A specific example of the hardware structure of an electronic device 1000 according to an embodiment is shown. The electronic device 1000 includes:

[0289] The processor 1001 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present invention.

[0290] The memory 1002 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1002 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 1002, and the processor 1001 calls and executes the network node population optimization method of the embodiment of the present invention;

[0291] Input / output interface 1003, used to implement information input and output;

[0292] The communication interface 1004 is used to realize the communication interaction between the device and other devices. The communication can be realized through a wired manner (such as USB, network cable, etc.) or a wireless manner (such as mobile network, WIFI, Bluetooth, etc.);

[0293] A bus 1005 , which transmits information between various components of the device (e.g., the processor 1001 , the memory 1002 , the input / output interface 1003 , and the communication interface 1004 );

[0294] The processor 1001 , the memory 1002 , the input / output interface 1003 and the communication interface 1004 are connected to each other in communication within the device via the bus 1005 .

[0295] The electronic device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0296] The contents of the method embodiments of the present invention are all applicable to the electronic device embodiments. The functions specifically implemented by the electronic device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0297] Another aspect of an embodiment of the present invention further provides a computer-readable storage medium, wherein the storage medium stores a program, and the program is executed by a processor to implement the above method.

[0298] It should be noted that the computer-readable medium shown in the embodiment of the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (Compact Disc Read to Only Memory, CD to ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate, or transmit programs for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0299] The contents of the method embodiments of the present invention are all applicable to the computer-readable storage medium embodiments. The functions specifically implemented by the computer-readable storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0300] The embodiment of the present invention also discloses a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device can read the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the above method.

[0301] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

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

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

[0304] In some selectable embodiments, the function / operation mentioned in the block diagram may not occur in the order mentioned in the operation diagram. For example, depending on the function / operation involved, the two boxes shown in succession can actually be executed substantially simultaneously or the boxes can sometimes be executed in reverse order. In addition, the embodiment presented and described in the flow chart of the present invention is provided by way of example, for the purpose of providing a more comprehensive understanding of the technology. The disclosed method is not limited to the operation and logic flow presented by the present invention. Selectable embodiments are expected, wherein the order of various operations is changed and the sub-operation of a part described as a larger operation is performed independently.

[0305] In addition, although the present invention is described in the context of functional modules, it should be understood that, unless otherwise specified, one or more of the functions and / or features can be integrated into a single physical device and / or software module, or one or more functions and / or features can be implemented in separate physical devices or software modules. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the present invention. More specifically, in view of the properties, functions and internal relationships of various functional modules in the device disclosed in the present invention, the actual implementation of the module will be understood within the conventional skills of engineers. Therefore, those skilled in the art can implement the present invention set forth in the claims without excessive experimentation using ordinary techniques. It is also understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the present invention, which is determined by the full scope of the appended claims and their equivalents.

[0306] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0307] The logic and / or steps represented in the flowchart or otherwise described herein, for example, may be considered as an ordered list of executable instructions for implementing logical functions, and may be embodied in any computer-readable medium for use by an instruction execution device, apparatus or device (such as a computer-based device, a device including a processor, or other device that can fetch instructions from an instruction execution device, apparatus or device and execute the instructions), or in conjunction with such instruction execution device, apparatus or device. For purposes of this specification, "computer-readable medium" may be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution device, apparatus or device, or in conjunction with such instruction execution device, apparatus or device.

[0308] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or processing in another suitable manner as necessary, and then stored in a computer memory.

[0309] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution device. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0310] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0311] Although the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.

[0312] The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the embodiments. Those skilled in the art can make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of the present invention.

Claims

1. A user portrait intelligent inference method, characterized in that: The following steps are involved: Acquire collected data of multiple target objects, and organize the collected data based on a preset family model data structure to obtain family model data; Preprocessing the family model data to obtain a family model data set; the family model data set includes feature data and label data; Using the family model data set to perform model training on a preset feedforward neural network to obtain a target model; The target model is deployed to a Web application framework associated with the object to be inferred, so that the Web application framework performs a portrait inference on the object to be inferred through the target model.

2. The user portrait intelligent inference method according to claim 1 is characterized in that: The step of arranging the collected data based on a preset family model data structure to obtain family model data comprises the following steps: Based on a preset family model data structure, the collected data is stored in layers and processed and analyzed through data warehouse technology to obtain the family model data; The family model data structure includes a family layer, a user layer, a product service layer, a device layer and a label layer.

3. The user portrait intelligent inference method according to claim 2 is characterized in that: The collected data is obtained based on a preset application carrier; based on a preset family model data structure, the collected data is stored in layers and processed and analyzed through data warehouse technology to obtain the family model data, including the following steps: Extract and obtain the household data, primary account, product and service account, device and tag attributes associated with each target object according to the collected data; storing the family data in the family layer; storing the account information of the main account and its associated sub-accounts in the user layer; establishing first relationship data between the family layer and the user layer according to the target object bound to the same family data; The product service account is stored in the product service layer; the device is stored in the device layer; the tag attribute is stored in the tag layer; Establishing second relationship data of the user layer, the product service layer, the device layer, and the tag layer according to the primary account, the product service account, the device, and the tag attribute associated with the same target object; Based on the family model data structure storing the collected data, the family model data is obtained by combining the first relationship data and the second relationship data.

4. The user portrait intelligent inference method according to claim 1 is characterized in that: The preprocessing of the family model data to obtain a family model data set includes the following steps: Based on the family model data, target operations are performed through a preset computing engine to obtain sample data of each target object; the target operations include data format conversion, missing value processing, outlier processing, and standardization or normalization; the sample data includes the feature data and the label data of the target object; The sample data corresponding to the multiple target objects are integrated to form the family model data set.

5. The user portrait intelligent inference method according to claim 1 is characterized in that: The method of using the family model data set to perform model training on a preset feedforward neural network to obtain a target model includes the following steps: Initializing the network parameters of the feedforward neural network by random values ​​to obtain a first model; the network parameters include weights and biases; Using the feature data as model input and the label data as result comparison label; Based on the model input and the result comparison label, the loss is calculated by combining the preset loss function in the forward propagation of the first model, and the network parameters of the first model are optimized and adjusted by back propagation based on the loss calculation result and a preset optimizer to obtain a second model; The number of iterations is increased by 1, the second model is used as the first model, and the step of comparing the labels based on the model input and the results is returned to calculate the loss by combining the forward propagation of the first model with a preset loss function until the number of iterations reaches the preset number of training times, and the second model obtained in the last iteration is used as the target model; the number of iterations is initialized to 0.

6. The user portrait intelligent inference method according to claim 5 is characterized in that: The method further comprises at least one of the following steps: Based on the validation set and the test set obtained by segmenting the family model data set, a model evaluation is performed on the training effect of the target model by using the mean square error; In response to the adjustment instruction of the management object, hyper-parameter adjustment is performed on the model training.

7. The user portrait intelligent inference method according to claim 1 is characterized in that: The step of deploying the target model to a Web application architecture associated with the object to be inferred includes the following steps: Configuring a web endpoint in the web application architecture; The target model is called based on the HTTP interface exposed externally by the Web endpoint.

8. A user portrait intelligent inference device, characterized in that: include: The first module is used to obtain the collected data of multiple target objects, and to organize the collected data based on a preset family model data structure to obtain family model data; The second module is used to preprocess the family model data to obtain a family model data set; the family model data set includes feature data and label data; The third module is used to perform model training on a preset feedforward neural network using the family model data set to obtain a target model; The fourth module is used to deploy the target model to the Web application architecture associated with the object to be inferred, so that the Web application architecture can perform a portrait inference on the object to be inferred through the target model.

9. An electronic device, characterized in that: including a processor and a memory; The memory is used to store programs; The processor executes the program to implement the method according to any one of claims 1 to 7.

10. A computer storage medium storing a program executable by a processor, characterized in that: The program executable by the processor is used to implement the method according to any one of claims 1 to 7 when executed by the processor.