Public account message subscription method and system based on user customization
By collecting user behavior data and predicting preferences, drawing a personalized recommendation list, and personalized screening and pushing of official account articles, the problem of lack of personalization in traditional subscription methods is solved, and user experience and operational efficiency is improved.
Patent Information
- Application Number
- CN202310754748.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-25
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2043-06-25
AI Technical Summary
The traditional public account subscription method lacks personalization and cannot be customized according to users' interests and preferences, resulting in users being uninterested in push content and reducing user participation and interactivity.
By collecting user behavior data, calculating user categories and historical preferences, using preset formulas to predict public account category preferences, drawing a personalized recommendation list, and personalized article filtering and pushing in the middleware cluster to ensure that the content matches user interests.
It improves user experience and participation, improves operational effectiveness and resource utilization efficiency, realizes more accurate and personalized subscription to public account messages, simplifies the publishing process and reduces the risk of errors.
Smart Images

Figure CN116800578B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a method and system for subscribing to public account messages based on user customization. Background Art
[0002] With the continuous development of information technology, people have entered an era of information explosion. Everyone can obtain a large amount of information through the Internet. In order to solve the problem of how to obtain valuable information quickly and efficiently, it is necessary to study a method of user-customized public account message subscription.
[0003] Traditional public account subscription methods are usually based on broadcast push for all users, and cannot be customized according to the interests and preferences of individual users. Users need to browse a large number of subscription account articles, only a few of which are relevant to their interests, resulting in increased time and energy consumption. In actual applications, due to the lack of personalization and screening of user-interested content in traditional public account subscription methods, users may not be interested in the pushed article content, which in turn reduces user participation and interactivity, making it impossible to achieve user-customized public account message subscription. Summary of the invention
[0004] The present invention provides a method and system for subscribing to public account messages based on user customization, the main purpose of which is to solve the problem of low accuracy in pushing public account message subscriptions based on user customization.
[0005] To achieve the above object, the present invention provides a method for subscribing to public account messages based on user customization, comprising:
[0006] Collect user behavior data, use the user behavior data to calculate user categories and corresponding historical preferences, use the user categories and historical preferences to calculate the predicted preferences of preset public account categories corresponding to the user categories, and draw the user categories, public account categories and predicted preferences into a personalized recommendation list, wherein the predicted preferences of the preset public account categories corresponding to the user categories are calculated using the following preference calculation formula:
[0007]
[0008] in, is the predicted preference of user category u for public account category i, is the average preference of user category u for all public account categories, r v,i is the historical preference of user category v for public account category i, is the average preference of user category v for all public account categories, sim(u,v) is the similarity between user categories u and v, and N(u) is the set of k user categories most similar to user category u;
[0009] The content published by the official account and the user subscription relationship are stored in a preset official account database, a subscription interface is created in the official account database, and the official account database is updated in real time through the subscription interface to obtain an updated database;
[0010] A middleware cluster is set up, and a public theme middleware is created through a command line tool in the middleware cluster. When a public account publishes an article, the article is sent to the public theme middleware in the form of a message, and the article is personalized and screened in the public theme middleware using the personalized recommendation list to obtain a target message;
[0011] The target message is sent to a preset personalized theme middleware, a subscriber of the public account corresponding to the target message is searched in the update database, and the target message is pushed to the user through the personalized theme middleware.
[0012] Optionally, calculating the user category and the corresponding historical preference by using the user behavior data includes:
[0013] Selecting characteristic data from the user behavior data as user characteristics;
[0014] Using a clustering algorithm to classify the user features to obtain user categories;
[0015] The data word frequency of the behavior characteristics of the user behavior data corresponding to the user category is calculated, and the user behavior data whose data word frequency is greater than a preset word frequency is used as the historical preference of the user category.
[0016] Optionally, the calculating the data word frequency of the behavior feature of the user behavior data corresponding to the user category includes:
[0017] The data word frequency of the behavior characteristics of the user behavior data corresponding to the user category is calculated using the following word frequency formula:
[0018]
[0019] Where BM is the calculated data word frequency, H is the number of data of all user behavior data, h is the number of data of user behavior data containing the behavior feature, f represents the number of times the behavior feature appears in the user behavior data, k and b represent adjustment factors, L represents the length of the user behavior data, and L a vg represents the average length of all user behavior data.
[0020] Optionally, define interface endpoints and request methods according to the interface functions;
[0021] Write interface code through the interface endpoint and request method;
[0022] The interface code is connected to the public account database to obtain an updated database.
[0023] Optionally, the writing of interface code through the interface endpoint and the request method includes:
[0024] Select programming language and code framework according to the interface function;
[0025] Generate a corresponding response code using the programming language according to the interface endpoint and the request method;
[0026] The response code is combined with the code framework to obtain an interface code.
[0027] Optionally, the step of connecting the interface code with the public account database to obtain an updated database includes:
[0028] Confirm the database type according to the interface code;
[0029] Install a database driver in the public account database using the database type;
[0030] Use the method provided by the database driver to create a database connection object in the public account database, and determine the public account database for creating the database connection object as the update database.
[0031] Optionally, the setting of the middleware cluster includes:
[0032] Install the corresponding middleware software according to the preset middleware type;
[0033] configuring the middleware software to obtain configured middleware;
[0034] Using the command line tool for configuring the middleware to start the middleware node;
[0035] Gather all started middleware nodes into a middleware cluster.
[0036] Optionally, the article is personalized screened using the personalized recommendation list in the common theme middleware to obtain a target message, including:
[0037] Creating a publisher program using the common theme middleware;
[0038] Convert the article into a message format to obtain a format message, and publish the format message to a public theme middleware through the publisher program to obtain a message middleware;
[0039] In the message middleware, the articles are personalized screened through the personalized recommendation list to obtain the target message.
[0040] Optionally, the creating a publisher program using the common theme middleware includes:
[0041] Introducing the client library of the common theme middleware into a preset blank program;
[0042] Creating a program connection object with the common theme middleware in the blank program;
[0043] A publisher object is created through the program connection object to obtain a publisher program.
[0044] In order to solve the above problems, the present invention also provides a public account message subscription system based on user customization, the system comprising:
[0045] Preference calculation module: collects user behavior data, uses the user behavior data to calculate user categories and corresponding historical preferences, uses the user categories and historical preferences to calculate the predicted preferences of preset public account categories corresponding to the user categories, and plots the user categories, public account categories and predicted preferences into a personalized recommendation list;
[0046] Update database module: store the content published by the official account and the user subscription relationship in a preset official account database, create a subscription interface in the official account database, and update the official account database in real time through the subscription interface to obtain an updated database;
[0047] Personalized screening module: set up a middleware cluster, create a public theme middleware through the command line tool in the middleware cluster, when the public account publishes an article, send the article to the public theme middleware in the form of a message, and use the personalized recommendation list in the public theme middleware to perform personalized screening on the article to obtain the target message;
[0048] The final push module: sends the target message to the preset personalized theme middleware, searches for the subscribers of the public account corresponding to the target message in the update database, and pushes the target message to the user through the personalized theme middleware.
[0049] The embodiment of the present invention collects user behavior data, calculates user categories and corresponding historical preferences, and predicts preferences, and draws a personalized recommendation list. Drawing the personalized recommendation list can achieve more accurate and personalized public account message subscription, which not only helps to improve user experience and participation, but also helps to improve operational effects and resource utilization efficiency; the content and user subscription relationship are stored in the public account database, a subscription interface is created, and the public account database is updated in real time to obtain an updated database; a middleware cluster is set, and a public theme middleware is created. When the public account publishes an article, the article is sent to the public theme middleware in the form of a message, and the article is personalized and screened to obtain a target message. Using the public theme middleware to create a publisher program can help the public account or other content providers to conveniently publish articles to the public theme middleware, thereby realizing article sharing and management, and can also simplify the publishing process, improve publishing efficiency and reduce the risk of errors; the target message is sent to the personalized theme middleware, the subscriber of the public account corresponding to the target message is found, and the target message is pushed to the user. By using the personalized theme middleware, the message can be sent to a specific topic, so that only the receiver who subscribes to the topic will receive the message. This greatly improves the efficiency of message delivery and avoids sending messages to everyone. At the same time, by publishing messages to the personalized subject middleware, it is possible to push messages to recipients who subscribe to the subject. This method is more efficient than the traditional polling method and can deliver messages to recipients in a timely manner. Therefore, the user-customized public account message subscription method and system proposed in the present invention can solve the problem of low accuracy when pushing public account message subscriptions based on user customization. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 A flowchart of a method for subscribing to public account messages based on user customization provided by an embodiment of the present invention;
[0051] Figure 2 A schematic diagram of a process for calculating user categories and corresponding historical preferences provided by an embodiment of the present invention;
[0052] Figure 3 A schematic diagram of a process for writing interface codes according to an embodiment of the present invention;
[0053] Figure 4 A functional module diagram of a public account message subscription system based on user customization provided by an embodiment of the present invention;
[0054] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0055] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0056] The embodiment of the present application provides a method for subscribing to public account messages based on user customization. The execution subject of the method for subscribing to public account messages based on user customization includes but is not limited to at least one of the electronic devices such as a server, a terminal, etc. that can be configured to execute the method provided by the embodiment of the present application. In other words, the method for subscribing to public account messages based on user customization can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc. The server can be an independent server, or it can be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.
[0057] Reference Figure 1 FIG. 1 is a flow chart of a method for subscribing to a public account message based on user customization according to an embodiment of the present invention. In this embodiment, the method for subscribing to a public account message based on user customization includes:
[0058] S1. Collect user behavior data, use the user behavior data to calculate user categories and corresponding historical preferences, use the user categories and historical preferences to calculate predicted preferences for preset public account categories corresponding to the user categories, and plot the user categories, public account categories, and predicted preferences into a personalized recommendation list;
[0059] In an embodiment of the present invention, the user behavior data includes the user's browsing history, like history, comment history, sharing history, etc. in the official account.
[0060] In detail, the user behavior data can be collected by checking the user's behavior data through the official account background, and third-party analysis tools can be used to collect and analyze the user's historical behavior data. Common third-party analysis tools include Baidu Statistics, Google Analytics, Umeng, etc. In addition, the user's interests and preferences can be understood through questionnaires. For example, a questionnaire is published in the official account, asking users how much they like certain topics or content, and what types of articles they want to see.
[0061] In addition, refer to Figure 1 As shown, the method of calculating the user category and the corresponding historical preference using the user behavior data includes:
[0062] S21, selecting characteristic data from the user behavior data as user characteristics;
[0063] S22, using a clustering algorithm to classify the user features to obtain user categories;
[0064] S23: Calculate the data word frequency of the behavior characteristics of the user behavior data corresponding to the user category, and use the user behavior data whose data word frequency is greater than a preset word frequency as the historical preference of the user category.
[0065] In detail, feature data is selected from the user behavior data as user features, wherein the feature data is appropriate features selected from the collected user behavior data, such as public account category, browsing time, purchase frequency, etc.
[0066] Specifically, the clustering algorithm is an unsupervised learning method used to group objects in a data set so that the objects in the same group have high similarity and the objects in different groups have low similarity. In an embodiment of the present invention, the clustering algorithm includes but is not limited to a K-means algorithm, a hierarchical clustering algorithm, a DBSCAN algorithm, and the like.
[0067] Furthermore, the step of calculating the data word frequency of the behavior feature of the user behavior data corresponding to the user category includes:
[0068] The data word frequency of the behavior characteristics of the user behavior data corresponding to the user category is calculated using the following word frequency formula:
[0069]
[0070] Where BM is the calculated data word frequency, H is the number of data of all user behavior data, h is the number of data of user behavior data containing the behavior feature, f represents the number of times the behavior feature appears in the user behavior data, k and b represent adjustment factors, L represents the length of the user behavior data, and L a vg represents the average length of all user behavior data.
[0071] In addition, the data word frequency of the behavioral characteristics of the user behavior data corresponding to the user category can be calculated using a text analysis tool to calculate the frequency of each word appearing in the text, also known as word frequency, wherein the text analysis tool includes but is not limited to NLTK or SpaCy in Python, and libraries such as CountVectorizer or TfidfVectorizer can also be used to implement this operation.
[0072] In an embodiment of the present invention, the method of calculating the predicted preference of the preset public account category corresponding to the user category by using the user category and the historical preference includes:
[0073] The predicted preference of the preset public account category corresponding to the user category is calculated using the following preference calculation formula:
[0074]
[0075] in, is the predicted preference of user category u for public account category i, is the average preference of user category u for all public account categories, r v,i is the historical preference of user category v for public account category i, is the average preference of user category v for all public account categories, sim(u,v) is the similarity between user categories u and v, and N(u) is the set of k user categories most similar to user category u.
[0076] In detail, the preference calculation formula can recommend the most relevant content to users based on the user's historical behavior and preferences, combined with the data of other similar users, thereby improving user satisfaction and usage experience. It does not require a lot of manpower investment and can automatically recommend content to users, effectively reducing recommendation costs.
[0077] In an embodiment of the present invention, mapping the user categories, public account categories, and predicted preferences into a personalized recommendation list can achieve more accurate and personalized public account message subscriptions, which not only helps to improve user experience and participation, but also helps to improve operational results and resource utilization efficiency.
[0078] S2. Store the content published by the official account and the user subscription relationship in a preset official account database, create a subscription interface in the official account database, and update the official account database in real time through the subscription interface to obtain an updated database;
[0079] In the embodiment of the present invention, storing the content published by the public account and the user subscription relationship in a preset public account database includes:
[0080] Create a database template according to the preset database building requirements;
[0081] Creating a content table and a relationship table in the database template respectively;
[0082] The API provided by the official account platform is called to obtain the article list and the subscription user list of the content published by the official account, and they are stored in the content table and the relationship table in the database template respectively to obtain the subscription database.
[0083] In detail, the database template is created according to preset database building requirements, wherein the database building requirements include database type, database structure, including the number of tables, fields and data types, etc.
[0084] In addition, the content table and the relationship table are created in the database template respectively, for example, the content table and the relationship table are created respectively using the following code:
[0085]
[0086] In the embodiment of the present invention, the step of creating a subscription interface in the public account database and updating the public account database in real time through the subscription interface to obtain an updated database includes:
[0087] Determine the interface function, and define the interface endpoint and the request method according to the interface function;
[0088] Write interface code through the interface endpoint and request method;
[0089] The interface code is connected to the public account database to obtain an updated database.
[0090] In detail, the interface function needs to clarify the main functions and uses of the interface, and consider the operations that the interface needs to perform, such as obtaining resources, creating new resources, updating existing resources, or deleting resources.
[0091] In addition, the interface endpoint and request method are defined according to the interface function. For example, if the interface function is to obtain data, the GET request method is usually used. If the interface function is to create data, the POST request method is usually used. If the interface function is to update data, the PUT or PATCH request method is usually used. If the interface function is to delete data, the DELETE request method is usually used. The interface function is determined to be related to the category to which it belongs. For example, registration, login or obtaining user information are user-related functions. / users may be an endpoint for obtaining all users, and / users / {id} may be an endpoint for obtaining a specific user.
[0092] Specifically, defining the interface endpoints and request methods according to the interface functions can make the structure of the API clearer and more intuitive. Developers can easily organize and manage different endpoints according to functional modules, reducing the complexity of the code. Client developers can build code logic for interacting with the API according to the target operation and the corresponding request method, simplifying the development process, thereby obtaining a better user experience and system maintainability.
[0093] Further, refer to Figure 3 As shown, the interface code is written through the interface endpoint and the request method, including:
[0094] S31, selecting a programming language and a code framework according to the interface function;
[0095] S32, generating a corresponding response code using the programming language according to the interface endpoint and the request method;
[0096] S33. Combine the response code with the code framework to obtain an interface code.
[0097] In addition, the interface code is connected to the public account database to obtain an updated database, including:
[0098] Confirm the database type according to the interface code;
[0099] Install a database driver in the public account database using the database type;
[0100] Use the method provided by the database driver to create a database connection object in the public account database, and determine the public account database for creating the database connection object as the update database.
[0101] In detail, the database types include but are not limited to MySQL, PostgreSQL, and SQLite.
[0102] Specifically, the database driver is installed in the public account database through the database type. For example, when using MySQL, the mysql-connector-python or pymysql library can be installed through the pip command; if PostgreSQL is used, the psycopg2 library can be used.
[0103] In addition, the method provided by the database driver is used to create a database connection object in the public account database. The connection object usually needs to specify the database host, port number, user name, password and other information. At the same time, the driver provides a simple and easy-to-use API for database connection, making the process of connecting to the database more convenient, and the database connection object can manage the connection pool, reuse the created connection, avoid the overhead of frequently creating and destroying the connection, thereby improving the performance of the program and reducing resource consumption.
[0104] S3, setting up a middleware cluster, creating a public theme middleware through a command line tool in the middleware cluster, and when a public account publishes an article, sending the article to the public theme middleware in the form of a message, and using the personalized recommendation list in the public theme middleware to perform personalized screening on the article to obtain a target message;
[0105] In order to enhance the scalability and fault tolerance of the system, it is necessary to set up a middleware cluster, which can not only meet business requirements such as high concurrency, high reliability, and high availability, but also dynamically scale the cluster according to actual conditions. In addition, the middleware cluster can also provide functions such as data backup, recovery, and synchronization to ensure data security and integrity.
[0106] In the embodiment of the present invention, the step of setting a middleware cluster includes:
[0107] Install the corresponding middleware software according to the preset middleware type;
[0108] configuring the middleware software to obtain configured middleware;
[0109] Using the command line tool for configuring the middleware to start the middleware node;
[0110] Gather all started middleware nodes into a middleware cluster.
[0111] In detail, the corresponding middleware software is installed according to the preset middleware type. For example, if you want to create a RabbitMQ public theme middleware cluster, you need to download and install RabbitMQ.
[0112] Specifically, the middleware software is configured to obtain the configuration middleware, including the name of the cluster to be created, the network binding address and the port number, etc.
[0113] In the embodiment of the present invention, the common topic middleware is created by the command line tool in the middleware cluster, and the common topic can be created by using the command line tool of Kafka. Use the kafka-topics.sh (Unix / Linux) or kafka-topics.bat (Windows) command, and specify the --replication-factor parameter to set the replication factor, the --partitions parameter to set the number of partitions, and the --topic parameter to set the topic name.
[0114] In addition, the article is sent to the common theme middleware in the form of a message, and the article is personalized screened by using the personalized recommendation list in the common theme middleware to obtain a target message, including:
[0115] Creating a publisher program using the common theme middleware;
[0116] Convert the article into a message format to obtain a format message, and publish the format message to a public theme middleware through the publisher program to obtain a message middleware;
[0117] In the message middleware, the articles are personalized screened through the personalized recommendation list to obtain the target message.
[0118] In detail, the method of creating a publisher program using the common theme middleware includes:
[0119] Introducing the client library of the common theme middleware into a preset blank program;
[0120] Creating a program connection object with the common theme middleware in the blank program;
[0121] A publisher object is created through the program connection object to obtain a publisher program.
[0122] In addition, the use of the public theme middleware to create a publisher program can help public accounts or other content providers to easily publish articles to the public theme middleware, thereby achieving article sharing and management, and can also simplify the publishing process, improve publishing efficiency and reduce the risk of errors.
[0123] Specifically, the personalized screening of the articles by the personalized recommendation list in the message middleware to obtain the target message includes:
[0124] Creating a subscription topic in the message middleware;
[0125] Obtain article codes that match user interests and preferences from the personalized recommendation list;
[0126] The article code list is published to a subscription topic, and the subscription topic is determined as a target message.
[0127] In an embodiment of the present invention, by utilizing a personalized recommendation list, the public account can filter out the most relevant and valuable articles based on the user's behavior, history, and preferences, and can also provide users with content of interest, so that users are more likely to interact with, read, and share these articles, thereby improving user satisfaction and engagement, increasing user engagement, and saving time and energy.
[0128] S4. Send the target message to a preset personalized theme middleware, search the update database for subscribers of the public account corresponding to the target message, and push the target message to the user through the personalized theme middleware.
[0129] In the embodiment of the present invention, by using personalized subject middleware, a message can be sent to a specific subject, so that only the receiver who subscribes to the subject will receive the message. This greatly improves the efficiency of message delivery and avoids the situation where the message is sent to everyone. At the same time, by publishing a message to the personalized subject middleware, the message can be pushed to the receiver who subscribes to the subject. This method is more efficient than the traditional polling method and can deliver the message to the receiver in a timely manner.
[0130] In the embodiment of the present invention, the subscribed user of the public account corresponding to the target message in the update database can be searched by using the function or method provided by the database client library to perform a consultation operation to find the user. For example, using the SQL query language, a query like this can be executed: SELECT*FROM users WHERE subscribed_public_account='public account identifier'.
[0131] In detail, the pushing of the target message to the user through the personalized subject middleware includes: setting a trigger condition in the personalized subject middleware; and pushing the target message to the user when the trigger condition is met.
[0132] The trigger condition is to send a corresponding message to the user when a specific condition is met. For example, if a user often searches for the latest technology news, a subscription notification can be automatically sent to the user when relevant news is released.
[0133] Furthermore, the public account message subscription method based on user customization provides users with personalized message subscription services. Users can choose the content to subscribe to according to their interests and needs, thereby obtaining more efficient, convenient and high-quality services. At the same time, providing customized message subscription services can enhance user stickiness to the public account. Users can subscribe to information that they are interested in, which makes it possible to maintain frequent interactions and thus improve user retention rate.
[0134] like Figure 4 The figure shows a functional module diagram of a public account message subscription system based on user customization provided by an embodiment of the present invention.
[0135] The user-customized public account message subscription system 100 of the present invention can be installed in an electronic device. According to the functions implemented, the user-customized public account message subscription system 100 can include a calculation preference module 101, an update database module 102, a personality screening module 103 and a final push module 4. The module of the present invention can also be referred to as a unit, which refers to a series of computer program segments that can be executed by an electronic device processor and can complete fixed functions, which are stored in the memory of the electronic device.
[0136] In this embodiment, the functions of each module / unit are as follows:
[0137] The preference calculation module 101 collects user behavior data, calculates user categories and corresponding historical preferences using the user behavior data, calculates predicted preferences of preset public account categories corresponding to the user categories using the user categories and historical preferences, and plots the user categories, public account categories and predicted preferences into a personalized recommendation list;
[0138] The updating database module 102: stores the content published by the public account and the user subscription relationship in a preset public account database, creates a subscription interface in the public account database, and updates the public account database in real time through the subscription interface to obtain an updated database;
[0139] The personalized screening module 103: sets a middleware cluster, creates a public theme middleware through a command line tool in the middleware cluster, and when a public account publishes an article, sends the article to the public theme middleware in the form of a message, and uses the personalized recommendation list in the public theme middleware to perform personalized screening on the article to obtain a target message;
[0140] The final push module 104 sends the target message to a preset personalized theme middleware, searches the update database for subscribers of the public account corresponding to the target message, and pushes the target message to the user through the personalized theme middleware.
[0141] In detail, each module described in the user-customized public account message subscription system 100 in the embodiment of the present invention is used in the same manner as described above. Figures 1 to 3 The same technical means as the user-customized public account message subscription method described in , and can produce the same technical effects, will not be repeated here.
[0142] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0143] Therefore, no matter from which point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is limited by the appended claims rather than the above description, so it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any attached figure mark in the claims should not be regarded as limiting the claims involved.
[0144] The blockchain referred to in this invention is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.
[0145] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0146] In addition, it is obvious that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. The multiple units or systems stated in the system embodiment can also be implemented by one unit or system through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any specific order.
[0147] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.
Claims
1. A method for subscribing to public account messages based on user customization, characterized in that: The method comprises: Collect user behavior data, use the user behavior data to calculate user categories and corresponding historical preferences, use the user categories and historical preferences to calculate the predicted preferences of preset public account categories corresponding to the user categories, and draw the user categories, public account categories and predicted preferences into a personalized recommendation list, wherein the predicted preferences of the preset public account categories corresponding to the user categories are calculated using the following preference calculation formula: , in, For user category For public account categories Prediction preference, For user category Average preference for all public account categories, For user category For public account categories historical preferences, For user category Average preference for all public account categories, For user category and The similarity between For user categories Most similar A collection of user categories; The content published by the official account and the user subscription relationship are stored in a preset official account database, a subscription interface is created in the official account database, and the official account database is updated in real time through the subscription interface to obtain an updated database; A middleware cluster is set up, and a public theme middleware is created through a command line tool in the middleware cluster. When a public account publishes an article, the article is sent to the public theme middleware in the form of a message, and the article is personalized and screened in the public theme middleware using the personalized recommendation list to obtain a target message; The target message is sent to a preset personalized theme middleware, a subscriber of the public account corresponding to the target message is searched in the update database, and the target message is pushed to the user through the personalized theme middleware.
2. The method for subscribing to public account messages based on user customization according to claim 1, characterized in that: The calculating the user category and the corresponding historical preference by using the user behavior data includes: Selecting characteristic data from the user behavior data as user characteristics; Using a clustering algorithm to classify the user features to obtain user categories; The data word frequency of the behavior characteristics of the user behavior data corresponding to the user category is calculated, and the user behavior data whose data word frequency is greater than a preset word frequency is used as the historical preference of the user category.
3. The method for subscribing to public account messages based on user customization according to claim 2, characterized in that: The calculating of the data word frequency of the behavior feature of the user behavior data corresponding to the user category includes: The data word frequency of the behavior characteristics of the user behavior data corresponding to the user category is calculated using the following word frequency formula: , in, is the calculated data word frequency, is the number of data of all user behavior data, is the number of user behavior data containing the behavior characteristics, Indicates the number of times a behavior feature appears in user behavior data. , represents the adjustment factor, Indicates the length of user behavior data. Indicates the average length of all user behavior data.
4. The method for subscribing to public account messages based on user customization according to claim 1, characterized in that: Define interface endpoints and request methods based on interface functions; Write interface code through the interface endpoint and request method; The interface code is connected to the public account database to obtain an updated database.
5. The method for subscribing to public account messages based on user customization according to claim 4, characterized in that: The step of writing the interface code through the interface endpoint and the request method includes: Select programming language and code framework according to the interface function; Generate a corresponding response code using the programming language according to the interface endpoint and the request method; The response code is combined with the code framework to obtain an interface code.
6. The method for subscribing to public account messages based on user customization according to claim 4, characterized in that: The step of connecting the interface code with the public account database to obtain an updated database includes: Confirm the database type according to the interface code; Install a database driver in the public account database using the database type; Use the method provided by the database driver to create a database connection object in the public account database, and determine the public account database for creating the database connection object as the update database.
7. The method for subscribing to public account messages based on user customization according to claim 1, characterized in that: The setting of the middleware cluster includes: Install the corresponding middleware software according to the preset middleware type; configuring the middleware software to obtain configured middleware; Using the command line tool for configuring the middleware to start the middleware node; Gather all started middleware nodes into a middleware cluster.
8. The method for subscribing to public account messages based on user customization according to any one of claims 1 to 7, characterized in that: The sending of the article to the common theme middleware in the form of a message, and using the personalized recommendation list in the common theme middleware to perform personalized screening on the article to obtain a target message, includes: Creating a publisher program using the common theme middleware; Convert the article into a message format to obtain a format message, and publish the format message to a public theme middleware through the publisher program to obtain a message middleware; In the message middleware, the articles are personalized screened through the personalized recommendation list to obtain the target message.
9. The method for subscribing to public account messages based on user customization according to claim 8, characterized in that: The method of creating a publisher program using the common theme middleware includes: Introducing the client library of the common theme middleware into a preset blank program; Creating a program connection object with the common theme middleware in the blank program; A publisher object is created through the program connection object to obtain a publisher program.
10. A public account message subscription system based on user customization, characterized in that: The system comprises: Preference calculation module: collects user behavior data, uses the user behavior data to calculate user categories and corresponding historical preferences, uses the user categories and historical preferences to calculate the predicted preferences of preset public account categories corresponding to the user categories, and plots the user categories, public account categories and predicted preferences into a personalized recommendation list; The following preference calculation formula is used to calculate the predicted preference of the preset public account category corresponding to the user category: , in, For user category For public account categories Prediction preference, For user category Average preference for all public account categories, For user category For public account categories historical preferences, For user category Average preference for all public account categories, For user category and The similarity between For user categories Most similar A collection of user categories; Update database module: store the content published by the official account and the user subscription relationship in a preset official account database, create a subscription interface in the official account database, and update the official account database in real time through the subscription interface to obtain an updated database; Personalized screening module: set up a middleware cluster, create a public theme middleware through the command line tool in the middleware cluster, when the public account publishes an article, send the article to the public theme middleware in the form of a message, and use the personalized recommendation list in the public theme middleware to perform personalized screening on the article to obtain the target message; The final push module: sends the target message to the preset personalized theme middleware, searches for the subscribers of the public account corresponding to the target message in the update database, and pushes the target message to the user through the personalized theme middleware.
