User portrait construction method, device and computer-readable storage medium

By combining the Spark platform with the mean square error method and the forgetting algorithm, the indicator weights of user portraits are adjusted in real time, which solves the problems of unchanging weights and unreflected time effects in the existing technology, and improves the accuracy and persuasiveness of user portraits.

CN111310052BActive Publication Date: 2024-10-29PINGAN INT SMART CITY TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202010135043.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-02-29
Publication Date
2024-10-29
Estimated Expiration
2040-02-29

AI Technical Summary

Technical Problem

Existing user portrait construction methods cannot adjust indicator weights in real time and cannot detect indicator anomalies in a timely manner, resulting in a lack of accuracy in the constructed user portraits and failure to effectively reflect the impact of time on the model.

Method used

The Spark platform and the mean square error method are used to calculate the index weights, and the forgetting algorithm is used to dynamically adjust the weights. The z-score method is used to standardize the index values, and the forgetting algorithm is used to simulate human forgetting rules, giving different weights to different periods, and adjusting model index values ​​in real time. .

Benefits of technology

It improves the accuracy of user portraits, can detect indicator anomalies in a timely manner, and dynamically adjust weights to avoid the one-sidedness and non-persistence of decision-makers’ subjective views, thereby enhancing the persuasiveness of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111310052B_ABST
    Figure CN111310052B_ABST
Patent Text Reader

Abstract

The present invention relates to a data analysis technology, including a user portrait construction method, device and computer-readable storage medium, the method comprising: collecting buried data, and using a Spark platform and SparkSQL to extract user active data and user learning behavior data; determining multiple indicators for evaluating a target model according to the collected user active data and user learning behavior data, and obtaining indicator values ​​required for statistics of the target model; calculating the indicator values ​​in each period; standardizing the indicator values ​​in each period based on a z-score method of the Spark platform; using a mean square error method to respectively calculate the weights of different indicators in the same period; performing weighted calculation on the indicator values ​​in each period and the weights of the corresponding indicators to obtain a period model value of the corresponding period; performing weighted calculation on different periods using a forgetting algorithm; performing weighted calculation on the period model value and the period weight calculated using the forgetting algorithm to obtain a final model indicator value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technologies, and in particular to a user portrait construction method, device and computer-readable storage medium. Background Art

[0002] User portraits are an effective tool for outlining target users and linking user demands with design directions. This method is basically used to calculate model labels in user portraits, such as commonly used user interests, activity levels, user value, contribution models, etc. The demand for accurately calculating model values ​​based on a single indicator can only be calculated using the user portrait construction method. This method involves multiple indicators, and comprehensive calculation of indicator values ​​is required to derive the final value of the model.

[0003] At present, the calculation of user portraits in the industry is mainly based on the design of weights based on indicators, and then weighted calculation is performed. It does not consider whether the initially set weights can adapt to the changes in indicator values ​​over time. The model can only be optimized and the weights adjusted after a period of time. Secondly, the impact of the indicator value of the current period and the indicator value of a period of time on the model are considered equally, and the effect of the current value of the indicator and the value of a period of time on the model are not distinguished. This calculation method has certain errors in the model, is not fully persuasive, and cannot reflect the impact of time on the model. In addition, the weights of the existing designs are fixed. If there is a problem with the value of a certain indicator or abnormal data, it cannot be discovered in time, so the constructed user portrait lacks accuracy. Summary of the invention

[0004] The present invention provides a user portrait construction method, device and computer-readable storage medium, the main purpose of which is to solve the setting of weights between indicators and assign different weights to the learning behavior indicators of users in different periods, perfectly distinguish the learning behaviors of users in different periods, provide a reference for the differentiation of platform users, and improve the accuracy of user portraits.

[0005] To achieve the above object, the present invention provides a method for constructing a user portrait, the method comprising:

[0006] Collect tracking data and use Spark platform and SparkSQL to extract user activity data and user learning behavior data;

[0007] Determine multiple indicators for evaluating the target model based on the collected user activity data and user learning behavior data, and obtain the indicator values ​​that need to be counted for the target model;

[0008] Calculate the indicator value within each period;

[0009] Standardizing the indicator values ​​in each cycle based on the z-score method of the Spark platform;

[0010] Use the mean square error method to calculate the weights of different indicators in the same period;

[0011] Performing weighted calculation on the indicator value in each period and the weight of the corresponding indicator to obtain the period model value of the corresponding period;

[0012] Use the forgetting algorithm to calculate the weights of different cycles;

[0013] Performing weighted calculation on the period model value and the period weight calculated using the forgetting algorithm to obtain a final model index value;

[0014] A user profile is constructed according to the model indicator values.

[0015] Optionally, the step of collecting tracking data and extracting user activity data and user learning behavior data using the spark platform and sparkSQL includes:

[0016] Collecting the buried point data;

[0017] Store the extracted user activity data and user learning behavior data in HDFS storage media;

[0018] The Sqoop technology is used to synchronize the user's learning records in the Oracle database to the HDFS storage medium.

[0019] Optionally, the step of determining multiple indicators for evaluating the target model based on the collected user activity data and user learning behavior data, and obtaining the indicator values ​​that need to be counted for the target model includes:

[0020] Determine multiple indicators for evaluating the target model based on the collected user activity data, learning behavior data, and learning records;

[0021] Use Python language to analyze indicator data and find out which periods of indicator values ​​need to be counted for the target model.

[0022] Optionally, the step of calculating the indicator value in each period includes:

[0023] The Spark platform and the SparkSQL are used to calculate the indicator values ​​in each cycle based on the Hadoop platform, and the indicator values ​​are cleaned and preprocessed using the Python language and saved as a Hive data table.

[0024] Optionally, the step of performing weighted calculation on the period model value and the period weight calculated by using the forgetting algorithm to obtain a final model index value includes:

[0025] The final model indicator value is saved in the Hive data table of the Hadoop platform.

[0026] The present invention also provides an electronic device, comprising a memory and a processor, wherein the memory stores a multi-index comprehensive evaluation program that can be run on the processor, and when the multi-index comprehensive evaluation program is executed by the processor, the following steps are implemented:

[0027] Collect tracking data and use Spark platform and SparkSQL to extract user activity data and user learning behavior data;

[0028] Determine multiple indicators for evaluating the target model based on the collected user activity data and user learning behavior data, and obtain the indicator values ​​that need to be counted for the target model;

[0029] Calculate the indicator value within each period;

[0030] Standardizing the indicator values ​​in each cycle based on the z-score method of the Spark platform;

[0031] Use the mean square error method to calculate the weights of different indicators in the same period;

[0032] Performing weighted calculation on the indicator value in each period and the weight of the corresponding indicator to obtain the period model value of the corresponding period;

[0033] Use the forgetting algorithm to calculate the weights of different cycles;

[0034] Performing weighted calculation on the period model value and the period weight calculated using the forgetting algorithm to obtain a final model index value;

[0035] A user profile is constructed according to the model indicator values.

[0036] Optionally, the step of collecting tracking data and extracting user activity data and user learning behavior data using the spark platform and sparkSQL includes:

[0037] Collecting the buried point data;

[0038] Store the extracted user activity data and user learning behavior data in HDFS storage media;

[0039] The Sqoop technology is used to synchronize the user's learning records in the Oracle database to the HDFS storage medium.

[0040] Optionally, the step of determining multiple indicators for evaluating the target model based on the collected user activity data and user learning behavior data, and obtaining the indicator values ​​that need to be counted for the target model includes:

[0041] Determine multiple indicators for evaluating the target model based on the collected user activity data, learning behavior data, and learning records;

[0042] Use Python language to analyze indicator data and find out which periods of indicator values ​​need to be counted for the target model.

[0043] Optionally, the step of calculating the indicator value in each period includes:

[0044] The Spark platform and the SparkSQL are used to calculate the indicator values ​​in each cycle based on the Hadoop platform, and the indicator values ​​are cleaned and preprocessed using the Python language and saved as a Hive data table.

[0045] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, on which a user portrait construction program is stored. The user portrait construction program can be executed by one or more processors to implement the steps of the above-mentioned user portrait construction method.

[0046] The user portrait construction method, device and computer-readable storage medium provided by the present invention use the mean square error method to calculate the weights of indicators in the same period, and can modify the weights of corresponding indicators in real time as the data changes, so as to avoid the designed weights being unchanged. If there is a problem with the value of a certain indicator or abnormal data, it can also be discovered in time according to the calculated weights, while avoiding the one-sidedness and non-persistence of the weights given by the subjective views of decision makers; the improved forgetting algorithm can better fit the degree of forgetting of people, and give different weights to data of different periods. The closer the period is to the current one, the more reference value and persuasiveness the user's behavior has, and the greater the weight should be given; the mean square error method and the forgetting algorithm are introduced into the same method at the same time, and the two algorithms are perfectly integrated, thereby improving the accuracy of user portraits. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 A schematic diagram of a process for constructing a user portrait according to an embodiment of the present invention;

[0048] Figure 2 A schematic diagram of the internal structure of an electronic device provided by an embodiment of the present invention;

[0049] Figure 3 A schematic diagram of a module for constructing a program based on a user portrait in an electronic device provided in an embodiment of the present invention.

[0050] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0051] 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.

[0052] The present invention provides a method for constructing a user portrait. Figure 1 FIG. 1 is a flow chart of a method for constructing a user portrait according to an embodiment of the present invention. The method may be executed by a device, which may be implemented by software and / or hardware. In this embodiment, the device is a smart terminal.

[0053] In this embodiment, the user portrait construction method includes:

[0054] S101, collect tracking data, and use Spark platform and SparkSQL to extract user activity data and user learning behavior data;

[0055] S102, determining multiple indicators for evaluating the target model based on the collected user activity data and user learning behavior data, and obtaining the indicator values ​​that need to be counted for the target model;

[0056] S103, calculating the index value in each period;

[0057] S104, standardizing the indicator value in each cycle based on the z-score method of the Spark platform;

[0058] S105, using the mean square error method to calculate the weights of different indicators in the same period;

[0059] S106, performing weighted calculation on the indicator value in each period and the weight of the corresponding indicator to obtain a period model value of the corresponding period;

[0060] S107, using a forgetting algorithm to calculate weights for different cycles;

[0061] S108, performing weighted calculation on the period model value and the period weight calculated by using the forgetting algorithm to obtain a final model index value;

[0062] S109: construct a user portrait according to the model indicator value.

[0063] Among them, Spark is a distributed big data parallel processing platform based on memory computing. It integrates batch processing, real-time stream processing, interactive query and graph computing, avoiding the waste of resources caused by the need to deploy different clusters in various computing scenarios.

[0064] Spark is a fast and general computing engine designed for large-scale data processing. In massive data retrieval applications, the distributed retrieval framework SparkSQL is widely used as an excellent big data retrieval method. Hive is a data warehouse processing tool based on Hadoop. It uses the SQL-like HiveQL language to implement data queries. All Hive data is stored in Hadoop-compatible file systems (for example, Amazon S3, HDFS). SparkSQL provides the same HiveQL interface as Hive, which has high efficiency and availability.

[0065] For a multi-indicator model, the values ​​of different indicators may be of different dimensions or even different orders of magnitude, and the indicators are not comparable, so they need to be standardized and converted to the same order of magnitude. This embodiment uses the z-score method of the Spark platform to obtain the value Zij of each indicator. The advantages of the z-score method are that it is less affected by outliers, has little effect on the distribution of data, and is simple to calculate.

[0066] Optionally, the step of collecting tracking data and extracting user activity data and user learning behavior data using the spark platform and sparkSQL includes:

[0067] Collecting the buried point data;

[0068] Store the extracted user activity data and user learning behavior data in HDFS storage media;

[0069] The Sqoop technology is used to synchronize the user's learning records in the Oracle database to the HDFS storage medium.

[0070] Among them, Hadoop Distributed File System (HDFS) is designed to be a distributed file system suitable for running on commodity hardware. It has a lot in common with existing distributed file systems. But at the same time, it is also very different from other distributed file systems. HDFS is a highly fault-tolerant system suitable for deployment on cheap machines. HDFS can provide high-throughput data access and is very suitable for applications on large-scale data sets.

[0071] Sqoop is an open source tool, mainly used for transferring data between Hadoop (Hive) and traditional databases (mysql, postgresql, etc.). It can import data from a relational database (such as MySQL, Oracle, Postgres, etc.) into Hadoop's HDFS, and can also import HDFS data into a relational database.

[0072] Optionally, the step of determining multiple indicators for evaluating the target model based on the collected user activity data and user learning behavior data, and obtaining the indicator values ​​that need to be counted for the target model includes:

[0073] Determine multiple indicators for evaluating the target model based on the collected user activity data, learning behavior data, and learning records;

[0074] Use Python language to analyze indicator data and find out which periods of indicator values ​​need to be counted for the target model.

[0075] Optionally, the step of calculating the indicator value in each period includes:

[0076] The Spark platform and the SparkSQL are used to calculate the indicator values ​​in each cycle based on the Hadoop platform, and the indicator values ​​are cleaned and preprocessed using the Python language and saved as a Hive data table.

[0077] Among them, Python is a computer programming language and an object-oriented dynamically typed language.

[0078] The steps of using the mean square error method to calculate the weights of different indicators in the same period are as follows:

[0079] First find the mean of each indicator:

[0080]

[0081] Then calculate the variance of each indicator:

[0082]

[0083] Then calculate the proportion of the variance of the corresponding indicator to the sum of all variances:

[0084]

[0085] The calculation result is used as the weight of the corresponding indicator; where n is the number of indicators, j is the number of indicator items, and j = 1, 2…n.

[0086] The principle of the mean square error method is as follows:

[0087] The weight of an indicator is related to the degree of dispersion of the indicator data value. The greater the dispersion of the indicator, the greater the weight. If the dispersion of the indicator data value is 0, the weight of the indicator is also 0. That is, if the value of the indicator for each data is the same, the indicator is not included in the calculation.

[0088] The mean square error method can calculate the weight of each indicator of the day in real time based on the data, and dynamically adjust the weight according to the data to avoid the weight remaining unchanged and unable to adapt to changes in the indicator value.

[0089] The method further comprises:

[0090] The calculation formula for obtaining the period model value of the corresponding period by weighted calculation of the indicator value in each period and the weight of the corresponding indicator is:

[0091]

[0092] The step of using the forgetting algorithm to calculate weights for different periods includes:

[0093] Use Python language to simulate user data, and use the data simulation results to improve and optimize the algorithm formula. The improved forgetting algorithm function is:

[0094]

[0095] Where t is the number of independent variable cycles, t0 = 0.0025, c = 0.025;

[0096] The improved forgetting algorithm is used to calculate the weights of different periods. The period value is substituted into the improved forgetting algorithm function to obtain the weight F of the corresponding period. t .

[0097] According to the law of human forgetting, the larger the period, the smaller the weight; the improved forgetting algorithm can better simulate human forgetting, and the introduction of human forgetting characteristics can better describe the user's model value, and the forgetting characteristics are effective for almost all user behavior indicators.

[0098] Optionally, the step of performing weighted calculation on the period model value and the period weight calculated by using the forgetting algorithm to obtain a final model index value includes:

[0099] The final model indicator value is saved in the Hive data table of the Hadoop platform.

[0100] The user portrait construction method proposed in this embodiment uses the mean square error method to calculate the weights of indicators in the same period. It can modify the weights of corresponding indicators in real time as the data changes, avoiding the design weights from being unchanged. If there is a problem with the value of a certain indicator or abnormal data, it can be discovered in time according to the calculated weights, while avoiding the one-sidedness and non-persistence of the weights given by the decision maker's subjective views. The improved forgetting algorithm can better fit the degree of human forgetting, and assign different weights to data of different periods. The closer the period is to the current one, the more reference value and persuasive the user's behavior is, and the greater the weight should be given. The mean square error method and the forgetting algorithm are introduced into the same method at the same time, and the two algorithms are perfectly integrated, thereby improving the accuracy of user portraits.

[0101] The present invention also provides an electronic device 1. Figure 2 , which is a schematic diagram of the internal structure of an electronic device provided by an embodiment of the present invention.

[0102] In this embodiment, the electronic device 1 may be a computer, a smart terminal or a server. The electronic device 1 at least includes a memory 11, a processor 13, a communication bus 15, and a network interface 17. In this embodiment, the electronic device 1 is a smart terminal.

[0103] Among them, the memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 11 can be an internal storage unit of the electronic device, such as a hard disk of the electronic device. In other embodiments, the memory 11 can also be an external storage device of the electronic device, such as a plug-in hard disk equipped on the electronic device, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), etc. Further, the memory 11 can also include both an internal storage unit of the electronic device and an external storage device. The memory 11 can not only be used to store application software and various types of data installed in the electronic device 1, such as the code of the user portrait construction program 111, but also can be used to temporarily store data that has been output or is to be output.

[0104] In some embodiments, the processor 13 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor or other data processing chip, and is used to run the program code stored in the memory 11 or process data.

[0105] The communication bus 15 is used to realize the connection and communication between these components.

[0106] The network interface 17 may optionally include a standard wired interface, a wireless interface (such as a WI-FI interface), and is generally used to establish a communication connection between the electronic device 1 and other electronic devices.

[0107] Optionally, the electronic device 1 may further include a user interface, which may include a display (Display), an input unit such as a keyboard (Keyboard), and the optional user interface may also include a standard wired interface and a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device, etc. Among them, the display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device and to display a visual user interface.

[0108] Figure 2 Only the electronic device 1 having components 11 to 17 is shown. It can be understood by those skilled in the art that Figure 2 The structure shown does not constitute a limitation on the electronic device, and may include fewer or more components than shown, or combine certain components, or arrange the components differently.

[0109] exist Figure 2 In the embodiment of the electronic device 1 shown, the memory 11 stores a user portrait construction program 111; when the processor 13 executes the user portrait construction program 111 stored in the memory 11, the following steps are implemented:

[0110] Collect tracking data and use Spark platform and SparkSQL to extract user activity data and user learning behavior data;

[0111] Determine multiple indicators for evaluating the target model based on the collected user activity data and user learning behavior data, and obtain the indicator values ​​that need to be counted for the target model;

[0112] Calculate the indicator value within each period;

[0113] Standardizing the indicator values ​​in each cycle based on the z-score method of the Spark platform;

[0114] Use the mean square error method to calculate the weights of different indicators in the same period;

[0115] Performing weighted calculation on the indicator value in each period and the weight of the corresponding indicator to obtain the period model value of the corresponding period;

[0116] Use the forgetting algorithm to calculate the weights of different cycles;

[0117] Performing weighted calculation on the period model value and the period weight calculated using the forgetting algorithm to obtain a final model index value;

[0118] A user profile is constructed according to the model indicator values.

[0119] Among them, Spark is a distributed big data parallel processing platform based on memory computing. It integrates batch processing, real-time stream processing, interactive query and graph computing, avoiding the waste of resources caused by the need to deploy different clusters in various computing scenarios.

[0120] Spark is a fast and general computing engine designed for large-scale data processing. In massive data retrieval applications, the distributed retrieval framework SparkSQL is widely used as an excellent big data retrieval method. Hive is a data warehouse processing tool based on Hadoop. It uses the SQL-like HiveQL language to implement data queries. All Hive data is stored in Hadoop-compatible file systems (for example, Amazon S3, HDFS). SparkSQL provides the same HiveQL interface as Hive, which has high efficiency and availability.

[0121] For a multi-indicator model, the values ​​of different indicators may be of different dimensions or even different orders of magnitude, and the indicators are not comparable, so they need to be standardized and converted to the same order of magnitude. This embodiment uses the z-score method of the Spark platform to obtain the value Zij of each indicator. The advantages of the z-score method are that it is less affected by outliers, has little effect on the distribution of data, and is simple to calculate.

[0122] Optionally, the step of collecting tracking data and extracting user activity data and user learning behavior data using the spark platform and sparkSQL includes:

[0123] Collecting the buried point data;

[0124] Store the extracted user activity data and user learning behavior data in HDFS storage media;

[0125] The Sqoop technology is used to synchronize the user's learning records in the Oracle database to the HDFS storage medium.

[0126] Among them, Hadoop Distributed File System (HDFS) is designed to be a distributed file system suitable for running on commodity hardware. It has a lot in common with existing distributed file systems. But at the same time, it is also very different from other distributed file systems. HDFS is a highly fault-tolerant system suitable for deployment on cheap machines. HDFS can provide high-throughput data access and is very suitable for applications on large-scale data sets.

[0127] Sqoop is an open source tool, mainly used for transferring data between Hadoop (Hive) and traditional databases (mysql, postgresql, etc.). It can import data from a relational database (such as MySQL, Oracle, Postgres, etc.) into Hadoop's HDFS, and can also import HDFS data into a relational database.

[0128] Optionally, the step of determining multiple indicators for evaluating the target model based on the collected user activity data and user learning behavior data, and obtaining the indicator values ​​that need to be counted for the target model includes:

[0129] Determine multiple indicators for evaluating the target model based on the collected user activity data, learning behavior data, and learning records;

[0130] Use Python language to analyze indicator data and find out which periods of indicator values ​​need to be counted for the target model.

[0131] Optionally, the step of calculating the indicator value in each period includes:

[0132] The Spark platform and the SparkSQL are used to calculate the indicator values ​​in each cycle based on the Hadoop platform, and the indicator values ​​are cleaned and preprocessed using the Python language and saved as a Hive data table.

[0133] Among them, Python is a computer programming language and an object-oriented dynamically typed language.

[0134] The steps of using the mean square error method to calculate the weights of different indicators in the same period are as follows:

[0135] First find the mean of each indicator:

[0136]

[0137] Then calculate the variance of each indicator:

[0138]

[0139] Then calculate the proportion of the variance of the corresponding indicator to the sum of all variances:

[0140]

[0141] The calculation result is used as the weight of the corresponding indicator; where n is the number of indicators, j is the number of indicator items, and j = 1, 2…n.

[0142] The principle of the mean square error method is as follows:

[0143] The weight of an indicator is related to the degree of dispersion of the indicator data value. The greater the dispersion of the indicator, the greater the weight. If the dispersion of the indicator data value is 0, the weight of the indicator is also 0. That is, if the value of the indicator for each data is the same, the indicator is not included in the calculation.

[0144] The mean square error method can calculate the weight of each indicator of the day in real time based on the data, and dynamically adjust the weight according to the data to avoid the weight remaining unchanged and unable to adapt to changes in the indicator value.

[0145] The method further comprises:

[0146] The calculation formula for obtaining the period model value of the corresponding period by weighted calculation of the indicator value in each period and the weight of the corresponding indicator is:

[0147]

[0148] The step of using the forgetting algorithm to calculate weights for different periods includes:

[0149] Use Python language to simulate user data, and use the data simulation results to improve and optimize the algorithm formula. The improved forgetting algorithm function is:

[0150]

[0151] Where t is the number of independent variable cycles, t0 = 0.0025, c = 0.025;

[0152] The improved forgetting algorithm is used to calculate the weights of different periods. The period value is substituted into the improved forgetting algorithm function to obtain the weight F of the corresponding period. t .

[0153] According to the law of human forgetting, the larger the period, the smaller the weight; the improved forgetting algorithm can better simulate human forgetting, and the introduction of human forgetting characteristics can better describe the user's model value, and the forgetting characteristics are effective for almost all user behavior indicators.

[0154] Optionally, the step of performing weighted calculation on the period model value and the period weight calculated by using the forgetting algorithm to obtain a final model index value includes:

[0155] The final model indicator value is saved in the Hive data table of the Hadoop platform.

[0156] The electronic device proposed in this embodiment uses the mean square error method to calculate the weights of indicators in the same period. It can modify the weights of corresponding indicators in real time as the data changes, avoiding the design weights from being unchanged. If there is a problem with the value of a certain indicator or abnormal data, it can be discovered in time according to the calculated weights, while avoiding the one-sidedness and non-persistence of the weights given by the decision maker's subjective views. The improved forgetting algorithm can better fit the degree of human forgetting, and assign different weights to data of different periods. The closer the period is to the current one, the more reference value and persuasive the user's behavior is, and the greater the weight should be given. The mean square error method and the forgetting algorithm are introduced into the same method at the same time, and the two algorithms are perfectly integrated, thereby improving the accuracy of user portraits.

[0157] In addition, an embodiment of the present invention further provides a computer-readable storage medium, on which a user portrait construction program 111 is stored. The user portrait construction program 111 can be executed by one or more processors to implement the following operations:

[0158] Collect tracking data and use Spark platform and SparkSQL to extract user activity data and user learning behavior data;

[0159] Determine multiple indicators for evaluating the target model based on the collected user activity data and user learning behavior data, and obtain the indicator values ​​that need to be counted for the target model;

[0160] Calculate the indicator value in each cycle, and standardize the indicator value in each cycle based on the z-score method of the Spark platform;

[0161] Use the mean square error method to calculate the weights of different indicators in the same period;

[0162] Performing weighted calculation on the indicator value in each period and the weight of the corresponding indicator to obtain the period model value of the corresponding period;

[0163] Use the forgetting algorithm to calculate the weights of different cycles;

[0164] Performing weighted calculation on the period model value and the period weight calculated using the forgetting algorithm to obtain a final model index value;

[0165] A user profile is constructed based on the model indicator values.

[0166] The specific implementation of the computer-readable storage medium of the present invention is basically the same as the above-mentioned electronic device and method embodiments, and will not be repeated here.

[0167] Optionally, in other embodiments, the user portrait construction program 111 can also be divided into one or more modules, one or more modules are stored in the memory 11, and are executed by one or more processors (processor 13 in this embodiment) to complete the present invention. The module referred to in the present invention refers to a series of computer program instruction segments that can perform specific functions, and is used to describe the execution process of the user portrait construction program in the electronic device.

[0168] For example, refer to Figure 3 FIG. 1 is a schematic diagram of program modules of a user portrait construction program 111 in an embodiment of an electronic device of the present invention. In this embodiment, the user portrait construction program 111 can be divided into a collection module 10, a design module 20, a calculation module 30, a standardization module 40 and a construction module 50. For example:

[0169] The collection module 10 is used to collect the tracking data and extract the user activity data and user learning behavior data using the Spark platform and SparkSQL;

[0170] The design module 20 is used to determine multiple indicators for evaluating the target model based on the collected user activity data and user learning behavior data, and obtain the indicator values ​​that need to be counted for the target model;

[0171] The calculation module 30 is used to calculate the index value in each period; use the mean square error method to calculate the weights of different indicators in the same period; perform weighted calculation on the index value in each period and the weight of the corresponding index to obtain the period model value of the corresponding period; use the forgetting algorithm to perform weight calculation on different periods; and perform weighted calculation on the period model value and the period weight calculated by the forgetting algorithm to obtain the final model index value;

[0172] The standardization module 40 is used to standardize the indicator value in each cycle based on the z-score method of the Spark platform;

[0173] The construction module 50 is used to construct a user portrait according to the model indicator value.

[0174] The functions or operation steps implemented when the program modules such as the collection module 10, the design module 20, the calculation module 30, the standardization module 40 and the construction module 50 are executed are substantially the same as those in the above-mentioned embodiments and will not be described in detail herein.

[0175] It should be noted that the serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments. And the terms "including", "comprising" or any other variants thereof in this article are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "including a ..." does not exclude the presence of other identical elements in the process, device, article or method including the element.

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

[0177] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A method for constructing a user portrait, the method comprising: Collect tracking data and use Spark platform and SparkSQL to extract user activity data and user learning behavior data; Determine multiple indicators for evaluating the target model based on the collected user activity data and user learning behavior data, and obtain the indicator values ​​that need to be counted for the target model; Calculate the indicator value within each period; Standardizing the indicator values ​​in each cycle based on the z-score method of the Spark platform; Use the mean square error method to calculate the weights of different indicators in the same period; Performing weighted calculation on the indicator value in each period and the weight of the corresponding indicator to obtain the period model value of the corresponding period; The forgetting algorithm is used to calculate the weights of different periods, including: data simulation of user data, and using the data simulation results to improve and optimize the algorithm formula. The improved forgetting algorithm function is: Where t is the number of independent variable cycles, t0=0.0025, c=0.025; Use the improved forgetting algorithm to calculate the weights of different periods, substitute the period value into the improved forgetting algorithm function, and get the weight of the corresponding period. ; Performing weighted calculation on the period model value and the period weight calculated using the forgetting algorithm to obtain a final model index value; A user profile is constructed based on the model indicator values.

2. The user portrait construction method according to claim 1, characterized in that: The steps of collecting tracking data and extracting user activity data and user learning behavior data using the spark platform and sparkSQL include: Collecting the buried point data; Store the extracted user activity data and user learning behavior data in HDFS storage media; The Sqoop technology is used to synchronize the user's learning records in the Oracle database to the HDFS storage medium.

3. The user portrait construction method according to claim 2, characterized in that: The step of determining multiple indicators for evaluating the target model based on the collected user activity data and user learning behavior data, and obtaining the indicator values ​​required for statistics of the target model includes: Determine multiple indicators for evaluating the target model based on the collected user activity data, user learning behavior data, and learning records; The indicator data of the multiple indicators are analyzed using Python language to obtain the indicator values ​​of which periods need to be counted for the target model.

4. The user portrait construction method according to claim 3, characterized in that: The step of calculating the index value in each period includes: The Spark platform and the SparkSQL are used to calculate the indicator values ​​in each cycle based on the Hadoop platform, and the indicator values ​​are cleaned and preprocessed using the Python language and saved as a Hive data table.

5. The user portrait construction method according to claim 4, characterized in that: After the step of performing weighted calculation on the period model value and the period weight calculated by using the forgetting algorithm to obtain a final model index value, the method further includes: The final model indicator value is saved in the Hive data table of the Hadoop platform.

6. A user portrait construction device, characterized in that: The user portrait construction device includes a memory and a processor, wherein the memory stores a multi-index comprehensive evaluation program that can be run on the processor, and when the multi-index comprehensive evaluation program is executed by the processor, the following steps are implemented: Collect tracking data and use Spark platform and SparkSQL to extract user activity data and user learning behavior data; Determine multiple indicators for evaluating the target model based on the collected user activity data and user learning behavior data, and obtain the indicator values ​​that need to be counted for the target model; Calculate the indicator value within each period; Standardizing the indicator values ​​in each cycle based on the z-score method of the Spark platform; Use the mean square error method to calculate the weights of different indicators in the same period; Performing weighted calculation on the indicator value in each period and the weight of the corresponding indicator to obtain the period model value of the corresponding period; The forgetting algorithm is used to calculate the weights of different periods, including: data simulation of user data, and using the data simulation results to improve and optimize the algorithm formula. The improved forgetting algorithm function is: Where t is the number of independent variable cycles, t0=0.0025, c=0.025; Use the improved forgetting algorithm to calculate the weights of different periods, substitute the period value into the improved forgetting algorithm function, and get the weight of the corresponding period. ; Performing weighted calculation on the period model value and the period weight calculated using the forgetting algorithm to obtain a final model index value; A user profile is constructed according to the model indicator values.

7. The user portrait construction device according to claim 6, characterized in that: The steps of collecting tracking data and extracting user activity data and user learning behavior data using the spark platform and sparkSQL include: Collecting the buried point data; Store the extracted user activity data and user learning behavior data in HDFS storage media; The Sqoop technology is used to synchronize the user's learning records in the Oracle database to the HDFS storage medium.

8. The user portrait construction device according to claim 7, characterized in that: The step of determining multiple indicators for evaluating the target model based on the collected user activity data and user learning behavior data, and obtaining the indicator values ​​required for statistics of the target model includes: Determine multiple indicators for evaluating the target model based on the collected user activity data, learning behavior data, and learning records; Use Python language to analyze indicator data and find out which periods of indicator values ​​need to be counted for the target model.

9. The user portrait construction device according to claim 8, characterized in that: The step of calculating the index value in each period includes: The Spark platform and the SparkSQL are used to calculate the indicator values ​​in each cycle based on the Hadoop platform, and the indicator values ​​are cleaned and preprocessed using the Python language and saved as a Hive data table.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a user portrait construction program, and the user portrait construction program can be executed by one or more processors to implement the user portrait construction method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Academic recommendation method and system based on citation network and user proficiency analysis

    CN105787068A

  • Method and apparatus for determining comprehensive evaluation value and computer readable storage medium

    CN107330619A

  • Enterprise scoring model construction method, enterprise scoring method and device

    CN109636244A

  • Portrait analysis method and device based on big data, computer device and storage medium

    CN110363387A

  • Method for realizing cell network flow resource index prediction based on combination and separation mode

    CN110381515A