WO2021208695A1 - 目标物推荐方法、装置、电子设备及计算机可读存储介质 - Google Patents
目标物推荐方法、装置、电子设备及计算机可读存储介质 Download PDFInfo
- Publication number
- WO2021208695A1 WO2021208695A1 PCT/CN2021/082891 CN2021082891W WO2021208695A1 WO 2021208695 A1 WO2021208695 A1 WO 2021208695A1 CN 2021082891 W CN2021082891 W CN 2021082891W WO 2021208695 A1 WO2021208695 A1 WO 2021208695A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- user
- data
- matrix
- target
- matrix set
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 30
- 239000011159 matrix material Substances 0.000 claims abstract description 481
- 238000004458 analytical method Methods 0.000 claims abstract description 32
- 238000004422 calculation algorithm Methods 0.000 claims description 38
- 238000004590 computer program Methods 0.000 claims description 13
- 238000012545 processing Methods 0.000 claims description 10
- 230000011218 segmentation Effects 0.000 claims description 10
- 238000010276 construction Methods 0.000 claims description 6
- 238000006243 chemical reaction Methods 0.000 claims description 5
- 238000005516 engineering process Methods 0.000 abstract description 4
- 238000007405 data analysis Methods 0.000 abstract description 2
- 238000004364 calculation method Methods 0.000 description 14
- 230000006870 function Effects 0.000 description 11
- 230000009286 beneficial effect Effects 0.000 description 6
- 230000005540 biological transmission Effects 0.000 description 5
- 238000010586 diagram Methods 0.000 description 5
- 238000004891 communication Methods 0.000 description 4
- 238000013481 data capture Methods 0.000 description 4
- 238000007726 management method Methods 0.000 description 4
- 238000011156 evaluation Methods 0.000 description 3
- 238000001914 filtration Methods 0.000 description 2
- 239000004973 liquid crystal related substance Substances 0.000 description 2
- 239000000463 material Substances 0.000 description 2
- 238000013500 data storage Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/953—Querying, e.g. by the use of web search engines
- G06F16/9535—Search customisation based on user profiles and personalisation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/602—Providing cryptographic facilities or services
Definitions
- This application relates to the field of data analysis technology, and in particular to a target recommendation method, device, electronic equipment, and computer-readable storage medium.
- the mainstream product push method in the market is to use collaborative filtering networks to predict users’ preferences for products to make target recommendations. For example, when users evaluate similar products, use collaborative filtering networks to predict users’ preferences for similar products based on the evaluations. Preferences to make target recommendations.
- the inventor realizes that in order to improve the prediction accuracy of the method, the network needs to use a large amount of user evaluation data for calculation, which results in low target recommendation efficiency; and directly using user evaluation data as network calculation data may cause user privacy leakage. Therefore, how to improve the efficiency of target recommendation for users while ensuring user privacy has become an urgent problem to be solved.
- a target recommendation method provided by this application includes:
- Obtain the target object set to be recommended use the updated score matrix set to generate the score value of each target object to be recommended in the target object set to be recommended, and select one or more target objects to be recommended from the target object set to be recommended according to the score value. Recommend the target, and recommend the selected target to be recommended to the user.
- the present application also provides a target recommendation device, the device includes:
- the data acquisition module is used to acquire user data, user rating data of the target object, and target object data;
- a matrix construction module for constructing a user matrix set using the user data, constructing a scoring matrix set using the scoring data, and constructing a target object matrix set using the target object data;
- a matrix division module configured to divide the user matrix set into a plurality of user matrix subsets, and select a preset number of user matrix subsets and collect them as a target user matrix set;
- a gradient analysis module configured to perform gradient analysis on the target user matrix set and the target object matrix set to obtain an updated gradient
- a parameter generation module configured to encrypt and transmit the update gradient to the server and obtain the update parameters generated by the server according to the update gradient;
- the update module is configured to update each scoring matrix in the scoring matrix set by using the update parameter to obtain an updated scoring matrix set
- the recommendation module is used to obtain the target object set to be recommended, use the updated score matrix set to generate the score value of each target object to be recommended in the target object set to be recommended, and select from the target object set to be recommended according to the score value One or more targets to be recommended, and recommend the selected targets to be recommended to the user.
- This application also provides an electronic device, which includes:
- Memory storing at least one computer program
- the processor executes the computer program stored in the memory to implement the following steps:
- Obtain the target object set to be recommended use the updated score matrix set to generate the score value of each target object to be recommended in the target object set to be recommended, and select one or more target objects to be recommended from the target object set to be recommended according to the score value. Recommend the target, and recommend the selected target to be recommended to the user.
- the present application also provides a computer-readable storage medium, including a storage data area and a storage program area, the storage data area stores created data, and the storage program area stores a computer program; wherein the computer program is executed by the processor as follows step:
- Obtain the target object set to be recommended use the updated score matrix set to generate the score value of each target object to be recommended in the target object set to be recommended, and select one or more target objects to be recommended from the target object set to be recommended according to the score value. Recommend the target, and recommend the selected target to be recommended to the user.
- FIG. 1 is a schematic flowchart of a target recommendation method provided by an embodiment of this application
- FIG. 2 is a schematic diagram of modules of a target recommendation device provided by an embodiment of the application.
- FIG. 3 is a schematic diagram of the internal structure of an electronic device for implementing a target recommendation method provided by an embodiment of the application;
- the execution subject of the target recommendation method provided in the embodiment of the present application is at least one of the electronic devices that can be configured to execute the method provided in the embodiment of the present application, such as a client.
- the target recommendation method may be executed by software or hardware installed on a terminal device or a server device, and the software may be a blockchain platform.
- This application provides a target recommendation method.
- FIG. 1 it is a schematic flowchart of a target recommendation method provided by an embodiment of this application.
- the method can be executed by a device, and the device can be implemented by software and/or hardware.
- the target recommendation method includes:
- a python sentence with a data capture function can be used to capture user data, user score data on the target object, and data from a database used to store user data, user score data on the target object, and target object data.
- Target data can be used to capture user data, user score data on the target object, and data from a database used to store user data, user score data on the target object, and target object data.
- the user data is the user's own data, such as user name, user age, and user gender.
- the target data includes product names, product descriptions, and product prices of multiple products.
- the score data of the object includes the user's score for each target object. For example, the user's score for target A is 30, and the user's score for target B is 70.
- the constructing a user matrix set by using the user data includes:
- the numerical value corresponding to the user data is filled into the null value matrix to obtain a user matrix set.
- the numerical processing of the user data is performed to obtain the numerical value corresponding to the user data, that is, the data in the user data that is originally in text form is numerically converted into numerical data.
- the gender of the user is male.
- gender female the user’s gender is converted to “1” for gender male
- the user’s gender is converted to “2” for gender female.
- null value matrix as described below:
- x indicates that the value at the position of x in the null value matrix is a null value.
- the user data of any user after digitization is filled into a null value matrix in the order from left to right and top to bottom, and then the user matrix of the user can be obtained, wherein the null value matrix is not filled in The numbers in the full position are all filled with 0; when the user data of all users in the user data is filled into the null value matrix, the user matrix set can be obtained.
- the steps of constructing a scoring matrix set using the scoring data and constructing a target matrix set using the target object data are the same as the above-mentioned steps of constructing a user matrix set using the user data, and will not be repeated.
- the embodiment of the application uses user data, scoring data, and target object data to construct a user matrix set, a scoring matrix set, and a target object matrix set, thereby realizing the matrix digitization of user data and scoring data set target data, which can avoid direct Analyzing the data generated by the user improves the security of the data generated by the user, which is beneficial to the protection of user privacy.
- the dividing the user matrix set into multiple user matrix subsets includes:
- a target user matrix is selected from the user matrix set according to the model length, and the selected target user matrix and the cluster center matrix are collected to obtain a plurality of user matrix subsets.
- the target user matrix c is randomly selected from the user matrix set. If the target user matrix c and the cluster center matrix a The distance is closer than the distance between the target user matrix c and the cluster center matrix b, then the target user matrix c and the cluster center matrix a are collected, and then the target user matrix d is randomly selected from the user matrix set. If the target user matrix d and the target cluster The distance of the center matrix a is closer than the distance between the target user matrix d and the cluster center matrix b, so the target user matrix d and the cluster center matrix a are collected.
- the target user matrix e is combined with the cluster center matrix b. If the distance between the target user matrix e and the cluster center matrix b is closer than the distance between the target user matrix e and the cluster center matrix a, then the target user matrix e and the cluster The core matrix b is collected, and then the target user matrix f is randomly selected from the user matrix set. If the distance between the target user matrix f and the cluster core matrix b is closer than the distance between the target user matrix f and the cluster core matrix a, then the target user matrix f is combined with the cluster center matrix b.
- the separately calculating the distance vector between each user matrix in the user matrix set and the cluster center matrix includes:
- the following distance vector algorithm is used to calculate the distance vector d(A, B) 2 between each user matrix in the user matrix set and the cluster center matrix:
- A is any user matrix in the user matrix set subset
- B is any cluster center matrix
- a preset number of user matrix subsets are selected from a plurality of user matrix subsets and collected as a target user matrix set.
- the preset number can be calculated by a selection algorithm.
- the selection algorithm is as follows :
- S is the number of user matrices to be selected
- I is the number of user matrices in the user matrix set
- P is the number of user matrices in the user matrix subset.
- the target user matrix set and the target object matrix set are input to a preset gradient descent algorithm to implement gradient analysis and obtain an updated gradient.
- the gradient descent algorithm includes, but is not limited to, batch gradient descent algorithm, stochastic gradient descent algorithm, mini-batch gradient descent algorithm, and the like.
- the gradient descent algorithm is:
- F i is the update gradient
- m is the number of target user matrices in the target user matrix set
- v j is the jth target user matrix in the target user matrix set
- u i is the first target user matrix in the target user matrix set.
- i target matrix ⁇ is the preset gradient coefficient.
- the update gradient is encrypted and transmitted to the server, and the update parameter generated by the server according to the update gradient is obtained.
- the step of encrypting the updated gradient and inputting it to the server includes:
- Data segmentation is performed on the update gradient to obtain segmentation data
- the encrypted data is transmitted to the server.
- the updated gradient data can be divided into equal intervals, that is, the updated gradient data is divided according to a preset fixed length to obtain the divided data. For example, if the updated gradient is "abcdef", the updated gradient will be updated. The data is divided into 2 at equal intervals to obtain the data to be encrypted: “ab”, “cd” and "ef".
- the IO (Input/Output, input/output) data stream is a commonly used data form for communication between computers.
- an IO converter can be used to convert the segmented data into an IO data stream to obtain encrypted data.
- the IO converter is a tool that can convert data from a non-IO data stream into an IO data stream.
- the IO converter includes a java character converter, a python character converter, and the like.
- said using an encryption algorithm to encrypt the data to be encrypted to obtain encrypted data includes:
- the embodiment of the application transmits the encrypted data to the server, and accepts the relationship parameter generated by the server according to the update gradient.
- the embodiment of the present application encrypts the updated gradient obtained by calculation and uploads it to the server, which ensures the security in the data transmission process and is beneficial to the protection of user privacy.
- using the update parameter to update each user matrix in the user matrix set of the client to obtain an updated user matrix set includes:
- the update value is used to assign a value to the element to be updated to obtain an update user matrix set.
- the embodiment of the present application may use a python sentence with a data capture function to extract the to-be-updated elements of each user matrix from the user matrix set.
- the calculation of the update value corresponding to the to-be-updated element of each user matrix separately according to the update parameter includes:
- the update value is calculated using the following update algorithm:
- V t + 1 is updated to be the i-th element value i corresponding to the updated h
- C is the updated parameter
- ⁇ is the gradient update
- h i is the i th element to be updated
- S t is the The t-th user matrix in the user matrix set.
- V t + 1 is used to indicate to the user the matrix S t i th element of h i to be updated is updated, t is expressed as the updated state, t + 1 denotes the state after updating, when the user all the matrix S t After completing the above update operation of the elements to be updated, the updated user matrix is obtained.
- the updated value obtained by calculation is used to assign values to the elements to be updated to obtain the updated user matrix set.
- the target to be recommended includes a plurality of targets to be recommended (for example, multiple products, resources, etc.).
- the block chain node that recommends the target object obtains the target set to be recommended, and the throughput of the block chain node for data can be used to improve the efficiency of obtaining the target set to be recommended.
- each target object to be recommended in the target object set to be recommended is input into the updated scoring matrix set to generate the score value of the target object to be recommended.
- This application selects one or more target objects to be recommended whose score value is greater than a preset score threshold from the set of target objects to be recommended as the recommended target, and pushes the selected recommended target to the user.
- the embodiment of the application constructs a user matrix set, a scoring matrix set, and a target object matrix set by obtaining user data, user rating data on a target object, and target object data, and performs matrix digitization on the user data and the target object data of the scoring data set, It can avoid directly analyzing the data generated by the user, improve the security of the data generated by the user, and is beneficial to the protection of user privacy; divide the user matrix set into multiple user matrix subsets and select a preset number from them Target user matrix set, gradient analysis is performed on the target user matrix set and the target object matrix set to obtain the updated gradient, the updated gradient is encrypted and transmitted to the server to obtain the generated update parameters, and the scoring matrix set is updated by using the update parameters to get the update
- the scoring matrix set divides the user matrix and selects a preset number of matrices for analysis, which reduces the number of matrices for analysis and calculation, which is conducive to improving the efficiency of analysis and calculation.
- the calculated update gradient is encrypted and uploaded to the server to ensure The security in the data transmission process is conducive to the protection of user privacy; obtain the target object set to be recommended, use the updated score matrix set to generate the score value of each target object to be recommended in the target object set to be recommended, and select the target to be recommended according to the score value.
- Push to the user generate the score value of each target object to be recommended in the target set to be recommended, select the target to be recommended according to the score value to recommend to the user, avoid additional analysis of the target set to be recommended, and help improve the target of the user The recommended efficiency of the material. Therefore, the target recommendation method proposed in this application can improve the security of user privacy and improve the efficiency of target recommendation for users.
- FIG. 2 it is a schematic diagram of the modules of the target recommendation device of the present application.
- the target recommendation apparatus 100 described in this application may be installed in an electronic device.
- the target recommendation device may include a data acquisition module 101, a matrix construction module 102, a matrix division module 103, a gradient analysis module 104, a parameter generation module 105, an update module 106, and a recommendation module 107.
- the module described in this application can also be referred to as a unit, which refers to a series of computer program segments that can be executed by the processor of an electronic device and can complete fixed functions, and are stored in the memory of the electronic device.
- each module/unit is as follows:
- the data acquisition module 101 is used to acquire user data, user rating data on a target object, and target object data;
- the matrix construction module 102 is configured to use the user data to construct a user matrix set, use the scoring data to construct a scoring matrix set, and use the target object data to construct a target object matrix set;
- the matrix dividing module 103 is configured to divide the user matrix set into a plurality of user matrix subsets, and select a preset number of user matrix subsets and collect them as a target user matrix set;
- the gradient analysis module 104 is configured to perform gradient analysis on the target user matrix set and the target object matrix set to obtain an updated gradient
- the parameter generation module 105 is configured to encrypt the update gradient and transmit it to the server, and obtain the update parameter generated by the server according to the update gradient;
- the update module 106 is configured to update each scoring matrix in the scoring matrix set by using the update parameter to obtain an updated scoring matrix set;
- the recommendation module 107 is configured to obtain a set of targets to be recommended, use the updated scoring matrix set to generate a score value for each target to be recommended in the set of targets to be recommended, and obtain the score value from the target to be recommended
- One or more to-be-recommended targets are selected in the object set, and the selected target-to-be-recommended targets are recommended to the user.
- each module of the target recommendation device is as follows:
- the data acquisition module 101 is used to acquire user data, user score data on a target object, and target object data.
- a python sentence with a data capture function can be used to capture user data, user score data on the target object, and data from a database used to store user data, user score data on the target object, and target object data.
- Target data can be used to capture user data, user score data on the target object, and data from a database used to store user data, user score data on the target object, and target object data.
- the user data is the user's own data, such as user name, user age, and user gender.
- the target data includes product names, product descriptions, and product prices of multiple products.
- the score data of the object includes the user's score for each target object. For example, the user's score for target A is 30, and the user's score for target B is 70.
- the matrix construction module 102 is configured to use the user data to construct a user matrix set, use the scoring data to construct a scoring matrix set, and use the target object data to construct a target object matrix set.
- the matrix construction module 102 is specifically configured to:
- the numerical value corresponding to the user data is filled into the null value matrix to obtain a user matrix set.
- the numerical processing of the user data is performed to obtain the numerical value corresponding to the user data, that is, the data in the user data that is originally in text form is numerically converted into numerical data.
- the gender of the user is male.
- gender female the user’s gender is converted to “1” for gender male
- the user’s gender is converted to “2” for gender female.
- null value matrix as described below:
- x indicates that the value at the position of x in the null value matrix is a null value.
- the user data of any user after digitization is filled into a null value matrix in the order from left to right and top to bottom, and then the user matrix of the user can be obtained, wherein the null value matrix is not filled in The numbers in the full position are all filled with 0; when the user data of all users in the user data is filled into the null value matrix, the user matrix set can be obtained.
- the steps of constructing a scoring matrix set using the scoring data and constructing a target matrix set using the target object data are the same as the above-mentioned steps of constructing a user matrix set using the user data, and will not be repeated.
- the embodiment of the application uses user data, scoring data, and target object data to construct a user matrix set, a scoring matrix set, and a target object matrix set, thereby realizing the matrix digitization of user data and scoring data set target data, which can avoid direct Analyzing the data generated by the user improves the security of the data generated by the user, which is beneficial to the protection of user privacy.
- the matrix dividing module 103 is configured to divide the user matrix set into a plurality of user matrix subsets, and select a preset number of user matrix subsets and collect them as a target user matrix set.
- the matrix division module 103 is specifically configured to:
- a target user matrix is selected from the user matrix set according to the model length, and the selected target user matrix and the cluster center matrix are collected to obtain a plurality of user matrix subsets.
- the target user matrix c is randomly selected from the user matrix set. If the target user matrix c and the cluster center matrix a The distance is closer than the distance between the target user matrix c and the cluster center matrix b, then the target user matrix c and the cluster center matrix a are collected, and then the target user matrix d is randomly selected from the user matrix set. If the target user matrix d and the target cluster The distance of the center matrix a is closer than the distance between the target user matrix d and the cluster center matrix b, so the target user matrix d and the cluster center matrix a are collected.
- the target user matrix e is combined with the cluster center matrix b. If the distance between the target user matrix e and the cluster center matrix b is closer than the distance between the target user matrix e and the cluster center matrix a, then the target user matrix e and the cluster The core matrix b is collected, and then the target user matrix f is randomly selected from the user matrix set. If the distance between the target user matrix f and the cluster core matrix b is closer than the distance between the target user matrix f and the cluster core matrix a, then the target user matrix f is combined with the cluster center matrix b.
- the separately calculating the distance vector between each user matrix in the user matrix set and the cluster center matrix includes:
- the following distance vector algorithm is used to calculate the distance vector d(A, B) 2 between each user matrix in the user matrix set and the cluster center matrix:
- A is any user matrix in the user matrix set subset
- B is any cluster center matrix
- a preset number of user matrix subsets are selected from a plurality of user matrix subsets and collected as a target user matrix set.
- the preset number can be calculated by a selection algorithm.
- the selection algorithm is as follows :
- S is the number of user matrices to be selected
- I is the number of user matrices in the user matrix set
- P is the number of user matrices in the user matrix subset.
- the gradient analysis module 104 is configured to perform gradient analysis on the target user matrix set and the target object matrix set to obtain updated gradients.
- the gradient analysis module 104 inputs the target user matrix set and the target object matrix set into a preset gradient descent algorithm to implement gradient analysis and obtain an updated gradient.
- the gradient descent algorithm includes, but is not limited to, batch gradient descent algorithm, stochastic gradient descent algorithm, mini-batch gradient descent algorithm, and the like.
- the gradient descent algorithm is:
- F i is the update gradient
- m is the number of target user matrices in the target user matrix set
- v j is the jth target user matrix in the target user matrix set
- u i is the first target user matrix in the target user matrix set.
- i target matrix ⁇ is the preset gradient coefficient.
- the parameter generation module 105 is configured to encrypt the update gradient and transmit it to the server, and obtain the update parameter generated by the server according to the update gradient.
- the parameter generation module 105 is specifically configured to:
- Data segmentation is performed on the update gradient to obtain segmentation data
- the updated gradient data can be divided into equal intervals, that is, the updated gradient data is divided according to a preset fixed length to obtain the divided data. For example, if the updated gradient is "abcdef", the updated gradient will be updated. The data is divided into 2 at equal intervals to obtain the data to be encrypted: “ab”, “cd” and "ef".
- the IO (Input/Output, input/output) data stream is a commonly used data form for communication between computers.
- an IO converter can be used to convert the segmented data into an IO data stream to obtain encrypted data.
- the IO converter is a tool that can convert data from a non-IO data stream into an IO data stream.
- the IO converter includes a java character converter, a python character converter, and the like.
- said using an encryption algorithm to encrypt the data to be encrypted to obtain encrypted data includes:
- the embodiment of the application transmits the encrypted data to the server, and accepts the relationship parameter generated by the server according to the update gradient.
- the embodiment of the present application encrypts the updated gradient obtained by calculation and uploads it to the server, which ensures the security in the data transmission process and is beneficial to the protection of user privacy.
- the update module 106 is configured to update each scoring matrix in the scoring matrix set by using the update parameter to obtain an updated scoring matrix set.
- the update module 106 is specifically configured to:
- the update value is used to assign a value to the element to be updated to obtain an update user matrix set.
- the embodiment of the present application may use a python sentence with a data capture function to extract the to-be-updated elements of each user matrix from the user matrix set.
- the calculation of the update value corresponding to the to-be-updated element of each user matrix separately according to the update parameter includes:
- the update value is calculated using the following update algorithm:
- V t + 1 is updated to be the i-th element value i corresponding to the updated h
- C is the updated parameter
- ⁇ is the gradient update
- h i is the i th element to be updated
- S t is the The t-th user matrix in the user matrix set.
- V t + 1 is used to indicate to the user the matrix S t i th element of h i to be updated is updated, t is expressed as the updated state, t + 1 denotes the state after updating, when the user all the matrix S t After completing the above update operation of the elements to be updated, the updated user matrix is obtained.
- the updated value obtained by calculation is used to assign values to the elements to be updated to obtain the updated user matrix set.
- the recommendation module 107 is configured to obtain a set of targets to be recommended, use the updated scoring matrix set to generate a score value for each target to be recommended in the set of targets to be recommended, and obtain the score value from the target to be recommended
- One or more to-be-recommended targets are selected in the object set, and the selected target-to-be-recommended targets are recommended to the user.
- the target to be recommended includes a plurality of targets to be recommended (for example, multiple products, resources, etc.).
- the block chain node that recommends the target object obtains the target set to be recommended, and the throughput of the block chain node for data can be used to improve the efficiency of obtaining the target set to be recommended.
- each target object to be recommended in the target object set to be recommended is input into the updated scoring matrix set to generate the score value of the target object to be recommended.
- This application selects one or more target objects to be recommended whose score value is greater than a preset score threshold from the set of target objects to be recommended as the recommended target, and pushes the selected recommended target to the user.
- the embodiment of the application constructs a user matrix set, a scoring matrix set, and a target object matrix set by obtaining user data, user rating data on a target object, and target object data, and performs matrix digitization on the user data and the target object data of the scoring data set, It can avoid directly analyzing the data generated by the user, improve the security of the data generated by the user, and is beneficial to the protection of user privacy; divide the user matrix set into multiple user matrix subsets and select a preset number from them Target user matrix set, gradient analysis is performed on the target user matrix set and the target object matrix set to obtain the updated gradient, the updated gradient is encrypted and transmitted to the server to obtain the generated update parameters, and the scoring matrix set is updated by using the update parameters to get the update
- the scoring matrix set divides the user matrix and selects a preset number of matrices for analysis, which reduces the number of matrices for analysis and calculation, which is conducive to improving the efficiency of analysis and calculation.
- the calculated update gradient is encrypted and uploaded to the server to ensure The security in the data transmission process is conducive to the protection of user privacy; obtain the target object set to be recommended, use the updated score matrix set to generate the score value of each target object to be recommended in the target object set to be recommended, and select the target to be recommended according to the score value.
- Push to the user generate the score value of each target object to be recommended in the target set to be recommended, select the target to be recommended according to the score value to recommend to the user, avoid additional analysis of the target set to be recommended, and help improve the target of the user The recommended efficiency of the material. Therefore, the target recommendation device proposed in this application can improve the security of user privacy and improve the efficiency of target recommendation for users.
- FIG. 3 it is a schematic structural diagram of an electronic device for implementing a target recommendation method provided by an embodiment of the present application.
- the electronic device 1 may include a processor 10, a memory 11, and a bus, and may also include a computer program stored in the memory 11 and running on the processor 10, such as a target recommendation program 12.
- the memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (for example: SD or DX memory, etc.), magnetic memory, magnetic disk, CD etc.
- the memory 11 may be an internal storage unit of the electronic device 1 in some embodiments, for example, a mobile hard disk of the electronic device 1.
- the memory 11 may also be an external storage device of the electronic device 1, such as a plug-in mobile hard disk, a smart media card (SMC), and a secure digital (Secure Digital) equipped on the electronic device 1. , SD) card, flash card (Flash Card), etc.
- the memory 11 may also include both an internal storage unit of the electronic device 1 and an external storage device.
- the memory 11 can be used not only to store application software and various data installed in the electronic device 1, such as the code of the target recommendation program 12, etc., but also to temporarily store data that has been output or will be output.
- the processor 10 may be composed of integrated circuits in some embodiments, for example, may be composed of a single packaged integrated circuit, or may be composed of multiple integrated circuits with the same function or different functions, including one or more Combinations of central processing unit (CPU), microprocessor, digital processing chip, graphics processor, and various control chips, etc.
- the processor 10 is the control unit of the electronic device, which uses various interfaces and lines to connect the various components of the entire electronic device, and runs or executes programs or modules (such as target modules) stored in the memory 11 Object recommendation program, etc.), and call the data stored in the memory 11 to execute various functions of the electronic device 1 and process data.
- the bus may be a peripheral component interconnect standard (PCI) bus or an extended industry standard architecture (EISA) bus, etc.
- PCI peripheral component interconnect standard
- EISA extended industry standard architecture
- the bus can be divided into address bus, data bus, control bus and so on.
- the bus is configured to implement connection and communication between the memory 11 and at least one processor 10 and the like.
- FIG. 3 only shows an electronic device with components. Those skilled in the art can understand that the structure shown in FIG. 3 does not constitute a limitation on the electronic device 1, and may include fewer or more components than shown in the figure. Components, or a combination of certain components, or different component arrangements.
- the electronic device 1 may also include a power source (such as a battery) for supplying power to various components.
- the power source may be logically connected to the at least one processor 10 through a power management device, thereby controlling power
- the device implements functions such as charge management, discharge management, and power consumption management.
- the power supply may also include any components such as one or more DC or AC power supplies, recharging devices, power failure detection circuits, power converters or inverters, and power status indicators.
- the electronic device 1 may also include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.
- the electronic device 1 may also include a network interface.
- the network interface may include a wired interface and/or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is usually used in the electronic device 1 Establish a communication connection with other electronic devices.
- the electronic device 1 may also include a user interface.
- the user interface may be a display (Display) and an input unit (such as a keyboard (Keyboard)).
- the user interface may also be a standard wired interface or a wireless interface.
- the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode, organic light-emitting diode) touch device, etc.
- the display can also be appropriately called a display screen or a display unit, which is used to display the information processed in the electronic device 1 and to display a visualized user interface.
- the target recommendation program 12 stored in the memory 11 in the electronic device 1 is a combination of multiple instructions. When running in the processor 10, it can realize:
- Obtain the target object set to be recommended use the updated score matrix set to generate the score value of each target object to be recommended in the target object set to be recommended, and select one or more target objects to be recommended from the target object set to be recommended according to the score value. Recommend the target, and recommend the selected target to be recommended to the user.
- the integrated module/unit of the electronic device 1 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.
- the computer-readable storage medium may be volatile or non-volatile.
- the computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory).
- the present application also provides a computer-readable storage medium that stores a computer program, and when the computer program is executed by a processor of an electronic device, it can realize:
- Obtain the target object set to be recommended use the updated score matrix set to generate the score value of each target object to be recommended in the target object set to be recommended, and select one or more target objects to be recommended from the target object set to be recommended according to the score value. Recommend the target, and recommend the selected target to be recommended to the user.
- modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
- the functional modules in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
- the above-mentioned integrated unit may be implemented in the form of hardware, or may be implemented in the form of hardware plus software functional modules.
- the blockchain referred to in this application is a new application mode of computer technology such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm.
- Blockchain essentially a decentralized database, is a series of data blocks associated with cryptographic methods. Each data block contains a batch of network transaction information for verification. The validity of the information (anti-counterfeiting) and the generation of the next block.
- the blockchain can include the underlying platform of the blockchain, the platform product service layer, and the application service layer.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- General Physics & Mathematics (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Computer Hardware Design (AREA)
- Computer Security & Cryptography (AREA)
- Software Systems (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Bioethics (AREA)
- Data Mining & Analysis (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
涉及数据分析技术,揭露了一种目标物推荐方法,包括:构建用户矩阵集、评分矩阵集和目标物矩阵集;将用户矩阵集划分为多个用户矩阵子集并从中选取目标用户矩阵集;对目标用户矩阵集和目标物矩阵集进行梯度分析得到更新梯度;将更新梯度传输至服务端并获取生成的更新参数;利用更新参数对评分矩阵集进行更新,得到更新评分矩阵集;获取待推荐目标物集,利用更新评分矩阵集生成待推荐目标物集的评分值,根据评分值选择待推荐目标并推送给用户。还提出了目标物推荐装置、设备及计算机可读存储介质。此外,还涉及区块链技术,待推荐目标物集可存储于区块链节点中。可以提高户隐私的安全性,提高对用户进行目标物推荐的效率。
Description
本申请要求于2020年11月19日提交中国专利局、申请号为CN202011298325.4、名称为“目标物推荐方法、装置、电子设备及计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及数据分析技术领域,尤其涉及一种目标物推荐方法、装置、电子设备及计算机可读存储介质。
用户对产品需求的个性化差异越来越大。在向用户进行目标物推荐时,若将海量的产品都集中推送至用户,将消耗较大的网络带宽,占用较大的存储资源,却不能满足用户的个性化需求。如何筛选出符合用户需求的产品并推送给用户,成为了越来越重要的需求。
目前市场上主流的产品推送方法是利用协同过滤网络预测用户对产品的偏好以进行目标物推荐,例如,当用户对相似产品做出评价后,基于评价利用协同过滤网络预测出用户对类似产品的偏好,从而进行目标物推荐。发明人意识到该方法为了提高预测精度,网络需要利用大量用户评价数据进行计算,从而导致目标物推荐效率不高;且直接利用用户的评价数据作为网络的计算数据,可能会造成用户隐私泄露。因此,如何保证用户隐私的同时提高对用户进行目标物推荐的效率,成为了亟待解决的问题。
发明内容
本申请提供的一种目标物推荐方法,包括:
获取用户数据、用户对目标物的评分数据和目标物数据;
利用所述用户数据构建用户矩阵集,利用所述评分数据构建评分矩阵集,利用目标物数据构建目标物矩阵集;
将所述用户矩阵集划分为多个用户矩阵子集,并选取预设数量的用户矩阵子集汇集为目标用户矩阵集;
对所述目标用户矩阵集和所述目标物矩阵集进行梯度分析,得到更新梯度;
将所述更新梯度加密后传输至服务端并获取所述服务端根据所述更新梯度生成的更新参数;
利用所述更新参数对所述评分矩阵集中各评分矩阵进行更新,得到更新评分矩阵集;
获取待推荐目标物集,利用所述更新评分矩阵集生成所述待推荐目标物集中各待推荐目标物的评分值,根据所述评分值从所述待推荐目标物集中选择一个或者多个待推荐目标,并向用户推荐选择的所述待推荐目标。
本申请还提供一种目标物推荐装置,所述装置包括:
数据获取模块,用于获取用户数据、用户对目标物的评分数据和目标物数据;
矩阵构建模块,用于利用所述用户数据构建用户矩阵集,利用所述评分数据构建评分矩阵集,利用目标物数据构建目标物矩阵集;
矩阵划分模块,用于将所述用户矩阵集划分为多个用户矩阵子集,并选取预设数量的用户矩阵子集汇集为目标用户矩阵集;
梯度分析模块,用于对所述目标用户矩阵集和所述目标物矩阵集进行梯度分析,得到更新梯度;
参数生成模块,用于将所述更新梯度加密后传输至服务端并获取所述服务端根据所述更新梯度生成的更新参数;
更新模块,用于利用所述更新参数对所述评分矩阵集中各评分矩阵进行更新,得到更 新评分矩阵集;
推荐模块,用于获取待推荐目标物集,利用所述更新评分矩阵集生成所述待推荐目标物集中各待推荐目标物的评分值,根据所述评分值从所述待推荐目标物集中选择一个或者多个待推荐目标,并向用户推荐选择的所述待推荐目标。
本申请还提供一种电子设备,所述电子设备包括:
存储器,存储至少一个计算机程序;及
处理器,执行所述存储器中存储的计算机程序以实现如下步骤:
获取用户数据、用户对目标物的评分数据和目标物数据;
利用所述用户数据构建用户矩阵集,利用所述评分数据构建评分矩阵集,利用目标物数据构建目标物矩阵集;
将所述用户矩阵集划分为多个用户矩阵子集,并选取预设数量的用户矩阵子集汇集为目标用户矩阵集;
对所述目标用户矩阵集和所述目标物矩阵集进行梯度分析,得到更新梯度;
将所述更新梯度加密后传输至服务端并获取所述服务端根据所述更新梯度生成的更新参数;
利用所述更新参数对所述评分矩阵集中各评分矩阵进行更新,得到更新评分矩阵集;
获取待推荐目标物集,利用所述更新评分矩阵集生成所述待推荐目标物集中各待推荐目标物的评分值,根据所述评分值从所述待推荐目标物集中选择一个或者多个待推荐目标,并向用户推荐选择的所述待推荐目标。
本申请还提供一种计算机可读存储介质,包括存储数据区和存储程序区,存储数据区存储创建的数据,存储程序区存储有计算机程序;其中,所述计算机程序被处理器执行时实现如下步骤:
获取用户数据、用户对目标物的评分数据和目标物数据;
利用所述用户数据构建用户矩阵集,利用所述评分数据构建评分矩阵集,利用目标物数据构建目标物矩阵集;
将所述用户矩阵集划分为多个用户矩阵子集,并选取预设数量的用户矩阵子集汇集为目标用户矩阵集;
对所述目标用户矩阵集和所述目标物矩阵集进行梯度分析,得到更新梯度;
将所述更新梯度加密后传输至服务端并获取所述服务端根据所述更新梯度生成的更新参数;
利用所述更新参数对所述评分矩阵集中各评分矩阵进行更新,得到更新评分矩阵集;
获取待推荐目标物集,利用所述更新评分矩阵集生成所述待推荐目标物集中各待推荐目标物的评分值,根据所述评分值从所述待推荐目标物集中选择一个或者多个待推荐目标,并向用户推荐选择的所述待推荐目标。
图1为本申请一实施例提供的目标物推荐方法的流程示意图;
图2为本申请一实施例提供的目标物推荐装置的模块示意图;
图3为本申请一实施例提供的实现目标物推荐方法的电子设备的内部结构示意图;
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
本申请实施例提供的目标物推荐方法的执行主体为客户端等能够被配置为执行本申请实施例提供的该方法的电子设备中的至少一种。换言之,所述目标物推荐方法可以由安装在终端设备或服务端设备的软件或硬件来执行,所述软件可以是区块链平台。
本申请提供一种目标物推荐方法。参照图1所示,为本申请一实施例提供的目标物推荐方法的流程示意图。该方法可以由一个装置执行,该装置可以由软件和/或硬件实现。
在本实施例中,目标物推荐方法包括:
S1、获取用户数据、用户对目标物的评分数据和目标物数据。
本申请实施例中,可利用具有数据抓取功能的python语句从用于存储用户数据、用户对目标物的评分数据和目标物数据的数据库中抓取用户数据、用户对目标物的评分数据和目标物数据。
详细地,所述用户数据为用户自身的数据,例如,用户名、用户年龄和用户性别等,所述目标物数据包括多个产品的产品名称、产品描述和产品价格等,所述用户对目标物的评分数据包括用户对各目标物的评分,例如,用户对目标物A的评分为30,用户对目标物B的评分为70。
S2、利用所述用户数据构建用户矩阵集,利用所述评分数据构建评分矩阵集,利用目标物数据构建目标物矩阵集。
本申请实施例中,所述利用所述用户数据构建用户矩阵集,包括:
将所述用户数据进行数值化处理,得到用户数据对应的数值;
构建多个空值矩阵,其中,所述空值矩阵的数量与用户的数量一致;
将所述用户数据对应的数值填充至所述空值矩阵中,得到用户矩阵集。
详细地,所述将所述用户数据进行数值化处理,得到用户数据对应的数值,即将用户数据中原本是文字形式的数据数值化为数值形式的数据,例如,用户数据中用户性别存在性别男和性别女,将用户性别为性别男数值化为“1”,将用户性别为性别女数值化为“2”。
进一步地,构建如下所述的空值矩阵:
其中,x表示所述空值矩阵中x所在的位置上的数值为空值。
本申请实施例将数值化后的任一用户的用户数据按照从左到右从上到下的顺序填充至空值矩阵中,即可得到该用户的用户矩阵,其中,空值矩阵中未填满的位置上的数字均用0进行填充;当将用户数据中所有用户的用户数据填充至空值矩阵后,即可得到所述用户矩阵集。
本申请实施例中,利用所述评分数据构建评分矩阵集,利用目标物数据构建目标物矩阵集的步骤均与上述利用所述用户数据构建用户矩阵集的一致,不再赘述。
本申请实施例通过利用用户数据、评分数据和目标物数据来构建用户矩阵集、评分矩阵集和目标物矩阵集,实现了将用户数据、评分数据集目标物数据进行矩阵数值化,可避免直接对用户所产生的的数据进行分析,提高了用户所产生的数据的安全性,有利于用户隐私的保护。
S3、将所述用户矩阵集划分为多个用户矩阵子集,并选取预设数量的用户矩阵子集汇集为目标用户矩阵集。
本申请实施例中,所述将所述用户矩阵集划分为多个用户矩阵子集,包括:
随机从所述用户矩阵集中选取预设数量的用户矩阵做为簇心矩阵;
分别计算所述用户矩阵集中每个用户矩阵与所述簇心矩阵的距离向量;
计算所述距离向量的模长;
根据所述模长从所述用户矩阵集中选取目标用户矩阵,并将选取的所述目标用户矩阵与簇心矩阵进行汇集,得到多个用户矩阵子集。
例如,当所述用户矩阵集中包含a,b,c,d,e,f六个用户矩阵,随机选择a和b作为两个簇心矩阵,分别计算未被选取的用户矩阵集中c,d,e,f与a和b的距离向量,并计算所述距离向量的模长,当模长计算完成后,随机从用户矩阵集中选取目标用户矩阵c, 若目标用户矩阵c与簇心矩阵a的距离比目标用户矩阵c与簇心矩阵b的距离更近,则将目标用户矩阵c与簇心矩阵a进行汇集,再随机从用户矩阵集中选取目标用户矩阵d,若目标用户矩阵d与目标簇心矩阵a的距离比目标用户矩阵d与簇心矩阵b的距离更近,则将目标用户矩阵d与簇心矩阵a进行汇集。
同时,继续随机地从用户矩阵集选取目标用户矩阵e,若目标用户矩阵e与簇心矩阵b的距离比目标用户矩阵e与簇心矩阵a的距离更近,则将目标用户矩阵e与簇心矩阵b进行汇集,再随机从用户矩阵集中选取目标用户矩阵f,若目标用户矩阵f与簇心矩阵b的距离比目标用户矩阵f与簇心矩阵a的距离更近,则将目标用户矩阵f与簇心矩阵b进行汇集。
详细地,所述分别计算所述用户矩阵集中每个用户矩阵与所述簇心矩阵的距离向量,包括:
利用如下距离向量算法分别计算所述用户矩阵集中每个用户矩阵与所述簇心矩阵的距离向量d(A,B)
2:
d(A,B)
2=‖A-B‖
2
其中,A为用户矩阵集子集中任一用户矩阵,B为任一簇心矩阵。
进一步地,本申请实施例从多个用户矩阵子集中选取预设数量的用户矩阵子集汇集为目标用户矩阵集,所述预设数量可通过选取算法计算获得,详细地,所述选取算法如下:
S=I/P
其中,S为需要选取的用户矩阵的数量,I为所述用户矩阵集中用户矩阵的数量,P为所述用户矩阵子集中用户矩阵的数量。
S4、对所述目标用户矩阵集和所述目标物矩阵集进行梯度分析,得到更新梯度。
本申请实施例中,将所述目标用户矩阵集和所述目标物矩阵集输入至预设的梯度下降算法,以实现梯度分析,得到更新梯度。
详细地,所述梯度下降算法包括但不限于批量梯度下降算法、随机梯度下降算法和小批量梯度下降算法等。
本申请实施例中,所述梯度下降算法为:
其中,F
i为所述更新梯度,m为所述目标用户矩阵集中目标用户矩阵的数量,v
j为所述目标用户矩阵集中第j个目标用户矩阵,u
i为所述目标物矩阵集中第i个目标物矩阵,μ为预设梯度系数。
S5、将所述更新梯度加密后传输至服务端并获取所述服务端根据所述更新梯度生成的更新参数。
本申请实施例中,所述将所述更新梯度加密后输入至服务端,包括:
将所述更新梯度进行数据分割,得到分割数据;
对所述分割数据进行IO数据流转化,得到待加密数据;
利用加密算法对所述待加密数据进行加密,得到加密数据;
将所述加密数据传输至服务端。
具体地,本可将所述更新梯度数据按照等间距进行数据分割,即按照预设的固定长度将所述更新梯度数据进行分割得到分割数据,例如,存在更新梯度为“abcdef”,将更新梯度按照等间距为2进行数据分割,得到待加密数据:“ab”、“cd”和“ef”。
详细地,所述IO(Input/Output,输入/输出)数据流是计算机之间进行通信常用的数据形式,本申请实施例可利用IO转化器将分割数据进行IO数据流转化,得到加密数据,所述IO转化器是可以将非IO数据流的数据转化为IO数据流的工具,所述IO转化器包括java字符转化器、python字符转化器等。
进一步地,所述利用加密算法对所述待加密数据进行加密,得到加密数据,包括:
对所述待加密数据进行等间距离散化处理,得到离散数据;
利用加密算法生成多个占位数据;
将所述多个占位数据插入所述离散数据中,得到加密数据。
本申请实施例将所述加密数据传输至服务端,并接受服务端根据所述更新梯度生成的关系参数。
本申请实施例将计算得到的更新梯度加密后上传至服务端,保证了数据传输过程中的安全性,有利于用户隐私的保护。
S6、利用所述更新参数对所述评分矩阵集中各评分矩阵进行更新,得到更新评分矩阵集。
本申请实施例中,所述利用所述更新参数对客户端的用户矩阵集中各用户矩阵进行更新,得到更新用户矩阵集,包括:
提取所述用户矩阵集中各用户矩阵的待更新元素;
根据所述更新参数分别计算各用户矩阵的待更新元素对应的更新数值;
利用所述更新数值对所述待更新元素进行赋值,得到更新用户矩阵集。
详细地,本申请实施例可利用具有数据抓取功能的python语句从所述用户矩阵集中提取各用户矩阵的待更新元素。
进一步地,所述根据所述更新参数分别计算各用户矩阵的待更新元素对应的更新数值,包括:
利用如下更新算法计算所述更新数值:
其中,V
t+1为与第i个待更新元素h
i对应的更新数值,C为所述更新参数,Δ为所述更新梯度,h
i为第i个待更新元素,S
t为所述用户矩阵集中第t个用户矩阵。
详细地,V
t+1用于表示对用户矩阵S
t中第i个待更新元素h
i的更新,t表示为更新的状态,t+1表示更新后的状态,当用户矩阵S
t中所有的待更新元素完成上述更新操作后,得到更新用户矩阵。
本申请实施例中,利用计算获得的更新数值对待更新元素进行赋值,得到更新用户矩阵集。
S7、获取待推荐目标物集,利用所述更新评分矩阵集生成所述待推荐目标物集中各待推荐目标物的评分值,根据所述评分值从所述待推荐目标物集中选择一个或者多个待推荐目标,并向用户推荐选择的所述待推荐目标。
本申请实施例中,所述待推荐目标物集中包括多个待推荐目标物(例如,多个产品,资源等),本申请实施例可利用具有数据抓取功能的python语句从用于存储待推荐目标物的区块链节点中获取待推荐目标物集,利用区块链节点对数据的该吞吐性,可提高获取待推荐目标物集的效率。
本申请实施例中,获取待推荐目标物集后,将所述待推荐目标物集中的各待推荐目标物输入至所述更新评分矩阵集,即可生成待推荐目标物的评分值,本申请实施例从所述待推荐目标物集中选取所述评分值大于预设评分阈值的一个或者多个待推荐目标物为推荐目标,并向用户推送选择的推荐目标。
本申请实施例通过获取用户数据、用户对目标物的评分数据和目标物数据来构建用户矩阵集、评分矩阵集和目标物矩阵集,将用户数据、评分数据集目标物数据进行矩阵数值化,可避免直接对用户所产生的的数据进行分析,提高了用户所产生的数据的安全性,有利于用户隐私的保护;将用户矩阵集划分为多个用户矩阵子集并从中选取预设数量的目标用户矩阵集,对目标用户矩阵集和目标物矩阵集进行梯度分析得到更新梯度,将更新梯度 加密后传输至服务端并获取生成的更新参数,利用更新参数对评分矩阵集进行更新,得到更新评分矩阵集,将用户矩阵进行划分并选取预设数量的矩阵进行分析,减少了分析计算的矩阵数量,有利于提高分析计算的效率,将计算得到的更新梯度加密后上传至服务端,保证了数据传输过程中的安全性,有利于用户隐私的保护;获取待推荐目标物集,利用更新评分矩阵集生成待推荐目标物集中各待推荐目标物的评分值,根据评分值选择待推荐目标并推送给用户,生成待推荐目标物集中各待推荐目标物的评分值,根据评分值选取待推荐目标对用户进行推荐,避免了对待推荐目标物集进行额外的分析,有利于提高对用户进行目标物推荐的效率。因此本申请提出的目标物推荐方法,可以提高户隐私的安全性,提高对用户进行目标物推荐的效率。
如图2所示,是本申请目标物推荐装置的模块示意图。
本申请所述目标物推荐装置100可以安装于电子设备中。根据实现的功能,所述目标物推荐装置可以包括数据获取模块101、矩阵构建模块102、矩阵划分模块103、梯度分析模块104、参数生成模块105、更新模块106和推荐模块107。本申请所述模块也可以称之为单元,是指一种能够被电子设备处理器所执行,并且能够完成固定功能的一系列计算机程序段,其存储在电子设备的存储器中。
在本实施例中,关于各模块/单元的功能如下:
所述数据获取模块101,用于获取用户数据、用户对目标物的评分数据和目标物数据;
所述矩阵构建模块102,用于利用所述用户数据构建用户矩阵集,利用所述评分数据构建评分矩阵集,利用目标物数据构建目标物矩阵集;
所述矩阵划分模块103,用于将所述用户矩阵集划分为多个用户矩阵子集,并选取预设数量的用户矩阵子集汇集为目标用户矩阵集;
所述梯度分析模块104,用于对所述目标用户矩阵集和所述目标物矩阵集进行梯度分析,得到更新梯度;
所述参数生成模块105,用于将所述更新梯度加密后传输至服务端并获取所述服务端根据所述更新梯度生成的更新参数;
所述更新模块106,用于利用所述更新参数对所述评分矩阵集中各评分矩阵进行更新,得到更新评分矩阵集;
所述推荐模块107,用于获取待推荐目标物集,利用所述更新评分矩阵集生成所述待推荐目标物集中各待推荐目标物的评分值,根据所述评分值从所述待推荐目标物集中选择一个或者多个待推荐目标,并向用户推荐选择的所述待推荐目标。
详细地,所述目标物推荐装置各模块的具体实施方式如下:
所述数据获取模块101,用于获取用户数据、用户对目标物的评分数据和目标物数据。
本申请实施例中,可利用具有数据抓取功能的python语句从用于存储用户数据、用户对目标物的评分数据和目标物数据的数据库中抓取用户数据、用户对目标物的评分数据和目标物数据。
详细地,所述用户数据为用户自身的数据,例如,用户名、用户年龄和用户性别等,所述目标物数据包括多个产品的产品名称、产品描述和产品价格等,所述用户对目标物的评分数据包括用户对各目标物的评分,例如,用户对目标物A的评分为30,用户对目标物B的评分为70。
所述矩阵构建模块102,用于利用所述用户数据构建用户矩阵集,利用所述评分数据构建评分矩阵集,利用目标物数据构建目标物矩阵集。
本申请实施例中,所述矩阵构建模块102具体用于:
将所述用户数据进行数值化处理,得到用户数据对应的数值;
构建多个空值矩阵,其中,所述空值矩阵的数量与用户的数量一致;
将所述用户数据对应的数值填充至所述空值矩阵中,得到用户矩阵集。
详细地,所述将所述用户数据进行数值化处理,得到用户数据对应的数值,即将用户数据中原本是文字形式的数据数值化为数值形式的数据,例如,用户数据中用户性别存在性别男和性别女,将用户性别为性别男数值化为“1”,将用户性别为性别女数值化为“2”。
进一步地,构建如下所述的空值矩阵:
其中,x表示所述空值矩阵中x所在的位置上的数值为空值。
本申请实施例将数值化后的任一用户的用户数据按照从左到右从上到下的顺序填充至空值矩阵中,即可得到该用户的用户矩阵,其中,空值矩阵中未填满的位置上的数字均用0进行填充;当将用户数据中所有用户的用户数据填充至空值矩阵后,即可得到所述用户矩阵集。
本申请实施例中,利用所述评分数据构建评分矩阵集,利用目标物数据构建目标物矩阵集的步骤均与上述利用所述用户数据构建用户矩阵集的一致,不再赘述。
本申请实施例通过利用用户数据、评分数据和目标物数据来构建用户矩阵集、评分矩阵集和目标物矩阵集,实现了将用户数据、评分数据集目标物数据进行矩阵数值化,可避免直接对用户所产生的的数据进行分析,提高了用户所产生的数据的安全性,有利于用户隐私的保护。
所述矩阵划分模块103,用于将所述用户矩阵集划分为多个用户矩阵子集,并选取预设数量的用户矩阵子集汇集为目标用户矩阵集。
本申请实施例中,所述矩阵划分模块103具体用于:
随机从所述用户矩阵集中选取预设数量的用户矩阵做为簇心矩阵;
分别计算所述用户矩阵集中每个用户矩阵与所述簇心矩阵的距离向量;
计算所述距离向量的模长;
根据所述模长从所述用户矩阵集中选取目标用户矩阵,并将选取的所述目标用户矩阵与簇心矩阵进行汇集,得到多个用户矩阵子集。
例如,当所述用户矩阵集中包含a,b,c,d,e,f六个用户矩阵,随机选择a和b作为两个簇心矩阵,分别计算未被选取的用户矩阵集中c,d,e,f与a和b的距离向量,并计算所述距离向量的模长,当模长计算完成后,随机从用户矩阵集中选取目标用户矩阵c,若目标用户矩阵c与簇心矩阵a的距离比目标用户矩阵c与簇心矩阵b的距离更近,则将目标用户矩阵c与簇心矩阵a进行汇集,再随机从用户矩阵集中选取目标用户矩阵d,若目标用户矩阵d与目标簇心矩阵a的距离比目标用户矩阵d与簇心矩阵b的距离更近,则将目标用户矩阵d与簇心矩阵a进行汇集。
同时,继续随机地从用户矩阵集选取目标用户矩阵e,若目标用户矩阵e与簇心矩阵b的距离比目标用户矩阵e与簇心矩阵a的距离更近,则将目标用户矩阵e与簇心矩阵b进行汇集,再随机从用户矩阵集中选取目标用户矩阵f,若目标用户矩阵f与簇心矩阵b的距离比目标用户矩阵f与簇心矩阵a的距离更近,则将目标用户矩阵f与簇心矩阵b进行汇集。
详细地,所述分别计算所述用户矩阵集中每个用户矩阵与所述簇心矩阵的距离向量,包括:
利用如下距离向量算法分别计算所述用户矩阵集中每个用户矩阵与所述簇心矩阵的距离向量d(A,B)
2:
d(A,B)
2=‖A-B‖
2
其中,A为用户矩阵集子集中任一用户矩阵,B为任一簇心矩阵。
进一步地,本申请实施例从多个用户矩阵子集中选取预设数量的用户矩阵子集汇集为目标用户矩阵集,所述预设数量可通过选取算法计算获得,详细地,所述选取算法如下:
S=I/P
其中,S为需要选取的用户矩阵的数量,I为所述用户矩阵集中用户矩阵的数量,P为所述用户矩阵子集中用户矩阵的数量。
所述梯度分析模块104,用于对所述目标用户矩阵集和所述目标物矩阵集进行梯度分析,得到更新梯度。
本申请实施例中,所述梯度分析模块104将所述目标用户矩阵集和所述目标物矩阵集输入至预设的梯度下降算法,以实现梯度分析,得到更新梯度。
详细地,所述梯度下降算法包括但不限于批量梯度下降算法、随机梯度下降算法和小批量梯度下降算法等。
本申请实施例中,所述梯度下降算法为:
其中,F
i为所述更新梯度,m为所述目标用户矩阵集中目标用户矩阵的数量,v
j为所述目标用户矩阵集中第j个目标用户矩阵,u
i为所述目标物矩阵集中第i个目标物矩阵,μ为预设梯度系数。
所述参数生成模块105,用于将所述更新梯度加密后传输至服务端并获取所述服务端根据所述更新梯度生成的更新参数。
本申请实施例中,所述参数生成模块105具体用于:
将所述更新梯度进行数据分割,得到分割数据;
对所述分割数据进行IO数据流转化,得到待加密数据;
利用加密算法对所述待加密数据进行加密,得到加密数据;
将所述加密数据传输至服务端;
获取所述服务端根据所述更新梯度生成的更新参数。
具体地,本可将所述更新梯度数据按照等间距进行数据分割,即按照预设的固定长度将所述更新梯度数据进行分割得到分割数据,例如,存在更新梯度为“abcdef”,将更新梯度按照等间距为2进行数据分割,得到待加密数据:“ab”、“cd”和“ef”。
详细地,所述IO(Input/Output,输入/输出)数据流是计算机之间进行通信常用的数据形式,本申请实施例可利用IO转化器将分割数据进行IO数据流转化,得到加密数据,所述IO转化器是可以将非IO数据流的数据转化为IO数据流的工具,所述IO转化器包括java字符转化器、python字符转化器等。
进一步地,所述利用加密算法对所述待加密数据进行加密,得到加密数据,包括:
对所述待加密数据进行等间距离散化处理,得到离散数据;
利用加密算法生成多个占位数据;
将所述多个占位数据插入所述离散数据中,得到加密数据。
本申请实施例将所述加密数据传输至服务端,并接受服务端根据所述更新梯度生成的关系参数。
本申请实施例将计算得到的更新梯度加密后上传至服务端,保证了数据传输过程中的安全性,有利于用户隐私的保护。
所述更新模块106,用于利用所述更新参数对所述评分矩阵集中各评分矩阵进行更新,得到更新评分矩阵集。
本申请实施例中,所述更新模块106具体用于:
提取所述用户矩阵集中各用户矩阵的待更新元素;
根据所述更新参数分别计算各用户矩阵的待更新元素对应的更新数值;
利用所述更新数值对所述待更新元素进行赋值,得到更新用户矩阵集。
详细地,本申请实施例可利用具有数据抓取功能的python语句从所述用户矩阵集中提取各用户矩阵的待更新元素。
进一步地,所述根据所述更新参数分别计算各用户矩阵的待更新元素对应的更新数值,包括:
利用如下更新算法计算所述更新数值:
其中,V
t+1为与第i个待更新元素h
i对应的更新数值,C为所述更新参数,Δ为所述更新梯度,h
i为第i个待更新元素,S
t为所述用户矩阵集中第t个用户矩阵。
详细地,V
t+1用于表示对用户矩阵S
t中第i个待更新元素h
i的更新,t表示为更新的状态,t+1表示更新后的状态,当用户矩阵S
t中所有的待更新元素完成上述更新操作后,得到更新用户矩阵。
本申请实施例中,利用计算获得的更新数值对待更新元素进行赋值,得到更新用户矩阵集。
所述推荐模块107,用于获取待推荐目标物集,利用所述更新评分矩阵集生成所述待推荐目标物集中各待推荐目标物的评分值,根据所述评分值从所述待推荐目标物集中选择一个或者多个待推荐目标,并向用户推荐选择的所述待推荐目标。
本申请实施例中,所述待推荐目标物集中包括多个待推荐目标物(例如,多个产品,资源等),本申请实施例可利用具有数据抓取功能的python语句从用于存储待推荐目标物的区块链节点中获取待推荐目标物集,利用区块链节点对数据的该吞吐性,可提高获取待推荐目标物集的效率。
本申请实施例中,获取待推荐目标物集后,将所述待推荐目标物集中的各待推荐目标物输入至所述更新评分矩阵集,即可生成待推荐目标物的评分值,本申请实施例从所述待推荐目标物集中选取所述评分值大于预设评分阈值的一个或者多个待推荐目标物为推荐目标,并向用户推送选择的推荐目标。
本申请实施例通过获取用户数据、用户对目标物的评分数据和目标物数据来构建用户矩阵集、评分矩阵集和目标物矩阵集,将用户数据、评分数据集目标物数据进行矩阵数值化,可避免直接对用户所产生的的数据进行分析,提高了用户所产生的数据的安全性,有利于用户隐私的保护;将用户矩阵集划分为多个用户矩阵子集并从中选取预设数量的目标用户矩阵集,对目标用户矩阵集和目标物矩阵集进行梯度分析得到更新梯度,将更新梯度加密后传输至服务端并获取生成的更新参数,利用更新参数对评分矩阵集进行更新,得到更新评分矩阵集,将用户矩阵进行划分并选取预设数量的矩阵进行分析,减少了分析计算的矩阵数量,有利于提高分析计算的效率,将计算得到的更新梯度加密后上传至服务端,保证了数据传输过程中的安全性,有利于用户隐私的保护;获取待推荐目标物集,利用更新评分矩阵集生成待推荐目标物集中各待推荐目标物的评分值,根据评分值选择待推荐目标并推送给用户,生成待推荐目标物集中各待推荐目标物的评分值,根据评分值选取待推荐目标对用户进行推荐,避免了对待推荐目标物集进行额外的分析,有利于提高对用户进行目标物推荐的效率。因此本申请提出的目标物推荐装置,可以提高户隐私的安全性,提高对用户进行目标物推荐的效率。
如图3所示,是本申请一实施例提供的实现目标物推荐方法的电子设备的结构示意图。
所述电子设备1可以包括处理器10、存储器11和总线,还可以包括存储在所述存储器11中并可在所述处理器10上运行的计算机程序,如目标物推荐程序12。
其中,所述存储器11至少包括一种类型的可读存储介质,所述可读存储介质包括闪存、移动硬盘、多媒体卡、卡型存储器(例如:SD或DX存储器等)、磁性存储器、磁盘、光盘等。所述存储器11在一些实施例中可以是电子设备1的内部存储单元,例如该电子设备 1的移动硬盘。所述存储器11在另一些实施例中也可以是电子设备1的外部存储设备,例如电子设备1上配备的插接式移动硬盘、智能存储卡(Smart Media Card,SMC)、安全数字(Secure Digital,SD)卡、闪存卡(Flash Card)等。进一步地,所述存储器11还可以既包括电子设备1的内部存储单元也包括外部存储设备。所述存储器11不仅可以用于存储安装于电子设备1的应用软件及各类数据,例如目标物推荐程序12的代码等,还可以用于暂时地存储已经输出或者将要输出的数据。
所述处理器10在一些实施例中可以由集成电路组成,例如可以由单个封装的集成电路所组成,也可以是由多个相同功能或不同功能封装的集成电路所组成,包括一个或者多个中央处理器(Central Processing unit,CPU)、微处理器、数字处理芯片、图形处理器及各种控制芯片的组合等。所述处理器10是所述电子设备的控制核心(Control Unit),利用各种接口和线路连接整个电子设备的各个部件,通过运行或执行存储在所述存储器11内的程序或者模块(例如目标物推荐程序等),以及调用存储在所述存储器11内的数据,以执行电子设备1的各种功能和处理数据。
所述总线可以是外设部件互连标准(peripheral component interconnect,简称PCI)总线或扩展工业标准结构(extended industry standard architecture,简称EISA)总线等。该总线可以分为地址总线、数据总线、控制总线等。所述总线被设置为实现所述存储器11以及至少一个处理器10等之间的连接通信。
图3仅示出了具有部件的电子设备,本领域技术人员可以理解的是,图3示出的结构并不构成对所述电子设备1的限定,可以包括比图示更少或者更多的部件,或者组合某些部件,或者不同的部件布置。
例如,尽管未示出,所述电子设备1还可以包括给各个部件供电的电源(比如电池),优选地,电源可以通过电源管理装置与所述至少一个处理器10逻辑相连,从而通过电源管理装置实现充电管理、放电管理、以及功耗管理等功能。电源还可以包括一个或一个以上的直流或交流电源、再充电装置、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。所述电子设备1还可以包括多种传感器、蓝牙模块、Wi-Fi模块等,在此不再赘述。
进一步地,所述电子设备1还可以包括网络接口,可选地,所述网络接口可以包括有线接口和/或无线接口(如WI-FI接口、蓝牙接口等),通常用于在该电子设备1与其他电子设备之间建立通信连接。
可选地,该电子设备1还可以包括用户接口,用户接口可以是显示器(Display)、输入单元(比如键盘(Keyboard)),可选地,用户接口还可以是标准的有线接口、无线接口。可选地,在一些实施例中,显示器可以是LED显示器、液晶显示器、触控式液晶显示器以及OLED(Organic Light-Emitting Diode,有机发光二极管)触摸器等。其中,显示器也可以适当的称为显示屏或显示单元,用于显示在电子设备1中处理的信息以及用于显示可视化的用户界面。
应该了解,所述实施例仅为说明之用,在专利申请范围上并不受此结构的限制。
所述电子设备1中的所述存储器11存储的目标物推荐程序12是多个指令的组合,在所述处理器10中运行时,可以实现:
获取用户数据、用户对目标物的评分数据和目标物数据;
利用所述用户数据构建用户矩阵集,利用所述评分数据构建评分矩阵集,利用目标物数据构建目标物矩阵集;
将所述用户矩阵集划分为多个用户矩阵子集,并选取预设数量的用户矩阵子集汇集为目标用户矩阵集;
对所述目标用户矩阵集和所述目标物矩阵集进行梯度分析,得到更新梯度;
将所述更新梯度加密后传输至服务端并获取所述服务端根据所述更新梯度生成的更 新参数;
利用所述更新参数对所述评分矩阵集中各评分矩阵进行更新,得到更新评分矩阵集;
获取待推荐目标物集,利用所述更新评分矩阵集生成所述待推荐目标物集中各待推荐目标物的评分值,根据所述评分值从所述待推荐目标物集中选择一个或者多个待推荐目标,并向用户推荐选择的所述待推荐目标。
具体地,所述处理器10对上述指令的具体实现方法可参考图1至图3对应实施例中相关步骤的描述,在此不赘述。
进一步地,所述电子设备1集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读存储介质中。所述计算机可读存储介质可以是易失性的,也可以是非易失性的。例如,所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)。
本申请还提供一种计算机可读存储介质,所述可读存储介质存储有计算机程序,所述计算机程序在被电子设备的处理器所执行时,可以实现:
获取用户数据、用户对目标物的评分数据和目标物数据;
利用所述用户数据构建用户矩阵集,利用所述评分数据构建评分矩阵集,利用目标物数据构建目标物矩阵集;
将所述用户矩阵集划分为多个用户矩阵子集,并选取预设数量的用户矩阵子集汇集为目标用户矩阵集;
对所述目标用户矩阵集和所述目标物矩阵集进行梯度分析,得到更新梯度;
将所述更新梯度加密后传输至服务端并获取所述服务端根据所述更新梯度生成的更新参数;
利用所述更新参数对所述评分矩阵集中各评分矩阵进行更新,得到更新评分矩阵集;
获取待推荐目标物集,利用所述更新评分矩阵集生成所述待推荐目标物集中各待推荐目标物的评分值,根据所述评分值从所述待推荐目标物集中选择一个或者多个待推荐目标,并向用户推荐选择的所述待推荐目标。
所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能模块的形式实现。
对于本领域技术人员而言,显然本申请不限于上述示范性实施例的细节,而且在不背离本申请的精神或基本特征的情况下,能够以其他的具体形式实现本申请。
因此,无论从哪一点来看,均应将实施例看作是示范性的,而且是非限制性的,本申请的范围由所附权利要求而不是上述说明限定,因此旨在将落在权利要求的等同要件的含义和范围内的所有变化涵括在本申请内。不应将权利要求中的任何附关联图标记视为限制所涉及的权利要求。
本申请所指区块链是分布式数据存储、点对点传输、共识机制、加密算法等计算机技术的新型应用模式。区块链(Blockchain),本质上是一个去中心化的数据库,是一串使用密码学方法相关联产生的数据块,每一个数据块中包含了一批次网络交易的信息,用于验证其信息的有效性(防伪)和生成下一个区块。区块链可以包括区块链底层平台、平台产品服务层以及应用服务层等。
此外,显然“包括”一词不排除其他单元或步骤,单数不排除复数。系统权利要求中陈述的多个单元或装置也可以由一个单元或装置通过软件或者硬件来实现。第二等词语用来 表示名称,而并不表示任何特定的顺序。
最后应说明的是,以上实施例仅用以说明本申请的技术方案而非限制,尽管参照较佳实施例对本申请进行了详细说明,本领域的普通技术人员应当理解,可以对本申请的技术方案进行修改或等同替换,而不脱离本申请技术方案的精神和范围。
Claims (20)
- 一种目标物推荐方法,其中,所述方法包括:获取用户数据、用户对目标物的评分数据和目标物数据;利用所述用户数据构建用户矩阵集,利用所述评分数据构建评分矩阵集,利用目标物数据构建目标物矩阵集;将所述用户矩阵集划分为多个用户矩阵子集,并选取预设数量的用户矩阵子集汇集为目标用户矩阵集;对所述目标用户矩阵集和所述目标物矩阵集进行梯度分析,得到更新梯度;将所述更新梯度加密后传输至服务端并获取所述服务端根据所述更新梯度生成的更新参数;利用所述更新参数对所述评分矩阵集中各评分矩阵进行更新,得到更新评分矩阵集;获取待推荐目标物集,利用所述更新评分矩阵集生成所述待推荐目标物集中各待推荐目标物的评分值,根据所述评分值从所述待推荐目标物集中选择一个或者多个待推荐目标,并向用户推荐选择的所述待推荐目标。
- 如权利要求1所述的目标物推荐方法,其中,所述利用所述用户数据构建用户矩阵集,包括:将所述用户数据进行数值化处理,得到用户数据对应的数值;构建多个空值矩阵,其中,所述空值矩阵的数量与用户的数量一致;将所述用户数据对应的数值填充至所述空值矩阵中,得到用户矩阵集。
- 如权利要求1所述的目标物推荐方法,其中,所述将所述用户矩阵集划分为多个用户矩阵子集,包括:随机从所述用户矩阵集中选取预设数量的用户矩阵做为簇心矩阵;分别计算所述用户矩阵集中每个用户矩阵与所述簇心矩阵的距离向量;计算所述距离向量的模长;根据所述模长从所述用户矩阵集中选取目标用户矩阵,并将选取的所述目标用户矩阵与簇心矩阵进行汇集,得到多个用户矩阵子集。
- 如权利要求1所述的目标物推荐方法,其中,所述将所述更新梯度加密后输入至服务端,包括:将所述更新梯度进行数据分割,得到分割数据;对所述分割数据进行IO数据流转化,得到待加密数据;利用加密算法对所述待加密数据进行加密,得到加密数据;将所述加密数据传输至服务端。
- 如权利要求4所述的目标物推荐方法,其中,所述利用加密算法对所述待加密数据进行加密,得到加密数据,包括:对所述待加密数据进行等间距离散化处理,得到离散数据;利用加密算法生成多个占位数据;将所述多个占位数据插入所述离散数据中,得到加密数据。
- 如权利要求1至5中任一项所述的目标物推荐方法,其中,所述利用所述更新参数对客户端的用户矩阵集中各用户矩阵进行更新,得到更新用户矩阵集,包括:提取所述用户矩阵集中各用户矩阵的待更新元素;根据所述更新参数分别计算各用户矩阵的待更新元素对应的更新数值;利用所述更新数值对所述待更新元素进行赋值,得到更新用户矩阵集。
- 一种目标物推荐装置,其中,所述装置包括:数据获取模块,用于获取用户数据、用户对目标物的评分数据和目标物数据;矩阵构建模块,用于利用所述用户数据构建用户矩阵集,利用所述评分数据构建评分矩阵集,利用目标物数据构建目标物矩阵集;矩阵划分模块,用于将所述用户矩阵集划分为多个用户矩阵子集,并选取预设数量的用户矩阵子集汇集为目标用户矩阵集;梯度分析模块,用于对所述目标用户矩阵集和所述目标物矩阵集进行梯度分析,得到更新梯度;参数生成模块,用于将所述更新梯度加密后传输至服务端并获取所述服务端根据所述更新梯度生成的更新参数;更新模块,用于利用所述更新参数对所述评分矩阵集中各评分矩阵进行更新,得到更新评分矩阵集;推荐模块,用于获取待推荐目标物集,利用所述更新评分矩阵集生成所述待推荐目标物集中各待推荐目标物的评分值,根据所述评分值从所述待推荐目标物集中选择一个或者多个待推荐目标,并向用户推荐选择的所述待推荐目标。
- 一种电子设备,其中,所述电子设备包括:至少一个处理器;以及,与所述至少一个处理器通信连接的存储器;其中,所述存储器存储有可被所述至少一个处理器执行的计算机程序,所述计算机程序被所述至少一个处理器执行,以使所述至少一个处理器能够执行如下步骤:获取用户数据、用户对目标物的评分数据和目标物数据;利用所述用户数据构建用户矩阵集,利用所述评分数据构建评分矩阵集,利用目标物数据构建目标物矩阵集;将所述用户矩阵集划分为多个用户矩阵子集,并选取预设数量的用户矩阵子集汇集为目标用户矩阵集;对所述目标用户矩阵集和所述目标物矩阵集进行梯度分析,得到更新梯度;将所述更新梯度加密后传输至服务端并获取所述服务端根据所述更新梯度生成的更新参数;利用所述更新参数对所述评分矩阵集中各评分矩阵进行更新,得到更新评分矩阵集;获取待推荐目标物集,利用所述更新评分矩阵集生成所述待推荐目标物集中各待推荐目标物的评分值,根据所述评分值从所述待推荐目标物集中选择一个或者多个待推荐目标,并向用户推荐选择的所述待推荐目标。
- 如权利要求9所述的电子设备,其中,所述利用所述用户数据构建用户矩阵集,包括:将所述用户数据进行数值化处理,得到用户数据对应的数值;构建多个空值矩阵,其中,所述空值矩阵的数量与用户的数量一致;将所述用户数据对应的数值填充至所述空值矩阵中,得到用户矩阵集。
- 如权利要求9所述的电子设备,其中,所述将所述用户矩阵集划分为多个用户矩阵子集,包括:随机从所述用户矩阵集中选取预设数量的用户矩阵做为簇心矩阵;分别计算所述用户矩阵集中每个用户矩阵与所述簇心矩阵的距离向量;计算所述距离向量的模长;根据所述模长从所述用户矩阵集中选取目标用户矩阵,并将选取的所述目标用户矩阵与簇心矩阵进行汇集,得到多个用户矩阵子集。
- 如权利要求9所述的电子设备,其中,所述将所述更新梯度加密后输入至服务端,包括:将所述更新梯度进行数据分割,得到分割数据;对所述分割数据进行IO数据流转化,得到待加密数据;利用加密算法对所述待加密数据进行加密,得到加密数据;将所述加密数据传输至服务端。
- 如权利要求12所述的电子设备,其中,所述利用加密算法对所述待加密数据进行加密,得到加密数据,包括:对所述待加密数据进行等间距离散化处理,得到离散数据;利用加密算法生成多个占位数据;将所述多个占位数据插入所述离散数据中,得到加密数据。
- 如权利要求9至13中任一项所述的电子设备,其中,所述利用所述更新参数对客户端的用户矩阵集中各用户矩阵进行更新,得到更新用户矩阵集,包括:提取所述用户矩阵集中各用户矩阵的待更新元素;根据所述更新参数分别计算各用户矩阵的待更新元素对应的更新数值;利用所述更新数值对所述待更新元素进行赋值,得到更新用户矩阵集。
- 一种计算机可读存储介质,包括存储数据区和存储程序区,存储数据区存储创建的数据,存储程序区存储有计算机程序;其中,所述计算机程序被处理器执行时实现如下步骤:获取用户数据、用户对目标物的评分数据和目标物数据;利用所述用户数据构建用户矩阵集,利用所述评分数据构建评分矩阵集,利用目标物数据构建目标物矩阵集;将所述用户矩阵集划分为多个用户矩阵子集,并选取预设数量的用户矩阵子集汇集为目标用户矩阵集;对所述目标用户矩阵集和所述目标物矩阵集进行梯度分析,得到更新梯度;将所述更新梯度加密后传输至服务端并获取所述服务端根据所述更新梯度生成的更新参数;利用所述更新参数对所述评分矩阵集中各评分矩阵进行更新,得到更新评分矩阵集;获取待推荐目标物集,利用所述更新评分矩阵集生成所述待推荐目标物集中各待推荐目标物的评分值,根据所述评分值从所述待推荐目标物集中选择一个或者多个待推荐目标,并向用户推荐选择的所述待推荐目标。
- 如权利要求16所述的计算机可读存储介质,其中,所述利用所述用户数据构建用户矩阵集,包括:将所述用户数据进行数值化处理,得到用户数据对应的数值;构建多个空值矩阵,其中,所述空值矩阵的数量与用户的数量一致;将所述用户数据对应的数值填充至所述空值矩阵中,得到用户矩阵集。
- 如权利要求16所述的计算机可读存储介质,其中,所述将所述用户矩阵集划分为多个用户矩阵子集,包括:随机从所述用户矩阵集中选取预设数量的用户矩阵做为簇心矩阵;分别计算所述用户矩阵集中每个用户矩阵与所述簇心矩阵的距离向量;计算所述距离向量的模长;根据所述模长从所述用户矩阵集中选取目标用户矩阵,并将选取的所述目标用户矩阵与簇心矩阵进行汇集,得到多个用户矩阵子集。
- 如权利要求16所述的计算机可读存储介质,其中,所述将所述更新梯度加密后输入至服务端,包括:将所述更新梯度进行数据分割,得到分割数据;对所述分割数据进行IO数据流转化,得到待加密数据;利用加密算法对所述待加密数据进行加密,得到加密数据;将所述加密数据传输至服务端。
- 如权利要求19所述的计算机可读存储介质,其中,所述利用加密算法对所述待加密数据进行加密,得到加密数据,包括:对所述待加密数据进行等间距离散化处理,得到离散数据;利用加密算法生成多个占位数据;将所述多个占位数据插入所述离散数据中,得到加密数据。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011298325.4A CN112380439B (zh) | 2020-11-19 | 2020-11-19 | 目标物推荐方法、装置、电子设备及计算机可读存储介质 |
CN202011298325.4 | 2020-11-19 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2021208695A1 true WO2021208695A1 (zh) | 2021-10-21 |
Family
ID=74585869
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2021/082891 WO2021208695A1 (zh) | 2020-11-19 | 2021-03-25 | 目标物推荐方法、装置、电子设备及计算机可读存储介质 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN112380439B (zh) |
WO (1) | WO2021208695A1 (zh) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112380439B (zh) * | 2020-11-19 | 2024-06-04 | 平安科技(深圳)有限公司 | 目标物推荐方法、装置、电子设备及计算机可读存储介质 |
CN113032670B (zh) * | 2021-03-15 | 2022-10-25 | 清华大学 | 停车场推荐方法、装置、计算机设备和存储介质 |
CN113706204B (zh) * | 2021-08-31 | 2024-04-05 | 中国平安财产保险股份有限公司 | 基于深度学习的权益发放方法、装置、设备及存储介质 |
CN114417138B (zh) * | 2021-12-27 | 2024-04-02 | 海信集团控股股份有限公司 | 一种健康信息推荐方法和设备 |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105095477A (zh) * | 2015-08-12 | 2015-11-25 | 华南理工大学 | 一种基于多指标评分的推荐算法 |
EP2960849A1 (en) * | 2014-06-26 | 2015-12-30 | Deutsche Telekom AG | Method and system for recommending an item to a user |
CN109740064A (zh) * | 2019-01-18 | 2019-05-10 | 北京化工大学 | 一种融合矩阵分解和挖掘用户项目信息的cf推荐方法 |
CN110503506A (zh) * | 2019-07-05 | 2019-11-26 | 平安科技(深圳)有限公司 | 基于评分数据的物品推荐方法、装置及介质 |
CN111667340A (zh) * | 2020-05-29 | 2020-09-15 | 中国平安财产保险股份有限公司 | 基于大数据的目标物推荐方法、装置及计算机可读存储介质 |
CN112380439A (zh) * | 2020-11-19 | 2021-02-19 | 平安科技(深圳)有限公司 | 目标物推荐方法、装置、电子设备及计算机可读存储介质 |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110209994B (zh) * | 2019-04-25 | 2022-12-23 | 广西师范大学 | 基于同态加密的矩阵分解推荐方法 |
CN111931035B (zh) * | 2019-05-13 | 2023-11-24 | 中国移动通信集团湖北有限公司 | 业务推荐方法、装置及设备 |
CN111324812B (zh) * | 2020-02-20 | 2021-02-19 | 深圳前海微众银行股份有限公司 | 基于迁移学习的联邦推荐方法、装置、设备及介质 |
CN111859155B (zh) * | 2020-08-04 | 2024-08-13 | 深圳前海微众银行股份有限公司 | 物品推荐方法、设备及计算机可读存储介质 |
-
2020
- 2020-11-19 CN CN202011298325.4A patent/CN112380439B/zh active Active
-
2021
- 2021-03-25 WO PCT/CN2021/082891 patent/WO2021208695A1/zh active Application Filing
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP2960849A1 (en) * | 2014-06-26 | 2015-12-30 | Deutsche Telekom AG | Method and system for recommending an item to a user |
CN105095477A (zh) * | 2015-08-12 | 2015-11-25 | 华南理工大学 | 一种基于多指标评分的推荐算法 |
CN109740064A (zh) * | 2019-01-18 | 2019-05-10 | 北京化工大学 | 一种融合矩阵分解和挖掘用户项目信息的cf推荐方法 |
CN110503506A (zh) * | 2019-07-05 | 2019-11-26 | 平安科技(深圳)有限公司 | 基于评分数据的物品推荐方法、装置及介质 |
CN111667340A (zh) * | 2020-05-29 | 2020-09-15 | 中国平安财产保险股份有限公司 | 基于大数据的目标物推荐方法、装置及计算机可读存储介质 |
CN112380439A (zh) * | 2020-11-19 | 2021-02-19 | 平安科技(深圳)有限公司 | 目标物推荐方法、装置、电子设备及计算机可读存储介质 |
Also Published As
Publication number | Publication date |
---|---|
CN112380439B (zh) | 2024-06-04 |
CN112380439A (zh) | 2021-02-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021208695A1 (zh) | 目标物推荐方法、装置、电子设备及计算机可读存储介质 | |
WO2021147568A1 (zh) | 基于gbdt高阶特征组合的推荐方法、装置及存储介质 | |
CN112541745B (zh) | 用户行为数据分析方法、装置、电子设备及可读存储介质 | |
JP2021121922A (ja) | 特徴抽出に基くマルチモデルトレーニング方法及び装置、電子機器と媒体 | |
WO2021218336A1 (zh) | 用户信息判别方法、装置、设备及计算机可读存储介质 | |
WO2021208701A1 (zh) | 代码变更的注释生成方法、装置、电子设备及存储介质 | |
WO2023015935A1 (zh) | 一种体检项目推荐方法、装置、设备及介质 | |
CN114625976B (zh) | 一种基于联邦学习的数据推荐方法、装置、设备及介质 | |
WO2022227192A1 (zh) | 图像分类方法、装置、电子设备及介质 | |
WO2021189908A1 (zh) | 基于深度学习的图像分类方法、装置、服务器及介质 | |
WO2021238563A1 (zh) | 基于配置算法的企业运行数据分析方法、装置、电子设备及介质 | |
WO2023050779A1 (zh) | 预约服务的数量分析方法、装置、设备及存储介质 | |
WO2022088632A1 (zh) | 用户数据监控分析方法、装置、设备及介质 | |
CN113157739B (zh) | 跨模态检索方法、装置、电子设备及存储介质 | |
WO2021151305A1 (zh) | 基于缺失数据的样本分析方法、装置、电子设备及介质 | |
WO2022160442A1 (zh) | 答案生成方法、装置、电子设备及可读存储介质 | |
CN112507230B (zh) | 基于浏览器的网页推荐方法、装置、电子设备及存储介质 | |
CN114186132B (zh) | 信息推荐方法、装置、电子设备及存储介质 | |
CN113868528A (zh) | 资讯推荐方法、装置、电子设备及可读存储介质 | |
CN115758399A (zh) | 基于医联网的智慧医疗信息管理方法、装置、设备及介质 | |
CN113468421A (zh) | 基于向量匹配技术的产品推荐方法、装置、设备及介质 | |
CN116483976A (zh) | 挂号科室推荐方法、装置、设备及存储介质 | |
WO2022116422A1 (zh) | 产品推荐方法、装置、电子设备及计算机可读存储介质 | |
CN113515703A (zh) | 信息推荐方法、装置、电子设备及可读存储介质 | |
CN115982454A (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: 21789348 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: 21789348 Country of ref document: EP Kind code of ref document: A1 |