A product recommendation method, device and storage medium
By constructing a data matrix and performing similarity analysis and information gain calculation, combined with the Naive Bayes algorithm, the problem of low efficiency in historical data analysis of security products was solved, and efficient product recommendation was achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG DAHUA TECH CO LTD
- Filing Date
- 2022-09-26
- Publication Date
- 2026-05-08
AI Technical Summary
Existing technologies have low efficiency in analyzing and calculating historical data for security industry products, resulting in inefficient recommendation methods.
By constructing a first data matrix, similarity analysis is performed to merge functional points, information gain is calculated, and the Naive Bayes algorithm is used to calculate the product recommendation probability, thus selecting the most suitable product functional group.
It significantly reduces the computational workload of product data analysis, improving computational efficiency and the accuracy of recommendations.
Smart Images

Figure CN115599992B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data analysis technology, and in particular to a product recommendation method, apparatus, and storage medium. Background Technology
[0002] The security industry is characterized by a wide variety of products and an exceptionally diverse range of functions. As product functionality becomes increasingly specialized, more and more products, while generally similar, exhibit subtle functional differences, causing confusion for customers when making purchasing decisions. Furthermore, the security industry is characterized by product selection based on industry-specific clients; the most suitable product for the same needs differs across industry clients. Therefore, analyzing historical data on customer product usage scenarios to recommend the most appropriate product for each scenario is crucial. However, recommending the most suitable product for a given scenario requires analyzing a large amount of historical data. Existing recommendation methods rely on data analysis methods that analyze vast amounts of historical data, resulting in low computational efficiency.
[0003] There is currently no effective solution to the problem that the data analysis methods used in existing technologies, which analyze large amounts of historical data, result in low computational efficiency. Summary of the Invention
[0004] This embodiment provides a product recommendation method, apparatus, and storage medium to address the problem that existing data analysis methods suffer from low computational efficiency when analyzing large amounts of historical data.
[0005] Firstly, this embodiment provides a product recommendation method, the method comprising:
[0006] Obtain historical data of the product, and construct a first data matrix based on the historical data; the first data matrix includes the functional points supported by the product;
[0007] A similarity analysis is performed on the first data matrix, and functional points whose similarity meets a set threshold are merged into a first product functional group based on the similarity analysis results.
[0008] Calculate the information gain of the first product function group;
[0009] Based on the information gain, the first product function group is selected to obtain the second product function group;
[0010] Calculate the product recommendation probability of the second product function group, and recommend products based on the product recommendation probability.
[0011] In some embodiments, the matrix element A of the first data matrix ijThis indicates whether product i supports feature point j, where i is a natural number from 1 to M, j is a natural number from 1 to N, M is the number of products, and N is the number of feature points.
[0012] In some embodiments, performing similarity analysis on the first data matrix and merging function points with similarity meeting a set threshold into a first product function group based on the similarity analysis results includes:
[0013] Calculate the similarity between each column vector of the first data matrix, merge the column vectors in the first data matrix whose similarity is greater than a first preset value, and generate a second data matrix. The column vectors of the second data matrix include multiple first product function groups.
[0014] In some embodiments, calculating the information gain of the first product function group includes:
[0015] Calculate the information gain of each column vector of the second data matrix.
[0016] In some embodiments, selecting the first product function group based on the information gain to obtain the second product function group includes:
[0017] Sort the column vectors of the second data matrix according to the information gain;
[0018] Based on the sorting results, select the column vectors in the second data matrix whose information gain meets the preset conditions, and generate the second product function group.
[0019] In some embodiments, calculating the product recommendation probability of the second product feature group includes:
[0020] The applicability and inapplicability probabilities of the product are calculated based on the second product function group, and the recommendation probability of the product is calculated based on the applicability and inapplicability probabilities.
[0021] In some embodiments, calculating the applicability and inapplicability probabilities of the product based on the second product function group includes:
[0022] The applicability and inapplicability probabilities of the product are calculated using the Naive Bayes algorithm based on the second product function group.
[0023] In some embodiments, the matrix element B of the second data matrix ijThis indicates whether product i supports the first product function group j, where i is a natural number from 1 to M, j is a natural number from 1 to N′, M is the number of products, and N′ is the number of first product function groups. Each first product function group includes one or more product function points; the historical data includes the feature data of the product.
[0024] The calculation of the information gain of each column vector of the second data matrix includes:
[0025] A feature vector for the product is generated based on the product's feature data, wherein the element C of the feature vector is... i Indicates the characteristics of product i;
[0026] Calculate the first entropy value based on the feature vector;
[0027] Calculate the second entropy value of the first product function group j based on the second data matrix;
[0028] Based on the first entropy value and the second entropy value, calculate the information gain of each column vector of the second data matrix.
[0029] Secondly, this embodiment provides a product recommendation device, the device comprising:
[0030] An acquisition module is used to acquire historical data of the product and construct a first data matrix based on the historical data; the first data matrix includes the functional points supported by the product.
[0031] The analysis module is used to perform similarity analysis on the first data matrix and merge functional points whose similarity meets a set threshold into a first product functional group based on the similarity analysis results.
[0032] The calculation module is used to calculate the information gain of the first product function group;
[0033] The selection module is used to select the first product function group based on the information gain to obtain the second product function group;
[0034] The recommendation module is used to calculate the product recommendation probability of the second product function group and recommend products based on the product recommendation probability.
[0035] Thirdly, this embodiment provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the product recommendation method described in the first aspect.
[0036] Compared with the prior art, the product recommendation method, apparatus and storage medium provided in this embodiment significantly reduce the amount of computation in the subsequent product data analysis by performing similarity analysis on the first data matrix and calculating the information gain of the first product functional group and selecting the first product functional group according to the information gain, and by using similarity calculation and information gain calculation as screening conditions. This improves the computational efficiency.
[0037] Details of one or more embodiments of this application are set forth in the following drawings and description to make other features, objects and advantages of this application more readily apparent. Attached Figure Description
[0038] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0039] Figure 1 This is a schematic diagram of the hardware structure of a terminal that executes a product recommendation method according to this embodiment;
[0040] Figure 2 This is a flowchart of a product recommendation method according to this embodiment;
[0041] Figure 3 This is a schematic diagram of the preferred structure of the product recommendation system in this embodiment;
[0042] Figure 4 This is a preferred flowchart of the method executed by the historical data analysis module of the product recommendation system in this embodiment;
[0043] Figure 5 This is another preferred flowchart of the method executed by the historical data analysis module of the product recommendation system in this embodiment;
[0044] Figure 6 This is a preferred flowchart of a product recommendation method in this embodiment;
[0045] Figure 7 This is a schematic diagram of the structure of a product recommendation device in this embodiment. Detailed Implementation
[0046] To better understand the purpose, technical solution, and advantages of this application, the application is described and illustrated below in conjunction with the accompanying drawings and embodiments.
[0047] Unless otherwise defined, the technical or scientific terms used in this application shall have the general meaning as understood by one of ordinary skill in the art to which this application pertains. Words such as “a,” “an,” “an,” “the,” “the,” and “these,” used in this application, do not indicate quantitative limitation and may be singular or plural. The terms “comprising,” “including,” “having,” and any variations thereof used in this application are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that comprises a series of steps or modules (units) is not limited to the listed steps or modules (units) but may include steps or modules (units) not listed, or may include other steps or modules (units) inherent to such processes, methods, products, or devices. The terms “connected,” “linked,” and “coupled,” used in this application, are not limited to physical or mechanical connections but may include electrical connections, whether direct or indirect. The term “multiple” used in this application refers to two or more. The "and / or" operator describes the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: A alone, A and B simultaneously, and B alone. Typically, the character " / " indicates that the objects before and after it are in an "or" relationship. The terms "first," "second," and "third," etc., used in this application are merely for distinguishing similar objects and do not represent a specific ordering of the objects.
[0048] The method embodiments provided in this example can be executed on a terminal, computer, or similar computing device. For example, it can run on a terminal. Figure 1 This is a schematic diagram of the hardware structure of a terminal executing a product recommendation method according to this embodiment. Figure 1 As shown, a terminal may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 and a memory 104 for storing data are also included. The processor 102 may be, but is not limited to, a microprocessor (MCU) or a programmable logic device (FPGA). The terminal may also include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that… Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the terminal described above. For example, the terminal may also include components that are larger than... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown are illustrated.
[0049] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to a product recommendation method in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thereby implementing the aforementioned method. The memory 104 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0050] The transmission device 106 is used to receive or send data via a network. This network includes a wireless network provided by the terminal's communication provider. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 can be a Radio Frequency (RF) module used for wireless communication with the Internet.
[0051] This embodiment provides a product recommendation method. Figure 2 This is a flowchart of a product recommendation method according to this embodiment, such as... Figure 2 As shown, the process includes the following steps:
[0052] Step S210: Obtain historical data of the product and construct a first data matrix based on the historical data; the first data matrix includes the functional points supported by the product.
[0053] Specifically, historical data of the product is acquired, and a first data matrix is constructed based on this historical data. This historical data includes the functionalities supported by the product.
[0054] More specifically, let the matrix elements of the first data matrix be A. ij A ij This indicates whether product i supports feature point j, where i is a natural number from 1 to M, j is a natural number from 1 to N, M is the number of products, and N is the number of feature points. For example, when product i supports feature point j, A... ij Set to 1, when product i does not support feature point j, set A ij Set to 0.
[0055] Step S220: Perform similarity analysis on the first data matrix, and merge the functional points whose similarity meets the set threshold into the first product functional group based on the similarity analysis results.
[0056] Specifically, the similarity between each column vector of the first data matrix is calculated, and the column vectors in the first data matrix with a similarity greater than a first preset value are merged to generate a second data matrix. The column vectors of the second data matrix include multiple first product function groups.
[0057] More specifically, let the matrix elements of the second data matrix be B. ij B ij This indicates whether product i supports the first product function group j, where i is a natural number from 1 to M, j is a natural number from 1 to N′, M is the number of products, and N′ is the number of first product function groups. Each first product function group includes one or more product function points. For example, B... ij A value of 1 indicates that product i supports the first product function group j, B ij A value of 0 indicates that product i does not support the first product function group j.
[0058] Step S230: Calculate the information gain of the first product function group.
[0059] Specifically, the information gain of each column vector of the second data matrix is calculated, and the information gain of each column vector of the second data matrix is the information gain of each first product function group.
[0060] Step S240: Select the first product function group based on information gain to obtain the second product function group.
[0061] Specifically, based on the information gain of each column vector of the second data matrix calculated in step S230, the first product function groups are sorted. That is, the column vectors of the second data matrix are sorted according to their information gain. Based on the sorting result, column vectors in the second data matrix whose information gain satisfies a preset condition are selected to obtain the second product function groups. For example, selecting column vectors in the second data matrix whose information gain satisfies the preset condition to obtain the second product function groups can be done by selecting column vectors whose information gain satisfies a second preset value; or by sorting the column vectors in the second data matrix from largest to smallest according to their information gain, and selecting the column vectors in the first N″ positions to obtain the second product function groups. Here, N″ is a natural number greater than 1 and less than N′.
[0062] More specifically, the column vectors of the second data matrix are sorted according to their information gain. Based on the sorting result, column vectors in the second data matrix whose information gain satisfies a preset condition are selected to generate the third data matrix, thus obtaining the second product function group. Let the matrix elements of the third data matrix be C. ij C ij This indicates whether product i supports the second product function group j, where i is a natural number from 1 to M, j is a natural number from 1 to N″, M is the number of products, and N″ is the number of second product function groups. Each second product function group includes one or more product function points. The second product function group is the first product function group selected from the second data matrix that meets the preset conditions.
[0063] Step S250: Calculate the product recommendation probability of the second product function group, and recommend products based on the product recommendation probability.
[0064] Specifically, the product recommendation probability of the second product function group obtained in step S240 is calculated, and products are recommended based on the product recommendation probability.
[0065] More specifically, based on the second product function group, the Naive Bayes algorithm is used to calculate the applicability probability and inapplicability probability of the product, and the recommendation probability of the product is calculated based on the applicability probability and inapplicability probability.
[0066] Through the above steps, this embodiment performs similarity analysis on the first data matrix and calculates the information gain of the first product function group, and selects the first product function group based on the information gain. Calculating similarity and information gain as screening conditions significantly reduces the computational load of product data analysis in subsequent steps and improves computational efficiency.
[0067] In some embodiments, the historical data includes product feature data, and calculating the information gain of each column vector of the second data matrix includes: generating a feature vector of the product based on the product feature data, wherein the elements D of the feature vector... i The first entropy value is calculated based on the feature vector of product i; the second entropy value of the first product functional group j is calculated based on the second data matrix; and the information gain of each column vector of the second data matrix is calculated based on the first entropy value and the second entropy value.
[0068] The present embodiment will now be described and illustrated through preferred embodiments.
[0069] Figure 3 This is a schematic diagram of a preferred structure of the product recommendation system in this embodiment, as shown below. Figure 3 As shown, the product recommendation system includes a historical data analysis module 310 and a product selection module 320.
[0070] Figure 4This is a preferred flowchart of the method executed by the historical data analysis module of the product recommendation system in this embodiment, as follows: Figure 4 As shown, the method includes the following steps:
[0071] Step S410: Analyze customer product selection behavior, product usage scenario information, and historical data on usage evaluations to establish a structured data model.
[0072] Step S420: Perform similarity calculation and analysis on the structured data to obtain the correlation between different product function points, and merge product functions into product function groups.
[0073] Step S430: Calculate the information gain for each of the obtained product function groups and use it as a weight to influence the product applicability calculation index.
[0074] Step S440: Perform product applicability calculation and analysis on the product function groups after information gain filtering to obtain the product function point optimization results under each standard scenario, and transmit the product function point optimization results to the product selection module 320.
[0075] The above step S410 is specifically as follows:
[0076] Step S411: Collect customer historical data.
[0077] Specifically, the customer's historical data includes: product part number, product features, usage scenarios, user ratings, customer industry, and other data.
[0078] Step 412: Structure the historical data, take the union of product function points, and denote 1 as the product supports the function point and 0 as the product does not support the function point. Take the product user evaluation, and denote 1 as a positive review and 0 as a negative review. Take the customer industry and mark different industries with numbers 1, 2, ... to form a single product function point data matrix C. The data in the product function point data matrix C is shown in Table 1.
[0079] Table 1 Product Function Point Data Matrix C Data Diagram
[0080]
[0081] Step 413: Form multiple data matrices according to different usage scenarios.
[0082] The above step S420 is specifically as follows:
[0083] Step S421: Take a single data matrix under the usage scenario. Based on the product function point data matrix C, transpose the product function point data matrix C to obtain the function point product distribution matrix F, as shown in Table 2.
[0084] Table 2 Function Point Product Distribution Matrix F Data Diagram
[0085] Product 1 Product 2 Product 3 Product 4 … Product M Function Point 1 1 1 0 0 … 0 Function Point 2 1 1 0 0 … 0 Function Point 3 0 0 1 1 … 1 Function Point 4 1 1 0 1 … 0 Function Point 5 1 0 1 1 … 1 … … … … … … … Function Point N 1 0 0 1 … 1
[0086] Step S422: Optimize the combination of functional points through similarity calculation, grouping functional points with the same product distribution into functional groups. The specific steps are as follows:
[0087] Step S4221: F (N,M) Split into N row vectors F (1,M) Calculate the similarity S between each row vector. ab ,in,
[0088] Step S4222: When S ab When ≥0.95, record the row vector F. a(1,M) and row vector F b(1,M) Otherwise, it will not be processed;
[0089] Step S4223: Combine function point a and function point b into function group ab, where function group ab takes the value of the first reference function point a;
[0090] Step S423: Replace the original data matrix with functional groups to obtain a brand-new functional group product distribution matrix F′, as shown in Table 3.
[0091] Table 3. Functional Group Product Distribution Matrix F′ Data Diagram
[0092] Product 1 Product 2 Product 3 Product 4 … Product M Functional group ab 1 1 0 0 … 0 Function Point 3 0 0 1 1 … 1 Function Point 4 1 1 0 1 … 0 Function Point 5 1 0 1 1 … 1 … … … … … … … Function point N′ 1 0 0 1 … 1
[0093] The above step S430 is specifically as follows:
[0094] Step S431: Transpose the product distribution matrix F′ of the functional group to obtain the product functional group data matrix C′. Use the 0 / 1 values of the negative / positive review column as the criterion for judging whether the product is suitable, as shown in Table 4.
[0095] Table 4. Data Matrix C′ of Product Function Groups (Diagram)
[0096] Functional group ab Function Point 3 Function Point 4 Function Point 5 … Function point N′ evaluate Product 1 1 0 1 1 … 1 1 Product 2 1 0 1 0 … 0 0 Product 3 0 1 0 1 … 0 1 Product 4 0 1 1 1 … 1 0 … … … … … … … … Product M 0 1 0 1 … 1 1
[0097] Step S432: Calculate the entropy value E of customer satisfaction;
[0098] in, C′(i,N′+1) represents the evaluation data.
[0099] Step S433: Based on the distribution of functional group n′ in the products, split C′ into C1′ and C2′, where C1′ is the matrix of products that satisfy functional group n′ and C2′ is the matrix of products that do not satisfy functional group n′.
[0100] Step S434: Calculate the entropy value I(n′) of each functional group;
[0101] in,
[0102] Step S435: Calculate the information gain G(n′) of each functional group;
[0103] Where G(n′)=EI(n′).
[0104] Step S436: Sort the function points according to information gain, delete function points or function groups with low information gain, and readjust the matrix.
[0105] The above step S440 is specifically as follows:
[0106] Step S441: Use the product function group distribution matrix after filtering the function groups as the product function group data matrix C″, and use the 0 / 1 values of the negative / positive review column as the judgment criteria for whether the product is suitable, as shown in Table 5.
[0107] Table 5. Data Matrix C″ of Product Function Groups (Data Diagram)
[0108] Functional group ab Function Point 3 Function Point 4 … Function Point N evaluate Product 1 1 0 1 … 1 1 Product 2 1 0 1 … 0 0 Product 3 0 1 0 … 0 1 Product 4 0 1 1 … 1 0 … … … … … … … Product M 0 1 0 … 1 1
[0109] Step S442: Calculate the probability P of supporting each functional point, taking industry as the dimension. n and the probability P′ of not supporting each function point n ; Calculate the probability P of positive reviews for the product set. g And the probability P of negative reviews b ; Calculate the probability P of supporting each feature under the premise of positive reviews. gn and the probability P′ of not supporting each function point gn ; Calculate the probability P of supporting each feature under the premise of negative reviews. bn and the probability P′ of not supporting each function point bn ;
[0110] in,
[0111] Step S443: Use the Naive Bayes method to analyze the probability of product applicability under all combinations, and obtain the applicability probability P. y With the probability of inapplicability P c The ratio;
[0112] in,
[0113] The formula above specifies the following: when a product supports function point n, calculate the above P.y With P c At that time, P′ n 、P′ gn 、P′ bn All are 1; similarly, when a product does not support feature point n, calculate the above P. y With P c At that time, P n P gn P bn All are 1.
[0114] Step S444: When the applicable probability P y Greater than the probability of inapplicability P c At that time, that is At that time, the product is not recommended. At that time, products can be recommended, and product information can be imported into the product selection module 320.
[0115] Figure 5 This is another preferred flowchart of the method executed by the historical data analysis module of the product recommendation system in this embodiment, as follows: Figure 5 As shown, the method includes the following steps:
[0116] Step S501: Collect customer historical data;
[0117] Step S502: Structure the historical data and convert it into a data matrix;
[0118] Step S503: Based on different usage scenarios, split the data into multiple data matrix tables;
[0119] Step S504: Transpose the product function point data matrix into a function point product distribution matrix;
[0120] Step S505: Group functional points with the same product distribution into functional groups through similarity calculation;
[0121] Step S506: Replace the original function points with function groups to obtain a brand-new function group product distribution matrix;
[0122] Step S507: Calculate the information gain of each function point based on the function point distribution and customer evaluation, and then filter the function points;
[0123] Step S508: Transpose the functional group product distribution matrix into a product functional group data matrix, and use product evaluation as the criterion for judging product applicability.
[0124] Step S509: Use the Naive Bayes method to perform data analysis on the probability of product applicability under all combinations of each function point and function group, and calculate the probability values of applicability and inapplicability.
[0125] Step S510: Determine whether the ratio of the applicable probability to the inapplicable probability is greater than 1; if yes, proceed to step S511; if no, proceed to step S512.
[0126] Step S511: Import product information into product selection module 320;
[0127] Step S512, product not recommended.
[0128] Figure 6 This is a preferred flowchart of a product recommendation method according to this embodiment, which is applied to... Figure 3 The product recommendation system shown includes the following steps:
[0129] Step S601: The customer logs into the product selection module 320 and selects a standardized scenario;
[0130] Step S602: The product selection module 320 confirms the customer's industry based on the customer information and displays the data input from the historical data analysis module 310 through standardized scenarios;
[0131] Step S603: Based on the probability ratio of product applicability to product inapplicability, the product selection module 320 displays the available product set from high to low;
[0132] Step S604: When a customer has a custom requirement for a certain function, the product selection module 320 filters and displays products that meet the customer's requirements from the available product set;
[0133] Step S605: The customer completes the purchase, and the product selection module 320 records the purchase data;
[0134] Step S606: When the customer completes the product evaluation later, the product selection module 320 will transfer the selection data and product evaluation data to the historical data analysis module 310 to complete the dynamic automatic update of the data.
[0135] The historical data analysis module 310 collects historical data, structures the data, and uses similarity calculation analysis to improve the independence of each functional point. Then, it classifies functional points and functional groups using information gain, eliminating functional points with low impact on decision-making. Finally, it uses Naive Bayes for data analysis to output the most suitable product for standard scenarios. The product selection module 320, as a data display and collection module, receives the data results processed by the historical data analysis module 310 and provides guidance information for customers when actually selecting products, serving as the external business window. Simultaneously, customer usage data for selected products is also returned to the historical data analysis module 310 for data support.
[0136] It should be noted that the steps shown in the above process or in the flowchart of the accompanying figures can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0137] This embodiment also provides a product recommendation device for implementing the above embodiments and preferred embodiments; details already described will not be repeated. The terms "module," "unit," "subunit," etc., used below refer to combinations of software and / or hardware that perform a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0138] Figure 7 This is a schematic diagram of the structure of a product recommendation device according to this embodiment, as shown below. Figure 7 As shown, the device includes:
[0139] The acquisition module 710 is used to acquire historical data of the product and construct a first data matrix based on the historical data; the first data matrix includes the functional points supported by the product.
[0140] Analysis module 720 is used to perform similarity analysis on the first data matrix and merge functional points whose similarity meets a set threshold into a first product functional group based on the similarity analysis results.
[0141] Calculation module 730 is used to calculate the information gain of the first product function group;
[0142] Selection module 740 is used to select the first product function group based on information gain to obtain the second product function group;
[0143] The recommendation module 750 is used to calculate the product recommendation probability of the second product function group and recommend products based on the product recommendation probability.
[0144] It should be noted that the above modules can be functional modules or program modules, and can be implemented through software or hardware. For modules implemented through hardware, the above modules can reside in the same processor; or the above modules can be located in different processors in any combination.
[0145] This embodiment also provides an electronic device including a memory and a processor, the memory storing a computer program and the processor being configured to run the computer program to perform the steps in any of the above method embodiments.
[0146] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.
[0147] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:
[0148] S1. Obtain the product's historical data and construct a first data matrix based on the historical data; the first data matrix includes the functionalities supported by the product.
[0149] S2, perform similarity analysis on the first data matrix, and merge the functional points whose similarity meets the set threshold into the first product functional group based on the similarity analysis results;
[0150] S3, calculate the information gain of the first product function group;
[0151] S4. Based on information gain, select the first product function group to obtain the second product function group;
[0152] S5, calculate the product recommendation probability of the second product function group, and recommend products based on the product recommendation probability.
[0153] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated in this embodiment.
[0154] Furthermore, in conjunction with the product recommendation method provided in the above embodiments, this embodiment can also provide a storage medium for implementation. The storage medium stores a computer program; when executed by a processor, the computer program implements the steps of any of the product recommendation methods in the above embodiments.
[0155] It should be understood that the specific embodiments described herein are merely illustrative of the application and not intended to limit it. All other embodiments derived by those skilled in the art based on the embodiments provided in this application without inventive effort are within the scope of protection of this application.
[0156] Obviously, the accompanying drawings are merely some examples or embodiments of this application. Those skilled in the art can apply this application to other similar situations based on these drawings without any creative effort. Furthermore, it is understood that although the work done in this development process may be complex and lengthy, for those skilled in the art, certain design, manufacturing, or production modifications made based on the technical content disclosed in this application are merely conventional technical means and should not be considered as insufficient disclosure of this application.
[0157] The term "embodiment" in this application refers to a specific feature, structure, or characteristic described in connection with an embodiment that may be included in at least one embodiment of this application. The appearance of this phrase in various places in the specification does not necessarily imply the same embodiment, nor does it imply that it is mutually exclusive with or independent of other embodiments. It will be clearly or implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments without conflict.
[0158] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of patent protection. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the appended claims.
Claims
1. A product recommendation method, characterized in that, The method includes: Obtain historical data of the product, and construct a first data matrix based on the historical data; the first data matrix includes the functional points supported by the product; A similarity analysis is performed on the first data matrix, and functional points whose similarity meets a set threshold are merged into a first product functional group based on the similarity analysis results. Calculate the information gain of the first product function group; Based on the information gain, the first product function group is selected to obtain the second product function group; Calculate the product recommendation probability of the second product function group, and recommend products based on the product recommendation probability; Matrix elements of the first data matrix This indicates whether product i supports feature point j, where i is a natural number from 1 to M, j is a natural number from 1 to N, M is the number of products, and N is the number of feature points; A similarity analysis is performed on the first data matrix. Based on the similarity analysis results, functional points with similarity scores meeting a set threshold are merged into a first product functional group, including: Calculate the similarity between each column vector of the first data matrix, merge the column vectors in the first data matrix whose similarity is greater than a first preset value, and generate a second data matrix. The column vectors of the second data matrix include multiple first product function groups. Matrix elements of the second data matrix This indicates whether product i supports the first product function group j, where i is a natural number from 1 to M, and j is a number from 1 to M. A natural number, where M is the quantity of products, and... The number of first product function groups, each first product function group includes one or more product function points; the historical data includes the feature data of the product. Calculating the information gain of the first product function group includes: Generate a feature vector for the product based on its feature data, wherein the elements of the feature vector are... Indicates the characteristics of product i; Calculate the first entropy value based on the feature vector; Calculate the second entropy value of the first product function group j based on the second data matrix; Based on the first entropy value and the second entropy value, calculate the information gain of each column vector of the second data matrix.
2. The product recommendation method according to claim 1, characterized in that, The step of selecting the first product function group based on the information gain to obtain the second product function group includes: Sort the column vectors of the second data matrix according to the information gain; Based on the sorting results, select the column vectors in the second data matrix whose information gain meets the preset conditions, and generate the second product function group.
3. The product recommendation method according to claim 2, characterized in that, The calculation of the product recommendation probability for the second product function group includes: The applicability and inapplicability probabilities of the product are calculated based on the second product function group, and the recommendation probability of the product is calculated based on the applicability and inapplicability probabilities.
4. The product recommendation method according to claim 3, characterized in that, The step of calculating the applicability and inapplicability probability of the product based on the second product function group includes: The applicability and inapplicability probabilities of the product are calculated using the Naive Bayes algorithm based on the second product function group.
5. A product recommendation device, characterized in that, The device includes: An acquisition module is used to acquire historical data of the product and construct a first data matrix based on the historical data; the first data matrix includes the functional points supported by the product. The analysis module is used to perform similarity analysis on the first data matrix and merge functional points whose similarity meets a set threshold into a first product functional group based on the similarity analysis results. The calculation module is used to calculate the information gain of the first product function group; The selection module is used to select the first product function group based on the information gain to obtain the second product function group; The recommendation module is used to calculate the product recommendation probability of the second product function group and recommend products based on the product recommendation probability. Matrix elements of the first data matrix This indicates whether product i supports feature point j, where i is a natural number from 1 to M, j is a natural number from 1 to N, M is the number of products, and N is the number of feature points; The analysis module is also used to calculate the similarity between each column vector of the first data matrix, merge the column vectors in the first data matrix whose similarity is greater than a first preset value, and generate a second data matrix. The column vectors of the second data matrix include multiple first product function groups. Matrix elements of the second data matrix This indicates whether product i supports the first product function group j, where i is a natural number from 1 to M, and j is a number from 1 to M. A natural number, where M is the quantity of products, and... The number of first product function groups, each first product function group includes one or more product function points; the historical data includes the feature data of the product. The calculation module is further configured to generate a feature vector of the product based on the product's feature data, wherein the elements of the feature vector are... The features of product i are represented; a first entropy value is calculated based on the feature vector; a second entropy value of the first product functional group j is calculated based on the second data matrix; and the information gain of each column vector of the second data matrix is calculated based on the first entropy value and the second entropy value.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the product recommendation method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Collaborative filtering method for personalized recommendation fusion content and behavior
CN108205682A
Hybrid collaborative filtering recommendation algorithm based on user clustering and commodity clustering
CN114741603A