A personalized recommendation method, system and electronic device
By constructing a decision tree model and optimizing node splitting, and utilizing information entropy and gain to select feature attributes, the high complexity and low accuracy problems of personalized recommendation schemes are solved, achieving efficient and low-power personalized recommendations, and improving the accuracy and completeness of recommendations.
Patent Information
- Application Number
- CN202211320827.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-26
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2042-10-26
AI Technical Summary
Current personalized recommendation solutions suffer from high computational complexity, low accuracy, and low completeness, making it difficult to meet users' demands for highly accurate and complete personalized recommendations.
By constructing a decision tree model and using information entropy and information gain to select feature attributes, a low-complexity personalized recommendation system is established. Preset thresholds are set based on user search frequency and browsing count to optimize node splitting and data retrieval in the decision tree model.
It achieves personalized recommendations with low computational complexity, high accuracy, and high completeness, reduces system power consumption and computational pressure, improves the intelligence and usability of personalized recommendations, simplifies system architecture, and reduces production, installation, and maintenance costs.
Smart Images

Figure CN115600002B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of personalized recommendation methods, and specifically discloses a personalized recommendation method, system, and electronic device. Background Technology
[0002] With the rapid development and widespread adoption of mobile technology and 5G networks, massive amounts of data are constantly being generated across various industries. As this data accumulates and becomes more refined, its research and utilization value becomes increasingly apparent. Users' demands for accuracy and completeness in data recommendations are also constantly rising. Therefore, personalized recommendations are particularly important. However, current personalized recommendation solutions are increasingly complex, placing greater pressure on system computation and increasing energy consumption. Different complex algorithms are often required to achieve personalized recommendations for different user data requests. Furthermore, design flaws in algorithms and parameters can lead to inaccurate and incomplete server-recommended data. Current personalized recommendation systems lack low computational complexity, high accuracy, high completeness, and high applicability.
[0003] Therefore, the existing technology still needs further development and improvement. Summary of the Invention
[0004] To address the shortcomings of existing technologies and solve the aforementioned problems, this invention proposes a personalized recommendation method, system, and electronic device with low computational complexity, high accuracy, high completeness, and high applicability. The invention provides the following technical solution:
[0005] According to a first aspect of the present invention, a personalized recommendation method is provided, the method comprising:
[0006] Acquire user search data, which includes the terms the user has searched for and the number of times each term has been searched;
[0007] A personalized term sequence is constructed based on the terms the user has searched and the number of times each term has been searched. The terms in the personalized term sequence are then arranged in descending order of the number of views and assigned corresponding preset priorities according to a preset recommendation priority sequence.
[0008] The server uses each word in the user's personalized word sequence as the root node according to the preset priority to build each decision tree model. The server calls the feature attribute set related to each word and calculates the information entropy of each feature attribute in each feature attribute set. The feature attribute with the largest information entropy is used as the first layer node of each decision tree model and the information entropy of the first layer node is calculated to see if it is greater than the preset threshold.
[0009] When the information entropy exceeds a preset threshold, the server calculates the information gain of each remaining feature attribute in the current feature attribute set, selects the feature attribute with the largest information gain as the second-layer node of each decision tree model, calculates the conditional entropy of the second-layer node, and determines whether the conditional entropy is greater than the preset threshold. If the conditional entropy is still greater than the preset threshold, the server recursively uses the feature attribute with the largest information gain among the remaining feature attributes in each feature attribute set as the third-layer node, and then recursively constructs subsequent layer nodes of each decision tree model based on the information gain. After constructing each layer node, the server calculates the conditional entropy and information gain until the conditional entropy is less than the preset threshold. At this point, the server stops building subsequent layer nodes and calls the relevant datasets in the backend database to merge and organize the relevant data sets of each term based on the feature attributes of each layer node of the decision tree model of each term, and then recommends them to the user.
[0010] Furthermore, the preset recommendation priority sequence includes:
[0011] The preset recommendation priority sequence is arranged in descending order of recommendation priority.
[0012] Furthermore, the method also includes:
[0013] The preset thresholds are set to different levels from low to high based on the recommendation priority of the entries.
[0014] Furthermore, the method also includes:
[0015] When the information entropy or conditional entropy falls below a preset threshold at any given time, the server stops building subsequent layer nodes and, based on the characteristic attributes of each layer node, merges the datasets and recommends them to the user according to a preset recommendation priority sequence.
[0016] Furthermore, the step of calling the data set based on the established feature attributes of each layer of nodes includes:
[0017] The server iterates through the backend database and retrieves relevant data based on all the feature attributes of each node in the established decision tree model, then organizes the relevant data into a data set for each personalized term.
[0018] Furthermore, the process of organizing and recommending the relevant data sets of each term to the user includes:
[0019] The server will arrange the data sets of each term in the database according to the preset recommendation priority sequence from top to bottom, and then recommend them to the user.
[0020] Furthermore, the method also includes:
[0021] If, after arranging each term in the personalized term sequence according to the number of views from high to low according to the preset recommendation priority sequence and corresponding to the preset threshold of the corresponding level, there are still terms that do not have a preset threshold corresponding to their level, then the highest level threshold value in the preset thresholds for that term is used.
[0022] Furthermore, the method also includes:
[0023] The user-personalized term sequence includes at least one term that the user has searched.
[0024] According to a second aspect of the present invention, a personalized recommendation system is provided, the personalized recommendation system comprising:
[0025] The acquisition module is used to acquire user search data, which includes the terms the user has searched for and the number of times each term has been searched;
[0026] The server constructs a personalized term sequence for each user based on the terms they have searched and the number of times each term has been searched. The personalized term sequence is then assigned a corresponding preset priority according to the number of views, from highest to lowest.
[0027] Alternatively, each word in the user's personalized word sequence can be used as the root node to build each decision tree model according to a preset priority. The server calls the feature attribute set related to each word and calculates the information entropy of each feature attribute in each feature attribute set. The feature attribute with the largest information entropy is used as the first-level node of each decision tree model, and the information entropy of the first-level node is calculated to see if it is greater than a preset threshold.
[0028] Alternatively, when the information entropy exceeds a preset threshold, the server calculates the information gain of each remaining feature attribute in the current feature attribute set, selects the feature attribute with the largest information gain as the second-layer node of each decision tree model, calculates the conditional entropy of the second-layer node, and determines whether the conditional entropy is greater than the preset threshold. If the conditional entropy is still greater than the preset threshold, the server recursively uses the feature attribute with the largest information gain among the remaining feature attributes in each feature attribute set as the third-layer node, and then recursively constructs the subsequent layer nodes of each decision tree model based on the information gain. After constructing each layer node, the server calculates the conditional entropy and information gain until the conditional entropy is less than the preset threshold. At this point, the server stops building subsequent layer nodes and calls the relevant datasets in the backend database to merge and organize the relevant data sets of each term based on the feature attributes of each layer node of the decision tree model of each term. The server then recommends the relevant data sets of each term to the user.
[0029] The backend database is used to store various types of data for the server to access.
[0030] According to a third aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0031] A memory; and a processor, wherein the memory stores computer-readable instructions that, when executed by the processor, implement the personalized recommendation method according to any one of claims 1 to 8.
[0032] The beneficial effects of this invention are:
[0033] 1. This invention can constrain the conditional entropy of personalized terms with different search frequencies by setting different preset thresholds. The higher the information entropy or conditional entropy, the higher the uncertainty of the information contained in the decision tree model of the current term. It is necessary to further split the feature attributes of the last layer node of the decision tree model of the current term. The higher the search frequency of a user for a certain personalized term, the lower the corresponding preset threshold. When the information entropy or conditional entropy is lower than the preset threshold, the server completes the establishment of the decision tree model and calls the relevant data set of the backend database through the decision tree model. That is, the information entropy or conditional entropy is limited to a lower level, so as to realize highly intelligent personalized recommendations for users with higher certainty, more complete and clearer data. That is, users can obtain clearer, more complete and less uncertain data through this server. This design can increase the preset threshold when the frequency of user search for terms is not high, reduce the data analysis requirements, greatly improve the intelligence level of the invention, reduce system complexity and computational pressure, greatly reduce system power consumption, and greatly expand the application scenarios of the invention.
[0034] 2. This invention can analyze information gain and build decision tree models in real time based on the information gain of each feature attribute of each term in a personalized term sequence. It can use the feature attribute with the largest information gain as the root node, and then recursively use the feature attribute with the largest information gain among the remaining feature attributes in each feature attribute set as the second-level node. This process continues recursively, using information gain to build subsequent layers of the decision tree model. After each layer is built, the conditional entropy is calculated until it is less than a preset threshold. The feature attribute that maximizes information gain (i.e., minimizes information uncertainty) is then used as the node in the decision tree model. This enables intelligent splitting and extension of the feature attributes of the nodes in the intelligent tree model of the user's search term, improving the accuracy and completeness of retrieving relevant data sets from the backend database using the feature attributes of each node in the intelligent tree model of the search term. This significantly improves the accuracy and completeness of personalized recommendation data, making it easier for users to solve problems. It achieves highly accurate, highly complete, and highly applicable personalized recommendations, greatly expanding the application scenarios of this invention.
[0035] 3. This invention calculates the current information entropy and conditional entropy after each node is established; only when the information entropy or conditional entropy is less than a preset threshold at any time, the server stops establishing subsequent layer nodes and calls the dataset to merge according to the feature attributes of each established layer node, and recommends it to the user according to the preset recommendation priority sequence. This can greatly improve the integrity and accuracy of information and further improve the usability of this invention.
[0036] 4. This invention can achieve personalized recommendations for the data used in the call using only an algorithm, with low complexity, high accuracy, high completeness, high reliability, and high applicability. It realizes personalized data recommendations with low system complexity, high completeness, and high accuracy without the need for complex systems and modeling calculations. While ensuring the quality of personalized recommendations, it greatly simplifies the system architecture, significantly reduces the system production, installation, and maintenance costs, and greatly improves enterprise efficiency.
[0037] 5. In this invention, after arranging each term in the personalized term sequence according to the number of views from high to low according to the preset recommendation priority sequence and corresponding to the preset threshold of the corresponding level, if there are still terms that do not have a preset threshold corresponding to the corresponding level, then the term corresponds to the highest level threshold value in the preset threshold. This optimizes the program architecture, further reduces the computational pressure of the personalized recommendation system, saves time costs to a great extent, and realizes the low-power and high-reliability operation of the personalized recommendation system. Attached Figure Description
[0038] Figure 1 This is a flowchart of the personalized recommendation method in a specific embodiment of the present invention;
[0039] Figure 2 This is a schematic diagram of a personalized recommendation method in another specific embodiment of the present invention;
[0040] Figure 3 This is a block diagram illustrating the principle of a personalized recommendation system in a specific embodiment of the present invention. Detailed Implementation
[0041] To enable those skilled in the art to better understand the technical solutions of the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Based on the embodiments in this application, other similar embodiments obtained by those skilled in the art without creative effort should all fall within the scope of protection of this application. Furthermore, directional terms mentioned in the following embodiments, such as "up," "down," "left," and "right," are only for reference to the directions in the accompanying drawings; therefore, the directional terms used are for illustrative purposes and not for limiting the invention.
[0042] The present invention will be further described below with reference to the accompanying drawings and preferred embodiments.
[0043] Please see Figure 1 This invention provides a personalized recommendation method, comprising:
[0044] S100. Obtain user search data, which includes the terms the user has searched for and the number of times each term has been searched.
[0045] It should be noted that the personalized recommendation system of the present invention has a pre-set acquisition module for acquiring user search data; the user search data includes the terms that the user has searched and the number of times each term has been searched, and the user search data is sent to the server; providing a data foundation for subsequent data analysis by the server.
[0046] S200: Construct a personalized term sequence based on the terms the user has searched and the number of times each term has been searched, and arrange the terms in the personalized term sequence in descending order of the number of views, and assign them corresponding preset priorities according to the preset recommendation priority sequence.
[0047] It should be noted that the preset recommendation priority sequence is arranged in descending order of priority. The preset recommendation priority sequence includes a first preset priority, a second preset priority, a third preset priority, a fourth preset priority, a fifth preset priority, a sixth preset priority, a seventh preset priority, an eighth preset priority, a ninth preset priority, and a tenth preset priority. The terms in the user-personalized term sequence are arranged in descending order of view count, corresponding to the first, second, third, fourth, fifth, sixth, seventh, eighth, ninth, and tenth recommendation priorities. If, after arranging the terms in the personalized term sequence in descending order of view count according to the preset recommendation priority sequence and corresponding to the corresponding preset recommendation priority level, and still some terms do not have a corresponding preset recommendation priority level, then that term corresponds to the highest preset recommendation priority value, i.e., that term corresponds to the tenth recommendation priority. This setting allows the personalized term sequence to be sorted according to the number of times users have viewed it. This sorting method provides a sorting method for the server to call relevant data sets from the backend database based on the decision tree model built for each term. This enables users to browse the relevant data sets from the backend database calculated based on the terms most frequently searched by the user first, improving the user experience and allowing users to obtain information more efficiently, conveniently, and accurately. This greatly enhances the intelligence and usability of the invention.
[0048] S300: The server uses each term in the user's personalized term sequence as the root node in order of preset priority to build each decision tree model. The server calls the feature attribute set related to each term and calculates the information entropy of each feature attribute in each feature attribute set. The feature attribute with the largest information entropy is used as the first layer node of each decision tree model and the information entropy of the first layer node is calculated to see if it is greater than the preset threshold.
[0049] It should be noted that, taking the term "watermelon" as an example, its feature attributes can include "color," "stem," "sound," "texture," "navel," and "touch." The preset thresholds include a first preset threshold, a second preset threshold, a third preset threshold, a fourth preset threshold, a fifth preset threshold, a sixth preset threshold, a seventh preset threshold, an eighth preset threshold, a ninth preset threshold, and a tenth preset threshold. These thresholds are set sequentially from smallest to largest, with the first preset threshold being the smallest and the tenth preset threshold being the largest. The first preset threshold is set when building the decision tree model for terms with the first recommendation priority, the second preset threshold is set when building the decision tree model for terms with the second recommendation priority, the third preset threshold is set when building the decision tree model for terms with the third recommendation priority, the fourth preset threshold is set when building the decision tree model for terms with the fourth recommendation priority, and so on. When building a decision tree model for a term, a fifth preset threshold is set. Similarly, for terms with the sixth recommendation priority, a sixth preset threshold is set; for terms with the seventh recommendation priority, a seventh preset threshold is set; for terms with the eighth recommendation priority, an eighth preset threshold is set; for terms with the ninth recommendation priority, a ninth preset threshold is set; and for terms with the tenth recommendation priority, a tenth preset threshold is set. If, after arranging each term in the personalized term sequence according to its browsing count from highest to lowest, and corresponding it to the preset threshold of the corresponding level, there are still terms without a corresponding preset threshold, then the highest level threshold value in the preset thresholds is used for that term. That is, when building the decision tree model for that term and subsequent priority terms, a tenth preset threshold is set. This setting optimizes the program architecture, further reduces the computational pressure on the personalized recommendation system, significantly saves time costs, and achieves low-power, high-reliability operation of the personalized recommendation system.This setting allows for the constraint of conditional entropy or information entropy on personalized terms searched at different frequencies by users through different preset thresholds. Higher information entropy or conditional entropy indicates greater uncertainty in the decision tree model of the current term, necessitating further splitting of the feature attributes of the last layer node in the decision tree model. Furthermore, the higher the user's search frequency for a particular personalized term, the lower the corresponding preset threshold. Only when the information entropy or conditional entropy falls below the preset threshold does the server complete the establishment of the decision tree model and call relevant data sets from the backend database through the decision tree model, thus limiting the information entropy or conditional entropy to a lower level. This allows users to obtain more certain, complete, and clearer data. In other words, users can obtain clearer, more complete, and less uncertain data through this server. This design increases the preset threshold when the user's search frequency is low, reducing data analysis requirements, significantly improving the intelligence level of the invention, reducing system complexity and computational pressure, greatly reducing system power consumption, and significantly expanding the application scenarios of the invention.
[0050] S400. When the information entropy is greater than the preset threshold, the server calculates the information gain of each remaining feature attribute in the current feature attribute set, selects the feature attribute with the largest information gain as the second-layer node of each decision tree model, calculates the conditional entropy of the second-layer node, and determines whether the conditional entropy is greater than the preset threshold. If the conditional entropy is still greater than the preset threshold, the server recursively uses the feature attribute with the largest information gain among the remaining feature attributes in each feature attribute set as the third-layer node, and then recursively constructs the subsequent layer nodes of each decision tree model based on the information gain. After constructing each layer node, the server calculates the conditional entropy and information gain until the conditional entropy is less than the preset threshold. At this point, the server stops building subsequent layer nodes and calls the relevant datasets in the background database to merge and organize the relevant data sets of each term based on the feature attributes of each layer node of the decision tree model of each term. The server then recommends the relevant data sets of each term to the user.
[0051] It should be noted that higher information entropy or conditional entropy indicates greater uncertainty in the current node's feature attributes. When information entropy or conditional entropy exceeds a preset threshold, it indicates that the current node's decision tree model contains too much information, which is not clear enough. Further splitting and analysis of the node's feature data is needed to ensure the decision tree model contains sufficiently accurate, clear, and complete information. This invention, through information gain analysis, uses the information gain of each feature attribute in each personalized term sequence in real time to build each decision tree model. It can use the feature attribute with the largest information gain as the root node, and then recursively use the feature attribute with the largest information gain among the remaining feature attributes in each feature attribute set as the second-level node, and then recursively construct the model based on information gain. Each decision tree model's subsequent layer nodes calculate conditional entropy after each layer is constructed, until the conditional entropy is less than a preset threshold. The feature attribute that maximizes information gain (i.e., minimizes information uncertainty) from the feature attribute set is then used as the node in the decision tree model. This enables intelligent splitting and extension of the feature attributes of the nodes in the decision tree model for the user's search term, improving the accuracy and completeness of retrieving relevant data sets from the backend database using the feature attributes of each node in the intelligent tree model for the search term. This significantly improves the accuracy and completeness of personalized recommendation data, making it easier for users to solve problems. It achieves highly accurate, complete, and applicable personalized recommendations, greatly expanding the application scenarios of this invention. The algorithm alone can achieve low-complexity, high-accuracy, high-completeness, high-reliability, and high-applicability personalized recommendations for the retrieved data, realizing low-system-complexity, high-completeness, and high-accuracy personalized data recommendations without complex system and modeling calculations. While ensuring the quality of personalized recommendations, it greatly simplifies the system architecture, significantly reduces system production, installation, and maintenance costs, and greatly improves enterprise efficiency.
[0052] Please see Figure 2 This invention proposes a specific embodiment, providing a personalized recommendation method, the method comprising:
[0053] P0: Start.
[0054] P1: Obtain user search data.
[0055] It should be noted that the personalized recommendation system of the present invention has a pre-set acquisition module for acquiring user search data; the user search data includes the terms that the user has searched and the number of times each term has been searched, and the user search data is sent to the server; providing a data foundation for subsequent data analysis by the server.
[0056] P2. Construct a personalized term sequence for each user based on the terms they have searched and the number of times each term has been searched.
[0057] P3. Arrange the entries in the user's personalized entry sequence in descending order of the number of views, and assign them corresponding preset priorities according to the preset recommendation priority sequence.
[0058] It should be noted that the preset recommendation priority sequence is arranged in descending order of priority. The preset recommendation priority sequence includes a first preset priority, a second preset priority, a third preset priority, a fourth preset priority, a fifth preset priority, a sixth preset priority, a seventh preset priority, an eighth preset priority, a ninth preset priority, and a tenth preset priority. The terms in the user-personalized term sequence are arranged in descending order of view count, corresponding to the first, second, third, fourth, fifth, sixth, seventh, eighth, ninth, and tenth recommendation priorities. If, after arranging the terms in the personalized term sequence in descending order of view count according to the preset recommendation priority sequence and corresponding to the corresponding preset recommendation priority level, and still some terms do not have a corresponding preset recommendation priority level, then that term corresponds to the highest preset recommendation priority value, i.e., that term corresponds to the tenth recommendation priority. This setting allows the personalized term sequence to be sorted according to the number of times users have viewed it. This sorting method provides a sorting method for the server to call the relevant data sets in the backend database based on the decision tree model built for each term. This enables users to browse the relevant data sets in the backend database calculated based on the terms that users searched most often, improving the user experience and allowing users to obtain information more efficiently and conveniently. This greatly improves the intelligence and usability of the invention.
[0059] P4. The server uses each term in the user's personalized term sequence as the root node to build each decision tree model according to the preset priority. The server calls the feature attribute set related to each term and calculates the information entropy of each feature attribute in each feature attribute set. The feature attribute with the largest information entropy is used as the first layer node of each decision tree model and the information entropy of the first layer node is calculated to see if it is greater than the preset threshold.
[0060] It should be noted that, taking the term "watermelon" as an example, its feature attributes can include "color," "stem," "sound," "texture," "navel," and "touch." The preset thresholds include a first preset threshold, a second preset threshold, a third preset threshold, a fourth preset threshold, a fifth preset threshold, a sixth preset threshold, a seventh preset threshold, an eighth preset threshold, a ninth preset threshold, and a tenth preset threshold. These thresholds are set sequentially from smallest to largest, with the first preset threshold being the smallest and the tenth preset threshold being the largest. The first preset threshold is set when building the decision tree model for terms with the first recommendation priority, the second preset threshold is set when building the decision tree model for terms with the second recommendation priority, the third preset threshold is set when building the decision tree model for terms with the third recommendation priority, the fourth preset threshold is set when building the decision tree model for terms with the fourth recommendation priority, and so on. When building a decision tree model for a term, a fifth preset threshold is set. Similarly, for terms with the sixth recommendation priority, a sixth preset threshold is set; for terms with the seventh recommendation priority, a seventh preset threshold is set; for terms with the eighth recommendation priority, an eighth preset threshold is set; for terms with the ninth recommendation priority, a ninth preset threshold is set; and for terms with the tenth recommendation priority, a tenth preset threshold is set. If, after arranging each term in the personalized term sequence according to its browsing count from highest to lowest, and corresponding it to the preset threshold of the corresponding level, there are still terms without a corresponding preset threshold, then the highest level threshold value in the preset thresholds is used for that term. That is, when building the decision tree model for that term and subsequent priority terms, a tenth preset threshold is set. This setting optimizes the program architecture, further reduces the computational pressure on the personalized recommendation system, significantly saves time costs, and achieves low-power, high-reliability operation of the personalized recommendation system.This setting allows for the constraint of conditional entropy or information entropy on personalized terms searched at different frequencies by users through different preset thresholds. Higher information entropy or conditional entropy indicates higher uncertainty in the current node's feature attributes. Conversely, higher search frequencies for a particular personalized term result in lower preset thresholds. Only when the information entropy or conditional entropy falls below the preset threshold does the server complete the establishment of the decision tree model and call relevant data sets from the backend database. This further limits the information entropy or conditional entropy, enabling users to obtain more certain, complete, and clearer data. In other words, users can obtain clearer, more complete, and less uncertain data through this server. This design increases the preset threshold when the frequency of user searches for terms is low, reducing data analysis requirements, significantly improving the intelligence level of the invention, reducing system complexity and computational pressure, greatly reducing system power consumption, and significantly expanding the application scenarios of the invention.
[0061] P5. Is the information entropy of the first-level nodes of the decision tree model for a certain term greater than the preset threshold? If yes, proceed to step P6; if no, proceed to step P8.
[0062] It should be noted that the higher the information entropy or conditional entropy, the higher the uncertainty of the current node's feature attributes. When the information entropy or conditional entropy is greater than the preset threshold, it means that the current node's decision tree model contains too much information and the information is not clear enough. Further splitting and analysis of the node's feature data is needed to make the information contained in the decision tree model accurate, clear and complete enough.
[0063] P6. The server calculates the information gain of each remaining feature attribute in the feature attribute set of the term, selects the feature attribute with the largest information gain as the next layer node of the decision tree model, and calculates the conditional entropy of the next layer node.
[0064] It should be noted that this invention, through information gain analysis, establishes decision tree models by real-time analyzing the information gain of each feature attribute of each term in each personalized term sequence. This allows the feature attribute with the largest information gain to be used as the root node. Then, the feature attribute with the largest information gain among the remaining feature attributes in each feature attribute set is recursively used as the second-layer node. This process continues recursively, using information gain to construct subsequent layers of the decision tree model. After each layer is constructed, the conditional entropy is calculated until it falls below a preset threshold. The feature attribute that maximizes information gain (i.e., minimizes information uncertainty) is then used as the node in the decision tree model. This enables the system to intelligently split and extend the feature attributes of the nodes in the decision tree model of the user's searched term. This improves the accuracy and completeness of retrieving relevant data sets from the backend database using the feature attributes of each node in the intelligent tree model of the searched term, significantly enhancing the accuracy and completeness of personalized recommendation data. This allows users to solve problems more easily and conveniently, achieving highly accurate, complete, and applicable personalized recommendations, and greatly expanding the application scenarios of this invention. Personalized recommendations with low complexity, high accuracy, high completeness, high reliability, and high applicability can be achieved solely through algorithms. This enables personalized data recommendations with low system complexity, high completeness, and high accuracy, without the need for complex systems and modeling calculations. While ensuring the quality of personalized recommendations, it greatly simplifies the system architecture, significantly reduces system production, installation, and maintenance costs, and greatly improves enterprise efficiency.
[0065] P7. Is the conditional entropy of the next layer node greater than the preset threshold? If yes, return to step P6; otherwise, proceed to step P8.
[0066] P8, End.
[0067] Please see Figure 3 The present invention provides another embodiment, which provides a personalized recommendation system, the personalized recommendation system comprising:
[0068] This includes module 1, server 2, and backend database 3;
[0069] The acquisition module 1 is used to acquire user search data and send the user search data to the server 2. The user search data includes the terms that the user has searched for and the number of times each term has been searched.
[0070] Server 2 constructs a personalized term sequence for each user based on the terms the user has searched and the number of times each term has been searched. The personalized term sequence is then assigned a corresponding preset priority according to the number of views, from highest to lowest, based on the preset recommendation priority sequence.
[0071] Alternatively, each word in the user's personalized word sequence can be used as the root node in order of preset priority to build each decision tree model. Server 2 calls the feature attribute set related to each word and calculates the information entropy of each feature attribute in each feature attribute set. The feature attribute with the largest information entropy is used as the first layer node of each decision tree model and the information entropy of the first layer node is calculated to see if it is greater than the preset threshold.
[0072] Alternatively, when the information entropy is greater than a preset threshold, server 2 calculates the information gain of each remaining feature attribute in the current feature attribute set, selects the feature attribute with the largest information gain as the second-layer node of each decision tree model, calculates the conditional entropy of the second-layer node, and determines whether the conditional entropy is greater than the preset threshold. If the conditional entropy is still greater than the preset threshold, the feature attribute with the largest information gain among the remaining feature attributes in each feature attribute set is recursively used as the third-layer node, and the subsequent layer nodes of each decision tree model are recursively constructed based on the information gain. After the construction of each layer node is completed, the conditional entropy and information gain are calculated until the conditional entropy is less than the preset threshold. At this time, server 2 stops building subsequent layer nodes and calls the relevant datasets of the background database 3 to merge and organize the relevant data sets of each term according to the feature attributes of each layer node of the decision tree model of each term. The data sets of each term are then recommended to the user.
[0073] The backend database 3 is used to store various types of data for server 2 to access.
[0074] In a preferred embodiment, this application also provides an electronic device, the electronic device comprising:
[0075] The computer device includes a memory and a processor, wherein the memory stores computer-readable instructions that, when executed by the processor, implement the personalized recommendation method described herein. The computer device can be broadly categorized as a server, terminal, or any other electronic device with the necessary computing and / or processing capabilities. In one embodiment, the computer device may include a processor, memory, network interface, communication interface, etc., connected via a system bus. The processor of the computer device can be used to provide the necessary computing, processing, and / or control capabilities. The memory of the computer device may include a non-volatile storage medium and internal memory. The non-volatile storage medium may store an operating system, computer programs, etc. The internal memory can provide an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The network interface and communication interface of the computer device can be used to connect and communicate with external devices via a network. When the computer program is executed by the processor, it performs the steps of the method of the present invention.
[0076] This invention can be implemented as a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, causes the steps of the methods of embodiments of the invention to be performed. In one embodiment, the computer program is distributed across multiple network-coupled computer devices or processors, such that the computer program is stored, accessed, and executed in a distributed manner by one or more computer devices or processors. A single method step / operation, or two or more method steps / operations, may be executed by a single computer device or processor or by two or more computer devices or processors. One or more method steps / operations may be executed by one or more computer devices or processors, and one or more other method steps / operations may be executed by one or more other computer devices or processors. One or more computer devices or processors may execute a single method step / operation, or execute two or more method steps / operations.
[0077] Those skilled in the art will understand that the method steps of this invention can be performed by a computer program instructing related hardware, such as a computer device or processor, to perform the steps of this invention when executed. Depending on the context, any references herein to memory, storage, databases, or other media may include non-volatile and / or volatile memory. Examples of non-volatile memory include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), flash memory, magnetic tape, floppy disk, magneto-optical data storage device, optical data storage device, hard disk, solid-state drive, etc. Examples of volatile memory include random access memory (RAM), external cache memory, etc.
[0078] The technical features described above can be combined arbitrarily. Although not all possible combinations of these technical features are described, any combination of these technical features should be considered to be covered by this specification, provided that such combination does not contain contradictions.
[0079] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.
Claims
1. A personalized recommendation method, characterized in that, Acquire user search data, which includes the terms the user has searched for and the number of times each term has been searched; A personalized term sequence is constructed based on the terms the user has searched and the number of times each term has been searched. The terms in the personalized term sequence are then arranged in descending order of the number of views and assigned corresponding preset priorities according to a preset recommendation priority sequence. The server uses each word in the user's personalized word sequence as the root node according to the preset priority to build each decision tree model. The server calls the feature attribute set related to each word and calculates the information entropy of each feature attribute in each feature attribute set. The feature attribute with the largest information entropy is used as the first layer node of each decision tree model and the information entropy of the first layer node is calculated to see if it is greater than the preset threshold. When the information entropy exceeds a preset threshold, the server calculates the information gain of each remaining feature attribute in the current feature attribute set, selects the feature attribute with the largest information gain as the second-layer node of each decision tree model, calculates the conditional entropy of the second-layer node, and determines whether the conditional entropy is greater than the preset threshold. If the conditional entropy is still greater than the preset threshold, the server recursively uses the feature attribute with the largest information gain among the remaining feature attributes in each feature attribute set as the third-layer node, and then recursively constructs subsequent layer nodes of each decision tree model based on the information gain. After constructing each layer node, the server calculates the conditional entropy and information gain until the conditional entropy is less than the preset threshold. At this point, the server stops building subsequent layer nodes and calls the relevant datasets in the backend database to merge and organize the relevant data sets of each term based on the feature attributes of each layer node of the decision tree model of each term, and then recommends them to the user.
2. The personalized recommendation method according to claim 1, characterized in that, The preset recommendation priority sequence includes: The preset recommendation priority sequence is arranged in descending order of recommendation priority.
3. The personalized recommendation method according to claim 2, characterized in that, The method further includes: The preset thresholds are set to different levels from low to high based on the recommendation priority of the entries.
4. The personalized recommendation method according to claim 1, characterized in that, The method further includes: When the information entropy or conditional entropy falls below a preset threshold at any given time, the server stops building subsequent layer nodes and, based on the characteristic attributes of each layer node, merges the datasets and recommends them to the user according to a preset recommendation priority sequence.
5. The personalized recommendation method according to claim 4, characterized in that, The process of calling the data set based on the characteristic attributes of each layer of nodes includes: The server iterates through the backend database and retrieves relevant data based on all the feature attributes of each node in the established decision tree model, then organizes the relevant data into a data set for each personalized term.
6. The personalized recommendation method according to claim 1, characterized in that, The process of organizing the relevant data sets of each term and recommending them to users includes: The server will arrange the data sets of each term in the database according to the preset recommendation priority sequence from top to bottom, and then recommend them to the user.
7. The personalized recommendation method according to claim 6, characterized in that, The method further includes: If, after arranging each term in the personalized term sequence according to the number of views from high to low according to the preset recommendation priority sequence and corresponding to the preset threshold of the corresponding level, there are still terms that do not have a preset threshold corresponding to their level, then the highest level threshold value in the preset thresholds for that term is used.
8. The personalized recommendation method according to claim 1, characterized in that, The method further includes: The user-personalized term sequence includes at least one term that the user has searched.
9. A personalized recommendation system, characterized in that, include: The acquisition module is used to acquire user search data and send the user search data to the server. The user search data includes the terms that the user has searched for and the number of times each term has been searched. The server constructs a personalized term sequence for each user based on the terms they have searched and the number of times each term has been searched. The personalized term sequence is then assigned a corresponding preset priority according to the number of views, from highest to lowest. Alternatively, each word in the user's personalized word sequence can be used as the root node to build each decision tree model according to a preset priority. The server calls the feature attribute set related to each word and calculates the information entropy of each feature attribute in each feature attribute set. The feature attribute with the largest information entropy is used as the first-level node of each decision tree model, and the information entropy of the first-level node is calculated to see if it is greater than a preset threshold. Alternatively, when the information entropy exceeds a preset threshold, the server calculates the information gain of each remaining feature attribute in the current feature attribute set, selects the feature attribute with the largest information gain as the second-layer node of each decision tree model, calculates the conditional entropy of the second-layer node, and determines whether the conditional entropy is greater than the preset threshold. If the conditional entropy is still greater than the preset threshold, the server recursively uses the feature attribute with the largest information gain among the remaining feature attributes in each feature attribute set as the third-layer node, and then recursively constructs the subsequent layer nodes of each decision tree model based on the information gain. After constructing each layer node, the server calculates the conditional entropy and information gain until the conditional entropy is less than the preset threshold. At this point, the server stops building subsequent layer nodes and calls the relevant datasets in the backend database to merge and organize the relevant data sets of each term based on the feature attributes of each layer node of the decision tree model of each term. The server then recommends the relevant data sets of each term to the user. The backend database is used to store various types of data for the server to access.
10. An electronic device, characterized in that, A memory; and a processor, wherein the memory stores computer-readable instructions that, when executed by the processor, implement the personalized recommendation method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Resource recommendation method and device
CN108595526A
Model generation method and device, search recommendation method and device, equipment and medium
CN113641718A