CN111105267A - Recommendation method and device based on ALS algorithm and readable medium - Google Patents

Recommendation method and device based on ALS algorithm and readable medium Download PDF

Info

Publication number
CN111105267A
CN111105267A CN201911157285.9A CN201911157285A CN111105267A CN 111105267 A CN111105267 A CN 111105267A CN 201911157285 A CN201911157285 A CN 201911157285A CN 111105267 A CN111105267 A CN 111105267A
Authority
CN
China
Prior art keywords
user
matrix
commodity
result
data
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.)
Pending
Application number
CN201911157285.9A
Other languages
Chinese (zh)
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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN201911157285.9A priority Critical patent/CN111105267A/en
Publication of CN111105267A publication Critical patent/CN111105267A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0241Advertisements
    • G06Q30/0251Targeted advertisements
    • G06Q30/0269Targeted advertisements based on user profile or attribute
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0241Advertisements
    • G06Q30/0251Targeted advertisements
    • G06Q30/0255Targeted advertisements based on user history

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Development Economics (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Entrepreneurship & Innovation (AREA)
  • General Business, Economics & Management (AREA)
  • Marketing (AREA)
  • Economics (AREA)
  • Game Theory and Decision Science (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a recommendation method based on an ALS algorithm, which comprises the following steps: the method comprises the steps that network collection is conducted on a plurality of client sides based on a cloud database, and scores of users for commodities are obtained from the cloud database so as to establish user data and commodity data; modeling user data and commodity data, carrying out iterative solution by using an ALS algorithm, and screening results; and responding to the result, screening, and returning the commodity corresponding to the result to the corresponding client to recommend the user. The invention also discloses a computer device and a readable storage medium. The recommendation method, the equipment and the medium based on the ALS algorithm combine the Spark calculation platform and the ALS algorithm to design the recommendation method, and the method has the characteristics of rapidness, high efficiency, high accuracy and the like, and can give corresponding recommendations for different users.

Description

Recommendation method and device based on ALS algorithm and readable medium
Technical Field
The invention relates to the technical field of big data mining and analysis, in particular to a recommendation method, equipment and a readable medium based on an ALS algorithm.
Background
With the increasing scale of the internet, the amount of information generated by related applications in the internet is increasing at a geometric level every day, and nowadays, the information is a process that the IT era slowly enters the DT era. In the face of the dilemma of information overload, how to reasonably utilize information in huge data sets generated by user behaviors to provide valuable reference sets for users is an important field for the competitive research of enterprises and organizations at present, and a recommendation system is produced in such an environment.
Recommendation systems are a subset of information filtering systems that aim to predict a user's preferences or grade an item, etc. The basic task of the recommendation system is to mine useful information in the data generated by the user so as to achieve the effect of contacting the user with the information. On the one hand, help the user to find information of interest and value to the user and on the other hand present the information in a way to the user. The research and implementation of the recommendation algorithm in the recommendation system are very important, and the overall performance of the recommendation system is directly related to the quality of the recommendation algorithm. The recommendation algorithm is classified in the categories of machine learning and data mining, and single-machine calculation is performed on the calculation tasks of mass data under the current commercial operation condition, so that the recommendation algorithm is obviously unrealistic.
Disclosure of Invention
In view of this, an object of the embodiments of the present invention is to provide a recommendation method, device and medium based on an ALS algorithm, in which a Spark computing platform and the ALS algorithm are combined to design a recommendation method, and the method has the characteristics of rapidness, high efficiency, high accuracy and the like, and can provide corresponding recommendations for different users.
Based on the above purpose, an aspect of the embodiments of the present invention provides an ALS algorithm-based recommendation method, including the following steps: the method comprises the steps that network collection is conducted on a plurality of client sides based on a cloud database, and scores of users for commodities are obtained from the cloud database so as to establish user data and commodity data; modeling user data and commodity data, carrying out iterative solution by using an ALS algorithm, and screening results; and responding to the result, screening, and returning the commodity corresponding to the result to the corresponding client to recommend the user.
In some embodiments, modeling the user data and the commodity data comprises: generating a user matrix based on the user data, generating a commodity matrix based on the commodity data, transposing the user matrix and multiplying the user matrix by the commodity matrix to obtain a user scoring matrix; a first user matrix and a first commodity matrix are randomly generated.
In some embodiments, iteratively solving using the ALS algorithm and screening the results comprises: according to an ALS algorithm, performing iterative computation on a first user matrix and a first commodity matrix based on a loss function and a user scoring matrix to obtain an Nth user matrix and an Nth commodity matrix; calculating to obtain a user root mean square error and a commodity root mean square error based on the user matrix, the Nth user matrix, the commodity matrix and the Nth commodity matrix; and screening results in response to the user root mean square error and the commodity root mean square error being lower than the error threshold.
In some embodiments, the step of returning the product corresponding to the result to the corresponding client to recommend the user in response to the result passing the screening includes: performing system evaluation on the result; and responding to the evaluation through the system, creating a server interface, and displaying the commodity corresponding to the result as a recommendation result on the client.
In some embodiments, further comprising: constructing a spark computing platform, and installing and deploying a computing module and a storage module on the computing platform; integrating the ALS algorithm into a database of a computing platform; and calling an algorithm in a database to realize the recommendation method based on the calculation module and the storage module.
In another aspect of the embodiments of the present invention, there is also provided a computer device, including: at least one processor; and a memory storing computer instructions executable on the processor, the instructions being executable by the processor to perform the steps of: the method comprises the steps that network collection is conducted on a plurality of client sides based on a cloud database, and scores of users for commodities are obtained from the cloud database so as to establish user data and commodity data; modeling user data and commodity data, carrying out iterative solution by using an ALS algorithm, and screening results; and responding to the result, screening, and returning the commodity corresponding to the result to the corresponding client to recommend the user.
In some embodiments, modeling the user data and the commodity data comprises: generating a user matrix based on the user data, generating a commodity matrix based on the commodity data, transposing the user matrix and multiplying the user matrix by the commodity matrix to obtain a user scoring matrix; a first user matrix and a first commodity matrix are randomly generated.
In some embodiments, iteratively solving using the ALS algorithm and screening the results comprises: according to an ALS algorithm, performing iterative computation on a first user matrix and a first commodity matrix based on a loss function and a user scoring matrix to obtain an Nth user matrix and an Nth commodity matrix; calculating to obtain a user root mean square error and a commodity root mean square error based on the user matrix, the Nth user matrix, the commodity matrix and the Nth commodity matrix; and screening results in response to the user root mean square error and the commodity root mean square error being lower than the error threshold.
In some embodiments, the step of returning the product corresponding to the result to the corresponding client to recommend the user in response to the result passing the screening includes: performing system evaluation on the result; and responding to the evaluation through the system, creating a server interface, and displaying the commodity corresponding to the result as a recommendation result on the client.
In a further aspect of the embodiments of the present invention, a computer-readable storage medium is also provided, in which a computer program for implementing the above method steps is stored when the computer program is executed by a processor.
The invention has the following beneficial technical effects: a recommendation method is designed by combining a Spark computing platform and an ALS algorithm, has the characteristics of rapidness, high efficiency, high accuracy and the like, and can give corresponding recommendations for different users.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other embodiments can be obtained by using the drawings without creative efforts.
Fig. 1 is a schematic diagram of an embodiment of an ALS algorithm-based recommendation method provided by the present invention;
fig. 2 is a flowchart of an embodiment of an ALS algorithm-based recommendation method provided in the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following embodiments of the present invention are described in further detail with reference to the accompanying drawings.
It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are used for distinguishing two entities with the same name but different names or different parameters, and it should be noted that "first" and "second" are merely for convenience of description and should not be construed as limitations of the embodiments of the present invention, and they are not described in any more detail in the following embodiments.
In view of the above object, a first aspect of the embodiments of the present invention proposes an embodiment of a recommendation method based on the ALS algorithm. Fig. 1 is a schematic diagram illustrating an embodiment of an ALS algorithm-based recommendation method provided by the present invention. As shown in fig. 1, the embodiment of the present invention includes the following steps:
s1, performing network collection on the plurality of clients based on the cloud database, and acquiring scores of the users on the commodities from the cloud database to establish user data and commodity data;
s2, modeling the user data and the commodity data, iteratively solving by using an ALS algorithm, and screening the result; and
and S3, responding to the result, screening, and returning the commodity corresponding to the result to the corresponding client to recommend the user.
In the present embodiment, the ALS algorithm (alternating least squares) is one of the most commonly used approximation calculations in statistical analysis, and the alternating calculation results make the final result approximate the true result as much as possible. In machine learning, the ALS refers to a collaborative filtering algorithm solved by using a least square method, and in terms of classification of collaborative filtering, the ALS algorithm considers two aspects of users and commodities at the same time, and can be recommended based on the users and the commodities. However, the conventional ALS model has some disadvantages, and the performance can be greatly improved by the scheme of the present inventive concept.
In some embodiments, the recommendation method based on the ALS algorithm firstly carries out network collection on a plurality of clients, and obtains scores of the users for commodities from a cloud database; then modeling is carried out, and a training algorithm which can be directly used can be called from an Mllib algorithm library; and finally, calculating parameters such as accuracy, recall rate, coverage rate, minimum root mean square and the like of the commodities based on the iteration result, determining whether to give a recommendation or not according to the calculated parameters, and returning the recommended commodities to the client for recommending the user.
In some embodiments of the invention, modeling the user data and the commodity data comprises: generating a user matrix U based on the user data, generating a commodity matrix M based on the commodity data, transposing the user matrix U and multiplying the transposed user matrix U by the commodity matrix M to obtain a user scoring matrix R; a first user matrix U1 and a first commodity matrix M1 are randomly generated.
In some embodiments of the invention, iteratively solving using the ALS algorithm and screening the results comprises: according to ALS algorithm, based on loss function
Figure BDA0002285136370000051
(in the formula, (i, j) ∈ l denotes all user-commodity pairs, /)jRepresenting a set of users,/iDenotes a set of items, KNN (u)i) Representing user uiN nearest neighbors, KNN (m)j) Representing an article mjThe number of N nearest neighbors of (a),
Figure BDA0002285136370000052
which represents the similarity between the users and is,
Figure BDA0002285136370000053
representing similarity between items, k representing any one attribute)
And a user scoring matrix R, performing iterative computation on the first user matrix U1 and the first commodity matrix M1, fixing M1, and updating each feature U of each user one by onekiWhere k denotes any one of the characteristics of the user, i.e. for ukiCalculating the partial derivative, and making the partial derivative equal to 0, thereby obtaining uki(ii) a Fixing U1, updating each feature m of each article one by onekjWhere k denotes any one of the characteristics of the article, i.e. for mkjObtaining the partial derivative, and making the partial derivative equal to 0, thereby obtaining mkj
I.e., the first user matrix U1 is fixed to find another, non-randomized matrix M. And then, the randomized user matrix U is solved by utilizing the solved commodity matrix M object. Finally, the two matrixes are subjected to mutual iterative calculation until the error reaches a certain threshold condition or the upper limit of the iterative times, and an Nth user matrix Un and an Nth commodity matrix Mn are obtained; calculating to obtain a user root mean square error and a commodity root mean square error based on the user matrix U, the Nth user matrix Un, the commodity matrix M and the Nth commodity matrix Mn; and screening results in response to the user root mean square error and the commodity root mean square error being lower than the error threshold. The loss function in the embodiment considers the similarity relationship between the user and the commodity, the similarity between the user and the commodity can be still maintained after training, the condition that some information of the user or the commodity is lost when the U matrix and the M matrix are solved can be overcome, and the calculation result is more accurate.
In some embodiments of the present invention, the screening the result in response to the result, and the returning the product corresponding to the result to the corresponding client to recommend the user includes: performing system evaluation on the result; evaluating the result according to parameters such as accuracy, recall rate, coverage rate, minimum root mean square and the like in response to the evaluation through the system, and determining whether to recommend the result to the user; and creating an API server interface, and displaying the commodity corresponding to the result as a recommendation result on the client.
The accuracy rate determines whether the recommended commodity is liked by the user or not, and is directly related to the quality of the service of the user; recall refers to how many proportions of user scoring records are included in the list ultimately recommended to the user; the coverage rate refers to the proportion of the recommended quantity of the commodities in the total quantity of the commodities provided by the application provider; the root mean square error is the evaluation of the score prediction in the recommendation system.
In some embodiments of the invention, further comprising: constructing a Spark computing platform based on the Insight (such as a flagship version), installing and deploying corresponding components such as a computing module and a storage module on the computing platform, wherein Hdfs is stored, Spark is responsible for data computing, and carrying out statistical analysis on a large-scale data set; integrating the ALS algorithm into a database Mllib of a computing platform to realize parallelization of the algorithm; and modeling and performing model training according to the grade of the user on the commodity, and judging whether to recommend a certain commodity to the user according to the result.
Spark is a general memory parallel computing frame, and intermediate results are directly stored in a memory, so that the I/O frequency is reduced, the completion time of operation is greatly reduced, and the requirement of real-time service of a recommendation system is met. By building a Spark computing platform, related recommendation algorithms in the recommendation system are realized in a parallelization mode, and real-time recommendation for users is realized. The recommendation method combining Spark and ALS algorithms has the characteristics of rapidness, high efficiency, high accuracy and the like, can give corresponding recommendations for different users, attracts more attention on one hand, and improves the sales volume on the other hand.
In some embodiments, parallelization of spark includes data parallelization and task parallelization: data parallelization refers to parallelization of data in Spark mainly by establishing a logic execution diagram, i.e., a flow direction process of data flow. Then dividing the logic execution graph into physical execution graphs to realize task parallelization, and finally generating tasks to be distributed to nodes for execution; task parallelization means that Spark faces a complex data processing flow, data dependence is more flexible, and data flow and physical task are difficult to be simply unified together. Thus, Spark separates the data flow from the execution flow of a specific task, and designs an algorithm to convert the logical execution graph into a task physical execution graph.
Fig. 2 is a block diagram illustrating an embodiment of a method for optimizing storage performance according to the present invention. As shown in fig. 2, in some embodiments of the invention, the following steps are included:
generating a user scoring matrix RDD based on the obtained scores of the users on the commodities, and randomly generating a U matrix and an M matrix; respectively calculating an M matrix based on the U matrix and the RDD, calculating a U matrix based on the M matrix and the RDD, and continuously performing iterative calculation to obtain a final training model; and judging the optimal model through RMSE (minimum root mean square error), outputting the optimal model, inputting the optimal model into a recommendation system for evaluation, determining whether to recommend or not, and outputting a result if recommended.
It should be particularly noted that, the steps in the embodiments of the ALS algorithm-based recommendation method described above can be mutually intersected, replaced, added, and deleted, so that these methods of reasonably arranging, combining and transforming files based on soft links also belong to the scope of the present invention, and the scope of the present invention should not be limited to the embodiments.
In view of the above object, a second aspect of the embodiments of the present invention provides a computer device, including: at least one processor; and a memory storing computer instructions executable on the processor, the instructions being executable by the processor to perform the steps of: s1, performing network collection on the plurality of clients based on the cloud database, and acquiring scores of the users on the commodities from the cloud database to establish user data and commodity data; s2, modeling the user data and the commodity data, iteratively solving by using an ALS algorithm, and screening the result; and S3, responding to the result, screening, and returning the commodity corresponding to the result to the corresponding client to recommend the user.
In some embodiments, modeling the user data and the commodity data comprises: generating a user matrix based on the user data, generating a commodity matrix based on the commodity data, transposing the user matrix and multiplying the user matrix by the commodity matrix to obtain a user scoring matrix; a first user matrix and a first commodity matrix are randomly generated.
In some embodiments, iteratively solving using the ALS algorithm and screening the results comprises: according to an ALS algorithm, performing iterative computation on a first user matrix and a first commodity matrix based on a loss function and a user scoring matrix to obtain an Nth user matrix and an Nth commodity matrix; calculating to obtain a user root mean square error and a commodity root mean square error based on the user matrix, the Nth user matrix, the commodity matrix and the Nth commodity matrix; and screening results in response to the user root mean square error and the commodity root mean square error being lower than the error threshold.
In some embodiments, the step of returning the product corresponding to the result to the corresponding client to recommend the user in response to the result passing the screening includes: performing system evaluation on the result; and responding to the evaluation through the system, creating a server interface, and displaying the commodity corresponding to the result as a recommendation result on the client.
The invention also provides a computer readable storage medium storing a computer program which, when executed by a processor, performs the method as above.
Finally, it should be noted that, as one of ordinary skill in the art can appreciate that all or part of the processes of the methods of the above embodiments can be implemented by a computer program to instruct related hardware, and the program of the recommended method based on the ALS algorithm can be stored in a computer readable storage medium, and when executed, the program can include the processes of the embodiments of the methods as described above. The storage medium of the program may be a magnetic disk, an optical disk, a Read Only Memory (ROM), a Random Access Memory (RAM), or the like. The embodiments of the computer program may achieve the same or similar effects as any of the above-described method embodiments.
Furthermore, the methods disclosed according to embodiments of the present invention may also be implemented as a computer program executed by a processor, which may be stored in a computer-readable storage medium. Which when executed by a processor performs the above-described functions defined in the methods disclosed in embodiments of the invention.
Further, the above method steps and system elements may also be implemented using a controller and a computer readable storage medium for storing a computer program for causing the controller to implement the functions of the above steps or elements.
Further, it should be appreciated that the computer-readable storage media (e.g., memory) herein can be either volatile memory or nonvolatile memory, or can include both volatile and nonvolatile memory. By way of example, and not limitation, nonvolatile memory can include Read Only Memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM), which can act as external cache memory. By way of example and not limitation, RAM is available in a variety of forms such as synchronous RAM (DRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The storage devices of the disclosed aspects are intended to comprise, without being limited to, these and other suitable types of memory.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as software or hardware depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the disclosed embodiments of the present invention.
The various illustrative logical blocks, modules, and circuits described in connection with the disclosure herein may be implemented or performed with the following components designed to perform the functions herein: a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination of these components. A general purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. A processor may also be implemented as a combination of computing devices, e.g., a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a DSP, and/or any other such configuration.
The steps of a method or algorithm described in connection with the disclosure herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an ASIC. The ASIC may reside in a user terminal. In the alternative, the processor and the storage medium may reside as discrete components in a user terminal.
In one or more exemplary designs, the functions may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer. By way of example, and not limitation, such computer-readable media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a general-purpose or special-purpose computer, or a general-purpose or special-purpose processor. Also, any connection is properly termed a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, Digital Subscriber Line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. Disk and disc, as used herein, includes Compact Disc (CD), laser disc, optical disc, Digital Versatile Disc (DVD), floppy disk, blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
The foregoing is an exemplary embodiment of the present disclosure, but it should be noted that various changes and modifications could be made herein without departing from the scope of the present disclosure as defined by the appended claims. The functions, steps and/or actions of the method claims in accordance with the disclosed embodiments described herein need not be performed in any particular order. Furthermore, although elements of the disclosed embodiments of the invention may be described or claimed in the singular, the plural is contemplated unless limitation to the singular is explicitly stated.
It should be understood that, as used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly supports the exception. It should also be understood that "and/or" as used herein is meant to include any and all possible combinations of one or more of the associated listed items.
The numbers of the embodiments disclosed in the embodiments of the present invention are merely for description, and do not represent the merits of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
Those of ordinary skill in the art will understand that: the discussion of any embodiment above is meant to be exemplary only, and is not intended to intimate that the scope of the disclosure, including the claims, of embodiments of the invention is limited to these examples; within the idea of an embodiment of the invention, also technical features in the above embodiment or in different embodiments may be combined and there are many other variations of the different aspects of the embodiments of the invention as described above, which are not provided in detail for the sake of brevity. Therefore, any omissions, modifications, substitutions, improvements, and the like that may be made without departing from the spirit and principles of the embodiments of the present invention are intended to be included within the scope of the embodiments of the present invention.

Claims (10)

1. A recommendation method based on ALS algorithm is characterized by comprising the following steps:
the method comprises the steps that network collection is conducted on a plurality of client sides based on a cloud database, and scores of users for commodities are obtained from the cloud database so as to establish user data and commodity data;
modeling the user data and the commodity data, iteratively solving by using an ALS algorithm, and screening results; and
and responding to the result, screening, and returning the commodity corresponding to the result to the corresponding client to recommend the user.
2. The recommendation method of claim 1, wherein modeling the user data and the good data comprises:
generating a user matrix based on the user data, generating a commodity matrix based on the commodity data, transposing the user matrix and multiplying the user matrix by the commodity matrix to obtain a user scoring matrix;
a first user matrix and a first commodity matrix are randomly generated.
3. The recommendation method according to claim 2, wherein the ALS algorithm is used for iterative solution, and the screening of the result comprises:
according to an ALS algorithm, performing iterative computation on the first user matrix and the first commodity matrix based on a loss function and the user scoring matrix to obtain an Nth user matrix and an Nth commodity matrix;
calculating to obtain a user root mean square error and a commodity root mean square error based on the user matrix, the Nth user matrix, the commodity matrix and the Nth commodity matrix;
and screening the result in response to the user root mean square error and the commodity root mean square error being lower than an error threshold.
4. The recommendation method according to claim 1, wherein the step of returning the commodity corresponding to the result to the corresponding client to recommend the user in response to the result being screened comprises:
performing system evaluation on the result;
and responding to the evaluation through the system, creating a server interface, and displaying the commodity corresponding to the result as a recommendation result on the client.
5. The recommendation method according to claim 1, further comprising:
constructing a spark computing platform, and installing and deploying a computing module and a storage module on the computing platform;
integrating the ALS algorithm into a database of the computing platform;
and calling an algorithm in the database to realize the recommendation method based on the calculation module and the storage module.
6. A computer device, comprising:
at least one processor; and
a memory storing computer instructions executable on the processor, the instructions when executed by the processor implementing the steps of:
the method comprises the steps that network collection is conducted on a plurality of client sides based on a cloud database, and scores of users for commodities are obtained from the cloud database so as to establish user data and commodity data;
modeling the user data and the commodity data, iteratively solving by using an ALS algorithm, and screening results; and
and responding to the result, screening, and returning the commodity corresponding to the result to the corresponding client to recommend the user.
7. The computer device of claim 6, wherein modeling the user data and the commodity data comprises:
generating a user matrix based on the user data, generating a commodity matrix based on the commodity data, transposing the user matrix and multiplying the user matrix by the commodity matrix to obtain a user scoring matrix;
a first user matrix and a first commodity matrix are randomly generated.
8. The computer device of claim 7, wherein iteratively solving using the ALS algorithm and screening the results comprises:
according to an ALS algorithm, performing iterative computation on the first user matrix and the first commodity matrix based on a loss function and the user scoring matrix to obtain an Nth user matrix and an Nth commodity matrix;
calculating to obtain a user root mean square error and a commodity root mean square error based on the user matrix, the Nth user matrix, the commodity matrix and the Nth commodity matrix;
and screening the result in response to the user root mean square error and the commodity root mean square error being lower than an error threshold.
9. The computer device of claim 6, wherein in response to the result being filtered, returning the product corresponding to the result to the corresponding client for recommendation to the user comprises:
performing system evaluation on the result;
and responding to the evaluation through the system, creating a server interface, and displaying the commodity corresponding to the result as a recommendation result on the client.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 5.
CN201911157285.9A 2019-11-22 2019-11-22 Recommendation method and device based on ALS algorithm and readable medium Pending CN111105267A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911157285.9A CN111105267A (en) 2019-11-22 2019-11-22 Recommendation method and device based on ALS algorithm and readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911157285.9A CN111105267A (en) 2019-11-22 2019-11-22 Recommendation method and device based on ALS algorithm and readable medium

Publications (1)

Publication Number Publication Date
CN111105267A true CN111105267A (en) 2020-05-05

Family

ID=70421069

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911157285.9A Pending CN111105267A (en) 2019-11-22 2019-11-22 Recommendation method and device based on ALS algorithm and readable medium

Country Status (1)

Country Link
CN (1) CN111105267A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112036987A (en) * 2020-09-11 2020-12-04 杭州海康威视数字技术股份有限公司 Method and device for determining recommended commodities

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106056427A (en) * 2016-05-25 2016-10-26 中南大学 Spark-based big data hybrid model mobile recommending method
CN107133279A (en) * 2017-04-13 2017-09-05 西安电子科技大学 A kind of intelligent recommendation method and system based on cloud computing
CN110363555A (en) * 2018-04-10 2019-10-22 深圳市阿西莫夫科技有限公司 Recommended method and device based on eye tracking vision algorithm
CN110458638A (en) * 2019-06-26 2019-11-15 平安科技(深圳)有限公司 A kind of Method of Commodity Recommendation and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106056427A (en) * 2016-05-25 2016-10-26 中南大学 Spark-based big data hybrid model mobile recommending method
CN107133279A (en) * 2017-04-13 2017-09-05 西安电子科技大学 A kind of intelligent recommendation method and system based on cloud computing
CN110363555A (en) * 2018-04-10 2019-10-22 深圳市阿西莫夫科技有限公司 Recommended method and device based on eye tracking vision algorithm
CN110458638A (en) * 2019-06-26 2019-11-15 平安科技(深圳)有限公司 A kind of Method of Commodity Recommendation and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112036987A (en) * 2020-09-11 2020-12-04 杭州海康威视数字技术股份有限公司 Method and device for determining recommended commodities
CN112036987B (en) * 2020-09-11 2024-04-02 杭州海康威视数字技术股份有限公司 Method and device for determining recommended commodity

Similar Documents

Publication Publication Date Title
US10600005B2 (en) System for automatic, simultaneous feature selection and hyperparameter tuning for a machine learning model
Rabosky et al. FiSSE: a simple nonparametric test for the effects of a binary character on lineage diversification rates
CN110321422B (en) Method for training model on line, pushing method, device and equipment
Idris et al. Intelligent churn prediction for telecom using GP-AdaBoost learning and PSO undersampling
CN106023015B (en) Course learning path recommendation method and device
Lima et al. Domain knowledge integration in data mining using decision tables: case studies in churn prediction
US9633311B2 (en) Decision tree learning
CN112990486A (en) Method and system for generating combined features of machine learning samples
CN110880014B (en) Data processing method, device, computer equipment and storage medium
US11809455B2 (en) Automatically generating user segments
CN104573130A (en) Entity resolution method based on group calculation and entity resolution device based on group calculation
US11875368B2 (en) Proactively predicting transaction quantity based on sparse transaction data
KR102192949B1 (en) Apparatus and method for evaluating start-up companies using artifical neural network
CN113157922B (en) Network entity behavior evaluation and visualization method based on graph
US20220150123A1 (en) Temporal-Based Network Embedding and Prediction
CN116882520A (en) Prediction method and system for predetermined prediction problem
US20210279643A1 (en) Method and system for generating best performing data models for datasets in a computing environment
CN114579584B (en) Data table processing method and device, computer equipment and storage medium
KR20230095796A (en) Joint personalized search and recommendation with hypergraph convolutional networks
EP4226292A1 (en) Systems and methods for tracking data shared with third parties using artificial intelligence-machine learning
CN108319628B (en) User interest determination method and device
CN110472659B (en) Data processing method, device, computer readable storage medium and computer equipment
Zhang Prediction of customer propensity based on machine learning
CN111105267A (en) Recommendation method and device based on ALS algorithm and readable medium
Gao et al. A robust collaborative filtering approach based on user relationships for recommendation systems

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200505