WO2020107836A1 - 基于 word2vec 的用户缺失画像的补充方法和相关设备 - Google Patents

基于 word2vec 的用户缺失画像的补充方法和相关设备 Download PDF

Info

Publication number
WO2020107836A1
WO2020107836A1 PCT/CN2019/088849 CN2019088849W WO2020107836A1 WO 2020107836 A1 WO2020107836 A1 WO 2020107836A1 CN 2019088849 W CN2019088849 W CN 2019088849W WO 2020107836 A1 WO2020107836 A1 WO 2020107836A1
Authority
WO
WIPO (PCT)
Prior art keywords
portrait
preset
vocabulary
user
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2019/088849
Other languages
English (en)
French (fr)
Inventor
王建明
肖京
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Publication of WO2020107836A1 publication Critical patent/WO2020107836A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/35Clustering; Classification
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation

Definitions

  • the present application relates to the technical field of data analysis and processing, and in particular to a word2vec-based user-missing portrait supplement method and related equipment.
  • User portraits also called user roles, mainly represent the user's specific relevant information, such as age, economic income or consumption propensity.
  • user portraits As an effective tool for sketching target users, contacting users' demands and design directions, user portraits have been widely used in various fields.
  • User portraits are mainly obtained from public channels, such as the user's registration information and shopping history records, and the lack of user portraits is large.
  • the existing supplementary methods for missing user portraits mainly use traditional statistical methods. The inventors found that the existing supplementary methods are inefficient and fail to take into account the influence of the user's overall portraits. Sexuality is low.
  • the main purpose of this application is to provide a word2vec-based user missing portrait supplement method and related equipment, aiming to solve the drawbacks of the existing user missing portrait supplement method that is inefficient and inaccurate.
  • this application provides a supplementary method based on word2vec for missing portraits of users, which is characterized by including:
  • the first user portrait is composed of a first preset number of first user portrait values in a preset arrangement order, and the first user portrait includes multiple first missing portrait values and Multiple first known portrait values;
  • each first user portrait value into a preset correspondence table to obtain a corresponding first vocabulary, and construct each corpus according to the preset arrangement order, and the corpus includes each of the first
  • the missing vocabulary corresponding to the missing portrait value and the first known vocabulary corresponding to each of the first known portrait values the preset correspondence table is composed of multiple groups of user portrait value corresponding vocabularies constructed in advance;
  • Each of the first predicted portrait values replaces the corresponding first missing portrait value in the first user portrait.
  • This application also provides a supplementary device based on word2vec for missing portraits of users, including:
  • Retrieval module used to retrieve the pre-recorded first user portrait
  • a first construction module configured to input each first user portrait value into a preset correspondence table to obtain a corresponding first vocabulary, and construct each corpus according to the preset arrangement order;
  • a calculation module configured to input the corpus into a prediction model constructed in advance based on word2vec for calculation, and output a prediction vocabulary corresponding to each of the missing vocabulary;
  • a first screening module configured to input each prediction vocabulary into the correspondence table to obtain a corresponding first prediction portrait value
  • a replacement module is used to replace each first predicted portrait value with the corresponding first missing portrait value in the first user portrait.
  • the present application also provides a computer device, including a memory and a processor, where a computer program is stored in the memory, and when the processor executes the computer program, any of the steps of the method described above is implemented.
  • the present application also provides a non-volatile computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of any one of the methods described above are implemented.
  • the word2vec-based user portrait missing supplement method, device, computer equipment and non-volatile computer-readable storage medium provided in this application, by calling the prediction model based on the word2vec idea, can be based on the appearance of each portrait information Probability, thus automatically selecting predicted portrait information with a high probability of occurrence according to the existing portrait information of the user to complete the corresponding missing portrait information, has excellent accuracy and completeness rate, and effectively improves work efficiency.
  • FIG. 1 is a schematic diagram of steps of a method for supplementing missing user portraits based on word2vec in an embodiment of the present application
  • FIG. 2 is a block diagram of the overall structure of a user portrait missing supplement device based on word2vec in an embodiment of the present application
  • FIG. 3 is a schematic block diagram of a computer device according to an embodiment of the present application.
  • an embodiment of the present application provides a supplementary method for user-missing portraits based on word2vec, including:
  • S1 retrieve a pre-entered first user portrait, the first user portrait is composed of a first preset number of first user portrait values in a preset arrangement order, and the first user portrait includes multiple first missing portraits Value and multiple first known profile values;
  • S2 Enter each first user portrait value into a preset correspondence table to obtain a corresponding first vocabulary, and construct the corpus according to the preset arrangement order, and the corpus includes each The missing vocabulary corresponding to the first missing portrait value and the first known vocabulary corresponding to each of the first known portrait values, the preset correspondence table is composed of multiple groups of user portrait value corresponding vocabularies constructed in advance;
  • S3 input the corpus into a prediction model constructed in advance based on word2vec for calculation, and output the prediction vocabulary corresponding to each of the missing vocabulary;
  • Word2vec is a group of related models used to generate word vectors. These models are shallow, two-layer neural networks that are used to train to reconstruct linguistic texts.
  • the first user portrait is entered into the processing terminal by the operator.
  • the operator collects information of different latitudes of the user through objective data collection channels, such as the user fills in himself, the user’s purchase records left on the Internet, and browsing records, and integrates the collected user information according to traditional data processing methods.
  • the data table is the first user portrait.
  • the user information vocabulary in the data table is expressed as the first user portrait value according to the preset correspondence table, rather than a specific text vocabulary, and is arranged according to the preset arrangement order.
  • the text vocabulary corresponding to the first user portrait value "1" in the preset correspondence table is "male".
  • the processing terminal needs to input each first user portrait value in the first user portrait into the preset correspondence table to obtain the corresponding first vocabulary, and convert the converted first
  • the vocabulary is arranged in the order originally in the portrait of the first user, that is, the preset arrangement order, and a corpus is constructed to form a text description of the portrait of the first user, which has a specific meaning.
  • the first user portrait value includes a plurality of first known portrait values and first missing portrait values, and the first known portrait values are converted into corresponding first known words with specific word meanings.
  • the first missing portrait value that is, the null value is uniformly converted into "unknown", that is, the first missing word.
  • the processing terminal inputs the corpus into a prediction model constructed based on word2vec in advance for calculation.
  • the prediction model includes prediction words corresponding to multiple sets of known words.
  • Each first vocabulary in the corpus is arranged according to the preset order.
  • the prediction model can identify the first known vocabulary and the first missing vocabulary, and then directly obtain the corresponding to the first missing vocabulary according to the matching of the first known vocabulary
  • the prediction model matches the first known vocabulary "male”, “civil servant”, and "30 years old".
  • the probability of occurrence of "have a car” is 60%, "no car”
  • the occurrence probability of " is 40%, and the prediction model chooses to output the word "have a car” with a large occurrence probability as the prediction vocabulary.
  • the processing terminal needs to input each predicted vocabulary into the correspondence table to obtain the corresponding first predicted portrait value, and replace the corresponding first missing portrait value with the first predicted portrait value until completion
  • the entire first user portrait that is, the first user portrait is a known portrait value.
  • the step of inputting the corpus into a prediction model based on word2vec for calculation and outputting the prediction vocabulary corresponding to each of the missing vocabulary includes:
  • S302 Use the prediction model to select from the corpus the second preset number of the first known vocabularies that appear next to each of the missing vocabularies according to the preset arrangement order, and according to each of the Knowing the vocabulary to obtain at least one initial predicted vocabulary and the corresponding occurrence probability of each initial predicted vocabulary;
  • S303 Compare the appearance probabilities respectively, and select the initial predicted vocabulary with the largest appearance probability as the predicted vocabulary.
  • the prediction model is pre-built based on the training idea of word2vec, which contains the initial prediction vocabulary corresponding to the output of the first known vocabulary and the appearance probability corresponding to the initial prediction vocabulary.
  • the processing terminal calls the prediction model to analyze the corpus.
  • the prediction model can identify the first known vocabulary and the first missing vocabulary during the parsing process, and the preset arrangement order between the two.
  • the prediction model selects the second preset number of first known words adjacent to the missing word as input according to the preset arrangement order between the first words, and outputs the corresponding one after filtering Or multiple initial predicted words and their corresponding occurrence probabilities.
  • the prediction model compares the occurrence probability of each initial predicted vocabulary one by one, and then selects the initial predicted vocabulary with the largest occurrence probability as the predicted vocabulary output. For example, according to the first known vocabulary "male”, “civil servant”, and “30 years old", the prediction model matches the text description after the preset order of "gender”, "occupation”, and “age”: "Is there a car? The initial prediction vocabulary "has a car” has a probability of 60%, another initial prediction vocabulary “no car” has a probability of 40%, and the prediction model chooses to output the initial prediction vocabulary "a car” with a higher probability Predict vocabulary.
  • the step of inputting the corpus into a prediction model constructed based on word2vec in advance and outputting the prediction vocabulary corresponding to each of the missing vocabulary it includes:
  • S6 Filter a third preset number of second user portraits with portrait saturation greater than a threshold from the original portrait table, the original portrait table is constructed by the developer based on a plurality of original user portraits collected in advance, and the second user portrait Consisting of the first preset number of second user portrait values according to the preset arrangement order;
  • S12 Determine whether the current second accuracy rate of the secondary training model meets a preset requirement, where the preset requirement is that the second accuracy rate is equal to the preset accuracy rate or the second accuracy rate and the Whether the difference between the first accuracy rates is less than the preset difference;
  • the portrait saturation of the user portrait is defined as: the average number of portrait values of the user/the total number of portrait values.
  • the processing terminal selects a third preset number of second user portraits whose portrait saturation is greater than a threshold value, such as a portrait saturation greater than 50%, from the original portrait table that the developer builds based on a plurality of original user portraits collected in advance.
  • a threshold value such as a portrait saturation greater than 50%
  • Each second user portrait is composed of a first preset number of second user portrait values in a preset arrangement order, that is, the specifications of each second user portrait are the same.
  • the processing terminal performs word segmentation on each second user portrait, and inputs the second portrait value in each second user portrait into the preset correspondence table to obtain a corresponding second vocabulary.
  • the processing terminal constructs a training sample according to the correlation between the appearance of each second vocabulary in the second user portrait and the appearance of the fourth preset number of second vocabularies in the context, for example, "Male, 21 years old, civil servant, two property insurance "Corresponds to "has a car”.
  • the processing terminal calls the word2vec algorithm to train the training samples. First, you need to use a softmax classifier (logistic regression multi-class landing) to give each second vocabulary an initial vector, which is generally k-dimensional, and random values of 0-n form a k-dimensional variable, such as "2,1". Then, the processing terminal uses the Huffman tree classification scheme to train the training samples with initial vectors.
  • a softmax classifier logistic regression multi-class landing
  • the processing terminal After training to obtain the prediction model, the processing terminal additionally selects a third user portrait as a test sample to test the prediction model to obtain a corresponding test result.
  • the test result includes the predicted portrait value and the current first accuracy rate.
  • the processing terminal calls the preset accuracy rate and compares it with the first accuracy rate.
  • the processing terminal needs to determine whether the current second accuracy rate of the secondary training model after retraining meets the preset requirements. If the preset requirements are met, the secondary training model is set as the prediction model. If it is not satisfied, you need to expand the training sample again to retrain the secondary training model, and repeat the above actions in sequence until the trained training model meets the preset requirements.
  • the preset requirement is that the second accuracy rate is equal to the preset accuracy rate or whether the difference between the second accuracy rate and the first accuracy rate is less than the preset difference value.
  • step of constructing training samples according to preset rules for each of the second vocabulary includes:
  • S802 According to the preset arrangement order, respectively select the fourth preset number of the second vocabulary that appears adjacent to the output value as the input value;
  • S803 Correlate each input value with each output value to form multiple sets of training values, and aggregate the sets of training values to form the training samples.
  • each second vocabulary is sorted according to the position of the corresponding second portrait value in the user portrait, that is, a preset arrangement order, so that the processing terminal can directly recognize the appearance order of the second vocabulary corresponding to each user portrait.
  • the processing terminal sets each second vocabulary as an output value, and then searches for a fourth preset number of second vocabularies that appear adjacent to each output value as the input value corresponding to the output value according to the preset arrangement order.
  • the second vocabulary that appears in order in a single user portrait is "Male, 21 years old, civil servant, two property insurance, and a car".
  • the fifth second vocabulary is The output value, the format of the test value formed by the association is "(Male, 21 years old, civil servant, two property insurance)-(with car)".
  • the processing terminal associates the respective input values with the output values to form multiple sets of training values, and summarizes the sets of training values to form training samples.
  • steps of identifying the initial vector and training the training samples using the Huffman tree classification method to obtain an initial prediction model include:
  • S902 Obtain the number of occurrences of the same input value and the number of occurrences corresponding to each of the output values corresponding to the same input value;
  • S903 Calculate the occurrence probability of each output value according to the number of occurrences of the same input value and the number of occurrences corresponding to each output value;
  • S904 Construct the prediction model according to the input value, each output value, and the occurrence probability corresponding to each output value.
  • the processing terminal identifies the corresponding input value and output value in each training value according to the correspondence between the initial vector and the second vocabulary, and counts the number of occurrences of the same input value and the corresponding value of the input value The number of occurrences of each of one or more output values. The number of occurrences of each output value is divided by the number of occurrences of the corresponding input value to calculate the probability of occurrence of each output value.
  • the processing system constructs a Huffman tree based on the occurrence probabilities of each input value and the output value corresponding to the input value. Among them, the root node of the Huffman tree is the input value, and the root node of the subtree is the corresponding output value.
  • the output values are distributed according to the occurrence probability, and the output value with the greater occurrence probability is closer to the root node of the Huffman tree.
  • the processing terminal obtains a test sample, tests the accuracy rate of the initial model, and adjusts the initial model according to the test result until the accuracy rate of the initial model is equal to the preset accuracy rate to obtain the prediction model.
  • the step of determining whether the current first accuracy rate of the initial prediction model is less than a preset accuracy rate includes:
  • S1001 Acquire multiple third user portraits with portrait saturation of 100%, where the third user portrait includes a third known portrait value;
  • S1002 Select a fifth preset number of the third known portrait values as test portrait values from each of the third user portraits;
  • S1003 Separately remove each test portrait value from the corresponding third user portrait to obtain a fourth user portrait corresponding to the removed third user portraits;
  • S1004 Use each fourth user portrait to construct a test sample, and input the test sample into the initial prediction model to obtain a predicted portrait value;
  • the processing terminal inputs a plurality of third user portraits with portrait saturation of 100%, including a third known portrait value with a determined value.
  • the processing terminal selects a fifth preset number of third known portrait values from each third user portrait as test portrait values, and removes the test portrait values from each third user portrait, and each removed third user portrait forms a new Portrait of the fourth user.
  • the portrait value corresponding to the test portrait value in the fourth user portrait is the missing portrait value.
  • the processing terminal converts the fourth portrait value in each fourth user portrait into a corresponding fourth vocabulary, and constructs a test sample based on this.
  • the processing terminal inputs the test sample into the initial prediction model for analysis to obtain the predicted portrait value.
  • the processing terminal compares each predicted portrait value with the test portrait value.
  • the model accuracy rate is calculated.
  • the preset accuracy rate of processing the terminal call is compared with the first accuracy rate. If the first accuracy rate is less than the preset accuracy rate, it is determined that the current first accuracy rate of the initial prediction model is less than the preset accuracy rate. If the first accuracy rate is greater than the preset accuracy rate, it is determined that the current first accuracy rate of the initial prediction model is greater than the preset accuracy rate.
  • the step of expanding the training sample to retrain the initial prediction model to obtain a secondary training model includes:
  • S1101 Screening and testing all the test profile values that are different from the predicted profile values in the process of testing the initial prediction model as expanded output values;
  • S1102 Select a plurality of expansion input values corresponding to the expansion output values respectively according to the preset arrangement order;
  • S1103 Correlate each of the expanded input value and the expanded output value to the training sample to expand the training sample;
  • S1104 Use the expanded training sample to retrain the initial prediction model to obtain the secondary training model.
  • the processing terminal determines that the first accuracy rate of the prediction model is less than the preset accuracy rate, it needs to retrain the initial prediction model in the form of dividing different training samples. That is, the processing terminal selects one or more test portrait values that are different from the predicted portrait values in the test initial preset model as expanded output values, and selects their corresponding ones from the original user portrait table according to the expanded output values according to the preset arrangement order A fourth number of known portrait values are preset as expanded input values.
  • the obtained prediction profile value is "car”
  • the test profile value is "no car”
  • the processing terminal respectively associates each expanded input value with the output value, forms a test value, and adds it to the training sample to expand the training sample.
  • the processing terminal trains the expanded training samples through the Huffman tree classification method to obtain the secondary test model.
  • This embodiment provides a supplementary method for user portrait missing based on word2vec.
  • a prediction model based on word2vec idea it can automatically select the appearance probability according to the existing portrait information of the user according to the appearance probability between each portrait information.
  • the high predicted portrait information is used to complete the corresponding missing portrait information, has excellent accuracy and completeness, and effectively improves work efficiency.
  • an embodiment of the present application further provides a word2vec-based user missing portrait supplement device, including:
  • Retrieval module used to retrieve the first user portrait pre-recorded
  • the first building module 2 is configured to input each first user portrait value into a preset correspondence table to obtain a corresponding first vocabulary, and construct a corpus according to the preset arrangement order for each first vocabulary;
  • the calculation module 3 is configured to input the corpus into a prediction model constructed in advance based on word2vec for calculation, and output a prediction vocabulary corresponding to each of the missing vocabulary;
  • the first screening module 4 is configured to input each prediction vocabulary into the correspondence table to obtain a corresponding first prediction portrait value
  • the replacement module 5 is configured to replace each of the first predicted portrait values with the corresponding first missing portrait value in the first user portrait.
  • calculation module 3 includes:
  • a first input unit configured to input the corpus into the prediction model constructed in advance based on word2vec
  • a first screening unit for screening the second preset number of the first known vocabularies that appear next to each of the missing vocabularies from the corpus according to the preset arrangement order using the prediction model Obtaining at least one initial predicted vocabulary according to each known vocabulary and the respective occurrence probability of each initial predicted vocabulary;
  • the first selection unit is configured to compare the occurrence probabilities and select the initial predicted vocabulary with the largest occurrence probability as the predicted vocabulary.
  • the supplementary device further includes:
  • a second filtering module configured to filter a third preset number of second user portraits whose portrait saturation is greater than a threshold from the original portrait table
  • a third filtering module configured to input each second user portrait value into the preset correspondence table to obtain a corresponding second vocabulary
  • a second building module configured to construct training samples according to preset rules for each of the second vocabulary, and at the same time give the initial vector corresponding to each of the second vocabulary;
  • a training module used to identify each of the initial vectors, and use the Huffman tree classification method to train the training samples to obtain an initial prediction model
  • a first judgment module used to judge whether the current first accuracy rate of the initial prediction model is less than a preset accuracy rate
  • An expansion module for expanding the training samples to retrain the initial prediction model to obtain a secondary training model
  • a second judgment module used to judge whether the current second accuracy rate of the secondary training model meets the preset requirements
  • the setting module is used to set the secondary training model as the prediction model.
  • the second building module includes:
  • a setting unit configured to set each of the second vocabulary as an output value
  • a second selection unit configured to respectively select, as input values, a fourth preset number of the second vocabularies that appear adjacent to the output value according to the preset arrangement order;
  • the association unit is configured to associate each of the input values with each of the output values to form multiple sets of training values, and aggregate the sets of training values to form the training samples.
  • the embodiments of the units in the second building module are consistent with the corresponding method steps described above, and will not be described in detail here.
  • the training module includes:
  • An identification unit configured to identify each of the training values in the training sample according to the correspondence between the initial vector and the second vocabulary
  • a first obtaining unit configured to obtain the number of occurrences of the same input value and the number of occurrences corresponding to each of the output values corresponding to the same input value;
  • a first calculation unit configured to calculate the occurrence probability of each output value according to the number of occurrences of the same input value and the number of occurrences corresponding to each of the output values;
  • the construction unit is configured to construct the prediction model according to the input value, each output value, and the occurrence probability corresponding to each output value.
  • the embodiments of the units in the training module are consistent with the corresponding method steps described above, and will not be described in detail here.
  • the first judgment module includes:
  • a second obtaining unit configured to obtain multiple third user portraits with portrait saturation of 100%
  • a third selection unit configured to respectively select a fifth preset number of the third threshold portrait values as test portrait values from each of the third user portraits;
  • a culling unit configured to culminate each test portrait value from the corresponding third user portrait to obtain a fourth user portrait corresponding to each culled third user portrait;
  • a second input unit configured to construct a test sample using each of the fourth user portraits, and input the test sample into the initial prediction model to obtain a predicted portrait value
  • a second calculation unit configured to calculate the same rate between the predicted portrait value and the corresponding test portrait value to obtain the first accuracy rate
  • a calling unit configured to compare the preset accuracy rate with the first accuracy rate
  • a first determining unit configured to determine that the current first accuracy rate of the initial prediction model is less than a preset accuracy rate
  • the second determining unit is configured to determine that the current first accuracy rate of the initial prediction model is greater than a preset accuracy rate.
  • the expansion module includes:
  • a second screening unit configured to screen all test profile values that are different from the predicted profile values during the testing of the initial prediction model as expanded output values
  • a fourth selection unit configured to respectively select a plurality of expanded input values corresponding to the expanded output values according to the preset arrangement order
  • An expansion unit for respectively correlating each of the expanded input value and the expanded output value into the training sample to expand the training sample
  • the training unit is configured to retrain the initial prediction model using the expanded training samples to obtain the secondary training model.
  • This embodiment provides a word2vec-based user portrait missing supplement device.
  • a prediction model based on word2vec thoughts, it can automatically select the appearance probability according to the existing portrait information of the user according to the appearance probability between each portrait information
  • the high predicted portrait information is used to complete the corresponding missing portrait information, has excellent accuracy and completeness, and effectively improves work efficiency.
  • an embodiment of the present application further provides a computer device.
  • the computer device may be a server, and its internal structure may be as shown in FIG.
  • the computer device includes a processor, memory, network interface, and database connected by a system bus. Among them, the processor designed by the computer is used to provide computing and control capabilities.
  • the memory of the computer device includes a non-volatile storage medium and an internal memory.
  • the non-volatile storage medium stores an operating system, a computer program, and a database.
  • the internal memory provides an environment for the operating system and computer programs in the non-volatile storage medium.
  • the database of the computer device is used to store data such as the original portrait table.
  • the network interface of the computer device is used to communicate with external terminals through a network connection.
  • FIG. 3 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied.
  • An embodiment of the present application further provides a non-volatile computer-readable storage medium on which a computer program is stored.
  • a computer program is stored on which a computer program is stored.
  • the process of the foregoing method embodiments is performed.

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Machine Translation (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本申请提供一种基于word2vec的用户缺失画像的补充方法和相关设备,方法包括:调取并基于第一用户画像筛选第一词汇构建语料库;将语料库输入基于word2vec构建的预测模型计算预测词汇,再将其转化为第一缺失画像值。本申请基于预测模型计算预测画像信息用以补全缺失画像信息,具有高准确率、完整率。

Description

基于word2vec的用户缺失画像的补充方法和相关设备
本申请要求于2018年11月30日提交中国专利局、申请号为201811453793.7,发明名称为“基于word2vec的用户缺失画像的补充方法和相关设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及数据分析与处理技术领域,特别涉及一种基于word2vec的用户缺失画像的补充方法和相关设备。
背景技术
用户画像又称用户角色,主要表征了用户的具体相关信息,比如年龄、经济收入情况或消费倾向等。作为一种勾画目标用户、联系用户诉求与设计方向的有效工具,用户画像在各领域得到了广泛的应用。用户画像主要是从公开渠道获得,比如用户的注册信息、购物历史记录,用户画像缺失度较大。现有的对于用户画像缺失的补充方法,主要是使用传统统计学的方法,由此发明人发现现有的补充方法效率低下,且未能考虑到用户整体画像相互之间的影响,补充的准确性较低。
技术问题
本申请的主要目的为提供一种基于word2vec的用户缺失画像的补充方法和相关设备,旨在解决现有用户缺失画像补充方法效率低下和准确性低的弊端。
技术解决方案
为实现上述目的,本申请提供了一种基于word2vec的用户缺失画像的补充方法,其特征在于,包括:
调取预先录入的第一用户画像,所述第一用户画像由第一预设数量的第一用户画像值按照预设排列顺序组成,所述第一用户画像包括多个第一缺失画像值和多个第一已知画像值;
将各所述第一用户画像值输入预设对应表中筛选得到对应的第一词汇,并将各所述第一词汇按照所述预设排列顺序构建语料库,所述语料库包括各所述第一缺失画像值对应的缺失词汇和各所述第一已知画像值对应的第一已知词汇,所述预设对应表由预先构建的多组用户画像值对应词汇组成;
将所述语料库输入预先基于word2vec构建的预测模型中进行计算,输出各所述缺失词汇分别对应的预测词汇;
将各所述预测词汇输入所述对应表中筛选得到对应的第一预测画像值;
将各所述第一预测画像值分别替换所述第一用户画像中对应的所述第一缺失画像值。
本申请还提供了一种基于word2vec的用户缺失画像的补充装置,包括:
调取模块,用于调取预先录入的第一用户画像;
第一构建模块,用于将各所述第一用户画像值输入预设对应表中筛选得到对应的第一词汇,并将各所述第一词汇按照所述预设排列顺序构建语料库;
计算模块,用于将所述语料库输入预先基于word2vec构建的预测模型中进行计算,输出各所述缺失词汇分别对应的预测词汇;
第一筛选模块,用于将各所述预测词汇输入所述对应表中筛选得到对应的第一预测画像值;
替换模块,用于将各所述第一预测画像值分别替换所述第一用户画像中对应的所述第一缺失画像值。
本申请还提供一种计算机设备,包括存储器和处理器,所述存储器中存储有计算机程序,所述处理器执行所述计算机程序时实现上述任一项所述方法的步骤。
本申请还提供一种非易失性计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现上述任一项所述的方法的步骤。
有益效果
本申请中提供的一种基于word2vec的用户画像缺失补充方法、装置、计算机设备和非易失性计算机可读存储介质,通过调用基于word2vec思想构建的预测模型,能够根据各画像信息之间的出现概率,从而自动根据用户已有的画像信息,选择出现概率高的预测画像信息用以补全相应的缺失画像信息,具有优秀的准确率和完整率,并且有效提高工作效率。
附图说明
图1是本申请一实施例中基于word2vec的用户画像缺失补充方法步骤示意图;
图2是本申请一实施例中基于word2vec的用户画像缺失补充装置整体结构框图;
图3是本申请一实施例的计算机设备的结构示意框图。
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
本发明的最佳实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
参照图1,本申请一实施例中提供了一种基于word2vec的用户缺失画像的补充方法,包括:
S1:调取预先录入的第一用户画像,所述第一用户画像由第一预设数量的第一用户画像值按照预设排列顺序组成,所述第一用户画像包括多个第一缺失画像值和多个第一已知画像值;
S2:将各所述第一用户画像值输入预设对应表中筛选得到对应的第一词汇,,并将各所述第一词汇按照所述预设排列顺序构建语料库,所述语料库包括各所述第一缺失画像值对应的缺失词汇和各所述第一已知画像值对应的第一已知词汇,所述预设对应表由预先构建的多组用户画像值对应词汇组成;
S3:将所述语料库输入预先基于word2vec构建的预测模型中进行计算,输出各所述缺失词汇分别对应的预测词汇;
S4:将各所述预测词汇输入所述对应表中筛选得到对应的第一预测画像值;
S5:将各所述第一预测画像值分别替换所述第一用户画像中对应的所述第一缺失画像值。
本实施例中,Word2vec是为一群用来产生词向量的相关模型。这些模型为浅而双层的神经网络,用来训练以重新建构语言学之词文本。第一用户画像由操作人员录入处理终端。操作人员通过客观的数据收集渠道,比如用户自己填写、用户网上留下的购买记录、浏览记录等途径,收集用户不同纬度的信息,并将所收集的用户信息按照传统的数据加工手段处理整合成数据表,该数据表即为第一用户画像。其中,数据表中的用户信息词汇按照预设对应表表现为第一用户画像值,而非具体的文本词汇,并按照预设排列顺序进行排列。比如,第一用户画像值“1”在预设对应表中对应的文本词汇为“男性”。处理终端在调取预先录入的第一用户画像后,需要将第一用户画像中的各个第一用户画像值输入预设对应表中筛选得到对应的第一词汇,,并将转化后的第一词汇按照原先在第一用户画像中的顺序,即预设排列顺序进行排列,构建语料库,形成第一用户画像的文本描述,具有具体的词义。其中,第一用户画像值中包括多个第一已知画像值和第一缺失画像值,第一已知画像值转化为对应的具有具体词义的第一已知词汇。而第一缺失画像值,即空值统一转化为“未知”,即第一缺失词汇。处理终端将所述语料库输入预先基于word2vec构建的预测模型中进行计算。其中,预测模型中包括有多组已知词汇对应的预测词汇。语料库中的各第一词汇按照预设排列顺序排列,在进行解析时,预测模型可以识别第一已知词汇和第一缺失词汇,然后根据第一已知词汇匹配直接得到第一缺失词汇对应的一个或多个预测词汇,并根据各个预测词汇的出现概率,选择出现概率最大的一个预测词汇输出。比如,预测模型根据第一已知词汇“男”、“公务员”、“30岁”,匹配得到在“是否有车”这个文本描述中,“有车”的出现概率为60%,“没有车”的出现概率为40%,预测模型选择输出出现概率较大的“有车”这个词汇作为预测词汇。处理终端在获得预测模型输出的预测词汇后,需要将各预测词汇输入对应表中筛选得到对应的第一预测画像值,并使用第一预测画像值替换对应的第一缺失画像值,直至补全整个第一用户画像,即第一用户画像中均为已知画像值。
进一步的,所述将所述语料库输入基于word2vec构建的预测模型中进行计算,输出各所述缺失词汇分别对应的预测词汇的步骤,包括:
S301:将所述语料库输入预先基于word2vec构建的所述预测模型;
S302:利用所述预测模型,从所述语料库中按照所述预设排列顺序筛选各所述缺失词汇相邻出现的第二预设数量的所述第一已知词汇,并根据各所述已知词汇获得至少一个初始预测词汇以及各初始预测词汇分别对应的出现概率;
S303:分别比对各所述出现概率,选择所述出现概率最大的所述初始预测词汇作为所述预测词汇。
本实施例中,预测模型预先基于word2vec的训练思想构建得到,内部包含有第一已知词汇对应输出的初始预测词汇,以及初始预测词汇对应的出现概率。处理终端调用预测模型对语料库进行解析。预测模型在解析过程中可以识别第一已知词汇和第一缺失词汇,以及两者之间的预设排列顺序。预测模型在对第一缺失词汇进行预测时,根据第一词汇之间的预设排列顺序选择缺失词汇相邻出现的第二预设数量的第一已知词汇作为输入,筛选后输出对应的一个或多个初始预测词汇及其对应的出现概率。预测模型对各个初始预测词汇的出现概率一一进行比较,然后选择出现概率最大的初始预测词汇作为预测词汇输出。比如,预测模型根据第一已知词汇“男”、“公务员”、“30岁”,匹配得到在“性别”、“职业”、“年龄”预设排列顺序之后的文本描述:“是否有车”的初始预测词汇“有车”的出现概率为60%,另一初始预测词汇“没有车”的出现概率为40%,预测模型选择输出出现概率较大的“有车”这个初始预测词汇作为预测词汇。
进一步的,所述将所述语料库输入预先基于word2vec构建的预测模型中进行计算,输出各所述缺失词汇分别对应的预测词汇的步骤之前,包括:
S6:从原始画像表中筛选画像饱和度大于阈值的第三预设数量的第二用户画像,所述原始画像表由开发人员根据预先收集的多个原始用户画像构建,所述第二用户画像由所述第一预设数量的第二用户画像值按照所述预设排列顺序组成;
S7:将各所述第二用户画像值输入所述预设对应表中筛选得到对应的第二词汇;
S8:将各所述第二词汇按照预设规则构建训练样本,同时分别给予各所述第二词汇对应的初始向量;
S9:识别各所述初始向量,并使用霍夫曼树分类方法训练所述训练样本得到初始预测模型;
S10:判断所述初始预测模型当前的第一准确率是否小于预设准确率;
S11:若小于预设准确率,则扩大所述训练样本重新训练所述初始预测模型,得到二次训练模型;
S12:判断所述二次训练模型当前的第二准确率是否满足预设要求,所述预设要求为所述第二准确率等于所述预设准确率或所述第二准确率与所述第一准确率之间的差值是否小于预设差值;
S13:若满足预设要求,则将所述二次训练模型设定为所述预测模型。
本实施例中,用户画像的画像饱和度定义为:用户平均有值的画像值数/总的画像值数。处理终端从开发人员根据预先收集的多个原始用户画像构建后录入的原始画像表中,筛选画像饱和度大于阈值,比如画像饱和度大于50%的第三预设数量的第二用户画像。其中,各个第二用户画像均由第一预设数量的第二用户画像值按照预设排列顺序组成,即各个第二用户画像的规格相同。然后,处理终端对各个第二用户画像进行分词,将各个第二用户画像中的第二画像值输入所述预设对应表中筛选得到对应的第二词汇。处理终端根据第二用户画像中的各个第二词汇的出现与其上下文中第四预设数量个第二词汇的出现的相关关系构建训练样本,比如,“男,21岁,公务员,两个产险”对应与“有车”。处理终端调用word2vec算法对训练样本进行训练。首先需要使用softmax分类器(逻辑回归多分类落站)给予各个第二词汇一个初始向量,一般是k维,0—n的随机值组成一个k维变量,比如“2,1”。然后,处理终端采用霍夫曼树分类方案对具有初始向量的训练样本进行训练。根据霍夫曼树思想,概率越大的向量其离树的根节点越近,由此训练得到的预测模型,可以预测出现了N个词后,N+1个词可能出现的概率。比如,“男”、“30—40岁”两个词出现后,下一个词为“购买一次”的概率是0.3,“购买两次”的概率是0.2。处理终端在训练得到预测模型后,另外选取第三用户画像作为测试样本,用于测试预测模型,得到相应的测试结果,测试结果包括预测画像值和当前的第一准确率。处理终端调用预设准确率与第一准确率进行比较,如果第一准确率大于或等于预设准确率,则不需要扩大训练样本,直接将初始训练模型设置为预设模型。如果第一准确率小于预设准确率,则需要扩大训练样本重新训练初始预测模型,得到二次训练模型。处理终端需要判断再次训练后的二次训练模型当前的第二准确率是否满足预设要求,如果满足预设要求,则将二次训练模型设定为预测模型。如果不满足,则需要再次扩大训练样本重新训练二次训练模型,依次重复上述动作,直至训练后的训练模型满足预设要求。其中预设要求为第二准确率等于预设准确率或第二准确率与第一准确率之间的差值是否小于预设差值。
进一步的,所述将各所述第二词汇按照预设规则构建训练样本的步骤,包括:
S801:将各所述第二词汇分别设为输出值;
S802:按照所述预设排列顺序,分别选择所述输出值相邻出现的第四预设数量的所述第二词汇作为输入值;
S803:将各所述输入值分别与各输出值对应关联形成多组训练值,并汇总各组所述训练值形成所述训练样本。
本实施例中,各个第二词汇按照对应的第二画像值在用户画像中的位置,即预设排列顺序进行排序,由此处理终端可以直接识别各个用户画像对应的第二词汇的出现顺序。处理终端分别将各个第二词汇设为输出值,然后根据预设排列顺序,分别寻找各个输出值相邻出现的第四预设数量的第二词汇作为该输出值对应的输入值。比如,单个用户画像中按照顺序出现的第二词汇为“男,21岁,公务员,两个产险,有车”,选择前4个第二词汇作为输入值,则第5个第二词汇为输出值,关联形成的测试值格式为“(男,21岁,公务员,两个产险)—(有车)”。处理终端将各个输入值分别与输出值对应关联形成多组训练值,并汇总各组所述训练值汇总形成训练样本。
进一步的,所述识别所述初始向量,并使用霍夫曼树分类方法训练所述训练样本得得到初始预测模型的步骤,包括:
S901:根据所述初始向量与所述第二词汇的对应关系,识别所述训练样本中的各个所述训练值;
S902:获取相同输入值的出现次数,以及与所述相同输入值对应的各个所述输出值分别对应的出现次数;
S903:根据所述相同输入值的出现次数和各所述输出值对应的出现次数,计算得到各所述输出值的出现概率;
S904:根据所述输入值、各所述输出值以及各所述输出值对应的所述出现概率,构建所述预测模型。
本实施例中,处理终端根据初始向量与第二词汇之间的对应关系,识别各个训练值中对应的输入值和输出值,并统计相同的输入值的出现次数,以及与该输入值对应的一个或多个输出值各自的出现次数。各个输出值的出现次数除以对应的输入值的出现次数,计算获得各个输出值的出现概率。处理系统根据各个输入值以及与该输入值对应的输出值的出现概率,构建霍夫曼树。其中,霍夫曼树的根节点为输入值,子树的根节点为对应的输出值。输出值按照出现概率进行分布,出现概率越大的输出值离霍夫曼树的根节点越近。整理统合所有的霍夫曼树,形成初始模型。处理终端获取测试样本,对初始模型的准确率进行测试,并根据测试结果调整初始模型,直至初始模型的准确率等于预设准确率,得到预测模型。
进一步的,所述判断所述初始预测模型当前的第一准确率是否小于预设准确率的步骤,包括:
S1001:获取画像饱和度为100%的多个第三用户画像,所述第三用户画像包括第三已知画像值;
S1002:分别从各所述第三用户画像中选择第五预设数量的所述第三已知画像值作为测试画像值;
S1003:将各所述测试画像值从对应的所述第三用户画像中分别剔除,得到剔除后的各所述第三用户画像对应的第四用户画像;
S1004:使用各所述第四用户画像构建测试样本,并将所述测试样本输入所述初始预测模型,得到预测画像值;
S1005:计算所述预测画像值与对应的所述测试画像值之间的相同数量,得到所述第一准确率;
S1006:调用所述预设准确率与所述第一准确率进行比较;
S1007:若所述第一准确率小于所述预设准确率,则判定所述初始预测模型当前的第一准确率小于预设准确率;
S1008:若所述第一准确率大于所述预设准确率,则判定所述初始预测模型当前的第一准确率大于预设准确率。
本实施例中,处理终端录入画像饱和度为100%的多个第三用户画像,其中包括具有确定值的第三已知画像值。处理终端从各个第三用户画像中选择第五预设数量的第三已知画像值作为测试画像值,将测试画像值从各个第三用户画像中剔除,剔除后的各个第三用户画像形成新的第四用户画像。此时第四用户画像中对应测试画像值的画像值为缺失画像值。处理终端将各个第四用户画像中的第四画像值转化为对应的第四词汇,并以此构建测试样本。处理终端将测试样本输入到初始预测模型中进行解析,得到预测画像值。处理终端分别将各个预测画像值与测试画像值进行对应比对,如果预测画像值与对应的测试画像值相同,则预测正确;如果不同则错误。根据预测画像值的总数和正确的预测画像值的数目,计算得到模型准确率。处理终端调用调用预设准确率与第一准确率进行比较。如果第一准确率小于预设准确率,则判定初始预测模型当前的第一准确率小于预设准确率。若第一准确率大于预设准确率,则判定初始预测模型当前的第一准确率大于预设准确率。
进一步的,所述扩大所述训练样本重新训练所述初始预测模型,得到二次训练模型的步骤,包括:
S1101:筛选测试所述初始预测模型过程中与预测画像值不同的所有测试画像值作为扩大输出值;
S1102:按照所述预设排列顺序分别选择所述扩大输出值对应的多个扩大输入值;
S1103:分别将各所述扩大输入值与所述扩大输出值对应关联后加入所述训练样本中,扩大所述训练样本;
S1104:使用扩大后的所述训练样本重新训练所述初始预测模型,得到所述二次训练模型。
本实施例中,处理终端判定预测模型的第一准确率小于预设准确率后,则需要采用切分不同训练样本的形式重新训练初始预测模型。即处理终端筛选出在测试初始预设模型中与预测画像值不同的一个或多个测试画像值作为扩大输出值,并按照预设排列顺序从原始用户画像表中根据扩大输出值选择其对应的预设第四数量的已知画像值作为扩大输入值。比如,在测试初始预测模型中,得到的预测画像值为“有车”,而测试画像值为“无车”,则说明初始预测模型在对输出值“是否有车”进行补充时不准确,需要针对该输出值扩大训练样本,即获取更多在“是否有车”这一用户画像的更多已知画像值作为扩大输入值。处理终端分别将各个扩大输入值与输出值对应关联,形成测试值后加入训练样本中,扩大训练样本。处理终端通过霍夫曼树分类方法训练扩大后的训练样本,得到二次测试模型。
本实施例提供的一种基于word2vec的用户画像缺失补充方法,通过调用基于word2vec思想构建的预测模型,能够根据各画像信息之间的出现概率,从而自动根据用户已有的画像信息,选择出现概率高的预测画像信息用以补全相应的缺失画像信息,具有优秀的准确率和完整率,并且有效提高工作效率。
参照图2,本申请一实施例中还提供了一种基于word2vec的用户缺失画像的补充装置,包括:
调取模块1,用于调取预先录入的第一用户画像;
第一构建模块2,用于将各所述第一用户画像值输入预设对应表中筛选得到对应的第一词汇,并将各所述第一词汇按照所述预设排列顺序构建语料库;
计算模块3,用于将所述语料库输入预先基于word2vec构建的预测模型中进行计算,输出各所述缺失词汇分别对应的预测词汇;
第一筛选模块4,用于将各所述预测词汇输入所述对应表中筛选得到对应的第一预测画像值;
替换模块5,用于将各所述第一预测画像值分别替换所述第一用户画像中对应的所述第一缺失画像值。
本实施例中,补充装置各模块的实施例与上述对应的方法步骤一致,在此不作详述。
进一步的,所述计算模块3包括:
第一输入单元,用于将所述语料库输入预先基于word2vec构建的所述预测模型;
第一筛选单元,用于利用所述预测模型,从所述语料库中按照所述预设排列顺序筛选各所述缺失词汇相邻出现的第二预设数量的所述第一已知词汇,并根据各所述已知词汇获得至少一个初始预测词汇以及各初始预测词汇分别对应的出现概率;
第一选择单元,用于分别比对各所述出现概率,选择所述出现概率最大的所述初始预测词汇作为所述预测词汇。
本实施例中,计算模块中各单元的实施例与上述对应的方法步骤一致,在此不作详述。
进一步的,所述补充装置还包括:
第二筛选模块,用于从原始画像表中筛选画像饱和度大于阈值的第三预设数量的第二用户画像;
第三筛选模块,用于将各所述第二用户画像值输入所述预设对应表中筛选得到对应的第二词汇;
第二构建模块,用于将各所述第二词汇按照预设规则构建训练样本,同时分别给予各所述第二词汇对应的初始向量;
训练模块,用于识别各所述初始向量,并使用霍夫曼树分类方法训练所述训练样本得到初始预测模型;
第一判断模块,用于判断所述初始预测模型当前的第一准确率是否小于预设准确率;
扩大模块,用于扩大所述训练样本重新训练所述初始预测模型,得到二次训练模型;
第二判断模块,用于判断所述二次训练模型当前的第二准确率是否满足预设要求;
设定模块,用于将所述二次训练模型设定为所述预测模型。
本实施例中,补充装置各模块的实施例与对应的方法步骤一致,在此不作详述。
进一步,所述第二构建模块包括:
设定单元,用于将各所述第二词汇分别设为输出值;
第二选择单元,用于按照所述预设排列顺序,分别选择所述输出值相邻出现的第四预设数量的所述第二词汇作为输入值;
关联单元,用于将各所述输入值分别与各输出值对应关联形成多组训练值,并汇总各组所述训练值形成所述训练样本。
本实施例中,第二构建模块中各单元的实施例与上述对应的方法步骤一致,在此不作详述。
进一步的,所述训练模块,包括:
识别单元,用于根据所述初始向量与所述第二词汇的对应关系,识别所述训练样本中的各个所述训练值;
第一获取单元,用于获取相同输入值的出现次数,以及与所述相同输入值对应的各个所述输出值分别对应的出现次数;
第一计算单元,用于根据所述相同输入值的出现次数和各所述输出值对应的出现次数,计算得到各所述输出值的出现概率;
构建单元,用于根据所述输入值、各所述输出值以及各所述输出值对应的所述出现概率,构建所述预测模型。
本实施例中,训练模块中各单元的实施例与上述对应的方法步骤一致,在此不作详述
进一步的,第一判断模块包括:
第二获取单元,用于获取画像饱和度为100%的多个第三用户画像;
第三选择单元,用于分别从各所述第三用户画像中选择第五预设数量的所述第三阈值画像值作为测试画像值;
剔除单元,用于将各所述测试画像值从对应的所述第三用户画像中分别剔除,得到剔除后的各所述第三用户画像对应的第四用户画像;
第二输入单元,用于使用各所述第四用户画像构建测试样本,并将所述测试样本输入所述初始预测模型,得到预测画像值;
第二计算单元,用于计算所述预测画像值与对应的所述测试画像值之间的相同率,得到所述第一准确率;
调用单元,用于调用所述预设准确率与所述第一准确率进行比较;
第一判定单元,用于判定所述初始预测模型当前的第一准确率小于预设准确率;
第二判定单元,用于判定所述初始预测模型当前的第一准确率大于预设准确率。
本实施例中,第一判断模块中各单元的实施例与上述对应的方法步骤一致,在此不作详述
进一步的,所述扩大模块包括:
第二筛选单元,用于筛选测试所述初始预测模型过程中与预测画像值不同的所有测试画像值作为扩大输出值;
第四选择单元,用于按照所述预设排列顺序分别选择所述扩大输出值对应的多个扩大输入值;
扩大单元,用于分别将各所述扩大输入值与所述扩大输出值对应关联后加入所述训练样本中,扩大所述训练样本;
训练单元,用于使用扩大后的所述训练样本重新训练所述初始预测模型,得到所述二次训练模型。
本实施例中,扩大模块中各单元的实施例与上述对应的方法步骤一致,在此不作详述
本实施例提供的一种基于word2vec的用户画像缺失补充装置,通过调用基于word2vec思想构建的预测模型,能够根据各画像信息之间的出现概率,从而自动根据用户已有的画像信息,选择出现概率高的预测画像信息用以补全相应的缺失画像信息,具有优秀的准确率和完整率,并且有效提高工作效率。
参照图3,本申请实施例中还提供一种计算机设备,该计算机设备可以是服务器,其内部结构可以如图3所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设计的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机程序和数据库。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的数据库用于存储原始画像表等数据。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机可读指令在执行时,执行如上述各方法的实施例的流程。本领域技术人员可以理解,图3中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定。
本申请一实施例还提供一种非易失性计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时,执行如上述各方法的实施例的流程。以上所述仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。

Claims (20)

  1. 一种基于word2vec的用户缺失画像的补充方法,包括:
    调取预先录入的第一用户画像,所述第一用户画像由第一预设数量的第一用户画像值按照预设排列顺序组成,所述第一用户画像包括多个第一缺失画像值和多个第一已知画像值;
    将各所述第一用户画像值输入预设对应表中筛选得到对应的第一词汇,并将各所述第一词汇按照所述预设排列顺序构建语料库,所述语料库包括各所述第一缺失画像值对应的缺失词汇和各所述第一已知画像值对应的第一已知词汇,所述预设对应表由预先构建的多组用户画像值对应词汇组成;
    将所述语料库输入预先基于word2vec构建的预测模型中进行计算,输出各所述缺失词汇分别对应的预测词汇;
    将各所述预测词汇输入所述预设对应表中筛选得到对应的第一预测画像值;
    将各所述第一预测画像值分别替换所述第一用户画像中对应的所述第一缺失画像值。
  2. 根据权利要求1所述的基于word2vec的用户缺失画像的补充方法,所述将所述语料库输入基于word2vec构建的预测模型中进行计算,输出各所述缺失词汇分别对应的预测词汇的步骤,包括:
    将所述语料库输入预先基于word2vec构建的所述预测模型;
    利用所述预测模型,从所述语料库中按照所述预设排列顺序筛选各所述缺失词汇相邻出现的第二预设数量的所述第一已知词汇,并根据各所述已知词汇获得至少一个初始预测词汇以及各初始预测词汇分别对应的出现概率;
    分别比对各所述出现概率,选择所述出现概率最大的所述初始预测词汇作为所述预测词汇。
  3. 根据权利要求1所述的基于word2vec的用户缺失画像的补充方法,所述将所述语料库输入预先基于word2vec构建的预测模型中进行计算,输出各所述缺失词汇分别对应的预测词汇的步骤之前,包括:
    从原始画像表中筛选画像饱和度大于阈值的第三预设数量的第二用户画像,所述原始画像表由开发人员根据预先收集的多个原始用户画像构建,所述第二用户画像由所述第一预设数量的第二用户画像值按照所述预设排列顺序组成;
    将各所述第二用户画像值输入所述预设对应表中筛选得到对应的第二词汇;
    将各所述第二词汇按照预设规则构建训练样本,同时分别给予各所述第二词汇对应的初始向量;
    识别各所述初始向量,并使用霍夫曼树分类方法训练所述训练样本得到初始预测模型;
    判断所述初始预测模型当前的第一准确率是否小于预设准确率;
    若小于预设准确率,则扩大所述训练样本重新训练所述初始预测模型,得到二次训练模型;
    判断所述二次训练模型当前的第二准确率是否满足预设要求,所述预设要求为所述第二准确率等于所述预设准确率或所述第二准确率与所述第一准确率之间的差值是否小于预设差值;
    若满足预设要求,则将所述二次训练模型设定为所述预测模型。
  4. 根据权利要求3所述的基于word2vec的用户缺失画像的补充方法,所述将各所述第二词汇按照预设规则构建训练样本的步骤,包括:
    将各所述第二词汇分别设为输出值;
    按照所述预设排列顺序,分别选择所述输出值相邻出现的第四预设数量的所述第二词汇作为输入值;
    将各所述输入值分别与各输出值对应关联形成多组训练值,并汇总各组所述训练值形成所述训练样本。
  5. 根据权利要求4所述的基于word2vec的用户缺失画像的补充方法,所述识别所述初始向量,并使用霍夫曼树分类方法训练所述训练样本得得到初始预测模型的步骤,包括:
    根据所述初始向量与所述第二词汇的对应关系,识别所述训练样本中的各个所述训练值;
    获取相同输入值的出现次数,以及与所述相同输入值对应的各个所述输出值分别对应的出现次数;
    根据所述相同输入值的出现次数和各所述输出值对应的出现次数,计算得到各所述输出值的出现概率;
    根据所述输入值、各所述输出值以及各所述输出值对应的所述出现概率,构建所述预测模型。
  6. 根据权利要求3所述的基于word2vec的用户缺失画像的补充方法,所述判断所述初始预测模型当前的第一准确率是否小于预设准确率的步骤,包括:
    获取画像饱和度为100%的多个第三用户画像,所述第三用户画像包括第三已知画像值;
    分别从各所述第三用户画像中选择第五预设数量的所述第三阈值画像值作为测试画像值;
    将各所述测试画像值从对应的所述第三用户画像中分别剔除,得到剔除后的各所述第三用户画像对应的第四用户画像;
    使用各所述第四用户画像构建测试样本,并将所述测试样本输入所述初始预测模型,得到预测画像值;
    计算所述预测画像值与对应的所述测试画像值之间的相同率,得到所述第一准确率;
    调用所述预设准确率与所述第一准确率进行比较;
    若所述第一准确率小于所述预设准确率,则判定所述初始预测模型当前的第一准确率小于预设准确率;
    若所述第一准确率大于所述预设准确率,则判定所述初始预测模型当前的第一准确率大于预设准确率。
  7. 根据权利要求6所述的基于word2vec的用户缺失画像的补充方法,所述扩大所述训练样本重新训练所述初始预测模型,得到二次训练模型的步骤,包括:
    筛选测试所述初始预测模型过程中与预测画像值不同的所有测试画像值作为扩大输出值;
    按照所述预设排列顺序分别选择所述扩大输出值对应的多个扩大输入值;
    分别将各所述扩大输入值与所述扩大输出值对应关联后加入所述训练样本中,扩大所述训练样本;
    使用扩大后的所述训练样本重新训练所述初始预测模型,得到所述二次训练模型。
  8. 一种基于word2vec的用户缺失画像的补充装置,包括:
    调取模块,用于调取预先录入的第一用户画像;
    构建模块,用于将各所述第一用户画像值输入预设对应表中筛选得到对应的第一词汇,并将各所述第一词汇按照所述预设排列顺序构建语料库;
    计算模块,用于将所述语料库输入预先基于word2vec构建的预测模型中进行计算,输出各所述缺失词汇分别对应的预测词汇;
    筛选模块,用于将各所述预测词汇输入所述对应表中筛选得到对应的第一预测画像值;
    替换模块,用于将各所述第一预测画像值分别替换所述第一用户画像中对应的所述第一缺失画像值。
  9. 根据权利要求8所述的基于word2vec的用户缺失画像的补充装置,所述计算模块包括:
    第一输入单元,用于将所述语料库输入预先基于word2vec构建的所述预测模型;
    第一筛选单元,用于利用所述预测模型,从所述语料库中按照所述预设排列顺序筛选各所述缺失词汇相邻出现的第二预设数量的所述第一已知词汇,并根据各所述已知词汇获得至少一个初始预测词汇以及各初始预测词汇分别对应的出现概率;
    第一选择单元,用于分别比对各所述出现概率,选择所述出现概率最大的所述初始预测词汇作为所述预测词汇。
  10. 根据权利要求8所述的基于word2vec的用户缺失画像的补充装置,所述补充装置还包括:
    第二筛选模块,用于从原始画像表中筛选画像饱和度大于阈值的第三预设数量的第二用户画像;
    第三筛选模块,用于将各所述第二用户画像值输入所述预设对应表中筛选得到对应的第二词汇;
    第二构建模块,用于将各所述第二词汇按照预设规则构建训练样本,同时分别给予各所述第二词汇对应的初始向量;
    训练模块,用于识别各所述初始向量,并使用霍夫曼树分类方法训练所述训练样本得到初始预测模型;
    第一判断模块,用于判断所述初始预测模型当前的第一准确率是否小于预设准确率;
    扩大模块,用于扩大所述训练样本重新训练所述初始预测模型,得到二次训练模型;
    第二判断模块,用于判断所述二次训练模型当前的第二准确率是否满足预设要求;
    设定模块,用于将所述二次训练模型设定为所述预测模型。
  11. 根据权利要求10所述的基于word2vec的用户缺失画像的补充装置,所述第二构建模块包括:
    设定单元,用于将各所述第二词汇分别设为输出值;
    第二选择单元,用于按照所述预设排列顺序,分别选择所述输出值相邻出现的第四预设数量的所述第二词汇作为输入值;
    关联单元,用于将各所述输入值分别与各输出值对应关联形成多组训练值,并汇总各组所述训练值形成所述训练样本。
  12. 根据权利要求10所述的基于word2vec的用户缺失画像的补充装置,所述训练模块,包括:
    识别单元,用于根据所述初始向量与所述第二词汇的对应关系,识别所述训练样本中的各个所述训练值;
    第一获取单元,用于获取相同输入值的出现次数,以及与所述相同输入值对应的各个所述输出值分别对应的出现次数;
    第一计算单元,用于根据所述相同输入值的出现次数和各所述输出值对应的出现次数,计算得到各所述输出值的出现概率;
    构建单元,用于根据所述输入值、各所述输出值以及各所述输出值对应的所述出现概率,构建所述预测模型。
  13. 根据权利要求10所述的基于word2vec的用户缺失画像的补充装置,第一判断模块包括:
    第二获取单元,用于获取画像饱和度为100%的多个第三用户画像;
    第三选择单元,用于分别从各所述第三用户画像中选择第五预设数量的所述第三阈值画像值作为测试画像值;
    剔除单元,用于将各所述测试画像值从对应的所述第三用户画像中分别剔除,得到剔除后的各所述第三用户画像对应的第四用户画像;
    第二输入单元,用于使用各所述第四用户画像构建测试样本,并将所述测试样本输入所述初始预测模型,得到预测画像值;
    第二计算单元,用于计算所述预测画像值与对应的所述测试画像值之间的相同率,得到所述第一准确率;
    调用单元,用于调用所述预设准确率与所述第一准确率进行比较;
    第一判定单元,用于判定所述初始预测模型当前的第一准确率小于预设准确率;
    第二判定单元,用于判定所述初始预测模型当前的第一准确率大于预设准确率。
  14. 根据权利要求10所述的基于word2vec的用户缺失画像的补充装置,所述扩大模块包括:
    第二筛选单元,用于筛选测试所述初始预测模型过程中与预测画像值不同的所有测试画像值作为扩大输出值;
    第四选择单元,用于按照所述预设排列顺序分别选择所述扩大输出值对应的多个扩大输入值;
    扩大单元,用于分别将各所述扩大输入值与所述扩大输出值对应关联后加入所述训练样本中,扩大所述训练样本;
    训练单元,用于使用扩大后的所述训练样本重新训练所述初始预测模型,得到所述二次训练模型。
  15. 一种计算机设备,包括存储器和处理器,所述存储器中存储有计算机程序,所述处理器执行所述计算机程序时实现基于word2vec的用户缺失画像的补充方法,所述补充方法包括:
    调取预先录入的第一用户画像,所述第一用户画像由第一预设数量的第一用户画像值按照预设排列顺序组成,所述第一用户画像包括多个第一缺失画像值和多个第一已知画像值;
    将各所述第一用户画像值输入预设对应表中筛选得到对应的第一词汇,并将各所述第一词汇按照所述预设排列顺序构建语料库,所述语料库包括各所述第一缺失画像值对应的缺失词汇和各所述第一已知画像值对应的第一已知词汇,所述预设对应表由预先构建的多组用户画像值对应词汇组成;
    将所述语料库输入预先基于word2vec构建的预测模型中进行计算,输出各所述缺失词汇分别对应的预测词汇;
    将各所述预测词汇输入所述预设对应表中筛选得到对应的第一预测画像值;
    将各所述第一预测画像值分别替换所述第一用户画像中对应的所述第一缺失画像值。
  16. 根据权利要求15所述的计算机设备,所述将所述语料库输入基于word2vec构建的预测模型中进行计算,输出各所述缺失词汇分别对应的预测词汇的步骤,包括:
    将所述语料库输入预先基于word2vec构建的所述预测模型;
    利用所述预测模型,从所述语料库中按照所述预设排列顺序筛选各所述缺失词汇相邻出现的第二预设数量的所述第一已知词汇,并根据各所述已知词汇获得至少一个初始预测词汇以及各初始预测词汇分别对应的出现概率;
    分别比对各所述出现概率,选择所述出现概率最大的所述初始预测词汇作为所述预测词汇。
  17. 根据权利要求16所述的计算机设备,所述将所述语料库输入预先基于word2vec构建的预测模型中进行计算,输出各所述缺失词汇分别对应的预测词汇的步骤之前,包括:
    从原始画像表中筛选画像饱和度大于阈值的第三预设数量的第二用户画像,所述原始画像表由开发人员根据预先收集的多个原始用户画像构建,所述第二用户画像由所述第一预设数量的第二用户画像值按照所述预设排列顺序组成;
    将各所述第二用户画像值输入所述预设对应表中筛选得到对应的第二词汇;
    将各所述第二词汇按照预设规则构建训练样本,同时分别给予各所述第二词汇对应的初始向量;
    识别各所述初始向量,并使用霍夫曼树分类方法训练所述训练样本得到初始预测模型;
    判断所述初始预测模型当前的第一准确率是否小于预设准确率;
    若小于预设准确率,则扩大所述训练样本重新训练所述初始预测模型,得到二次训练模型;
    判断所述二次训练模型当前的第二准确率是否满足预设要求,所述预设要求为所述第二准确率等于所述预设准确率或所述第二准确率与所述第一准确率之间的差值是否小于预设差值;
    若满足预设要求,则将所述二次训练模型设定为所述预测模型。
  18. 一种非易失性计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现基于word2vec的用户缺失画像的补充方法,所述补充方法包括:
    调取预先录入的第一用户画像,所述第一用户画像由第一预设数量的第一用户画像值按照预设排列顺序组成,所述第一用户画像包括多个第一缺失画像值和多个第一已知画像值;
    将各所述第一用户画像值输入预设对应表中筛选得到对应的第一词汇,并将各所述第一词汇按照所述预设排列顺序构建语料库,所述语料库包括各所述第一缺失画像值对应的缺失词汇和各所述第一已知画像值对应的第一已知词汇,所述预设对应表由预先构建的多组用户画像值对应词汇组成;
    将所述语料库输入预先基于word2vec构建的预测模型中进行计算,输出各所述缺失词汇分别对应的预测词汇;
    将各所述预测词汇输入所述预设对应表中筛选得到对应的第一预测画像值;
    将各所述第一预测画像值分别替换所述第一用户画像中对应的所述第一缺失画像值。
  19. 根据权利要求18所述的非易失性计算机可读存储介质,所述处理器将所述语料库输入基于word2vec构建的预测模型中进行计算,输出各所述缺失词汇分别对应的预测词汇的步骤,包括:
    将所述语料库输入预先基于word2vec构建的所述预测模型;
    利用所述预测模型,从所述语料库中按照所述预设排列顺序筛选各所述缺失词汇相邻出现的第二预设数量的所述第一已知词汇,并根据各所述已知词汇获得至少一个初始预测词汇以及各初始预测词汇分别对应的出现概率;
    分别比对各所述出现概率,选择所述出现概率最大的所述初始预测词汇作为所述预测词汇。
  20. 根据权利要求18所述的非易失性计算机可读存储介质,所述处理器将所述语料库输入预先基于word2vec构建的预测模型中进行计算,输出各所述缺失词汇分别对应的预测词汇的步骤之前,包括:
    从原始画像表中筛选画像饱和度大于阈值的第三预设数量的第二用户画像,所述原始画像表由开发人员根据预先收集的多个原始用户画像构建,所述第二用户画像由所述第一预设数量的第二用户画像值按照所述预设排列顺序组成;
    将各所述第二用户画像值输入所述预设对应表中筛选得到对应的第二词汇;
    将各所述第二词汇按照预设规则构建训练样本,同时分别给予各所述第二词汇对应的初始向量;
    识别各所述初始向量,并使用霍夫曼树分类方法训练所述训练样本得到初始预测模型;
    判断所述初始预测模型当前的第一准确率是否小于预设准确率;
    若小于预设准确率,则扩大所述训练样本重新训练所述初始预测模型,得到二次训练模型;
    判断所述二次训练模型当前的第二准确率是否满足预设要求,所述预设要求为所述第二准确率等于所述预设准确率或所述第二准确率与所述第一准确率之间的差值是否小于预设差值;
    若满足预设要求,则将所述二次训练模型设定为所述预测模型。
PCT/CN2019/088849 2018-11-30 2019-05-28 基于 word2vec 的用户缺失画像的补充方法和相关设备 Ceased WO2020107836A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811453793.7A CN109710837B (zh) 2018-11-30 2018-11-30 用户缺失画像的补充方法和相关设备
CN201811453793.7 2018-11-30

Publications (1)

Publication Number Publication Date
WO2020107836A1 true WO2020107836A1 (zh) 2020-06-04

Family

ID=66255388

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/088849 Ceased WO2020107836A1 (zh) 2018-11-30 2019-05-28 基于 word2vec 的用户缺失画像的补充方法和相关设备

Country Status (2)

Country Link
CN (1) CN109710837B (zh)
WO (1) WO2020107836A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119295141A (zh) * 2024-12-10 2025-01-10 国网四川省电力公司成都供电公司 基于ai的用户用能画像分析方法及系统

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109710837B (zh) * 2018-11-30 2024-07-16 平安科技(深圳)有限公司 用户缺失画像的补充方法和相关设备
CN113378034B (zh) * 2020-03-09 2025-04-04 腾讯科技(北京)有限公司 一种兴趣画像的扩展方法、兴趣画像扩展装置及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6826312B1 (en) * 1998-07-23 2004-11-30 Fuji Photo Film Co., Ltd. Method, apparatus, and recording medium for image processing
CN105976336A (zh) * 2016-05-06 2016-09-28 安徽伟合电子科技有限公司 一种视频图像模糊修复方法
CN106023125A (zh) * 2016-05-06 2016-10-12 安徽伟合电子科技有限公司 一种基于图像覆盖和模糊重现的图像拼接方法
CN109710837A (zh) * 2018-11-30 2019-05-03 平安科技(深圳)有限公司 基于word2vec的用户缺失画像的补充方法和相关设备

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6192224B2 (ja) * 2013-12-26 2017-09-06 日本放送協会 注目キーワード情報抽出装置およびそのプログラム
US10248718B2 (en) * 2015-07-04 2019-04-02 Accenture Global Solutions Limited Generating a domain ontology using word embeddings
GB201511887D0 (en) * 2015-07-07 2015-08-19 Touchtype Ltd Improved artificial neural network for language modelling and prediction
CN107729937B (zh) * 2017-10-12 2020-11-03 北京京东尚科信息技术有限公司 用于确定用户兴趣标签的方法及装置
CN108363690A (zh) * 2018-02-08 2018-08-03 北京十三科技有限公司 基于神经网络的对话语义意图预测方法及学习训练方法
CN108268449A (zh) * 2018-02-10 2018-07-10 北京工业大学 一种基于词项聚类的文本语义标签抽取方法
CN108363695B (zh) * 2018-02-23 2020-04-24 西南交通大学 一种基于双向依赖语法树表征的用户评论属性抽取方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6826312B1 (en) * 1998-07-23 2004-11-30 Fuji Photo Film Co., Ltd. Method, apparatus, and recording medium for image processing
CN105976336A (zh) * 2016-05-06 2016-09-28 安徽伟合电子科技有限公司 一种视频图像模糊修复方法
CN106023125A (zh) * 2016-05-06 2016-10-12 安徽伟合电子科技有限公司 一种基于图像覆盖和模糊重现的图像拼接方法
CN109710837A (zh) * 2018-11-30 2019-05-03 平安科技(深圳)有限公司 基于word2vec的用户缺失画像的补充方法和相关设备

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119295141A (zh) * 2024-12-10 2025-01-10 国网四川省电力公司成都供电公司 基于ai的用户用能画像分析方法及系统
CN119295141B (zh) * 2024-12-10 2025-02-25 国网四川省电力公司成都供电公司 基于ai的用户用能画像分析方法及系统

Also Published As

Publication number Publication date
CN109710837B (zh) 2024-07-16
CN109710837A (zh) 2019-05-03

Similar Documents

Publication Publication Date Title
US12566739B2 (en) Automatic entity resolution with rules detection and generation system
CN111061856B (zh) 一种基于知识感知的新闻推荐方法
CN109165664B (zh) 一种基于生成对抗网络的属性缺失数据集补全与预测方法
CN108346436B (zh) 语音情感检测方法、装置、计算机设备及存储介质
CN113628059A (zh) 一种基于多层图注意力网络的关联用户识别方法及装置
CN110853654A (zh) 一种模型生成方法、声纹识别方法及对应装置
CN112579789A (zh) 一种设备故障诊断的方法和装置及设备
CN111985228A (zh) 文本关键词提取方法、装置、计算机设备和存储介质
CN114840642B (zh) 事件抽取方法、装置、设备及存储介质
CN112632248A (zh) 问答方法、装置、计算机设备和存储介质
CN112463964B (zh) 文本分类及模型训练方法、装置、设备及存储介质
CN112528022A (zh) 主题类别对应的特征词提取和文本主题类别识别方法
CN117290519A (zh) 基于知识图谱的妇产科数据分析方法
WO2020107836A1 (zh) 基于 word2vec 的用户缺失画像的补充方法和相关设备
CN112489689A (zh) 基于多尺度差异对抗的跨数据库语音情感识别方法及装置
CN114898164A (zh) 一种神经网络图像分类器置信度校准方法及系统
CN118093950A (zh) 故障诊断树生成方法、装置、设备及介质
CN119052109A (zh) 网络质差分析方法及装置、存储介质及电子设备
CN114429140A (zh) 一种基于相关图信息进行因果推断的案由认定方法及系统
CN114494809A (zh) 特征提取模型优化方法、装置及电子设备
CN114036267B (zh) 对话方法及系统
CN112307137B (zh) 数据处理方法、装置、存储介质及处理器
CN112860882A (zh) 一种基于神经网络的图书概念前后序关系抽取方法
CN117216250A (zh) 概念词筛选方法、装置、计算机设备和存储介质
CN112199285B (zh) 一种测试案例优选方法、装置及电子设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19890124

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19890124

Country of ref document: EP

Kind code of ref document: A1