Product recommendation method and device based on message queue, and electronic equipment
By adopting a product recommendation method based on message queues in the financial industry, the problems of poor timeliness of product recommendations and difficult to achieve personalized services in the existing technology are solved, real-time and accurate product recommendations are achieved, and recommendation efficiency and user experience are improved.
Patent Information
- Application Number
- CN202411962849.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-04-08
AI Technical Summary
The product recommendation strategy of the existing financial industry mainly relies on non-real-time batch processing mode, resulting in poor timeliness, slow response speed, and difficulty in meeting customer personalized needs, reducing recommendation efficiency and accuracy.
Using a product recommendation method based on message queue, the target customer's identification and compressed product information from the preset database through the producer component and send it to the message queue cluster. The consumer component pulls information from the partition and sends it to the preset application, and processes and displays recommended product information in real time.
Real-time data transmission and processing are realized, the timeliness and accuracy of recommendations is improved, the personalized needs of customers are met, and the recommendation efficiency and user experience are improved.
Smart Images

Figure CN119784507A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of financial technology, and in particular to a product recommendation method based on a message queue, a device thereof, and an electronic device. Background Art
[0002] With the rapid development of Internet technology, recommendation systems have increasingly higher requirements for data processing and message transmission. Especially for real-time recommendation scenarios, the efficiency and stability of real-time data transmission have become key factors in recommendation decisions.
[0003] At present, the product recommendation strategy adopted by the financial industry mainly relies on a non-real-time batch processing mode. There are two problems with this recommendation strategy: first, the timeliness of non-real-time batch recommendations is poor. There is a time lag from data collection and analysis to the implementation of the recommendation strategy, which not only limits the response speed of the recommendation activities, but also makes it more difficult to meet the personalized services of customers, reducing the recommendation efficiency; second, non-real-time batch recommendations are based on the recommended customer set selected based on information such as customer tags, ignoring the real-time behavior and dynamic needs of customers, causing financial institutions to miss the best time to interact with customers and provide customized services, thereby affecting the accuracy of recommendations and customer satisfaction.
[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0005] The embodiments of the present invention provide a product recommendation method based on a message queue, a device thereof, and an electronic device, so as to at least solve the technical problem of low efficiency in recommending financial products in the related art.
[0006] According to one aspect of an embodiment of the present application, a product recommendation method based on a message queue is provided, comprising: when it is detected that a target customer is operating on a preset application, using a producer component to obtain a target customer identifier of the target customer and compressed product information associated with the target customer identifier from a preset database, wherein the preset database pre-stores a plurality of target customer identifiers and product information associated with each target customer identifier, and the compressed product information is obtained by compressing the product information associated with the target customer identifier; using the producer component to send the target customer identifier and the compressed product information associated with the target customer identifier to a preset message queue cluster, wherein the preset message queue cluster comprises: a plurality of message service nodes, the message service nodes comprise: a plurality of message topics, the message topics comprise: a plurality of partitions, the partitions are used to store the compressed product information; using a plurality of consumer components in a consumer group to pull the compressed product information from the plurality of partitions respectively, and send the compressed product information to the preset application operated by the target customer, wherein the preset application processes the compressed product information, obtains information about recommended products, and displays the recommended product information on the interface of the preset application.
[0007] Furthermore, when it is detected that the target customer is operating on a preset application, before the producer component is used to obtain the target customer identification of the target customer and the compressed product information associated with the target customer identification from the preset database, it also includes: screening the customers in the target financial institution to determine a target customer set, wherein the target customer set includes: a target customer identification; determining a set of products to be recommended for each customer indicated by the target customer identification, and associating the product information of each product to be recommended in the set of products to be recommended with the target customer identification; storing each target customer identification and the product information associated with the target customer identification in the preset database.
[0008] Furthermore, the step of screening the customers in the target financial institution to determine the target customer set includes: generating a preset label for each of the customers based on the historical transaction information of the customers; and screening the customers based on the preset labels to determine the target customer set.
[0009] Furthermore, before using the producer component to send the target customer identifier and the compressed product information associated with the target customer identifier to the preset message queue cluster, it also includes: constructing multiple message service nodes, and constructing the preset message queue cluster based on all the message service nodes; based on the message service nodes, using a preset command line script, creating the message topic, and based on the message topic, creating the partition.
[0010] Furthermore, after creating the partition based on the message topic, it also includes: configuring the configuration parameters of the producer component, wherein the configuration parameters at least include: a batch size parameter; based on the batch size parameter, determining the size of the compressed product information sent by the producer component.
[0011] Furthermore, after the producer component is used to send the target customer identifier and the compressed product information associated with the target customer identifier to the preset message queue cluster, it also includes: controlling the message service node to receive the compressed product information; determining the target message topic based on the data type corresponding to the compressed product information, and storing the compressed product information to any partition of the target message topic.
[0012] Furthermore, before using multiple consumer components in the consumer group to pull the compressed product information from the multiple partitions respectively, it also includes: configuring the configuration parameters of each of the consumer components, wherein the configuration parameters at least include: a minimum byte number parameter; based on the minimum byte number parameter, determining the size of the compressed product information received by the consumer component.
[0013] Furthermore, the product recommendation method also includes: performing performance monitoring on the preset message queue cluster; when a performance failure is detected in any of the message service nodes in the preset message queue cluster, sending the compressed product information in the message service node to other message service nodes, wherein the other message service nodes are the message service nodes that do not have the performance failure.
[0014] According to another aspect of an embodiment of the present application, a product recommendation device based on a message queue is also provided, including: an acquisition unit, which is used to use a producer component to acquire a target customer identifier of the target customer and compressed product information associated with the target customer identifier from a preset database when it is detected that the target customer operates on a preset application, wherein the preset database pre-stores multiple target customer identifiers and product information associated with each target customer identifier, and the compressed product information is obtained by compressing the product information associated with the target customer identifier; a first sending unit, which is used to use the producer component to send the target customer identifier and the compressed product information associated with the target customer identifier to a preset message queue cluster, wherein the preset message queue cluster includes: multiple message service nodes, the message service nodes include: multiple message topics, the message topics include: multiple partitions, and the partitions are used to store the compressed product information; a second sending unit, which is used to use multiple consumer components in a consumer group to pull the compressed product information from the multiple partitions respectively, and send the compressed product information to the preset application operated by the target customer, wherein the preset application processes the compressed product information, obtains information about recommended products, and displays the information about recommended products on the interface of the preset application.
[0015] Furthermore, the product recommendation device includes: a first screening module, which is used to screen customers in the target financial institution and determine a target customer set before using a producer component to obtain the target customer identification of the target customer and the compressed product information associated with the target customer identification from a preset database when it is detected that the target customer is operating on a preset application, wherein the target customer set includes: a target customer identification; a first determination module, which is used to determine a set of products to be recommended for each customer indicated by the target customer identification, and associate the product information of each product to be recommended in the set of products to be recommended with the target customer identification; and a first storage module, which is used to store each target customer identification and the product information associated with the target customer identification in the preset database.
[0016] Furthermore, the first screening module includes: a first generating submodule, used to generate a preset label for each of the customers based on the historical transaction information of the customers; and a first screening submodule, used to screen the customers based on the preset labels to determine the target customer set.
[0017] Furthermore, the product recommendation device also includes: a first construction module, used to build a plurality of the message service nodes before using the producer component to send the target customer identifier and the compressed product information associated with the target customer identifier to the preset message queue cluster, and to build the preset message queue cluster based on all the message service nodes; a first creation module, used to create the message topic based on the message service node using a preset command line script, and to create the partition based on the message topic.
[0018] Furthermore, the product recommendation device also includes: a first configuration module, used to configure the configuration parameters of the producer component after creating the partition based on the message topic, wherein the configuration parameters include at least: a batch size parameter; a second determination module, used to determine the size of the compressed product information sent by the producer component based on the batch size parameter.
[0019] Furthermore, the product recommendation device also includes: a first receiving module, used to control the message service node to receive the compressed product information after the producer component uses the target customer identifier and the compressed product information associated with the target customer identifier to a preset message queue cluster; a third determination module, used to determine the target message topic based on the data type corresponding to the compressed product information, and store the compressed product information to any partition of the target message topic.
[0020] Furthermore, the product recommendation device also includes: a second configuration module, used to configure the configuration parameters of each consumer component before using multiple consumer components in the consumer group to pull the compressed product information from the multiple partitions respectively, wherein the configuration parameters include at least: a minimum byte number parameter; a fourth determination module, used to determine the size of the compressed product information received by the consumer component based on the minimum byte number parameter.
[0021] Furthermore, the product recommendation device also includes: a first monitoring module, used to monitor the performance of the preset message queue cluster; a first sending module, used to send the compressed product information in the message service node to other message service nodes when a performance failure is detected in any of the message service nodes in the preset message queue cluster, wherein the other message service nodes are the message service nodes that do not have the performance failure.
[0022] According to another aspect of an embodiment of the present application, a computer program product is also provided, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, any one of the above-mentioned product recommendation methods based on a message queue is implemented.
[0023] According to another aspect of an embodiment of the present application, an electronic device is also provided, including one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement any one of the above-mentioned product recommendation methods based on the message queue.
[0024] In the present invention, when it is detected that the target customer is operating on a preset application, a producer component is used to obtain the target customer identifier of the target customer and the compressed product information associated with the target customer identifier from a preset database, and the producer component is used to send the target customer identifier and the compressed product information associated with the target customer identifier to a preset message queue cluster, and multiple consumer components in a consumer group are used to pull the compressed product information from multiple partitions respectively, and send the compressed product information to the preset application operated by the target customer, thereby solving the technical problem of low efficiency in recommending financial products in related technologies.
[0025] In the present invention, when it is detected that the target customer is performing an interactive operation in a preset application, the producer component can obtain the unique identifier of the target customer and the compressed product information associated with the target customer identifier from the preset database. The producer component can then send the obtained target customer identifier and the associated compressed product information to the preset message queue cluster. Then, multiple consumer components in the consumer group can respectively pull the compressed product information from different partitions of the preset message queue cluster, and can send the compressed product information to the preset application operated by the target customer. The preset application can process the compressed product information, obtain the recommended product information, and can display the recommended product information on the interface of the preset application, thereby ensuring the real-time and accuracy of the information, realizing the instant push of the recommended product information, and thus achieving the technical effect of improving the efficiency of financial product recommendations. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0027] Figure 1 A hardware structure block diagram of a computer terminal (or mobile device) for implementing a product recommendation method based on a message queue is shown;
[0028] Figure 2 is a flowchart of a product recommendation method based on a message queue according to Embodiment 1 of the present application;
[0029] Figure 3is a schematic diagram of an optional product recommendation process according to an embodiment of the present application;
[0030] Figure 4 is a schematic diagram of an optional product recommendation device based on a message queue according to an embodiment of the present application;
[0031] Figure 5 It is a structural block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0032] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0033] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0034] It should be noted that the relevant information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) collected and involved in the present invention are all information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of relevant data are in compliance with the relevant laws, regulations and standards of the relevant regions, necessary confidentiality measures are taken, and public order and good customs are not violated, and corresponding operation entrances are provided for users to choose to authorize or refuse. For example, an interface is set between the system and the relevant users or organizations. Before obtaining relevant information, it is necessary to send an acquisition request to the aforementioned user or organization through the interface, and obtain relevant information after receiving the consent information fed back by the aforementioned user or organization.
[0035] In the present invention, when it is detected that a customer is operating in a page of a preset application, the producer component captures the customer-related identification and compressed product information from the preset database in real time to ensure the timeliness of the information. The producer component then efficiently pushes the compressed product information to the distributed preset message queue cluster, utilizing its distributed architecture and high throughput characteristics to achieve rapid data flow and large-scale processing. Multiple consumer components of the consumer group pull compressed product information from each partition and send the compressed product information to the preset application, providing customers with personalized product recommendations and services, thereby enhancing customer stickiness and recommendation effects, and improving the accuracy of real-time recommendations.
[0036] The present invention is described in detail below in conjunction with various embodiments.
[0037] Example 1
[0038] According to an embodiment of the present application, an embodiment of a product recommendation method based on a message queue is also provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0039] The method embodiment provided in the first embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 FIG. 1 shows a hardware structure block diagram of a computer terminal (or mobile device) for implementing a product recommendation method based on a message queue. Figure 1 As shown, the computer terminal 10 (or mobile device) may include one or more ( Figure 1 102a, 102b, ..., 102n are used to illustrate) processor 102 (processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, a keyboard, a cursor control device, an input / output interface (I / 0 interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera, wherein the network interface may be connected to a wired and / or wireless network. A person of ordinary skill in the art will understand that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0040] It should be noted that the one or more processors 102 and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 10 (or mobile device). As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).
[0041] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the product recommendation method based on the message queue in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, realizing the above-mentioned product recommendation method based on the message queue. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0042] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0043] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 (or mobile device).
[0044] Under the above operating environment, this application provides Figure 2 The product recommendation method based on the message queue is shown. Figure 2 is a flowchart of a product recommendation method based on a message queue according to Example 1 of the present application, such as Figure 2 As shown, the method comprises the following steps:
[0045] Step S201, when it is detected that the target customer is operating on a preset application, a producer component is used to obtain a target customer identifier of the target customer and compressed product information associated with the target customer identifier from a preset database, wherein the preset database pre-stores multiple target customer identifiers and product information associated with each target customer identifier, and the compressed product information is obtained by compressing the product information associated with the target customer identifier.
[0046] Optionally, the target customers are screened or identified customers with specific values or needs (such as customers pre-selected through batch recommendation and with high value or potential recommendation value (such as customers with high spending power)).
[0047] In an embodiment of the present invention, the operations (such as query, click, etc.) of the target customer on a preset application (such as a mobile client of a financial institution) can be monitored in real time. When it is detected that the target customer is operating on the preset application, the producer component is used to obtain the target customer identification of the target customer and the compressed product information associated with the target customer identification (that is, the product information of the target customer identification in the preset database is compressed) from a preset database (which stores multiple target customer identifications and product information associated with each target customer identification), thereby ensuring the integrity and timeliness of the information and reducing the cost of data transmission and storage.
[0048] Step S202, using a producer component to send the target customer identifier and the compressed product information associated with the target customer identifier to a preset message queue cluster, wherein the preset message queue cluster includes: multiple message service nodes, the message service nodes include: multiple message topics, the message topics include: multiple partitions, and the partitions are used to store compressed product information.
[0049] Optionally, a preset message queue cluster (such as a distributed message queue cluster) composed of multiple Brokers (ie, message service nodes) is responsible for the storage, forwarding, and management of messages, and is the core processing unit of the real-time recommendation data stream.
[0050] In the embodiment of the present invention, a producer component may be used to send the target customer identifier and the compressed product information associated with the target customer identifier to a partition under a message topic under a message service node.
[0051] Step S203, using multiple consumer components in the consumer group to pull compressed product information from multiple partitions respectively, and send the compressed product information to a preset application operated by the target customer, wherein the preset application processes the compressed product information, obtains information about recommended products, and displays the recommended product information on the interface of the preset application.
[0052] In an embodiment of the present invention, consumer components within a consumer group can pull compressed product information from different partitions of a preset message queue cluster in parallel. Through parallel processing, high-concurrency data consumption requirements can be met, thereby improving the efficiency and throughput of message processing.
[0053] In an embodiment of the present invention, the consumer component sends the pulled compressed product information to the preset application currently operated by the target customer. The preset application receives the compressed product information and decompresses the compressed product information to obtain the recommended product information. The recommended product information can be displayed on the interface of the preset application, thereby realizing real-time push of information and ensuring that the recommended content can instantly reflect the customer's behavior and needs.
[0054] In summary, when it is detected that the target customer is performing an interactive operation in the preset application, the producer component can obtain the target customer's unique identifier and the compressed product information associated with the target customer identifier from the preset database. The producer component can then send the obtained target customer identifier and the associated compressed product information to the preset message queue cluster. Then, multiple consumer components in the consumer group can respectively pull the compressed product information from different partitions of the preset message queue cluster, and can send the compressed product information to the preset application operated by the target customer. The preset application can process the compressed product information, obtain the recommended product information, and can display the recommended product information on the interface of the preset application, thereby solving the technical problem of low efficiency in recommending financial products in related technologies.
[0055] In order to accurately obtain the preset database, in the message queue-based product recommendation method provided in Example 1 of the present application, customers in the target financial institution are screened to determine a target customer set, wherein the target customer set includes: a target customer identifier; determining a set of products to be recommended for the customer indicated by each target customer identifier, and associating the product information of each product to be recommended in the set of products to be recommended with the target customer identifier; and storing each target customer identifier and the product information associated with the target customer identifier in the preset database.
[0056] Optionally, the massive customer data in the target financial institution can be finely screened to identify customer groups with potential high value or specific recommendation needs, thereby building a target customer set (such as customers with high spending power).
[0057] In an embodiment of the present invention, for each target customer identifier (used to represent the unique identity of the customer), a set of products to be recommended for the customer indicated by the target customer identifier is determined, and the product information of each product to be recommended in the set of products to be recommended can be associated with the target customer identifier, and each target customer identifier and the product information associated with the target customer identifier are stored in a preset database, so that the most suitable set of products to be recommended is screened from the rich product library of the financial institution, thereby improving the efficiency of data retrieval and transmission, providing convenience for the producer component to instantly obtain customer information and product information, and thereby accelerating the operation of the real-time recommendation process.
[0058] In order to accurately determine the target customer set, in the message queue-based product recommendation method provided in Example 1 of the present application, a preset label is generated for each customer based on the customer's historical transaction information; based on the preset label, the customers are screened to determine the target customer set.
[0059] In an embodiment of the present invention, a preset label (such as high consumption level, low consumption level, etc.) can be generated for each customer based on the customer's historical transaction information (such as customer behavior analysis, transaction history, account activity and other multi-dimensional data). Based on the preset labels, customers with high potential can be screened out, and customers with similar behavioral characteristics, preferences or needs can be effectively classified, further narrowing the scope of recommendation objects, thereby improving the pertinence and efficiency of recommendation activities.
[0060] In order to accurately construct a preset message queue cluster, in the message queue-based product recommendation method provided in Example 1 of the present application, multiple message service nodes are constructed, and a preset message queue cluster is constructed based on all message service nodes; based on the message service nodes, a preset command line script is used to create a message topic, and based on the message topic, a partition is created.
[0061] Optionally, multiple message service nodes of a preset message queue cluster may be deployed, each of which may store and transmit messages, thereby ensuring the efficiency and reliability of message processing.
[0062] In an embodiment of the present invention, multiple message topics can be created through a preset command line script (such as topics.sh), and the message topics can manage different types of messages (such as information on different products) to ensure data traceability.
[0063] In an embodiment of the present invention, each message topic can be divided into multiple partitions. The partition mechanism ensures parallel processing and storage of messages, and can ensure fast processing and low-latency transmission of messages even in high-concurrency scenarios.
[0064] In order to accurately determine the size of compressed product information sent by the producer component, in the message queue-based product recommendation method provided in Example 1 of the present application, the configuration parameters of the producer component are configured, wherein the configuration parameters include at least: a batch size parameter; based on the batch size parameter, the size of the compressed product information sent by the producer component is determined.
[0065] Optionally, the parameters of the producer component can be configured to optimize its data transmission efficiency and performance in the real-time recommendation system. The setting of the batch size parameter (i.e., batch.size) can determine the number of messages sent by the producer component at one time (i.e., the size of the compressed product information). A larger batch size parameter can reduce the number of times the producer component sends data to the preset message queue cluster, thereby reducing network overhead and improving data transmission efficiency.
[0066] In the embodiment of the present invention, the batch size parameters can be dynamically adjusted in the actual environment, and the transmission size of the compressed product information can be automatically optimized according to the real-time network status and load to achieve the best performance balance.
[0067] In order to accurately store compressed product information in any partition of the target message topic, in the message queue-based product recommendation method provided in Example 1 of the present application, the message service node is controlled to receive compressed product information; based on the data type corresponding to the compressed product information, the target message topic is determined, and the compressed product information is stored in any partition of the target message topic.
[0068] Optionally, the message service node is controlled to receive compressed product information to ensure that the message service node can efficiently and stably receive and store the compressed product information, thereby avoiding data loss or system delays caused by improper message reception.
[0069] In an embodiment of the present invention, the target message topic can be determined according to the data type corresponding to the compressed product information (such as financial products, insurance products, credit services, etc.) (that is, this type of product recommendation information can be classified under one topic), and the compressed product information can be stored in any partition of the target message topic.
[0070] In order to accurately determine the size of the compressed product information received by the consumer component, in the message queue-based product recommendation method provided in Example 1 of the present application, the configuration parameters of each consumer component are configured, wherein the configuration parameters include at least: a minimum byte number parameter; based on the minimum byte number parameter, the size of the compressed product information received by the consumer component is determined.
[0071] In an embodiment of the present invention, the minimum byte number parameter (i.e., fetch.min.bytes) can determine the minimum byte number that the consumer component must meet when requesting data from a preset message queue cluster. In each operation of pulling compressed product information, the consumer component can obtain the minimum byte amount of data defined by the minimum byte number parameter, thereby improving data transmission efficiency, reducing the number of network requests, and ensuring that the consumer component can process real-time product recommendation information in a timely manner to meet the user's immediate response needs.
[0072] In order to improve the performance of the preset message queue cluster, in the message queue-based product recommendation method provided in Example 1 of the present application, the performance of the preset message queue cluster is monitored; when a performance failure is detected in any message service node in the preset message queue cluster, the compressed product information in the message service node is sent to other message service nodes, wherein the other message service nodes are message service nodes that have not experienced performance failures.
[0073] Optionally, a performance monitoring tool or a performance monitoring interface can be used to perform real-time performance monitoring of each message service node in a preset message queue cluster (such as CPU (Central Processing Unit) utilization, memory usage, disk I / 0 (input / output), network latency, message throughput, etc.).
[0074] In an embodiment of the present invention, when a performance failure is detected in any message service node in the preset message queue cluster (such as abnormally high CPU usage, memory overflow, unstable network connection, etc.), the failover mechanism is automatically triggered, and the compressed product information on the failed node can be reallocated and sent to other message service nodes in the cluster that have not experienced performance failures, thereby achieving high availability of the preset message queue cluster.
[0075] Figure 3 is a schematic diagram of an optional product recommendation process according to an embodiment of the present application, such as Figure 3As shown, when it is detected that the target customer is operating on the client application interface (i.e., the preset application), the producer component can first be used to obtain the target customer identifier of the target customer and the compressed product information associated with the target customer identifier from the product information database (i.e., the preset database), and the producer component can be used to send the target customer identifier and the compressed product information associated with the target customer identifier to the message queue cluster (the message queue cluster can include multiple message service nodes, such as Broker1 and Broker2). After that, the consumer component in the consumer group can be used to pull the compressed product information from the partition (such as Partition-0) of a message topic (such as TopicA) under the message service node, and send the compressed product information to the preset application operated by the target customer. The preset application can process the compressed product information, obtain the recommended product information, and display the recommended product information on the interface of the preset application.
[0076] The product recommendation method based on message queue provided in the embodiment of the present application can configure producer component parameters and consumer component parameters, combined with the message service nodes of the preset message queue cluster to intelligently receive and store compressed product information, and can efficiently allocate it to the corresponding topic partitions according to data type, thereby ensuring the low-latency characteristics of real-time recommendation. Through the continuous performance monitoring mechanism, when a performance failure of the message service node is detected, the affected compressed product information can be quickly redirected to a healthy node in the cluster, maintaining the continuity of the data flow, which not only improves the efficiency and stability of real-time recommendation, but also ensures that the recommendation strategy can be executed in real time and accurately, thereby improving user experience and business results.
[0077] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0078] Example 2
[0079] The embodiment of the present application also provides a product recommendation device based on a message queue. It should be noted that the product recommendation device based on a message queue in the embodiment of the present application can be used to execute the product recommendation method based on a message queue provided in the embodiment of the present application. The product recommendation device based on a message queue provided in the embodiment of the present application is introduced below.
[0080] According to an embodiment of the present application, a device for implementing the above-mentioned product recommendation method based on message queue is also provided. Figure 4 is a schematic diagram of an optional product recommendation device based on a message queue according to an embodiment of the present application, such as Figure 4As shown, the product recommendation device based on the message queue may include: an acquisition unit 40 , a first sending unit 41 , and a second sending unit 42 .
[0081] The acquisition unit 40 is used to acquire the target customer identifier of the target customer and the compressed product information associated with the target customer identifier from the preset database by using the producer component when detecting that the target customer performs an operation on the preset application, wherein the preset database pre-stores a plurality of target customer identifiers and the product information associated with each target customer identifier, and the compressed product information is obtained by compressing the product information associated with the target customer identifier;
[0082] The first sending unit 41 is used to use the producer component to send the target customer identifier and the compressed product information associated with the target customer identifier to a preset message queue cluster, wherein the preset message queue cluster includes: a plurality of message service nodes, the message service nodes include: a plurality of message topics, the message topics include: a plurality of partitions, and the partitions are used to store the compressed product information;
[0083] The second sending unit 42 is used to use multiple consumer components in the consumer group to pull compressed product information from multiple partitions respectively, and send the compressed product information to a preset application operated by the target customer, wherein the preset application processes the compressed product information, obtains the recommended product information, and displays the recommended product information on the interface of the preset application.
[0084] The message queue-based product recommendation device provided in the embodiment of the present application can, through the acquisition unit 40, when it is detected that the target customer is operating on the preset application, use the producer component to obtain the target customer identifier of the target customer and the compressed product information associated with the target customer identifier from the preset database, and can use the first sending unit 41 to use the producer component to send the target customer identifier and the compressed product information associated with the target customer identifier to the preset message queue cluster, and can use the second sending unit 42 to use multiple consumer components in the consumer group to pull the compressed product information from multiple partitions respectively, and send the compressed product information to the preset application operated by the target customer.
[0085] Optionally, the product recommendation device includes: a first screening module, which is used to screen customers in the target financial institution and determine a target customer set before using a producer component to obtain the target customer identification of the target customer and compressed product information associated with the target customer identification from a preset database when it is detected that the target customer is operating on a preset application, wherein the target customer set includes: a target customer identification; a first determination module, which is used to determine a set of products to be recommended for the customer indicated by each target customer identification, and associate the product information of each product to be recommended in the set of products to be recommended with the target customer identification; and a first storage module, which is used to store each target customer identification and the product information associated with the target customer identification in a preset database.
[0086] Optionally, the first screening module includes: a first generating submodule, used to generate a preset label for each customer based on the customer's historical transaction information; and a first screening submodule, used to screen customers based on the preset labels to determine a target customer set.
[0087] Optionally, the product recommendation device also includes: a first construction module, used to build multiple message service nodes before using the producer component to send the target customer identifier and the compressed product information associated with the target customer identifier to the preset message queue cluster, and build a preset message queue cluster based on all message service nodes; a first creation module, used to create a message topic based on the message service node using a preset command line script, and create a partition based on the message topic.
[0088] Optionally, the product recommendation device also includes: a first configuration module, used to configure the configuration parameters of the producer component after creating a partition based on the message topic, wherein the configuration parameters include at least: a batch size parameter; a second determination module, used to determine the size of compressed product information sent by the producer component based on the batch size parameter.
[0089] Optionally, the product recommendation device also includes: a first receiving module, used to control the message service node to receive compressed product information after the producer component uses the target customer identifier and the compressed product information associated with the target customer identifier to a preset message queue cluster; a third determination module, used to determine the target message topic based on the data type corresponding to the compressed product information, and store the compressed product information in any partition of the target message topic.
[0090] Optionally, the product recommendation device also includes: a second configuration module, used to configure the configuration parameters of each consumer component before using multiple consumer components in the consumer group to pull compressed product information from multiple partitions respectively, wherein the configuration parameters include at least: a minimum byte number parameter; a fourth determination module, used to determine the size of the compressed product information received by the consumer component based on the minimum byte number parameter.
[0091] Optionally, the product recommendation device also includes: a first monitoring module, used to monitor the performance of a preset message queue cluster; a first sending module, used to send the compressed product information in the message service node to other message service nodes when a performance failure is detected in any message service node in the preset message queue cluster, wherein the other message service nodes are message service nodes that have not experienced performance failures.
[0092] The above-mentioned product recommendation device based on message queue may also include a processor and a memory. The above-mentioned acquisition unit 40, the first sending unit 41, the second sending unit 42, etc. are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize corresponding functions.
[0093] The processor includes a kernel, which retrieves the corresponding program unit from the memory. One or more kernels can be set, and the kernel parameters can be adjusted to display the recommended product information on the interface of the preset application based on all the processed data.
[0094] The above-mentioned memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one storage chip.
[0095] It should be noted that the acquisition unit 40, the first sending unit 41, and the second sending unit 42 correspond to steps S201 to S203 in Example 1, and the examples and application scenarios implemented by the above units and the corresponding steps are the same, but are not limited to the contents disclosed in the above Example 1. It should be noted that the above units can be hardware components or software components stored in a memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n), and the above units can also be run in the computer terminal 10 provided in Example 1 as part of the device.
[0096] Example 3
[0097] The embodiment of the present application may provide a computer terminal, which may be any computer terminal device in a computer terminal group. Optionally, in this embodiment, the computer terminal may also be replaced by a terminal device such as a mobile terminal or an electronic device.
[0098] Optionally, in this embodiment, the computer terminal may be located in at least one network device among a plurality of network devices of the computer network.
[0099] In this embodiment, the above-mentioned computer terminal can execute the program code of the following steps in the product recommendation method based on the message queue: when it is detected that the target customer is operating on the preset application, the producer component is used to obtain the target customer identifier of the target customer and the compressed product information associated with the target customer identifier from the preset database, wherein the preset database pre-stores multiple target customer identifiers and the product information associated with each target customer identifier, and the compressed product information is obtained by compressing the product information associated with the target customer identifier; the producer component is used to send the target customer identifier and the compressed product information associated with the target customer identifier to the preset message queue cluster, wherein the preset message queue cluster includes: multiple message service nodes, the message service nodes include: multiple message topics, the message topics include: multiple partitions, and the partitions are used to store compressed product information; multiple consumer components in the consumer group are used to pull the compressed product information from the multiple partitions respectively, and send the compressed product information to the preset application operated by the target customer, wherein the preset application processes the compressed product information, obtains the recommended product information, and displays the recommended product information on the interface of the preset application.
[0100] Optionally, the above-mentioned computer terminal can execute the program code of the following steps in the product recommendation method based on the message queue: screening the customers in the target financial institution to determine the target customer set, wherein the target customer set includes: target customer identification; determining the set of products to be recommended for the customer indicated by each target customer identification, and associating the product information of each product to be recommended in the set of products to be recommended with the target customer identification; storing each target customer identification and the product information associated with the target customer identification in a preset database.
[0101] Optionally, the computer terminal may execute the program code of the following steps in the product recommendation method based on the message queue: generating a preset label for each customer based on the customer's historical transaction information; screening customers based on the preset labels to determine a target customer set.
[0102] Optionally, the above-mentioned computer terminal can execute the program code of the following steps in the product recommendation method based on the message queue: construct multiple message service nodes, and construct a preset message queue cluster based on all message service nodes; based on the message service nodes, use a preset command line script to create a message topic, and create a partition based on the message topic.
[0103] Optionally, the above-mentioned computer terminal can execute the program code of the following steps in the product recommendation method based on the message queue: configure the configuration parameters of the producer component, wherein the configuration parameters at least include: batch size parameters; based on the batch size parameters, determine the size of the compressed product information sent by the producer component.
[0104] Optionally, the above-mentioned computer terminal can execute the program code of the following steps in the product recommendation method based on the message queue: control the message service node to receive compressed product information; determine the target message topic based on the data type corresponding to the compressed product information, and store the compressed product information in any partition of the target message topic.
[0105] Optionally, the above-mentioned computer terminal can execute the program code of the following steps in the product recommendation method based on the message queue: configure the configuration parameters of each consumer component, wherein the configuration parameters at least include: a minimum byte number parameter; based on the minimum byte number parameter, determine the size of the compressed product information received by the consumer component.
[0106] Optionally, the above-mentioned computer terminal can execute the program code of the following steps in the product recommendation method based on the message queue: performance monitoring of the preset message queue cluster; when a performance failure is detected in any message service node in the preset message queue cluster, the compressed product information in the message service node is sent to other message service nodes, wherein the other message service nodes are message service nodes that have not experienced performance failures.
[0107] Optionally, Figure 5 is a structural block diagram of an electronic device according to an embodiment of the present application. Figure 5 As shown, the electronic device may include: one or more ( Figure 5 (only one is shown) processor 502, memory 504, storage controller, and peripheral interface, wherein the peripheral interface is connected to the radio frequency module, audio module and display.
[0108] Among them, the memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the product recommendation method and device based on the message queue in the embodiment of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, realizing the above-mentioned product recommendation method based on the message queue. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories can be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0109] The processor can call the information and application programs stored in the memory through the transmission device to execute the above steps in the above message queue-based product recommendation method.
[0110] By adopting the embodiment of the present application, a solution for a method for recommending financial products is provided, in which a producer component captures customer-related identification and compressed product information from a preset database in real time, and efficiently pushes the compressed product information to a distributed preset message queue cluster, and utilizes its distributed architecture and high throughput characteristics to achieve rapid data flow and large-scale processing. Multiple consumer components of a consumer group pull compressed product information from each partition of the preset message queue cluster, and send the compressed product information to a preset application, so as to provide customers with personalized product recommendations and services, realize high-concurrency, low-latency real-time recommendations, improve the recommendation efficiency of financial products, and thus solve the technical problem of low efficiency in recommending financial products in related technologies.
[0111] It can be understood by those skilled in the art that Figure 5 The structure shown is for illustration only, and the electronic device may also be a terminal device such as a smart phone, a tablet computer, a PDA, and a mobile Internet device (MID). Figure 5 The structure of the electronic device is not limited. Figure 5 More or fewer components (such as network interfaces, display devices, etc.) shown in, or having Figure 5 Different configurations shown.
[0112] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0113] Example 4
[0114] The embodiment of the present application further provides a storage medium. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the product recommendation method based on the message queue provided in the first embodiment.
[0115] Optionally, in this embodiment, the above storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.
[0116] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing the program steps of the product recommendation method based on a message queue.
[0117] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0118] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0119] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. 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 mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0120] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0121] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0122] If the 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 this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.
[0123] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A product recommendation method based on a message queue, characterized in that: include: When it is detected that the target customer performs an operation on a preset application, a producer component is used to obtain a target customer identifier of the target customer and compressed product information associated with the target customer identifier from a preset database, wherein the preset database pre-stores a plurality of target customer identifiers and product information associated with each target customer identifier, and the compressed product information is obtained by compressing the product information associated with the target customer identifier; The producer component is used to send the target customer identifier and the compressed product information associated with the target customer identifier to a preset message queue cluster, wherein the preset message queue cluster includes: a plurality of message service nodes, the message service nodes include: a plurality of message topics, the message topics include: a plurality of partitions, and the partitions are used to store the compressed product information; Multiple consumer components in a consumer group are used to pull the compressed product information from the multiple partitions respectively, and send the compressed product information to the preset application operated by the target customer, wherein the preset application processes the compressed product information, obtains the recommended product information, and displays the recommended product information on the interface of the preset application.
2. The product recommendation method based on message queue according to claim 1, characterized in that: When it is detected that the target customer performs an operation on the preset application, before the producer component is used to obtain the target customer identifier of the target customer and the compressed product information associated with the target customer identifier from the preset database, the method further includes: Screening the customers in the target financial institution to determine a target customer set, wherein the target customer set includes: a target customer identifier; Determine a set of products to be recommended for the customer indicated by each target customer identifier, and associate the product information of each product to be recommended in the set of products to be recommended with the target customer identifier; Each target customer identification and the product information associated with the target customer identification are stored in the preset database.
3. The product recommendation method based on message queue according to claim 2, characterized in that: The steps of screening the customers in the target financial institution and determining the target customer set include: Based on the historical transaction information of the customer, generating a preset label for each of the customers; Based on the preset tags, the customers are screened to determine the target customer set.
4. The product recommendation method based on message queue according to claim 1, characterized in that: Before using the producer component to send the target customer identifier and the compressed product information associated with the target customer identifier to a preset message queue cluster, the method further includes: Constructing a plurality of the message service nodes, and constructing the preset message queue cluster based on all the message service nodes; Based on the message service node, a preset command line script is used to create the message topic, and based on the message topic, the partition is created.
5. The product recommendation method based on message queue according to claim 4, characterized in that: After creating the partition based on the message topic, the method further includes: Configuring configuration parameters of the producer component, wherein the configuration parameters include at least: a batch size parameter; Based on the batch size parameter, the size of the compressed product information sent by the producer component is determined.
6. The product recommendation method based on message queue according to claim 5, characterized in that: After the producer component is used to send the target customer identifier and the compressed product information associated with the target customer identifier to a preset message queue cluster, the method further includes: Controlling the message service node to receive the compressed product information; Based on the data type corresponding to the compressed product information, a target message topic is determined, and the compressed product information is stored in any of the partitions of the target message topic.
7. The product recommendation method based on message queue according to claim 1, characterized in that: Before using multiple consumer components in the consumer group to pull the compressed product information from the multiple partitions respectively, the method further includes: Configuring configuration parameters of each of the consumer components, wherein the configuration parameters at least include: a minimum byte number parameter; Based on the minimum byte number parameter, the size of the compressed product information received by the consumer component is determined.
8. The product recommendation method based on message queue according to claim 1, characterized in that: The product recommendation method further includes: Performing performance monitoring on the preset message queue cluster; When a performance failure is detected in any of the message service nodes in the preset message queue cluster, the compressed product information in the message service node is sent to other message service nodes, wherein the other message service nodes are the message service nodes that do not have the performance failure.
9. A product recommendation device based on a message queue, characterized in that: include: an acquisition unit, configured to, when detecting that a target customer performs an operation on a preset application, acquire a target customer identifier of the target customer and compressed product information associated with the target customer identifier from a preset database using a producer component, wherein the preset database pre-stores a plurality of target customer identifiers and product information associated with each target customer identifier, and the compressed product information is obtained by compressing the product information associated with the target customer identifier; A first sending unit is used to use the producer component to send the target customer identifier and the compressed product information associated with the target customer identifier to a preset message queue cluster, wherein the preset message queue cluster includes: a plurality of message service nodes, the message service nodes include: a plurality of message topics, the message topics include: a plurality of partitions, and the partitions are used to store the compressed product information; The second sending unit is used to use multiple consumer components in the consumer group to pull the compressed product information from the multiple partitions respectively, and send the compressed product information to the preset application operated by the target customer, wherein the preset application processes the compressed product information, obtains the recommended product information, and displays the recommended product information on the interface of the preset application.
10. A computer program product, characterized in that It comprises a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the product recommendation method based on a message queue according to any one of claims 1 to 8 is implemented.
11. An electronic device, characterized in that: It includes one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the message queue-based product recommendation method described in any one of claims 1 to 8.
Citation Information
Patent Citations
Recommended data processing method, recommendation method, electronic equipment and storage medium
CN115730084A
Message processing system and method, computing device and storage medium
CN116800748A
Message pushing method and device, computer equipment and storage medium
CN116821493A
Method, device and equipment for quickly pushing ten-million-level user messages
CN116846967A
Redistributing Messages in a Clustered Messaging Environment
US20080034051A1