Commodity Similarity Matching Method and Its Device, Equipment, Medium, Product

Through the incremental scoring calculation method, the product similarity list is updated in real time, which solves the problems of large calculation volume and high latency of the existing e-commerce recommendation system, real-time recommendation is realized, and can better respond to changes in user interests.

CN114169965BActive Publication Date: 2025-05-30GUANGZHOU GESHEN INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111478414.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-06
Publication Date
2025-05-30
Estimated Expiration
2041-12-06

AI Technical Summary

Technical Problem

When calculating product similarity, existing e-commerce recommendation systems need to process a large amount of user behavior data, resulting in large amounts of calculations and large resource consumption, resulting in delayed recommendation results and inability to respond to changes in user interests in real time.

Method used

The incremental scoring calculation method is used to obtain user behavior data in real time, calculate the similarity between the product object and the historical access product list, update the product similarity list, quickly respond to external user requests, and provide real-time recommendations.

Benefits of technology

By incrementally calculating similarity, the consumption of computing resources is reduced, and the similarity is quickly calculated. Similar products can be recommended in real time in the high-frequency changes in user behavior, and the delay is reduced, and the recommendation results are more in line with user interests.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114169965B_ABST
    Figure CN114169965B_ABST
Patent Text Reader

Abstract

The present application discloses a method and apparatus, device, medium, and product for commodity similarity matching. The method includes: obtaining user behavior data, and determining an incremental score for a corresponding user to access a commodity object according to the commodity object access record in the user behavior data; calculating an intermediate change value required for calculating the similarity between the commodity object and all commodity objects in the historical access commodity list based on the incremental score according to the user's private historical access commodity list; updating the similarity value in the corresponding element in the commodity similarity list according to the intermediate change value; in response to a commodity object pointed to by an external user request, querying the commodity similarity list to obtain a target commodity object whose similarity value meets a preset condition for answering the external user request. The present application uses an incremental calculation similarity method to calculate the similarity required for commodity similarity matching in real time and quickly, and is applicable to business scenarios with high-frequency calls and real-time responses.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of e-commerce information technology, and particularly to a method for matching similar products, as well as a corresponding device, computer equipment, computer-readable storage medium, and computer program product. Background Art

[0002] The item-based collaborative filtering algorithm was born in 1998 and was first proposed by Amazon. After being applied to the e-commerce field, it has become one of the relatively classic algorithms in the field of product recommendation systems and is also one of the most widely used commercial recommendation algorithms. This algorithm analyzes the behavior of users when accessing products to determine product similarity, and a large amount of user behavior data needs to be calculated to determine the similarity between products. In actual business scenarios, the number of users is often in the hundreds of thousands, and the number of items is at least in the tens of thousands. The corresponding data volume is very large. For this reason, the general technical implementation is to set up a scheduled task. Since the amount of calculation is relatively large and the corresponding computing resources are used more, it is generally set to convert the full amount of data accumulated on the same day into a user-product relationship matrix every night, and then calculate the scores corresponding to each user's access to products in the matrix based on the relationship matrix to obtain the latest similarity between products. This often takes several hours to calculate the result, and the subsequent product recommendation can only be carried out on the next day after obtaining the result. Therefore, even if the recommended result on the same day attracts the interest of users, the interests of users often change rapidly, and the latest recommended result can only be updated on the next day. Obviously, the current method with a relatively large delay has insufficient effectiveness.

[0003] In order to achieve real-time and rapid matching of similar products for product recommendation, looking at the current technical pain points, the main reason for the delay is that the amount of calculation is large and a large amount of computing resources are consumed. It is necessary to conduct in-depth research on the technology related to the matching of product information to explore more technical solutions suitable for actual needs. Summary of the Invention

[0004] The primary objective of this application is to solve at least one of the above problems and provide a method for matching similar products, as well as a corresponding device, computer equipment, computer-readable storage medium, and computer program product.

[0005] To meet the various objectives of this application, the following technical solutions are adopted in this application:

[0006] A method for matching similar products provided to meet one of the objectives of this application includes the following steps:

[0007] Obtain user behavior data, and determine the incremental score of the corresponding user's access to the product object according to the product object access record in the user behavior data;

[0008] Based on the user's private historical accessed product list, calculate the intermediate change value required for calculating the similarity between the product object and all product objects in the historical accessed product list based on the incremental score;

[0009] Update the similarity value in the corresponding element in the product similarity list according to the intermediate change value, where the product similarity list is used to store the similarity values between pairwise product objects in the product database;

[0010] In response to the product object pointed to by an external user request, query the product similarity list to obtain target product objects whose similarity values meet the preset conditions for answering the external user request.

[0011] In a further embodiment, obtain user behavior data, and determine the incremental score of the corresponding user's access to the product object according to the product object access record in the user behavior data, including the following steps:

[0012] In response to a user behavior data submission event, obtain the corresponding user behavior data;

[0013] Determine its behavior type according to the product object access record in the user behavior data, query the preset mapping relationship data, and determine the rated score corresponding to the behavior type;

[0014] Query the historical score corresponding to the product object pointed to by the product object access record in the user's private historical accessed product list triggered by the submission event, and determine the incremental score of the rated score relative to the historical score.

[0015] In a preferred embodiment, in the mapping relationship data, multiple different behavior types in the same preset business logic chain and their respective corresponding rated scores are stored. According to the chronological order of the business logic chain, the rated score of the industry type later in time is higher than the rated score of the industry type later in time.

[0016] In a further embodiment, based on the user's private historical accessed product list, calculate the intermediate change value required for calculating the similarity between the product object and all product objects in the historical accessed product list based on the incremental score, including the following steps:

[0017] Call the user's private historical accessed product list to obtain all product objects accessed by the user historically. This list is used to store the product objects accessed by the user historically and the maximum rated score generated by the user's access to the product object;

[0018] Based on the incremental score, calculate each dependent variable of a preset similarity formula for each pair of product objects formed by the product object corresponding to the incremental score and each product object in the historical access product list, and obtain the intermediate change value corresponding to each dependent variable.

[0019] In a preferred embodiment, based on the incremental score, calculate each dependent variable of a preset similarity formula for each pair of product objects formed by the product object corresponding to the incremental score and each product object in the historical access product list, and obtain the intermediate change value corresponding to each dependent variable, including the following steps:

[0020] Call a numerical storage table for pre-storing the intermediate change values corresponding to the dependent variables of the similarity formula, and obtain the historical values corresponding to each dependent variable between each pair of product objects formed by the product object corresponding to the incremental score and each product object in the historical access product list;

[0021] Based on the incremental score, calculate each dependent variable of the preset similarity formula for each of the pairs of product objects, and obtain the intermediate change value corresponding to each dependent variable;

[0022] According to the corresponding relationship of each dependent variable, summarize and replace and update the numerical storage table with the corresponding historical values and the intermediate change values.

[0023] In a further embodiment, in response to a product object pointed to by an external user request, query the product similarity list, and obtain a target product object whose similarity value meets a preset condition to answer the external user request, including the following steps:

[0024] In response to an external user request, parse the product object pointed to by the request from the request;

[0025] Query the product similarity list, and obtain the row vector corresponding to the product object pointed to by the request, where the row vector includes the similarity values between the product object and all product objects in the product database;

[0026] Filter out each element whose similarity value exceeds a preset threshold from the row vector, and determine the product object corresponding to each element as the target product object;

[0027] Obtain the product summary information of the target product object to construct a recommendation list, and push the recommendation list in response to the request.

[0028] A product similarity matching device provided to meet one of the purposes of the present application includes:

[0029] A data acquisition module that acquires user behavior data and determines an incremental score for a user's access to a commodity object based on the access record of the commodity object in the user behavior data.

[0030] An incremental calculation module that calculates an intermediate change value required for similarity calculation between the commodity object and all commodity objects in the historical access commodity list based on the incremental score and the user's private historical access commodity list.

[0031] A similarity calculation module that updates the similarity value in the corresponding element of the commodity similarity list according to the intermediate change value, where the commodity similarity list is used to store the similarity values between pairwise commodity objects in the commodity database.

[0032] A similarity matching module that, in response to a commodity object pointed to by an external user request, queries the commodity similarity list and obtains target commodity objects whose similarity values meet preset conditions to answer the external user request.

[0033] In a further embodiment, the data acquisition module includes:

[0034] A submission response sub-module for obtaining corresponding user behavior data in response to a user behavior data submission event.

[0035] A query scoring sub-module for determining its behavior type according to the access record of the commodity object in the user behavior data, querying preset mapping relationship data, and determining the rated score corresponding to the behavior type.

[0036] A determination increment sub-module for querying the historical score corresponding to the commodity object pointed to by the commodity object access record in the user's private historical access commodity list triggered by the submission event, and determining the incremental score of the rated score relative to the historical score.

[0037] In a preferred embodiment, the rated score module includes: storing multiple different behavior types and their respective rated scores in the same preset business logic chain in the mapping relationship data, and according to the chronological order of the business logic chain, the rated score of the industry type later in time is higher than the rated score of the industry type earlier in time.

[0038] In a further embodiment, the incremental calculation module includes:

[0039] A determination scoring sub-module for calling the user's private historical access commodity list to obtain all commodity objects accessed by the user historically, where the list is used to store the commodity objects accessed by the user historically and the maximum rated score generated by the user's access to the commodity object.

[0040] A calculation variation value sub-module, based on the incremental score, calculates each dependent variable of a preset similarity formula for each pair of product objects formed by the product object corresponding to the incremental score and each product object in the historical access product list, and obtains the intermediate variation value corresponding to each dependent variable.

[0041] In a preferred embodiment, the calculation variation value sub-module includes:

[0042] A dependent variable query unit, which calls a numerical storage table for pre-storing the intermediate variation values corresponding to the dependent variables of the similarity formula, and obtains the historical values corresponding to each dependent variable between each pair of product objects formed by the product object corresponding to the incremental score and each product object in the historical access product list;

[0043] An incremental calculation unit, based on the incremental score, calculates each dependent variable of a preset similarity formula for each of the pairs of product objects, and obtains the intermediate variation value corresponding to each dependent variable;

[0044] A storage update unit, according to the corresponding relationship of each dependent variable, summarizes and replaces the corresponding historical value and the intermediate variation value to update the numerical storage table.

[0045] In a further embodiment, the similarity matching module includes:

[0046] A response parsing sub-module, in response to an external user request, parses the product object pointed to by the request from the request;

[0047] A similarity query sub-module, which queries the product similarity list and obtains the row vector corresponding to the product object pointed to by the request, and the row vector includes the similarity values between the product object and all product objects in the product database;

[0048] A confirmation target sub-module, which filters out each element whose similarity value exceeds a preset threshold from the row vector, and determines the product object corresponding to each element as the target product object;

[0049] A list construction sub-module, which obtains the product summary information of the target product object to construct a recommendation list, and pushes the recommendation list in response to the request.

[0050] A computer device provided to meet one of the purposes of the present application includes a central processing unit and a memory, and the central processing unit is used to call and run a computer program stored in the memory to execute the steps of the product similarity matching method described in the present application.

[0051] A computer-readable storage medium provided for another purpose of the present application stores a computer program implemented according to the commodity similarity matching method in the form of computer-readable instructions. When the computer program is called and run by a computer, it executes the steps included in the method.

[0052] A computer program product provided for another purpose of the present application includes a computer program / instructions. When the computer program / instructions are executed by a processor, the steps of the method described in any embodiment of the present application are implemented.

[0053] Compared with the prior art, the advantages of the present application are as follows:

[0054] The present application correspondingly sets intermediate variables according to the components in the preset similarity formula. The incremental score determined by comparing the score corresponding to the user behavior data when the current user accesses the commodity object with the historical score. Based on the incremental score, the change value of the intermediate variable corresponding to the dependent variable whose change occurs, that is, the intermediate change value, is calculated. Correspondingly, the intermediate variable corresponding to the fixed item that does not respond to the change does not need to be calculated. Furthermore, the intermediate variables required for calculating the similarity formula are obtained, that is, the value of the dependent variable updated according to the intermediate change value and the value of the fixed item, and then the similarity can be calculated. Further, since once the user behavior data is received, the above-mentioned incremental calculation of similarity is performed. Compared with summarizing all user behavior data for corresponding full-scale calculation of similarity, those skilled in the art should know that the calculation amount of the intermediate change value is relatively small and at this time there is no need to calculate the fixed item. Thus, it can be seen that the method of real-time calling the incremental calculation of similarity requires less computing resources and can quickly calculate the result. Subsequently, based on this, real-time recommendation can be achieved in the business scenario of high-frequency calculation of similarity for similar commodity matching for commodity recommendation.

[0055] Real-time receiving user behavior data for real-time recommendation, the recommendation result matches the user's current behavior, and relatively conforms to the user's changing interests. Description of the Drawings

[0056] The above and / or additional aspects and advantages of the present application will become obvious and easy to understand from the following description of the embodiments in conjunction with the drawings, where:

[0057] Figure 1 It is a schematic flowchart of a typical embodiment of the commodity similarity matching method of the present application;

[0058] Figure 2 It is a schematic flowchart of confirming the incremental score in the embodiment of the present application;

[0059] Figure 3 It is a schematic diagram of formulating the rated score in the embodiment of the present application;

[0060] Figure 4 Schematic flowchart of incrementally calculating the dependent variable in an embodiment of the present application;

[0061] Figure 5 Schematic flowchart of updating the dependent variable in an embodiment of the present application;

[0062] Figure 6 Schematic flowchart of constructing a push list in an embodiment of the present application;

[0063] Figure 7 Principle block diagram of the commodity similarity matching device of the present application;

[0064] Figure 8 Schematic structural diagram of a computer device adopted by the present application. Detailed implementation manners

[0065] The embodiments of the present application will be described in detail below. Examples of the embodiments are shown in the accompanying drawings, where the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application and should not be construed as limiting the present application.

[0066] Those skilled in the art of the present technology can understand that unless specifically stated otherwise, the singular forms "a", "an", "the" and "said" used herein may also include the plural forms. It should be further understood that the term "including" used in the specification of the present application means the presence of the described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or their groups. It should be understood that when we say that an element is "connected" or "coupled" to another element, it can be directly connected or coupled to other elements, or there may also be intermediate elements. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The phrase "and / or" used herein includes all or any unit and all combinations of one or more related listed items.

[0067] Those skilled in the art of the present technology can understand that unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meaning as the general understanding of those of ordinary skill in the art to which the present application belongs. It should also be understood that terms such as those defined in a general dictionary should be understood to have a meaning consistent with the meaning in the context of the prior art, and will not be interpreted with an idealized or overly formal meaning unless specifically defined as here.

[0068] Those skilled in the art can understand that the "client", "terminal", and "terminal device" used herein include both devices with a wireless signal receiver that only has the ability to receive and no ability to transmit, and devices with receiving and transmitting hardware that have the receiving and transmitting hardware capable of two-way communication on a two-way communication link. Such devices may include: cellular or other communication devices such as personal computers, tablet computers, etc., which have a single-line display or a multi-line display or a cellular or other communication device without a multi-line display; PCS (Personal Communications Service), which can combine voice, data processing, fax, and / or data communication capabilities; PDA (Personal Digital Assistant), which may include a radio frequency receiver, pager, Internet / intranet access, web browser, notepad, calendar, and / or GPS (Global Positioning System) receiver; conventional laptop and / or palm computers or other devices, which are conventional laptop and / or palm computers or other devices with and / or including a radio frequency receiver. The "client", "terminal", and "terminal device" used herein can be portable, transportable, installed in a vehicle (air, sea, and / or land), or suitable for and / or configured to run locally, and / or run in a distributed form at any other location on the earth and / or in space. The "client", "terminal", and "terminal device" used herein can also be a communication terminal, an Internet access terminal, a music / video playback terminal, for example, it can be a PDA, MID (Mobile Internet Device), and / or a mobile phone with music / video playback function, or can also be a smart TV, a set-top box, and other devices.

[0069] The hardware referred to by names such as "server", "client", and "service node" in this application is essentially an electronic device with the equivalent capabilities of a personal computer, and is a hardware device with the necessary components disclosed by the von Neumann principle, including a central processing unit (including an arithmetic unit and a controller), a memory, an input device, and an output device. The computer program is stored in its memory, and the central processing unit loads the program stored in the external memory into the memory for execution, executes the instructions in the program, and interacts with the input / output devices to complete specific functions.

[0070] It should be noted that the concept of "server" in this application can similarly be extended to apply to server clusters. According to the network deployment principles understood by those skilled in the art, the various servers should be logically divided. Physically, these servers can either be independent of each other but can be invoked through interfaces, or integrated into a single physical computer or a set of computer clusters. Those skilled in the art should understand this flexibility and should not be restricted by this when implementing the network deployment method of this application.

[0071] One or several technical features of this application, unless explicitly specified, can either be deployed on the server and accessed by the client remotely invoking the online service interface provided by the server, or directly deployed and run on the client for access.

[0072] All kinds of data involved in this application, unless explicitly specified, can either be remotely stored on the server or stored on local terminal devices, as long as they are suitable for being invoked by the technical solutions of this application.

[0073] Those skilled in the art should be aware that although the various methods of this application are described based on the same concept and thus show commonality with each other, unless otherwise specified, these methods can all be executed independently. Similarly, for each of the embodiments disclosed in this application, they are all proposed based on the same inventive concept. Therefore, for concepts with the same expression, as well as concepts that are only appropriately transformed for convenience although the concept expressions are different, they should be equivalently understood.

[0074] For each of the embodiments to be disclosed in this application, unless explicitly stated that there is a mutually exclusive relationship between them, the relevant technical features involved in each embodiment can be cross-combined to flexibly construct new embodiments, as long as such combination does not deviate from the creative spirit of this application and can meet the requirements in the prior art or solve certain deficiencies in the prior art. Those skilled in the art should be aware of this flexibility.

[0075] A method for matching similar commodities in this application can be programmed as a computer program product and deployed to run on the client to be implemented. In this way, by accessing the interface opened after the computer program product runs, human-computer interaction can be carried out with the computer program product through a graphical user interface to execute this method.

[0076] Please refer to Figure 1 , in the typical embodiment of the method for matching similar commodities in this application, it includes the following steps:

[0077] Step S1100: Obtain user behavior data, and determine the incremental score of the corresponding user accessing the commodity object according to the commodity object access records in the user behavior data;

[0078] On the e-commerce platform, each user operation can generate corresponding user behavior data, such as: login, registration, browsing products, purchasing products, etc. Since such user behavior data has high analysis and reference value, especially the data related to the accessed product objects in the user behavior. Therefore, in order to obtain the particularly important product object access records in the user behavior data, the method of listening is usually used. Specifically, generally, the e-commerce platform purposefully sets corresponding listeners for the product objects displayed on the user graphical interface, so as to collect and record the corresponding user behavior data when the user accesses the product objects for operations such as data analysis to analyze the meaning behind the user behavior. The user behavior can be the evaluation score of the product after the user consumes, or the consumption behavior score, or also the behavior scores such as browsing, liking, following, forwarding, etc. that characterize the popularity of the product in the market. Further, in order to make the user behavior data applicable to data analysis, certain quantification operations can be performed on the user behavior data as needed, and then, corresponding scores are given. The specific scores given can be flexibly set by those skilled in the art according to the business situation.

[0079] According to the preset listening mechanism, the listener is triggered to listen when the user accesses the product object, and responds to construct the corresponding user behavior data. Specifically, whenever the user interacts with the product object when accessing it on the graphical user interface, the listener is triggered to listen to the event, and responds to obtain the user behavior corresponding to the interaction and its corresponding score. The current score is associated with the corresponding user unique identifier and the product object unique identifier to construct the current user behavior data. The user unique identifier is the unique identifier generated by the e-commerce platform for the user after the user first logs in to the platform for registration. This identifier is publicly available within the e-commerce platform to distinguish each user and facilitate relevant operations for software engineering developers. The product object unique identifier is the unique identifier generated by the e-commerce platform for the product object after it is launched on the platform. This identifier is publicly available within the e-commerce platform to distinguish each product object and facilitate relevant operations for software engineering developers. For users, generally, the user unique identifier and the product object unique identifier are relatively hidden and not displayed on the graphical user interface.

[0080] The product object is the product object put on the shelves by the merchant users on the e-commerce platform or the product object put on the shelves by the relevant salespersons on the e-commerce platform, and includes the product title for generally describing the comprehensive information of the product, the product details for describing the detailed information of the product, for displaying the shape, structure, color, etc. of the product, etc. After being put on the shelves, the product object is displayed on the graphical user interface in the form established by the e-commerce platform.

[0081] To respond to the product similarity matching method of this application in real time, the server needs to access user behavior data in real time. That is, when a user accesses a product object, a listener is triggered to respond and construct corresponding user behavior data and submit it to the server for processing. Thus, the server calls the historical access product list private to the current user based on the user unique identifier in the user behavior data to obtain the corresponding historical score, and then compares it with the current score in the user behavior data. If the current score is lower than the historical score, the subsequent steps are terminated. If the current score is higher than the historical score, the corresponding difference is calculated as the incremental score. The historical score is the highest score obtained by the user's most recent access to the product object.

[0082] Step S1200: Based on the incremental score and according to the historical access product list private to the user, calculate the intermediate change value required for calculating the similarity between the product object and all product objects in the historical access product list.

[0083] Based on the incremental score and according to the historical access product list private to the user, calculate the intermediate change value required for calculating the similarity between the product object and all product objects in the historical access product list.

[0084] After the server calculates the incremental score based on the score in the current user behavior data and the historical score of the corresponding historical access product list private to the current user, further, based on the incremental score of the product object and the historical scores of other product objects in the historical access product list, calculate the change value of the corresponding intermediate variable, that is, the intermediate change value. The intermediate variable is the variable required for calculating the similarity between the product object and other product objects in the historical access list according to a preset similarity algorithm. The product objects stored in the historical access product list are the same as those stored in the product library. That is, thus obtain the intermediate change value required for calculating the similarity between the product object and each product object stored in the product library.

[0085] Step S1300: Update the similarity value in the corresponding element of the product similarity list according to the intermediate change value. The product similarity list is used to store the similarity values between pairwise product objects in the product database.

[0086] Add the intermediate change value to the intermediate variable stored in the product similarity list accordingly, and then update the intermediate variable. Overwrite the original intermediate variable with the updated intermediate variable and store it in the product similarity list. Thus, call a preset similarity algorithm and use the intermediate variable in the product similarity list as a parameter to calculate the similarity value between the product object and each product object stored in the product library, and then perform similarity update, and overwrite the original similarity value stored in the product similarity with the similarity value accordingly.

[0087] For general similarity calculation, common formulas such as the cosine similarity formula, Euclidean distance formula, Pearson correlation coefficient formula, Jaccard similarity formula, etc. can be selected. Each formula includes multiple variables, and these variables can be set as intermediate variables accordingly. Among them, due to the appearance of incremental scoring, the values of some intermediate variables change accordingly as dependent variables, and there may also be intermediate variables that do not respond to the change as fixed variables. Thus, based on the incremental scoring, the change in the value of the dependent variable, that is, the intermediate change value, is calculated accordingly. Furthermore, the value of the dependent variable after the change is the original value of the pre-stored intermediate variable plus the intermediate change value. Subsequently, based on the similarity formula, the corresponding dependent variables and fixed variables are obtained for calculation, and thus the similarity can be calculated.

[0088] Step S1400: In response to the commodity object pointed to by the external user request, query the commodity similarity list to obtain the target commodity object whose similarity value meets the preset conditions for answering the external user request.

[0089] In one embodiment, the user scrolls the graphical user interface to the commodity recommendation area, triggering a request to match the commodity object default-specified for the user with a similar commodity object, that is, the external user request. The server responds to the request to obtain the specified commodity object. The specified commodity object may be a commodity object that has been consumed and purchased, a commodity object to be consumed and purchased in the shopping cart, a commodity object that has been browsed many times in the browsing record for a long time, a commodity object in the favorite record, etc. Subsequently, based on the specified commodity object, query the similarity value between the commodity similarity list and other commodity objects in the commodity database, and filter out the commodity objects corresponding to the similarity value exceeding the preset threshold as the recommended target commodity objects, and push them to the recommendation area for corresponding display in a preset style. Thus, the event of recommending commodities similar to the specified commodity object is completed. The preset style can be a neat grid style, a waterfall flow style with uneven neatness, a carousel style, etc. The commodity similarity list stores the similarity between each commodity in the commodity database.

[0090] In another embodiment, the user long-presses the commodity object area or swipes left on the commodity object area on the graphical user interface and other operations to click the find-similar control, triggering a request to match the commodity object currently pointed to by the user with a similar commodity object. Similarly, filter out the commodity objects stored in the commodity database with relatively high similarity to the pointed commodity object for commodity recommendation, and display them in the recommendation area in a preset style to complete the response to the event.

[0091] This exemplary embodiment demonstrates the advantages of the present application. The present application correspondingly sets intermediate variables according to the components in the preset similarity formula, and determines the incremental score based on the score in the user behavior data when the current user accesses the commodity object compared to the historical score. Based on the incremental score, the change value of the intermediate variable corresponding to the dependent variable whose change occurs, that is, the intermediate change value, is calculated. Correspondingly, the intermediate variables corresponding to the fixed items that do not respond to the change do not need to be calculated. Furthermore, the intermediate variables required for calculating the similarity formula are obtained, that is, the values of the corresponding dependent variables updated according to the intermediate change value and the values of the fixed items, and then the similarity can be calculated. Further, since once the user behavior data is received, the above-mentioned incremental calculation of similarity is performed. Compared with summarizing all user behavior data for corresponding full-scale calculation of similarity, those skilled in the art should know that the calculation amount of the intermediate change value is relatively small and at this time there are fixed items that do not need to be calculated. Thus, it can be seen that the method of calling the incremental calculation of similarity in real time requires less computing resources and can quickly calculate the result. Subsequently, based on this, real-time recommendation can be achieved in the business scenario of high-frequency calculation of similarity for similar commodity matching for commodity recommendation.

[0092] Real-time receive user behavior data for real-time recommendation, and the recommendation result matches the user's behavior at that time, relatively conforming to the user's changing interests.

[0093] Please refer to Figure 2 In a further embodiment, user behavior data is obtained, and the incremental score of the user accessing the commodity object is determined according to the commodity object access record in the user behavior data, including the following steps:

[0094] Step S1110: Respond to the user behavior data submission event to obtain the corresponding user behavior data;

[0095] In order to obtain the user behavior executed when the user accesses the commodity object, a listener is set to pre-set corresponding monitoring for the area or interface where the commodity object is displayed. For example, when the user clicks on the cover area of the commodity object to enter the commodity details interface, the user scrolls the current commodity details interface to browse, the user clicks on the favorite, like, forward, purchase, add to shopping cart, controls, etc. on the commodity object interface. By monitoring whether the controls pre-set in this area or interface are clicked, whether the controls are in an open state or perform related operations after being clicked, and whether the interface scrolls, etc., the corresponding user behavior data can be obtained.

[0096] When a user accesses a product object, the monitoring set for the product object is triggered. The area or control on the graphical user interface responds to the monitoring through its preset method function, and submits the user behavior data generated by the interaction between the user and the product object to the monitor. Further, the monitor responds to the submission event to obtain corresponding user behavior data, and the user behavior data includes user information, product object information and behavior type, and then the user unique identifier, product object unique identifier, and behavior type are extracted accordingly to reconstruct the user behavior data.

[0097] Step S1120: determining the behavior type according to the commodity object access record in the user behavior data, querying the preset mapping relationship data, and determining the rating score corresponding to the behavior type;

[0098] Extract the behavior type corresponding to the commodity object access record between the commodity object and the user behavior data, and the behavior type can be any type of browsing, playing, collecting, liking, forwarding, purchasing, and adding to the shopping cart. In one embodiment, call the preset behavior scoring method and use the behavior type as a method parameter. The method executes and outputs the corresponding rated score based on the one-to-one mapping relationship between the behavior type and its corresponding rated score. If the behavior type is relatively small, and therefore the number of traversals is not large, it is recommended to adopt this implementation method; in another embodiment, a pre-constructed behavior scoring table is corresponding to the one-to-one mapping relationship between the behavior type and its corresponding rated score. Thus, querying the behavior scoring table can obtain the rated score corresponding to the behavior type. If the behavior type is relatively large, it is recommended to adopt this implementation method. The specific implementation method can be flexibly selected by technicians in this field according to the actual data volume. At this point, the behavior type in the user behavior data is replaced with the corresponding rated score to facilitate the operation of subsequent steps.

[0099] The rated score is to give different scores for different behavior types, which can be specifically expressed as setting the score according to the relative difficulty, frequency, complexity, time spent, amount of money consumed, etc. of the behavior type. Therefore, the behavior type with higher relative difficulty, more frequency, greater complexity, longer time spent, and more amount of money consumed should have a higher corresponding score. The specific rated score value can be flexibly set by technical personnel in this field with reference to the above logic.

[0100] Step S1130: query the historical score corresponding to the product object pointed to by the product object access record in the user's private historical visited product list that triggered the submission event, and determine the incremental score of the rated score relative to the historical score.

[0101] According to the unique user identifier in the user behavior data, query the user's private historical access list, and according to the unique identifier of the commodity object in the user behavior data, locate the corresponding commodity object in the historical commodity access list to obtain its corresponding historical score. Further, subtract the historical score from the rated score in the user behavior data to calculate the difference. If the difference is greater than 0, use it as the incremental score, indicating that the commodity object has received more attention and even love from the user compared to the history.

[0102] In this embodiment, the user behavior data can be obtained quickly in real time through the set monitoring mechanism, and the corresponding rated scores are set according to the refined user behavior types, laying a solid foundation for the accuracy of subsequent commodity similarity matching.

[0103] Please refer to Figure 3 In a preferred embodiment, in step S1121, in the mapping relationship data, multiple different behavior types in the same preset business logic chain and their respective corresponding rated scores are stored. According to the chronological order of the business logic chain, the rated score of the behavior type later in time is higher than the rated score of the behavior type later in time.

[0104] The mapping relationship between each behavior type and its corresponding rated score is one-to-one, and each behavior type belongs to the same preset business logic chain. The preset logic chain is the business logic chain from before consumption to after consumption, including implicit behavior types and explicit behavior types. When the user directly rates the commodity object, it is an explicit behavior type, and the corresponding feedback score is simply called the explicit score; correspondingly, any operation behavior that is not directly rated by the user is considered an implicit behavior type, and the corresponding feedback score is simply called the implicit score. The explicit behavior types include scoring within the given score upper limit, such as sliding to light up stars, specific numerical scoring, etc. The implicit behavior types include browsing, clicking, playing, collecting, commenting, liking, forwarding, paying for purchase, etc. Further, based on the degree of investment of the user in these implicit behavior types, such as the time cost, capital cost, social pressure, and chronological order invested, the corresponding rated scores are set. For the explicit scoring type, the rated score can be directly equivalent to the score given by the user. In one embodiment, according to the user behavior types before consumption including clicking, browsing, liking, collecting, forwarding, adding to the shopping cart, and the user behavior types after consumption including paying for purchase, it is set that the rated score of the corresponding user behavior type after consumption is higher than that before consumption. By way of example, the behavior types are clicking, browsing, liking, collecting, forwarding, adding to the shopping cart, paying for purchase, and the corresponding rated scores are 1, 1, 3, 5, 5, 6, 7, 9. The specific rated score values can be flexibly determined as needed by those skilled in the art according to the business chain in the actual operation scenario.

[0105] In this embodiment, by setting differentiated scores for different user behavior types, when the user accesses a commodity object, each behavior type in the corresponding business logic chain is hierarchically differentiated, and a gradually increasing rated score is set for each behavior type accordingly. Thus, the calculated similarity is more accurate and the granularity is finer, further differentiating commodity objects with extremely close similarities, which is convenient for more accurately matching similar commodities.

[0106] Please refer to Figure 4 , in a further embodiment, according to the user's private historical accessed commodity list, based on the incremental score, calculate the intermediate change value required for calculating the similarity between the commodity object and all commodity objects in the historical accessed commodity list, including the following steps:

[0107] Step S1210: Invoke the user's private historical accessed commodity list to obtain all commodity objects accessed by the user in history. This list is used to store the commodity objects accessed by the user in history and the rated score of the maximum value generated by the access of these commodity objects by the user.

[0108] The historical accessed commodity list stores the rated scores corresponding to the user behavior data when storing each commodity object in the user's historical accessed commodity database, and the corresponding commodity objects associated one-to-one with the rated scores. Further, whenever the server accesses new user behavior data, it determines whether the current rated score in the user behavior data is higher than the corresponding historical rated score. Only when the current rated score is higher than the historical rated score, the current rated score is used to overwrite and update the corresponding historical rated score. Thus, the corresponding incremental score is also calculated for use in the subsequent similarity calculation. Therefore, the stored rated score always remains the maximum value.

[0109] Step S1220: Based on the incremental score, calculate each dependent variable of the preset similarity formula for each pair of commodity objects composed of the commodity object corresponding to the incremental score and each commodity object in the historical accessed commodity list, and obtain the intermediate change value corresponding to each dependent variable.

[0110] The dependent variable is an intermediate variable that needs to be updated and changed for calculating the similarity between the commodity object corresponding to the incremental score, i.e., the current commodity object, and each commodity object in the historical access commodity list. Based on the incremental score and the historical score increment in the corresponding historical access commodity list, the change value of this intermediate variable, i.e., the intermediate change value, is calculated. Thus, by adding the intermediate change value to the intermediate variable corresponding to the dependent variable, the intermediate variable required for calculating the current similarity can be obtained correspondingly. Then, together with other intermediate variables that do not need to be updated and changed, the current similarity is calculated according to a preset similarity algorithm. The intermediate variable is a variable set based on a preset similarity algorithm. By calling this similarity algorithm with this variable, the similarity can be calculated. As an exemplary example, the preset similarity algorithm is the cosine similarity algorithm. The product of two vectors corresponding to its numerator can be used as an intermediate variable, and the part inside the square root corresponding to the modulus of two vectors corresponding to its denominator can be used as an intermediate variable. Thus, by calling the cosine similarity algorithm with the intermediate variable, the corresponding similarity can be calculated.

[0111] In this embodiment, the similarity can be quickly calculated by incrementally calculating the corresponding intermediate variable. Compared with obtaining the similarity by calculating the rated scores of the commodity object and each commodity object in the commodity list in full amount according to the preset similarity algorithm, the calculation amount is relatively small, which is suitable for business scenarios that require quick calculation of similarity.

[0112] Please refer to Figure 5 , in a preferred embodiment, based on the incremental score, each dependent variable of a preset similarity formula is calculated for each pair of commodity objects formed by the commodity object corresponding to the incremental score and each commodity object in the historical access commodity list, and the corresponding intermediate change value of each dependent variable is obtained, including the following steps:

[0113] Step S1221: Call the numerical storage table for pre-storing the intermediate change values corresponding to the dependent variables of the similarity formula, and obtain the historical values corresponding to each dependent variable between each pair of commodity objects formed by the commodity object corresponding to the incremental score and each commodity object in the historical access commodity list;

[0114] The numerical storage table is the table constructed during initialization, which is used to store the intermediate variables required for calculating the similarity according to a preset similarity formula. The initialization is to obtain a certain amount of user behavior data, and the specific volume is flexibly set by those skilled in the art according to the actual business data volume. Then, a user-product relationship matrix is constructed based on the user unique identifier, product object unique identifier, and rating in the full volume of user behavior data, where the rows represent product objects, the columns represent users, and the matrix elements represent the corresponding ratings. When the rating is 0, it indicates that there is no access record of the corresponding product object in the user behavior data. Further, a preset similarity algorithm is called to calculate the intermediate variables between each product object in the user-product relationship matrix, and then the similarity is calculated. In one embodiment, the preset similarity formula is the cosine similarity formula, and an exemplary formula is as follows:

[0115]

[0116] where: u is the user who has both product object i and product object j, U is all users, r u,i is the corresponding rating in the behavior data when user u accesses product object i, r u,j is the corresponding rating in the behavior data when user u accesses product object j, and sim(i, j) is the similarity between product object i and product object j.

[0117] In another embodiment, the preset similarity formula is the Euclidean distance similarity formula, and an exemplary formula is as follows:

[0118]

[0119] where: u is the user who has both product object i and product object j, U is all users, x u,i is the corresponding rating in the behavior data when user u accesses product object i, x u,j is the corresponding rating in the behavior data when user u accesses product object j, and sim(i, j) is the similarity between product object i and product object j.

[0120] Thus, a numerical storage table composed of the similarities and intermediate variables corresponding to each product object is obtained. The product objects (table headers) and table elements corresponding to the rows and columns along the diagonal of the table are the same, and the table elements are the similarities between the product objects in the rows and columns and the intermediate variables required for calculating the similarities.

[0121] Since the current score of the commodity object corresponding to the incremental score is the historical score plus the incremental score, the corresponding intermediate variable stored in the numerical storage table changes. The changed intermediate variable is the dependent variable. Calculate the incremental value of the change of the dependent variable relative to its corresponding historical value, that is, the intermediate change value. Then, summarize the historical value and its corresponding intermediate variable value to obtain the value corresponding to the changed intermediate variable of the dependent variable. Overwrite and update this value to the numerical storage table to be used for subsequent similarity calculation.

[0122] Step S1222: Based on the incremental score, calculate each dependent variable of the preset similarity formula for each pair of commodity objects, and obtain the corresponding intermediate change value of each dependent variable.

[0123] In one embodiment, the preset similarity formula is the cosine similarity formula. The corresponding intermediate variables stored in the numerical storage table are the vector product between the pair of commodity objects, the part inside the square root corresponding to the modulus of the two vectors, a total of three intermediate variables. An exemplary formula is as follows:

[0124]

[0125] count_users(item i ,item j )=∑ u∈U r u,i r u,j

[0126]

[0127]

[0128] Where: u is the user who has both commodity object i and commodity object j, U is all users, r u,i is the score corresponding to the behavior data when user u accesses commodity object i, r u,j is the score corresponding to the behavior data when user u accesses commodity object j, sim(i, j) is the similarity between commodity object i and commodity object j, count_users(item i ,item j ), count_users(item i ), count_users(item j ) are the three intermediate variables, and their corresponding intermediate change values are Δcount_users, Δcount_users(i), and Δcount_users(j).

[0129] Further, the intermediate change value corresponding to the dependent variable is calculated based on the incremental score. For example, the similarity between commodity object i and commodity object j is calculated. Referring to steps S1110 to S1130, the behavior data of user u when accessing commodity object i is used to obtain the incremental score corresponding to commodity object i. The corresponding dependent variable is count_users(item i ,item j )、count_users(item i ), the corresponding intermediate variable values ​​Δcount_users and Δcount_users(i) can be obtained by calling the formula, which is Δcount_users = C*r u,j , Δcount_users(i)=C 2 +2Cr u,i , where: C is the incremental score, r u,j is the score of the product object j in the behavior data corresponding to the current user u, r u,i is the score of the commodity object in the behavior data corresponding to the current user u.

[0130] In another embodiment, the preset formal degree formula is the Euclidean distance similarity formula, and the intermediate variable stored in the corresponding numerical storage table is the square of the difference in the score corresponding to each pair of commodity objects in the square root sign and the corresponding number of intermediate variables is the corresponding number of users. The exemplary formula is as follows:

[0131]

[0132] Among them: u is the user who shares commodity object i and commodity object j, U is all users, x u,i is the score corresponding to the behavior data of user u when visiting product object i, x u,j is the score corresponding to the behavior data of user u when visiting product object j, and sim(i, j) is the similarity between product object i and product object j. u,i -x u,j ) 2 is the intermediate variable, and the corresponding intermediate change value is Δx.

[0133] Further, the intermediate change value corresponding to the dependent variable is calculated based on the incremental score. For example, the similarity between commodity object i and commodity object j is calculated. Referring to steps S1110 to S1130, the incremental score corresponding to commodity object i is obtained according to the behavior data of user u when visiting commodity object i. The corresponding dependent variable is (x u,i -x u,j ) 2, the corresponding intermediate variable value Δx can be obtained by calling a formula, and the formula is Δx = C 2 +2C(x u,i -x u,j ), where: C is the incremental score, and x u,i is the score in the behavior data corresponding to the current user u for the commodity object j, and x u,j is the score in the behavior data corresponding to the current user u for the commodity object.

[0134] Step S1223: According to the corresponding relationships of the respective dependent variables, summarize the corresponding historical values and the intermediate change values and then replace and update the value storage table.

[0135] Call the value storage table to obtain the historical values corresponding to the intermediate variables of the respective dependent variables, replace and update the intermediate variables with the values obtained by adding the intermediate change values to the corresponding historical values, and then call a preset similarity algorithm according to the respective intermediate variables in the value storage table to calculate the similarity. Thus, update the similarity corresponding in the commodity similarity list to the similarity, and the commodity similarity list stores the similarity values between commodity objects.

[0136] In this embodiment, the intermediate change values corresponding to the relevant dependent variables are calculated according to the incremental score, and then the intermediate variables corresponding to the dependent variables are updated, so as to quickly calculate the corresponding similarity. Compared with initializing the full amount to calculate all scores to obtain the similarity, a large amount of unnecessary calculations are saved. Further, in view of the characteristic of the incremental calculation of similarity saving a large amount of computing resources, it is obviously applicable to business scenarios with high-frequency calls and fast calculations. Thus, whenever the server receives user behavior data, it can call the incremental calculation of similarity method to obtain the similarity and quickly respond to the request for similarity calculation. The incremental calculation of similarity method is applicable to various similarity formulas and has a certain degree of feasibility and universality.

[0137] Please refer to Figure 6 , in a further embodiment, in response to a commodity object pointed to by an external user request, query the commodity similarity list to obtain a target commodity object whose similarity value meets a preset condition for answering the external user request, including the following steps:

[0138] Step S1410: In response to an external user request, parse out the commodity object pointed to by the request from the request;

[0139] In one embodiment, the user clicks on a find-similar control preset in the commodity object area on the graphical user interface, triggering a request to match a commodity object similar to the commodity object. Subsequently, the server responds to the external user request and parses out the unique identification code of the commodity object pointed to in the request.

[0140] In another embodiment, the user scrolls the graphical user interface to the product recommendation area, triggering a product recommendation request. Subsequently, the server responds to the external user request, calls the user's private historical visited product list, filters out the products with more historical visit times as the product objects pointed to by the request, and obtains their corresponding unique identification codes.

[0141] Step S1420: Query the product similarity list to obtain the row vector corresponding to the product object pointed to by the request. The row vector includes the similarity values between this product object and all product objects in the product database.

[0142] The product similarity list stores the similarities between product objects in a matrix format. The product objects corresponding to the rows and columns along the diagonal of the matrix are the same. The product object is the matrix identifier, specifically the unique identifier of the product object, representing the product object corresponding to the matrix element. The matrix element is the similarity between the product objects in the row and column.

[0143] Query the product similarity list according to the unique identification code of the product object to obtain the row vector corresponding to this product object in the product similarity list.

[0144] Step S1430: Screen out each element in the row vector whose similarity value exceeds the preset threshold, and determine the product objects corresponding to each element as the target product objects.

[0145] The elements in the row vector are the similarity values between the product object and all product objects in the product database, and they are one-to-one associated with the corresponding product objects in the product database. Further, screen out the product objects corresponding to each element in the row vector whose similarity value exceeds the preset threshold as the target product objects, and sort these target product objects in descending order according to their corresponding similarity values to construct a target product object data set.

[0146] Step S1440: Obtain the product summary information of the target product objects to construct a recommendation list, and push the recommendation list in response to the request.

[0147] According to the unique identification codes of the respective target product objects in the target product object data set, obtain the corresponding product summary information from the product database, such as product cover pictures, product titles, product prices, the number of people who have purchased the product, etc. Furthermore, construct a recommendation list based on the sorting of the respective target products corresponding to the target product object data set and their corresponding product summary information, reply to the request and push the recommendation list to the client, and display the target product objects in a neat grid style, an uneven waterfall flow style, a carousel style, etc. according to the recommendation list.

[0148] In this embodiment, the core is to calculate the similarity by incremental calculation. Based on the calculated similarity, a recommendation list is constructed. With its characteristics of fast calculation and less computing resources used, it can quickly calculate the corresponding similarity whenever user data is received, match the recommended products according to it, and achieve the effect of real-time recommendation. It can quickly adapt to changes in user behavior and accurately recommend relevant products to users according to their current interests. Further, whenever a user accesses a product in the recommendation list, corresponding user behavior data can be generated, and then the incremental calculation similarity recommendation process can be executed to continuously iterate and optimize the corresponding similarity data, making the final recommendation result more accurately fit the user's preferences.

[0149] Please refer to Figure 7 , a product similarity matching device provided to meet one of the purposes of this application, includes: a data acquisition module 1100, an incremental calculation module 1200, a similarity calculation module 1300, and a similarity matching module 1400. Among them, the data acquisition module 1100 is used to acquire user behavior data and determine the incremental score of the user's access to the product object according to the product object access record in the user behavior data; the incremental calculation module 1200 is used to calculate the intermediate change value required for calculating the similarity between the product object and all product objects in the historical access product list based on the incremental score according to the user's private historical access product list; the similarity calculation module 1300 is used to update the similarity value in the corresponding element in the product similarity list according to the intermediate change value, and the product similarity list is used to store the similarity values between two product objects in the product database; the similarity matching module 1400 is used to query the product similarity list in response to the product object pointed to by an external user request, and obtain the target product object whose similarity value meets the preset conditions to respond to the external user request.

[0150] In a further embodiment, the data acquisition module 1100 includes: a submission response sub-module, which is used to obtain corresponding user behavior data in response to a user behavior data submission event; a query scoring sub-module, which is used to determine its behavior type according to the product object access record in the user behavior data, query the preset mapping relationship data, and determine the rated score corresponding to this behavior type; a determination increment sub-module, which is used to query the historical score corresponding to the product object pointed to by the product object access record in the user's private historical access product list that triggers this submission event, and determine the incremental score of the rated score relative to the historical score.

[0151] In a preferred embodiment, the rated score module includes: for the mapping relationship data, storing multiple different behavior types in the same preset service logic chain and their respective corresponding rated scores. According to the chronological order of the service logic chain, the rated score of the behavior type later in time is higher than the rated score of the behavior type earlier in time.

[0152] In a further embodiment, the incremental calculation module 1200 includes: a determination sub-module for calling the user's private historical accessed product list to obtain all product objects accessed by the user in history. This list is used to store the product objects accessed by the user in history and the rated score of the maximum value generated by the access of the product object by the user; a calculation change value sub-module for calculating each dependent variable of a preset similarity formula for each pair of product objects formed by the product object corresponding to the incremental score and each product object in the historical accessed product list based on the incremental score, and obtaining the intermediate change value corresponding to each dependent variable.

[0153] In a preferred embodiment, the calculation change value sub-module includes: a dependent variable query unit for calling a numerical storage table for pre-storing the intermediate change values corresponding to the dependent variables of the similarity formula to obtain the historical values corresponding to each dependent variable between each pair of product objects formed by the product object corresponding to the incremental score and each product object in the historical accessed product list; an incremental calculation unit for calculating each dependent variable of a preset similarity formula for each of the pairs of product objects based on the incremental score, and obtaining the intermediate change value corresponding to each dependent variable; a storage update unit for summarizing and replacing and updating the numerical storage table with the corresponding historical values and the intermediate change values according to the corresponding relationship of each dependent variable.

[0154] In a further embodiment, the similarity matching module 1400 includes: a response parsing sub-module for responding to an external user request and parsing out the product object pointed to by the request from the request; a similarity query sub-module for querying the product similarity list to obtain the row vector corresponding to the product object pointed to by the request, where the row vector includes the similarity values between the product object and all product objects in the product database; a confirmation target sub-module for screening out each element with a similarity value exceeding a preset threshold from the row vector and determining the product object corresponding to each element as the target product object; a list construction sub-module for obtaining the product summary information of the target product object to construct a recommendation list and pushing the recommendation list in response to the request.

[0155] To solve the above technical problems, the embodiments of the present application also provide a computer device. As Figure 8As shown, it is a schematic diagram of the internal structure of a computer device. The computer device includes a processor, a computer-readable storage medium, a memory, and a network interface connected through a system bus. Among them, the computer-readable storage medium of the computer device stores an operating system, a database, and computer-readable instructions. The database can store a control information sequence. When the computer-readable instructions are executed by the processor, the processor can implement a product similarity matching method. The processor of the computer device is used to provide computing and control capabilities to support the operation of the entire computer device. The memory of the computer device can store computer-readable instructions. When the computer-readable instructions are executed by the processor, the processor can execute the product similarity matching method of the present application. The network interface of the computer device is used to connect and communicate with a terminal. Those skilled in the art can understand, Figure 8 The structure shown is only a block diagram of some structures related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.

[0156] In this embodiment, the processor is used to execute Figure 7 the specific functions of each module and its sub-modules in. The memory stores the program codes and various types of data required to execute the above modules or sub-modules. The network interface is used for data transmission between the user terminal or the server. The memory in this embodiment stores the program codes and data required to execute all modules / sub-modules in the product similarity matching device of the present application. The server can call the program codes and data of the server to execute the functions of all sub-modules.

[0157] The present application also provides a storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors are caused to execute the steps of the product similarity matching method of any embodiment of the present application.

[0158] The present application also provides a computer program product, including a computer program / instructions. When the computer program / instructions are executed by one or more processors, the steps of the method described in any embodiment of the present application are implemented.

[0159] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments of the present application can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a computer-readable storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

[0160] To summarize, the present application predefines corresponding intermediate variables according to the adopted similarity formula, and then receives the user behavior data generated when the user visits the product object, compares the current score therein with the historical score in the historical behavior data of the user's historical visits to the product object to confirm the incremental score, and further calculates the corresponding intermediate variables based on the incremental score. At this point, the similarity can be calculated based on the intermediate variables and other intermediate variables that do not need to be calculated based on the incremental score, which is used for matching similar products. Since the user behavior data received each time is only generated by one user accessing one commodity object, and then only one rating data changes, therefore, there are not many intermediate variables that need to be incrementally calculated, and the calculation amount for updating the intermediate variable only needs to calculate the data related to the current rating. It can be seen that compared with the full calculation of the rating in the user behavior data generated when each user accesses the commodity object to obtain similarity, the incremental similarity calculation method has less calculation amount and requires less computing resources, so it is suitable for real-time calculation. Then, the commodity matching according to the calculated similarity is used for recommendation to achieve real-time recommendation. Therefore, the real-time recommendation with low delay or even close to no delay is more suitable for actual business scenarios, and when the user accesses the recommended commodity object, the corresponding incremental similarity calculation can be performed again, and the corresponding similarity data can be continuously updated, so that the recommendation result is more in line with the user's interest at the time. Furthermore, the incremental similarity calculation method is applicable to a variety of similarity formulas for calculating similarity, and is universal.

[0161] Those skilled in the art will appreciate that the various operations, methods, steps, measures, and schemes in the processes discussed in this application may be alternated, altered, combined, or deleted. Further, other steps, measures, and schemes in the various operations, methods, and processes discussed in this application may also be alternated, altered, rearranged, decomposed, combined, or deleted. Further, the steps, measures, and schemes in the prior art that are similar to those disclosed in this application may also be alternated, altered, rearranged, decomposed, combined, or deleted.

[0162] The above are only some embodiments of the present application. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present application, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present application.

Claims

1. A method for matching similar commodities, characterized in that, it includes the following steps: Obtain user behavior data, and determine the incremental score of the corresponding user's access to the commodity object according to the commodity object access record in the user behavior data; According to the user's private historical access commodity list, calculate the intermediate change value required for calculating the similarity between the commodity object and all commodity objects in the historical access commodity list based on the incremental score; Update the similarity value in the corresponding element in the commodity similarity list according to the intermediate change value, and the commodity similarity list is used to store the similarity values between pairwise commodity objects in the commodity database; Respond to the commodity object pointed to by the external user request, query the commodity similarity list, and obtain the target commodity object whose similarity value meets the preset conditions to answer the external user request; Wherein, the step of calculating the intermediate change value required for calculating the similarity between the commodity object and all commodity objects in the historical access commodity list based on the incremental score according to the user's private historical access commodity list includes: Call the user's private historical access commodity list to obtain all commodity objects accessed by the user historically, and this list is used to store the commodity objects accessed by the user historically and the rated score of the maximum value generated by the access of this commodity object by the user; Based on the incremental score, calculate each dependent variable of the preset similarity formula for each pairwise commodity object composed of the commodity object corresponding to the incremental score and each commodity object in the historical access commodity list, and obtain the intermediate change value corresponding to each dependent variable, including: Call the numerical storage table for pre-storing the intermediate change values corresponding to the dependent variables of the similarity formula to obtain the historical values corresponding to each dependent variable of each pairwise commodity object composed of the commodity object corresponding to the incremental score and each commodity object in the historical access commodity list; Based on the incremental score, calculate each dependent variable of the preset similarity formula for each of the pairwise commodity objects, and obtain the intermediate change value corresponding to each dependent variable; According to the corresponding relationship of each dependent variable, summarize and update the numerical storage table by replacing the corresponding historical value with the intermediate change value.

2. According to claim 1, characterized in that, The step of obtaining user behavior data and determining the incremental score of the corresponding user's access to the commodity object according to the commodity object access record in the user behavior data includes the following steps: Respond to the user behavior data submission event to obtain the corresponding user behavior data; Determine its behavior type according to the commodity object access record in the user behavior data, query the preset mapping relationship data, and determine the rated score corresponding to this behavior type; Query the historical score corresponding to the commodity object pointed to by the commodity object access record in the user's private historical access commodity list that triggered this submission event, and determine the incremental score of the rated score relative to the historical score.

3. According to claim 2, characterized in that, In the mapping relation data, multiple different behavior types in the same preset service logic chain and their respective corresponding rated scores are stored. According to the chronological order of the service logic chain, the rated score of the behavior type later in time is higher than that of the behavior type earlier in time.

4. According to claim 1, wherein, responding to the commodity object pointed to by an external user request, querying the commodity similarity list, and obtaining a target commodity object whose similarity value meets a preset condition for answering the external user request, including the following steps: responding to an external user request, and parsing out the commodity object pointed to by the request from the request; querying the commodity similarity list, and obtaining the row vector corresponding to the commodity object pointed to by the request, where the row vector includes the similarity values between the commodity object and all commodity objects in the commodity database; screening out each element whose similarity value exceeds a preset threshold from the row vector, and determining the commodity object corresponding to each element as the target commodity object; obtaining the commodity summary information of the target commodity object to construct a recommendation list, and pushing the recommendation list in response to the request.

5. A commodity similarity matching device, wherein, comprising: a data acquisition module, which acquires user behavior data and determines an incremental score for a corresponding user to access the commodity object according to the commodity object access record in the user behavior data; an incremental calculation module, which calculates an intermediate change value required for calculating the similarity between the commodity object and all commodity objects in the historical access commodity list based on the incremental score according to the user's private historical access commodity list; a similarity calculation module, which updates the similarity value in the corresponding element in the commodity similarity list according to the intermediate change value, and the commodity similarity list is used to store the similarity values between pairwise commodity objects in the commodity database; a similarity matching module, which responds to the commodity object pointed to by an external user request, queries the commodity similarity list, and obtains a target commodity object whose similarity value meets a preset condition for answering the external user request; wherein, calculating the intermediate change value required for calculating the similarity between the commodity object and all commodity objects in the historical access commodity list based on the incremental score according to the user's private historical access commodity list includes: invoking the user's private historical access commodity list to obtain all commodity objects accessed by the user historically, and this list is used to store the commodity objects accessed by the user historically and the maximum rated score generated by the access of this commodity object by the user; based on the incremental score, calculating each dependent variable of a preset similarity formula for each pairwise commodity object composed of the commodity object corresponding to the incremental score and each commodity object in the historical access commodity list, and obtaining the intermediate change value corresponding to each dependent variable, including: invoking a numerical storage table for pre-storing the intermediate change values corresponding to the dependent variables of the similarity formula, and obtaining the historical values corresponding to each dependent variable between each pairwise commodity object composed of the commodity object corresponding to the incremental score and each commodity object in the historical access commodity list; Based on the incremental score, each dependent variable of the preset similarity formula is calculated for each pair of commodity objects to obtain an intermediate change value corresponding to each dependent variable; According to the corresponding relationship between each dependent variable, the corresponding historical values ​​and the intermediate change values ​​are summarized and then replaced to update the value storage table.

6. A computer device comprising a central processing unit and a memory, It is characterized in that The central processing unit is used to call and run the computer program stored in the memory to execute the steps of the method according to any one of claims 1 to 4.

7. A computer-readable storage medium, It is characterized in that It stores a computer program implemented according to the method described in any one of claims 1 to 4 in the form of computer-readable instructions, and when the computer program is called and executed by a computer, the steps included in the corresponding method are executed.

8. A computer program product comprising a computer program / instructions, It is characterized in that When the computer program / instructions are executed by a processor, the steps of the method described in any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Hadoop-based commodity recommendation system

    CN106600302A

  • Commodity information search method and device, storage medium and electronic device

    CN111125491A