A method, system and electronic device for recommending family activities

The method improves activity recommendation by preprocessing, clustering, and classifying consumption data to align with a trained network model, addressing the challenge of complex family activity management through personalized recommendations.

CN114996320BActive Publication Date: 2025-07-15GUANGDONG UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210635525.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-07
Publication Date
2025-07-15
Estimated Expiration
2042-06-07

AI Technical Summary

Technical Problem

The existing service system cannot comprehensively analyze and process the user's various consumption information, resulting in the inability to recommend suitable family activities to users.

Method used

By receiving user login information, verifying and obtaining consumption data, pre-processing and clustering of data, analyzing consumption data using a classified network model, building a recommended activity page, and displaying activity information that meets user needs.

Benefits of technology

It improves data processing accuracy and the availability of classification network models, helps users better select activities, avoids analysis difficulties when facing complex and diverse consumption data, and provides a good decision-making basis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114996320B_ABST
    Figure CN114996320B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, a system and an electronic device for recommending family activities. By responding to the received user login information, the backend server verifies the user login information and sends an access authorization request for consumption data. When the user login information is successfully verified and the authorization permission is received, the backend server obtains the consumption data corresponding to the user login information, performs data preprocessing on the consumption data to obtain preprocessed data, performs clustering on the preprocessed data to obtain multiple target data clusters, the category average cost and the first category proportion, then inputs the category data in each target data cluster into the trained classification network model respectively to obtain the second category proportion, and finally selects the recommended activity information according to the first category proportion and the second category proportion, and then constructs and displays a recommended activity page by using the recommended activity information. It solves the problem that the existing service system cannot comprehensively analyze and process various consumption information of users and recommend activities to users.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and in particular, to a method, a system, and an electronic device for recommending household activities. Background Art

[0002] In life, the consumption situations of families are complex and diverse. For example, family's human relations and social interactions, investment in education funds, investment in daily necessities such as food, clothing, housing, and transportation, financial management and investment, tourism and vacation, annual plans, recommendation of personalized economic activities, etc. When conducting activity planning and management, comprehensive evaluation and arrangement are required, which undoubtedly increases the difficulty for users to manage.

[0003] With the development of network technology, the Internet provides various service systems for people's activity planning. However, the existing service systems are numerous, complex, and diverse, and can only perform single activity planning. They cannot comprehensively analyze and process the multiple consumption information of users and recommend activities to users. Summary of the Invention

[0004] The present invention provides a method, a system, and an electronic device for recommending household activities, which solve the technical problem that the existing service systems cannot comprehensively analyze and process the multiple consumption information of users and recommend activities to users.

[0005] In a first aspect of the present invention, a method for recommending household activities is provided, including the following steps:

[0006] Respond to the received user login information, verify the user login information through the backend server, and send an access authorization request for consumption data;

[0007] When the user login information is verified successfully and an authorization permission is received, obtain the consumption data corresponding to the user login information through the backend server;

[0008] Perform data preprocessing on the consumption data to obtain preprocessed data;

[0009] Cluster the preprocessed data to obtain multiple target data clusters, category mean costs, and a first category proportion;

[0010] Input the category data within each of the target data clusters into a trained classification network model to obtain a second category proportion;

[0011] Select recommended activity information according to the first category proportion and the second category proportion, and construct and display a recommended activity page using the recommended activity information.

[0012] Optionally, the step of performing data preprocessing on the consumption data to obtain preprocessed data includes:

[0013] Obtain the consumption type, consumption cost, and consumption time of the consumption data;

[0014] Filter the consumption data based on the preset consumption type, consumption cost, and consumption time through a database query statement to obtain filtered data;

[0015] Perform data normalization on the filtered data to obtain preprocessed data.

[0016] Optionally, the step of clustering the preprocessed data to obtain multiple target data clusters, class mean costs, and first class proportions includes:

[0017] Extract the consumption type features and consumption cost features of the preprocessed data;

[0018] Cluster the preprocessed data with the vector of the preset consumption type feature as the centroid to obtain n type data clusters, where n is a positive integer;

[0019] Cluster the type data clusters with the vector of the consumption cost feature as the centroid to obtain n - 1 target data clusters respectively;

[0020] Obtain the type data quantity and its corresponding type consumption cost within each type data cluster;

[0021] Sum up the type data quantities and the corresponding type consumption costs respectively for each type to obtain the total consumption amount of each type of data;

[0022] Calculate the ratio of the total consumption amount of each type of data to the corresponding type data quantity to obtain the class mean cost corresponding to each type data cluster;

[0023] Calculate the first consumption ratio of the total consumption amount of each type of data to the total consumption amount of all types of data to obtain the first class proportion corresponding to each type data cluster.

[0024] Optionally, the step of inputting the class data within each target data cluster into a pre - trained classification network model to obtain the second class proportion includes:

[0025] Concatenate the class data within each target data cluster to obtain multiple vector matrices;

[0026] Input each vector matrix into the pre - trained classification network model; the classification network model includes a convolutional layer and a fully - connected layer;

[0027] Perform convolution operations on each vector matrix through the convolutional layer to obtain multiple vector features;

[0028] Calculate the category similarity between the vector feature and multiple preset category features through the fully connected layer;

[0029] Classify the vector feature into the classification category to which the highest value of the category similarity belongs through the fully connected layer;

[0030] Sum up the number of vector features in each classification category and their corresponding target consumption costs respectively to obtain the total consumption amount of each classification category;

[0031] Calculate the second consumption ratio of the total consumption amount of each classification category to the total consumption amount of all classification categories respectively to obtain the second category proportion corresponding to each classification category.

[0032] Optionally, the step of selecting recommended activity information according to the first category proportion and the second category proportion, constructing a recommended activity page with the recommended activity information and displaying it includes:

[0033] Compare the second category proportion with a preset second category proportion threshold to determine the consumption level of the target data cluster corresponding to the second category proportion;

[0034] Select activity information with the first category proportion less than a preset first category proportion threshold and the consumption level less than a preset consumption threshold from a preset activity alternative table as recommended activity information;

[0035] Load the recommended activity information into a recommended component in a preset initial activity page;

[0036] Render the recommended component to generate a recommended activity page and display it.

[0037] Optionally, before the step of loading the recommended activity information into a recommended component in a preset initial activity page, it further includes:

[0038] Verify the user login information through a backend server and send an access authorization request for income data;

[0039] When the user login information is verified successfully and an authorization permission is received, obtain the income data corresponding to the user login information through the backend server;

[0040] Calculate the product of the income data and each first category proportion respectively to obtain multiple category arrangement costs;

[0041] Construct an annual investment plan with all the category arrangement costs;

[0042] Load the annual investment plan into a preset plan component.

[0043] Optionally, after the step of separately calculating the product of the revenue data and each of the first category ratios to obtain the arrangement costs for multiple categories, the method further includes:

[0044] Calculating the ratio of each of the category arrangement costs to a preset number of days to obtain the average daily cost for each category;

[0045] Obtaining the activity costs corresponding to each of the activity information in the activity alternative table;

[0046] Calculating the sum of each of the activity costs and the corresponding average daily cost to obtain the activity budget corresponding to each of the activity information;

[0047] Separately calculating the product of each of the category average costs and a preset threshold coefficient to obtain the activity budget threshold corresponding to each of the activity information;

[0048] Selecting the recommended activity information for which the activity budget is less than or equal to the activity budget threshold as the new recommended activity information.

[0049] Optionally, the method further includes:

[0050] When the recommended activity page is generated, loading the plan component onto the recommended activity page and rendering it to obtain a new recommended activity page.

[0051] A second aspect of the present invention provides a family activity recommendation system, including:

[0052] A user verification and authorization access request module, configured to respond to the received user login information, verify the user login information through a backend server, and send an access authorization request for consumption data.

[0053] A data acquisition module, configured to obtain the consumption data corresponding to the user login information through the backend server when the user login information is verified successfully and an authorization permission is received;

[0054] A first data preprocessing module, configured to perform data preprocessing on the consumption data to obtain preprocessed data;

[0055] A second data preprocessing module, configured to perform clustering on the preprocessed data to obtain multiple target data clusters, category average costs, and first category ratios;

[0056] A classification network model operation module, configured to separately input the category data in each of the target data clusters into a trained classification network model to obtain second category ratios;

[0057] A recommended activity page construction module is used to select recommended activity information according to the first category proportion and the second category proportion, construct a recommended activity page using the recommended activity information, and display it.

[0058] In a third aspect of the present invention, an electronic device is provided, including a memory and a processor. A computer program is stored in the memory. When the computer program is executed by the processor, the processor is caused to execute the steps of the home activity recommendation method according to any one of claims 1-8.

[0059] As can be seen from the above technical solutions, the present invention has the following advantages:

[0060] The present invention responds to the received user login information, verifies the user login information through the backend server and sends an access authorization request for consumption data. Then, when the user login information is verified successfully and an authorization permission is received, the consumption data corresponding to the user login information is obtained through the backend server. Next, the consumption data is preprocessed to obtain preprocessed data, ensuring the quality of the data and improving the data processing accuracy. Secondly, the preprocessed data is clustered to obtain multiple target data clusters, category mean costs, and the first category proportion. Then, the category data within each target data cluster is respectively input into the trained classification network model to obtain the second category proportion. Finally, recommended activity information is selected according to the first category proportion and the second category proportion, and a recommended activity page is constructed using the recommended activity information and displayed for the user to select. By performing clustering processing before inputting into the classification network model, the input data is more suitable for the classification network model, ensuring the usability of the classification network model. At the same time, by clustering the consumption data and combining it with the classification network model, comprehensive processing of the consumption data is beneficial to screening out recommended activities that are more in line with the user, avoiding the difficulty of processing and analyzing complex and diverse consumption data for the user, providing a good basis for the user to select activity information, improving the user decision-making efficiency, and solving the problem that the existing service system cannot comprehensively analyze and process the multiple consumption information of users and recommend activities to users. Description of the Drawings

[0061] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0062] Figure 1 It is a flowchart of a home activity recommendation method provided in Embodiment 1 of the present invention;

[0063] Figure 2Flowchart of a method for recommending family activities provided in Embodiment 2 of the present invention;

[0064] Figure 3 Schematic diagram of the back-end server provided in Embodiment 2 of the present invention;

[0065] Figure 4 Three-dimensional scatter plot of the category consumption situation chart provided in Embodiment 2 of the present invention;

[0066] Figure 5 Schematic diagram of the overall structure of a family activity recommendation system provided in Embodiment 3 of the present invention. Detailed implementation manners

[0067] In order to make the invention objectives, features, and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the embodiments described below are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0068] Please refer to Figure 1 , Figure 1 Flowchart of a method for recommending family activities provided in Embodiment 1 of the present invention.

[0069] A method for recommending family activities provided by the present invention includes the following steps:

[0070] Step 101: Respond to the received user login information, verify the user login information through the back-end server, and send an access authorization request for consumption data.

[0071] Step 102: When the user login information is verified successfully and the authorization permission is received, obtain the consumption data corresponding to the user login information through the back-end server.

[0072] Step 103: Perform data preprocessing on the consumption data to obtain preprocessed data.

[0073] Data preprocessing refers to some processing of data before the main processing to ensure the quality of the data, including ensuring the accuracy, integrity, and consistency of the data.

[0074] In the embodiments of the present invention, by performing data preprocessing before processing, the accuracy of data processing can be improved.

[0075] Step 104: Cluster the preprocessed data to obtain multiple target data clusters, category mean costs, and the first category proportion.

[0076] Clustering refers to dividing a large number of unlabeled datasets into multiple categories according to the inherent similarity of the data, so that the data within the categories has a large similarity and the data between the categories has a small similarity.

[0077] In the embodiments of the present invention, by clustering the preprocessed data, a plurality of target data clusters, the category mean cost, and the first category proportion are obtained. By clustering and dividing the consumption data and performing clustering processing before inputting it into the classification network model, the usability of the classification network model is ensured. At the same time, multiple reference information is provided for activity recommendation, which is convenient for better activity recommendation.

[0078] Step 105: Input the category data in each target data cluster into the trained classification network model respectively to obtain the second category proportion.

[0079] In the embodiments of the present invention, the category data in the target data cluster is classified through the classification network model to obtain the second category proportion, which provides more reference information for selecting recommended activity information and improves the practicality of the recommended activities.

[0080] Step 106: Select the recommended activity information according to the first category proportion and the second category proportion, and construct and display a recommended activity page using the recommended activity information.

[0081] In the embodiments of the present invention, the recommended activity information to be selected is determined through comprehensive analysis of the first category proportion and the second category proportion. At the same time, a recommended activity page is constructed and displayed using the determined recommended activity information for the user to view.

[0082] In the embodiments of the present application, by responding to the received user login information, verifying the user login information through the backend server and sending an access authorization request for consumption data, and then when the user login information is verified successfully and an authorization permission is received, obtaining the consumption data corresponding to the user login information through the backend server, and then performing data preprocessing on the consumption data to obtain preprocessed data, ensuring the quality of the data and improving the data processing accuracy. Secondly, clustering the preprocessed data to obtain multiple target data clusters, the category mean cost, and the first category proportion. Then, inputting the category data within each target data cluster into the trained classification network model respectively to obtain the second category proportion. Finally, selecting the recommended activity information according to the first category proportion and the second category proportion, and then constructing and displaying a recommended activity page using the recommended activity information for the user to select. By performing clustering processing before inputting into the classification network model, the input data is made more suitable for the classification network model, ensuring the usability of the classification network model. At the same time, by clustering the consumption data and combining it with the classification network model, comprehensive processing of the consumption data is beneficial to screening out more recommended activities that suit the user, avoiding the difficulty for the user to process and analyze the complex and diverse consumption data, providing a good basis for the user to select activity decisions, and solving the problem that the existing service system cannot comprehensively analyze and process the multiple consumption information of the user and recommend activities to the user.

[0083] Please refer to Figure 2 , Figure 2 which is a flowchart of a family activity recommendation method provided in the second embodiment of the present invention.

[0084] A family activity recommendation method provided by the present invention includes the following steps:

[0085] Step 201: Respond to the received user login information, verify the user login information through the backend server, and send an access authorization request for consumption data.

[0086] The backend server refers to the server side that directly provides services and data for the client.

[0087] It should be noted that the back-end server is built in advance based on the ssm framework, and the back-end server includes a control layer, a business layer and a DAO layer that are communicated with each other; the back-end server is also provided with a database; the control layer includes DispacherServlet (dispatcher), Controller (controller) and ModelAndView (model and view), DispacherServlet is used to process client requests and send the results to the client; Controller is used to call business logic processing from the business layer and perform data processing; ModelAndView is the return type of the Controller, which is divided into Model and View. Model is used to specify the return of corresponding parameters, and View is used to specify the return of corresponding pages and can be used to render model data. Preferably, the embodiment of the present invention adopts JSP page return.

[0088] In the specific implementation, Figure 3 As shown, the user can send a request through the client, that is, the client sends a request to DispacherServlet, which queries HanderMapping to find the Controller in the control layer that processes the request. After the Controller calls the business logic from the business layer, the business layer retrieves the corresponding data in the database through the DAO layer and returns ModelAndView. Then DispacherSerclet queries the view parser to find the view specified by ModelAndView, where the view renders the model data, which is parsed into the corresponding JSP page by the view parser and then returned to the client through DispacherServlet for the user to view. For example, the client can be developed based on the JS (JavaScript) framework. The user enters the username and password on the client. The client initiates a request on the JS page, converts the data into a string through json on the JS page, sends the data to the backend server through jquery+ajax, and then maps the data to the corresponding Controller method through the @RequestMapping annotation. After processing, the data is returned to the client, and the user logs in successfully.

[0089] DispacherServlet (dispatcher) refers to the front-end controller, whose main responsibility is to receive all requests (determined by the configuration file), forward the requests to the corresponding controller, receive the processing results of the controller, and determine which view will finally complete the response.

[0090] HandlerMapping is used to process the mapping relationship between request paths and controllers.

[0091] Controller refers to the controller, which is the component that actually processes requests, such as receiving request parameters and deciding whether to forward or redirect in the end to respond.

[0092] JSP (JavaServer Pages for short) is deployed on a web server and can respond to requests sent by clients and dynamically generate HTML, XML or other format documents according to the request content, and then return them to the requester.

[0093] JavaScript (abbreviated as "JS") is a lightweight, interpreted or just-in-time compiled programming language with function priority, mainly used in web application development.

[0094] In the embodiments of the present invention, by specifying the structure of the backend server and building the backend server based on the ssm framework, the working process of the backend server is illustrated, and the consumption data is comprehensively processed, making the calculation more lightweight and flexible, and having a high reusability.

[0095] Step 202: When the user login information is successfully verified and an authorization license is received, obtain the consumption data corresponding to the user login information through the backend server.

[0096] Step 203: Perform data preprocessing on the consumption data to obtain preprocessed data.

[0097] In the embodiments of the present invention, the specific implementation processes of steps 202-203 are similar to those of steps 102-103 and will not be elaborated here.

[0098] Further, step 203 specifically includes steps S11-S13:

[0099] Step S11: Obtain the consumption type, consumption cost and consumption time of the consumption data.

[0100] Step S12: Screen the consumption data through the preset consumption type, consumption cost and consumption time in the database query statement to obtain screened data.

[0101] It should be noted that the backend server is provided with a database. After obtaining the consumption data through the backend server, the obtained consumption data is saved in the database in the backend server for easy data calling and querying.

[0102] The database refers to a collection of a large amount of data that is stored in a computer for a long time, organized, shareable, and uniformly managed; the database query statement refers to filtering out data that meets the conditions from the database through the set syntax format. For example, obtain the consumption type, consumption cost and consumption time of the consumption data, and at the same time set the database query statement according to the data processing requirements as:

[0103] Select cType, cMoney from em_consumption

[0104] where

[0105] cMoney > 100 and YEAR(cTime) = YEAR(NOW())

[0106] Where: cType represents the consumption type, cMoney represents the consumption cost, em_consumption represents the data table in the database, cMoney > 100 represents querying for consumption costs higher than 100, and YEAR(cTime) = YEAR(NOW()) represents querying for the most recent year.

[0107] In the implementation of the present invention, by screening consumption data, on the one hand, the amount of data is reduced and the operation efficiency is improved. On the other hand, relatively important and representative consumption data is selected to improve the practicality and accuracy of data analysis, so that the recommended activities more meet the needs of users.

[0108] Step S13: Perform data normalization processing on the screened data to obtain preprocessed data.

[0109] Data normalization (standardization) processing is a basic task in data mining. Different evaluation indicators often have different dimensions and dimension units, and such situations will affect the results of data analysis. In order to eliminate the dimensional influence between indicators, data normalization processing is required to solve the comparability between data indicators.

[0110] In the embodiment of the present invention, through data normalization processing, the influence on the results of data analysis is avoided, and the effectiveness of data analysis is improved.

[0111] Further, step S13 specifically includes:

[0112] Perform data normalization processing on the screened data using one-hot encoding to obtain preprocessed data.

[0113] One-hot encoding, also known as one-hot encoding, is a method that uses an N-bit status register to encode N states. Each state has its own independent register bit, and at any time, only one bit is valid, that is, only one bit is 1 and the rest are all zero values. One-hot encoding uses 0 and 1 to represent some parameters and uses an N-bit status register to encode N states.

[0114] In a specific implementation, for example, one-hot encoding is used to encode the filtered data. For the consumption cost, we encode a vector every 100, capped at 4000. That is, there are 40 different vectors of length 40 to represent the amount. For example, 99, 150, 2005, and 3852 are respectively represented as:

[0115] [1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],

[0116] [0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],

[0117] [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],

[0118] [1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0].

[0119] For the consumption type, we use a vector of length 6 to encode, appended after the amount. For example, diet 99, transportation 150, education 2005, and loan 3852 are respectively represented as:

[0120] [1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0],

[0121] [0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0],

[0122] [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0],

[0123] [1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1]。

[0124] For the convenience of the calculation of the classification network model, the vector length can be extended to a preset length according to the requirement, and specifically, 0s are appended at the back according to the extended length.

[0125] In the implementation of the present invention, by adopting the one-hot encoding method, the values of discrete features are extended to the Euclidean space, so that the obtained preprocessed data is continuous and ordered, which is convenient for clustering and classification.

[0126] Step 204: Cluster the preprocessed data to obtain multiple target data clusters, the category mean cost, and the first category proportion.

[0127] Optionally, step 204 specifically includes steps S21 - S27:

[0128] Step S21: Extract the consumption type feature and the consumption cost feature of the preprocessed data.

[0129] Step S22: Cluster the preprocessed data with the vector of the preset consumption type feature as the centroid to obtain n type data clusters, where n is a positive integer.

[0130] Step S23: Cluster the type data clusters with the vector of the consumption cost feature as the centroid to obtain n - 1 target data clusters respectively.

[0131] Step S24: Obtain the number of type data and the corresponding type consumption cost within each type data cluster.

[0132] Step S25: Respectively perform summation calculations on the number of type data and the corresponding type consumption cost to obtain the total consumption amount of each type of data.

[0133] Step S26: Calculate the ratio of the total consumption amount of each type of data to the number of corresponding type data to obtain the category mean cost corresponding to each type data cluster.

[0134] Step S27: Calculate the first consumption ratio of the total consumption amount of each type of data to the total consumption amount of all types of data to obtain the first category proportion corresponding to each type data cluster.

[0135] It should be noted that in step S22, instead of randomly selecting the initial centroids, the vectors of the preset consumption type features are determined as the centroids. For example, using the k-means clustering algorithm, with the vectors of n preset consumption type features as the centroids, calculate the distances (similarities) between the vectors of the consumption types of the preprocessed data and each initial centroid respectively. Divide the data sample points in the preprocessed data into the clusters with the closest distances, and divide the preprocessed data into n type data clusters, where n is a positive integer. The calculation formula for the similarity between the centroid and the data sample point is:

[0136] where x is the centroid and y is the data sample point.

[0137] In step S23, cluster the type data clusters with the vectors of the consumption cost features as the centroids. For example, using the k-means++ clustering algorithm, within each type data cluster, with the vectors of the consumption cost features as the centroids, randomly select an initial centroid, calculate the distances (similarities) between the vectors of the consumption costs of the data sample points within each type data cluster and each initial centroid respectively. Divide the data sample points not higher than 1 / (n - 1) of the total number of sample points into the clusters with the closest distances, and find the sample point farthest from this centroid as the next centroid until the data sample points within each type data cluster are divided into n - 1 clusters, thus obtaining the target data clusters, where n is a positive integer. The calculation formula for the similarity between the centroid and the data sample point is:

[0138] where x is the centroid and y is the data sample point.

[0139] In the embodiments of the present invention, by extracting the consumption type features and consumption cost features of the preprocessed data, first, the preprocessed data is clustered with the preset consumption type features as the centroids, and the preprocessed data is divided into n type data clusters. Secondly, the type data clusters are clustered with the vector of the consumption cost features as the centroids, and n-1 target data clusters are obtained respectively, where n is a positive integer. Through two intra-cluster re-divisions with vector features of different categories as the centroids, using the vector of the consumption type features as the centroid can reflect the distribution of the user's consumption activities in different consumption types, and using the consumption cost features as the centroid can reflect the distribution of the user's consumption activities with different consumption costs in a certain consumption type. Then, obtain the number of type data and the corresponding type consumption cost within each type data cluster, and calculate the sum of each type data quantity and the corresponding type consumption cost respectively to obtain the total consumption amount of each type data. Calculate the ratio of the total consumption amount of each type data to the corresponding type data quantity to obtain the category mean cost corresponding to each type data cluster, which provides a reference basis for determining the recommended activity information. When the number of type data and the corresponding type consumption cost within the type data cluster are different, some are high and some are low. Therefore, by calculating the first consumption ratio of the total consumption amount of each type data to the total consumption amount of all type data, it can better reflect the user's consumption situation in different consumption types, so as to obtain the first category proportion corresponding to each type data cluster. Thus, specifically, the distribution of the user's consumption in different consumption types is reflected by the first category proportion, which is convenient to provide a reference basis for determining the recommended activity information, indirectly improving the practicability of the pushed activity information page and pushing more user-friendly recommended activities.

[0140] Step 205: Input the category data within each target data cluster into the trained classification network model respectively to obtain the second category proportion.

[0141] Optionally, step 205 specifically includes steps S31 - S37:

[0142] Step S31: Concatenate the category data within each target data cluster to obtain multiple vector matrices.

[0143] Step S32: Input each vector matrix into the trained classification network model respectively; the classification network model includes a convolutional layer and a fully connected layer.

[0144] Further, before step S32, it includes:

[0145] Use the multiple vector matrices as training samples to input into the classification network model for training and optimization to determine the optimal model of the classification network model and obtain the trained classification network model.

[0146] In the embodiments of the present invention, by pre-training and optimizing the classification network model, the computational amount of inputting the vector matrix into the classification network model is reduced, and the accuracy of the classification network model is improved.

[0147] Step S33: Perform a convolution operation on each vector matrix through a convolutional layer to obtain a plurality of vector features.

[0148] Step S34: Calculate the class similarity between the vector features and a plurality of preset class features through a fully connected layer.

[0149] Step S35: Classify the vector features into the classification category to which the highest value of the class similarity belongs through a fully connected layer.

[0150] Step S36: Respectively perform a summation calculation on the number of vector features and their corresponding target consumption costs within each classification category to obtain the total consumption amount of each classification category.

[0151] Step S37: Respectively calculate the second consumption ratio of the total consumption amount of each classification category to the total consumption amount of all classification categories to obtain the second category proportion corresponding to each classification category.

[0152] It should be noted that the total consumption amount of the classification category is the total consumption amount of all data sample points within each target data cluster in the same type of data cluster; the torch.cat function is used to splice vectors for the category data to obtain a plurality of vector matrices, preferably a two-dimensional matrix, that is, a 2D grayscale image, and the classification network model is preferably a resnet18 network model to classify each vector matrix; according to the number of categories to which the category data needs to be classified, the fully connected layer can be correspondingly set to the corresponding output number. In a specific implementation, for example, there are data sample points A and B, and through E = torch.cat((A, B), 0), it becomes two-dimensional. Preferably, the category data within each target data cluster is respectively created into a 2D gray image of 48 * 48 * 1. The specific number of images is generated according to the specific number of data items. 48 * 48 * 1 represents that 48 pieces of data are converted into an image with a length of 48, a width of 48, and a channel of 1 (grayscale image, 3 for color image).

[0153] In an embodiment of the present invention, after vector splicing of the category data in each target data cluster, each vector matrix is respectively input into a trained classification network model for feature classification. The classification network model includes a convolutional layer and a fully connected layer. After the vector matrix is input into the classification network model, first, the convolutional layer performs a convolutional operation on each vector matrix to obtain multiple vector features, and then the fully connected layer calculates the category similarity between the vector features and multiple preset category features. Next, the fully connected layer classifies the vector features into the classification category to which the highest value of the category similarity belongs. Finally, for the classified vector features, the number of vector features in each classification category and their corresponding target consumption costs are respectively summed to obtain the total consumption amount of each classification category, and then the second consumption ratio of the total consumption amount of each classification category to the total consumption amount of all classification categories is calculated to obtain the second category proportion corresponding to each classification category. By performing vector splicing on the category data in the target data cluster, the spliced vector matrix can be operated in the trained classification network model, improving the classification efficiency of the classification network model. Through the convolutional layer and the fully connected layer, vector feature extraction and classification are performed on the input vector matrix, and the second category proportion is calculated through the classified vector features, improving the operation efficiency of the classification of the classification network model, especially when the data volume is large.

[0154] Step 206: Select recommended activity information according to the first category proportion and the second category proportion, and construct and display a recommended activity page using the recommended activity information.

[0155] Optionally, step 206 specifically includes steps S41 - S44:

[0156] Step S41: Compare the second category proportion with a preset second category proportion threshold to determine the consumption level of the target data cluster corresponding to the second category proportion.

[0157] Step S42: Select activity information with a first category proportion less than a preset first category proportion threshold and a consumption level less than a preset consumption threshold from a preset activity alternative table as the recommended activity information.

[0158] Step S43: Load the recommended activity information into a recommended component in a preset initial activity page.

[0159] Step S44: Render the recommended component to generate and display a recommended activity page.

[0160] Rendering refers to the process of splicing data and templates together, binding the data to the page through template binding syntax, and finally presenting it to the user.

[0161] It should be noted that each first-category proportion has a corresponding preset first-category proportion threshold. For example, in the preset activity alternative list, the first-category proportion threshold for preset diet is 20%, the first-category proportion threshold for travel is 5%, the first-category proportion threshold for education is 25%, the first-category proportion threshold for travel is 5%, the first-category proportion threshold for utilities is 10%, and the first-category proportion threshold for RV loan is 35%. Further, to avoid excessive recommended activity information, first obtain the push frequency of activity information. Among them, select the activity information with a push frequency less than the preset push frequency, and use this activity information as the new recommended activity information, and record the recommended frequency of the currently selected activity information. When selecting activity information again, do not select the currently selected activity information within the preset number of selections.

[0162] In the embodiment of the present invention, the second-category proportion can reflect the consumption activity distribution of different consumption expenses of the user in a certain consumption type, that is, it can reflect the consumption level of different activities of the user in the same consumption type. Therefore, by comparing the second-category proportion with the preset second-category proportion threshold, the consumption level of the target data cluster corresponding to the second-category proportion can be determined, and thus the consumption level of the user in the corresponding target data cluster can be determined. The consumption level can be divided into high, medium, and low. When the second-category proportion is lower than the preset second-category proportion threshold, it indicates that the consumption data corresponding to the second-category proportion is at a low consumption level. And the first-category proportion reflects the consumption situation of the user in each consumption type. By comparing the first-category proportion with the preset first-category proportion threshold, if the first-category proportion is lower than the preset first-category proportion threshold, it indicates that the user conducts fewer activities in this consumption type. If the first-category proportion is higher than or equal to the preset first-category proportion threshold, it indicates that the user conducts more activities in this consumption type. In this embodiment, it is preferably to recommend activity information with fewer user participation times and lower cost performance to the user. Therefore, select the activity information with a first-category proportion less than the preset first-category proportion threshold and a consumption level less than the preset consumption threshold from the preset activity alternative list as the recommended activity information, then load the recommended activity information into the recommendation component on the preset initial activity page, and then render the recommendation component to generate and display the recommended activity page, and conduct comprehensive analysis from multiple dimensions to push out more user-compliant recommended activities.

[0163] Optionally, before step S43, steps S421 - S426 are further included:

[0164] Step S421: Verify the user login information through the backend server and send an access authorization request for income data.

[0165] Step S422: When the user login information is verified successfully and the authorization permission is received, obtain the income data corresponding to the user login information through the backend server.

[0166] Step S423: Calculate the product of the income data and each first-category proportion respectively to obtain multiple category arrangement costs.

[0167] Step S424: Construct an annual input plan table using all category arrangement costs.

[0168] Step S425: Load the annual input plan table into the plan component on the recommended activity page.

[0169] It should be noted that when using the income data, considering that users may have savings plans or other usage plans, therefore, when calculating the category arrangement costs, the income data used is the income data after removing the costs of savings plans or other usage plans. At the same time, when calculating the category arrangement costs, when screening the consumption data through the preset consumption types, consumption costs, and consumption times in the database query statement, the consumption time can be set to one year, making the constructed annual input plan table more accurate.

[0170] In the embodiment of the present invention, the back-end server verifies the user login information and sends an access authorization request for the income data. When the user login information is verified successfully and the authorization permission is received, the back-end server then obtains the income data corresponding to the user login information. Secondly, calculate the product of the income data and each first-category proportion respectively to obtain the category arrangement costs. Then, construct an annual input plan table using all category arrangement costs and load the annual input plan table into the plan component on the recommended activity page, which is convenient for rendering the plan component and loading it onto the recommended activity page for display.

[0171] Further, after step S423, steps S4231 - S4235 are also included:

[0172] Step S4231: Calculate the ratio of each category arrangement cost to the preset number of days respectively to obtain each daily average cost.

[0173] Step S4232: Obtain the activity costs corresponding to each activity information in the activity alternative table.

[0174] Step S4233: Calculate the sum of each activity cost and the corresponding daily average cost to obtain the activity budget corresponding to each activity information.

[0175] Step S4234: Calculate the product of each category average cost and the preset threshold coefficient respectively to obtain the activity budget threshold corresponding to each activity information.

[0176] Step S4235: Select the recommended activity information with the activity budget less than or equal to the activity budget threshold as the new recommended activity information.

[0177] In the embodiment of the present invention, by calculating the ratio of the expenses arranged for each category to the preset number of days, the average daily expenses for each category are obtained. Secondly, the activity expenses corresponding to each activity information in the activity alternative table are acquired, and then the sum of each activity expense and the corresponding average daily expense is calculated. Thus, the sum value is used as the activity budget corresponding to the activity information. The product of the average expense for each category and the preset threshold coefficient is calculated respectively to obtain the activity budget threshold corresponding to each activity information. The recommended activity information with an activity budget less than or equal to the activity budget threshold is selected as the new recommended activity information. By calculating the activity budget and the activity budget threshold and then comparing them, since the average daily expense is associated with the income data, the activity budget can be flexibly adjusted according to the income data. To avoid an overly high activity budget, that is, the activity budget threshold is set according to the actual average expense of the user for each category, so that the selected activity information is a recommended activity that better fits the user's actual consumption, improving the practicality of the recommended activity information.

[0178] Further, step 206 further includes steps S51 - S53:

[0179] Step S51: Construct a category consumption situation chart using all the first category ratios.

[0180] Step S52: Load the category consumption situation chart into the consumption component on the recommended activity page.

[0181] Step S53: After rendering the consumption component, update the recommended activity page at the current moment.

[0182] In the embodiment of the present invention, by constructing a consumption situation chart and displaying it on the recommended activity page, the user can intuitively understand their consumption situation for each consumption type. The consumption situation chart can be a histogram, a pie chart, or a line chart.

[0183] In one embodiment, as Figure 4 shown, a dimension z is randomly added to the type data in each type data cluster, and a category consumption situation chart is constructed using all the type data clusters. Among them, the category consumption situation chart is a three - dimensional scatter plot, which more intuitively shows the user's consumption situation for each consumption type, and is more visualized than displaying by using all the first category ratios through a histogram, a pie chart, or a line chart.

[0184] Step 207: After generating the recommended activity page, load the plan component onto the recommended activity page and render it to obtain a new recommended activity page.

[0185] In the embodiment of the present invention, by loading the plan component onto the recommended activity page and rendering it, a new activity recommendation page is obtained, and an annual investment plan table can be displayed on the new activity recommendation page. Through the annual investment plan table, the expected investment costs of the user in various consumption types in the future can be intuitively shown to the user, providing a reference for the user's activity planning.

[0186] In the embodiment of the present invention, through the use of database query statements and data normalization for preprocessing, the quality of the data is guaranteed and the data processing accuracy is improved. Secondly, the preprocessed data is clustered, and two different clustering methods are used to perform secondary clustering with different centroids, so that the input data better fits the classification network model and ensures the usability of the classification network model. The processing method of secondary clustering can also classify from multiple dimensions to obtain data for judgment, and improve the practicality of the judgment result, making it more in line with the actual needs of users. At the same time, combined with the classification network model, the consumption data is comprehensively processed, which is conducive to screening out more recommended activities that suit the user, avoiding the difficulty of processing and analyzing complex and diverse consumption data for the user, providing a good basis for the user to select activity decisions, and solving the problem that the existing service system cannot comprehensively analyze and process the user's multiple consumption information and recommend activities to the user. In addition, for the convenience of the user to view their own consumption situation, a category consumption situation chart is constructed using the proportion of all the first categories, and the category consumption situation chart is loaded onto the recommended activity page for display, which can reflect the user's consumption situation. Therefore, the recommended activity page can display multiple information such as recommended activity information, category consumption situation chart, and annual investment plan table, with strong comprehensiveness and high practicality, facilitating the user's viewing.

[0187] Please refer to Figure 5 , Figure 5 which provides an overall structural schematic diagram of a family activity recommendation system

[0188] A family activity recommendation system provided by an embodiment of the present invention includes:

[0189] A user verification and authorization access request module 301, which is used to respond to the received user login information, verify the user login information through the backend server, and send an access authorization request for consumption data.

[0190] A data acquisition module 302, which is used to obtain the consumption data corresponding to the user login information through the backend server when the user login information is verified successfully and an authorization permission is received;

[0191] A first data preprocessing module 303, which is used to perform data preprocessing on the consumption data to obtain preprocessed data;

[0192] A second data preprocessing module 304, which is used to cluster the preprocessed data to obtain multiple target data clusters, category mean costs, and the proportion of the first category;

[0193] The classification network model operation module 305 is configured to input the category data within each target data cluster into the trained classification network model respectively to obtain the second category proportion.

[0194] The recommended activity page construction module 306 is configured to select recommended activity information according to the first category proportion and the second category proportion, and construct and display a recommended activity page by using the recommended activity information.

[0195] Optionally, the user verification and authorization access request module 301 is further specifically configured to:

[0196] Verify the user login information through the backend server and send an access authorization request for the income data;

[0197] Optionally, the data acquisition module 302 is further specifically configured to:

[0198] When the user login information is verified successfully and an authorization permission is received, obtain the income data corresponding to the user login information through the backend server;

[0199] Optionally, the first data preprocessing module 303 is specifically configured to:

[0200] Obtain the consumption type, consumption cost and consumption time of the consumption data;

[0201] Filter the consumption data by using the preset consumption type, consumption cost and consumption time in the database query statement to obtain filtered data;

[0202] Perform data normalization processing on the filtered data to obtain preprocessed data.

[0203] Optionally, the second data preprocessing module 304 is specifically configured to:

[0204] Extract the consumption type feature and consumption cost feature of the preprocessed data;

[0205] Cluster the preprocessed data with the vector of the preset consumption type feature as the centroid to obtain n type data clusters, where n is a positive integer;

[0206] Cluster the type data clusters with the vector of the consumption cost feature as the centroid to obtain n - 1 target data clusters respectively;

[0207] Obtain the type data quantity and its corresponding type consumption cost within each type data cluster;

[0208] Perform a summation calculation on each type data quantity and the corresponding type consumption cost respectively to obtain the total consumption amount of each type of data;

[0209] Calculate the ratio of the total consumption amount of each type of data to the corresponding quantity of the type of data, and obtain the category mean cost corresponding to each type of data cluster;

[0210] Calculate the first consumption ratio of the total consumption amount of each type of data to the total consumption amount of all types of data, and obtain the first category proportion corresponding to each type of data cluster.

[0211] Optionally, the classification network model operation module 305 is specifically configured to:

[0212] Concatenate the category data within each target data cluster to obtain multiple vector matrices;

[0213] Input each vector matrix into the trained classification network model respectively; the classification network model includes a convolutional layer and a fully connected layer;

[0214] Perform a convolution operation on each vector matrix through the convolutional layer to obtain multiple vector features;

[0215] Calculate the category similarity between the vector features and multiple preset category features through the fully connected layer;

[0216] Classify the vector features into the classification category to which the highest value of the category similarity belongs through the fully connected layer;

[0217] Sum the quantities of the vector features within each classification category and their corresponding target consumption costs respectively, and obtain the total consumption amount of each classification category;

[0218] Calculate the second consumption ratio of the total consumption amount of each classification category to the total consumption amount of all classification categories respectively, and obtain the second category proportion corresponding to each classification category.

[0219] Optionally, the recommended activity page construction module 306 is specifically configured to:

[0220] Compare the second category proportion with a preset second category proportion threshold, and determine the consumption level of the target data cluster corresponding to the second category proportion;

[0221] Select the activity information with the first category proportion less than the preset first category proportion threshold and the consumption level less than the preset consumption threshold from the preset activity alternative table as the recommended activity information;

[0222] Load the recommended activity information into the recommended component in the preset initial activity page;

[0223] Render the recommended component to generate and display the recommended activity page.

[0224] Optionally, the recommended activity page construction module 306 is specifically further configured to:

[0225] Calculate the product of the income data and each first-category proportion respectively to obtain multiple category arrangement costs;

[0226] Construct an annual input plan table using all the category arrangement costs;

[0227] Load the annual input plan table into a preset plan component.

[0228] Optionally, the recommended activity page construction module 306 is specifically further used for:

[0229] Calculate the ratio of each category arrangement cost to a preset number of days respectively to obtain each daily average cost;

[0230] Obtain the activity costs corresponding to each activity information in the activity alternative table;

[0231] Calculate the sum of each activity cost and the corresponding daily average cost to obtain the activity budget corresponding to each activity information;

[0232] Calculate the product of each category average cost and a preset threshold coefficient respectively to obtain the activity budget threshold corresponding to each activity information;

[0233] Select the recommended activity information with the activity budget less than or equal to the activity budget threshold as the new recommended activity information.

[0234] Optionally, the recommended activity page construction module 306 is specifically further used for:

[0235] Construct a category consumption situation chart using all the first-category proportions;

[0236] Load the category consumption situation chart into the consumption component of the recommended activity page;

[0237] After rendering the consumption component, update the recommended activity page at the current moment.

[0238] Optionally, the recommended activity page construction module 306 is specifically further used for:

[0239] Construct a category consumption situation chart using all the type data clusters; wherein, the category consumption situation chart is a three-dimensional scatter plot;

[0240] Load the category consumption situation chart into the consumption component of the recommended activity page;

[0241] After rendering the consumption component, update the recommended activity page at the current moment.

[0242] Optionally, the system further includes:

[0243] A recommended activity page update module, which is used to load the plan component into the recommended activity page and render it after the recommended activity page is generated to obtain a new recommended activity page.

[0244] Optionally, the system further includes:

[0245] A query module, configured to respond to a user's information query request, send the information query request to the backend server, and display the information query result after the backend server responds.

[0246] It should be noted that the query module supports single-condition query and multi-condition query. For example, for the query method of consumption data, it can be queried by consumption type, by keyword, by payment method, by amount range, etc. For the query method of income data, it can be queried by income type, by keyword, by amount range, etc. In addition, after the user logs in, they can bind other accounts through authorization and query the data of multiple accounts. For example, family users can bind their children's accounts to easily view their children's consumption and avoid improper consumption by their children.

[0247] In an embodiment of the present invention, the query module sends the information query request to the backend server, and the backend server filters the corresponding data information from the database according to the information query request and returns it to the client to complete the information query, facilitating the user to query consumption / income data.

[0248] Optionally, the system further includes:

[0249] A modification module, configured to respond to a user's information modification request, send the information query request to the backend server, and display the information modification result after the backend server responds.

[0250] In an embodiment of the present invention, the modification module sends the information modification request to the backend server, and the backend server modifies the corresponding data information in the database according to the information modification request and returns it to the client. Among them, the information modification includes addition, deletion, or content modification, completing the information modification, facilitating the user to modify consumption / income data, and facilitating the user to flexibly adjust consumption / income data according to the actual situation.

[0251] Optionally, the system further includes:

[0252] An operation record and query module, configured to query the user's operation records and record the user's operation behaviors on the system.

[0253] In an embodiment of the present invention, the operation record and query module can query the user's operation records on the system and check their own operation behaviors. For example, if the user accidentally deletes or modifies data incorrectly when modifying data, they can return to view it. In addition, when the system crashes, it is convenient to perform a rollback operation to restore the system and data to an original correct state.

[0254] In the embodiments of the present application, the user authentication and authorized access request module 301 responds to the received user login information, verifies the user login information through the back-end server and sends an access authorization request for consumption data. Then, when the user login information is successfully verified and the authorization permission is received, the data acquisition module 302 acquires the consumption data corresponding to the user login information through the back-end server. Next, the first data preprocessing module 303 performs data preprocessing on the consumption data to obtain preprocessed data, ensuring the quality of the data and improving the data processing accuracy. Secondly, the second data preprocessing module 304 clusters the preprocessed data to obtain multiple target data clusters, the category average cost, and the first category proportion. The classification network model operation module 305 inputs the category data within each target data cluster into the trained classification network model respectively to obtain the second category proportion. Finally, the recommended activity page construction module 306 selects recommended activity information according to the first category proportion and the second category proportion, constructs a recommended activity page with the recommended activity information and displays it for the user to select. By performing clustering processing before inputting into the classification network model, the input data is more suitable for the classification network model, ensuring the usability of the classification network model. At the same time, by clustering the consumption data and combining the classification network model, comprehensive processing of the consumption data is beneficial to screening out recommended activities that are more in line with the user, avoiding the difficulty for the user to process and analyze complex and diverse consumption data, providing a good basis for the user to select activity decisions, and solving the problem that the existing service system cannot comprehensively analyze and process the multiple consumption information of the user and recommend activities to the user.

[0255] An embodiment of the present invention further provides an electronic device, including a memory and a processor. A computer program is stored in the memory. When the computer program is executed by the processor, the processor executes the steps of the home activity recommendation method according to any embodiment of the present invention.

[0256] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the above-described systems, devices, and units can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.

[0257] In several embodiments provided by the present application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be in an electrical, mechanical, or other form.

[0258] The unit described as a separation component may or may not be physically separated. The component shown as a unit may or may not be a physical unit, that is, it may be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0259] In addition, each functional unit in various embodiments of the present invention can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit.

[0260] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.

[0261] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of various embodiments of the present invention.

Claims

1. A method for recommending family activities, characterized in that, It includes the following steps: In response to the received user login information, verify the user login information through the backend server and send an access authorization request for consumption data; When the user login information is successfully verified and an authorization permission is received, obtain the consumption data corresponding to the user login information through the backend server; Perform data preprocessing on the consumption data to obtain preprocessed data; Cluster the preprocessed data to obtain multiple target data clusters, category mean costs, and a first category proportion; Input the category data within each of the target data clusters into a trained classification network model respectively to obtain a second category proportion; Select recommended activity information according to the first category proportion and the second category proportion, and construct and display a recommended activity page using the recommended activity information; The step of clustering the preprocessed data to obtain multiple target data clusters, category mean costs, and a first category proportion includes: Extract the consumption type features and consumption cost features of the preprocessed data; Cluster the preprocessed data with a preset vector of consumption type features as the centroid to obtain n type data clusters, where n is a positive integer; Cluster the type data clusters with the vector of consumption cost features as the centroid to obtain n - 1 target data clusters respectively; Obtain the number of type data and their corresponding type consumption costs within each of the type data clusters; Perform a summation calculation on the number of type data and the corresponding type consumption costs respectively to obtain the total consumption amount of each type of data; Calculate the ratio of the total consumption amount of each type of data to the number of corresponding type data to obtain the category mean cost corresponding to each type of data cluster; Calculate the first consumption ratio of the total consumption amount of each type of data to the total consumption amount of all types of data to obtain the first category proportion corresponding to each type of data cluster; The step of inputting the category data within each of the target data clusters into a trained classification network model respectively to obtain a second category proportion includes: Concatenate the category data within each of the target data clusters to obtain multiple vector matrices; Input each of the vector matrices into a trained classification network model; the classification network model includes a convolutional layer and a fully connected layer; Perform a convolution operation on each of the vector matrices through the convolutional layer to obtain multiple vector features; Calculate the category similarity between the vector features and multiple preset category features through the fully connected layer; Classify the vector features into the classification category to which the highest value of the category similarity belongs through the fully connected layer; Perform a summation calculation on the number of vector features and their corresponding target consumption costs within each of the classification categories respectively to obtain the total consumption amount of each classification category; Calculate the second consumption ratio of the total consumption amount of each classification category to the total consumption amount of all classification categories respectively to obtain the second category proportion corresponding to each classification category.

2. The family activity recommendation method according to claim 1, wherein The step of performing data preprocessing on the consumption data to obtain preprocessed data includes: Obtain the consumption type, consumption cost, and consumption time of the consumption data; Filter the consumption data according to the consumption type, consumption cost, and consumption time preset by the database query statement to obtain filtered data; Perform data normalization processing on the filtered data to obtain preprocessed data.

3. The family activity recommendation method according to claim 1, wherein The step of selecting recommended activity information according to the first category ratio and the second category ratio, constructing a recommended activity page with the recommended activity information and displaying it includes: Compare the second category ratio with a preset second category ratio threshold to determine the consumption level of the target data cluster corresponding to the second category ratio; Select activity information with a first category ratio less than a preset first category ratio threshold and a consumption level less than a preset consumption threshold from a preset activity alternative table as recommended activity information; Load the recommended activity information into a recommended component in a preset initial activity page; Render the recommended component to generate a recommended activity page and display it.

4. The family activity recommendation method according to claim 3, characterized in that Before the step of loading the recommended activity information into a recommended component in a preset initial activity page, it further includes: Verify the user login information through the backend server and send an access authorization request for income data; When the user login information is verified successfully and an authorization permission is received, obtain the income data corresponding to the user login information through the backend server; Calculate the product of the income data and each of the first category ratios respectively to obtain multiple category arrangement costs; Construct an annual investment plan table with all the category arrangement costs; Load the annual investment plan table into a preset plan component.

5. The family activity recommendation method according to claim 4, wherein After the step of calculating the product of the income data and each of the first category ratios respectively to obtain multiple category arrangement costs, it further includes: Calculate the ratio of each category arrangement cost to a preset number of days to obtain the average daily cost for each; Obtain the activity costs corresponding to each activity information in the activity alternative table; Calculate the sum of each activity cost and the corresponding average daily cost to obtain the activity budget corresponding to each activity information; Calculate the product of each category average cost and a preset threshold coefficient to obtain the activity budget threshold corresponding to each activity information; Select the recommended activity information with an activity budget less than or equal to the activity budget threshold as the new recommended activity information.

6. The family activity recommendation method according to claim 4, wherein It further includes: After generating the recommended activity page, load the plan component into the recommended activity page and render it to obtain a new recommended activity page.

7. A home activity recommendation system for performing the home activity recommendation method according to claim 1, characterized in that, It includes: A user verification and authorization access request module, which is used to respond to the received user login information, verify the user login information through the backend server and send an access authorization request for consumption data; A data acquisition module, which is used to obtain the consumption data corresponding to the user login information through the backend server when the user login information is verified successfully and an authorization permission is received; A first data preprocessing module, which is used to perform data preprocessing on the consumption data to obtain preprocessed data; A second data preprocessing module, which is used to cluster the preprocessed data to obtain multiple target data clusters, category average costs, and first category ratios; The classification network model operation module is used to input the category data in each of the target data clusters into the trained classification network model respectively to obtain the second category proportion; The recommended activity page construction module is used to select recommended activity information according to the first category proportion and the second category proportion, and construct and display a recommended activity page by using the recommended activity information.

8. An electronic device, characterized in that, It includes a memory and a processor. A computer program is stored in the memory. When the computer program is executed by the processor, the processor executes the steps of the home activity recommendation method according to any one of claims 1-6.

Citation Information

Patent Citations

  • Information recommendation method and device, computer equipment and storage medium

    CN111445304A

  • Product recommendation method and device, server and storage medium

    CN111932296A