Notification message arriving method, system and device, storage medium and program product
By storing the mapping fields of notification messages in the full-text search engine database, combining relational and distributed databases, the problem of slow notification message query speed is solved, and fast response and efficient notification push is achieved, suitable for massive users and high-quality users Concurrent scenarios.
Patent Information
- Application Number
- CN202411236461.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-04
- Publication Date
- 2024-12-06
AI Technical Summary
When sending notification messages to multiple terminals, it is difficult to quickly respond to transaction requirements for query notification messages, especially in high concurrency situations, and may introduce security risks or slow query speed.
The mapping fields of notification messages are stored through the full-text search engine database, and the rapid query characteristics are used to improve the response speed of multi-condition query notification messages. In combination with relational databases and distributed databases, data storage and push notification content are optimized.
It realizes quick response to notification message query under massive users and high concurrent access, shortens the response time, and compresses data storage space under millions of users, supporting accurate notification push from designated terminals and customer groups.
Smart Images

Figure CN119088888A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of data processing technology, and in particular, relates to a notification message delivery method, system, device, storage medium and program product. Background Art
[0002] Currently, many applications support deployment and operation in a variety of terminals, including mobile phones, POS machines, smart screens, etc. However, due to differences between different types of terminals, such as different resolutions supported by different types of terminals, when sending notification messages to applications, notification messages need to support the different requirements of multiple terminals. Moreover, since different terminals target different objects, it is also necessary to support the display of pushed messages only on designated terminals. In addition, it is also necessary to be able to respond to transactions of query messages in a timely manner.
[0003] There are mainly two types of message delivery solutions in the existing related technologies. The first is to complete message push through the SDK (Software Development Kit) of a third-party message platform component with high timeliness. However, this method needs to rely on third-party components, which may introduce other security risks, so it is not suitable for the processing of application notification messages. The second is to use a relational database to store the content and scope of published messages, and then when the user logs in to the application to query the message, if the user is the target user of the message, a notification message for the user is generated separately and pushed. However, due to the huge number of users of the application, the transaction concurrency of querying messages is high, and the relational database query is slow, so it cannot meet the requirements of fast response to query notification message transactions.
[0004] In view of this, there is an urgent need for a notification message delivery solution that can quickly respond to query notification message transactions. Summary of the invention
[0005] The embodiments of the present application provide a notification message delivery method, system, device, storage medium and program product, which store the mapping fields of notification messages in a full-text search engine database and utilize the fast query speed of the full-text search engine database to greatly improve the response speed of multi-condition query notification messages and shorten the response time.
[0006] In a first aspect, an embodiment of the present application provides a notification message delivery method, characterized by comprising:
[0007] Obtain the configured notification information and user profile indicators. The notification information at least includes the notification content and the terminal type corresponding to the notification content.
[0008] Obtain a user list and customer group identifiers of customer groups that meet the user portrait indicators, wherein the user list includes user identifiers corresponding to users that meet the user portrait indicators;
[0009] The notification content is stored as the notification content corresponding to the customer group identifier in a relational database, and a notification identifier corresponding to the notification content is generated;
[0010] Based on the information in the notification information other than the notification content, the notification identifier and the user identifier of each user in the user list, respectively generate notification mapping fields corresponding to each user in the user list, and save the notification mapping fields in the full-text search engine database;
[0011] In response to receiving a query request sent by a terminal, searching a full-text search engine database for a first notification mapping field that matches the query request, wherein the query request includes at least a terminal type of the terminal and a user identifier corresponding to the terminal;
[0012] The first notification content corresponding to the first notification mapping field is acquired from the relational database, and the first notification content is returned to the terminal.
[0013] In some possible implementations, the notification information also includes the notification effective time and a brief description of the notification message. Based on the information in the notification information other than the notification content, the notification identifier and the user identifier of the user, a notification mapping field corresponding to the user is generated, including:
[0014] The terminal type and notification effective time in the notification message as well as the notification identifier and the user identifier of the user are used as notification screening conditions corresponding to the user;
[0015] Briefly describe the notification filter conditions and notification messages as the notification mapping fields corresponding to the user.
[0016] In some possible implementations, the query request also includes the query time, and searching the full-text search engine database for a first notification mapping field that matches the query request includes:
[0017] Traversing the notification mapping fields stored in the full-text search engine database, searching for notification mapping fields whose notification screening conditions include the terminal type, user ID, and query time in the query request;
[0018] The found notification mapping field is used as the first notification mapping field.
[0019] In some possible implementations, the user list includes user data corresponding to users that meet the user portrait index. After obtaining the user list that meets the user portrait index, the method further includes:
[0020] Generate a row key corresponding to each user in the user list based on the customer group identifier and the user identifier of each user in the user list;
[0021] Based on the row key corresponding to each user, the user data of each user is stored in a distributed database.
[0022] In some possible implementations, returning the first notification content to the terminal includes:
[0023] Determine a target customer group identifier corresponding to the first notification content in a relational database;
[0024] Determine a target row key of the distributed database based on the target customer group identifier and the user identifier in the query request;
[0025] Obtain target user data corresponding to the user identifier in the query request from the distributed database based on the target row key;
[0026] Edit the first notification content based on the target user data to obtain the second notification content;
[0027] Return the second notification content to the terminal.
[0028] In some possible implementations, the target user data includes a user name and a user gender, and the notification content is edited based on the target user data to obtain the second notification content, including:
[0029] Determine the user title based on the user name and user gender in the target user data;
[0030] The user title is concatenated to the beginning of the first notification content to obtain the second notification content.
[0031] In some possible implementations, before acquiring the first notification content corresponding to the first notification mapping field from the relational database, the method further includes:
[0032] Returning the first notification mapping field to the terminal so that the terminal displays the first notification mapping field;
[0033] Acquiring first notification content corresponding to the first notification mapping field from a relational database includes:
[0034] In response to receiving a viewing request corresponding to the second notification mapping field sent by the terminal, the notification content corresponding to the second notification mapping field is obtained from the relational database as the first notification content, and the second notification mapping field belongs to the first notification mapping field.
[0035] In a second aspect, an embodiment of the present application provides a notification message delivery system, including:
[0036] The notification configuration interface is used to obtain the configured notification information and user profile indicators. The notification information at least includes the notification content and the terminal type corresponding to the notification content;
[0037] A user portrait platform is used to obtain a user list and customer group identifiers of customer groups that meet the user portrait indicators. The user list includes user identifiers corresponding to users that meet the user portrait indicators.
[0038] A storage system, used to store the notification content as the notification content corresponding to the customer group identifier in a relational database, and generate a notification identifier corresponding to the notification content;
[0039] The notification management system is used to generate notification mapping fields corresponding to each user in the user list based on information other than notification content in the notification information, the notification identifier and the user identifier of each user in the user list, and save the notification mapping fields into the full-text search engine database;
[0040] The notification management system is further used to search the first notification mapping field matching the query request from the full-text search engine database in response to receiving a query request sent by the terminal, wherein the query request includes at least a terminal type of the terminal and a user identifier corresponding to the terminal;
[0041] The notification management system is also used to obtain the first notification content corresponding to the first notification mapping field from the relational database, and return the first notification content to the terminal.
[0042] In some possible implementations, the notification information also includes the notification effective time and a brief description of the notification message, and the notification management system is used to:
[0043] The terminal type and notification effective time in the notification message as well as the notification identifier and the user identifier of the user are used as notification screening conditions corresponding to the user;
[0044] Briefly describe the notification filter conditions and notification messages as the notification mapping fields corresponding to the user.
[0045] In some possible implementations, the query request also includes the query time, and the management system is notified to:
[0046] Traversing the notification mapping fields stored in the full-text search engine database, searching for notification mapping fields whose notification screening conditions include the terminal type, user ID, and query time in the query request;
[0047] The found notification mapping field is used as the first notification mapping field.
[0048] In some possible implementations, the user list includes user data corresponding to users that meet the user profile indicators, and the notification message reaching system further includes:
[0049] The big data system is used to generate a row key corresponding to each user in the user list based on the customer group identifier and the user identifier of each user in the user list; and store the user data of each user in a distributed database based on the row key corresponding to each user.
[0050] In some possible implementations, the notification management system is used to:
[0051] Determine a target customer group identifier corresponding to the first notification content in a relational database;
[0052] Determine a target row key of the distributed database based on the target customer group identifier and the user identifier in the query request;
[0053] Obtain target user data corresponding to the user identifier in the query request from the distributed database based on the target row key;
[0054] Edit the first notification content based on the target user data to obtain the second notification content;
[0055] Return the second notification content to the terminal.
[0056] In some possible implementations, the target user data includes the user name and the user gender, and the notification management system is used to:
[0057] Determine the user title based on the user name and user gender in the target user data;
[0058] The user title is concatenated to the beginning of the first notification content to obtain the second notification content.
[0059] In some possible implementations, the notification management system is further used to:
[0060] Before acquiring the first notification content corresponding to the first notification mapping field from the relational database, returning the first notification mapping field to the terminal so that the terminal displays the first notification mapping field;
[0061] In response to receiving a viewing request corresponding to the second notification mapping field sent by the terminal, the notification content corresponding to the second notification mapping field is obtained from the relational database as the first notification content, and the second notification mapping field belongs to the first notification mapping field.
[0062] In some possible implementations, the notification mapping field includes a notification message status. Before the notification content corresponding to the notification mapping field is viewed for the first time, the notification message status is unread. The notification management system is further configured to:
[0063] After returning the first notification content to the terminal, determining whether it is the first time to receive a viewing request corresponding to the second notification mapping field;
[0064] When it is determined that the viewing request corresponding to the second notification mapping field is received for the first time, the notification message status in the second notification mapping field is updated from unread to read.
[0065] In a third aspect, an embodiment of the present application provides an electronic device, the electronic device comprising:
[0066] A processor and a memory storing computer program instructions; when the processor executes the computer program instructions, any one of the above notification message delivery methods is implemented.
[0067] In a fourth aspect, an embodiment of the present application provides a computer storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, any one of the above-mentioned notification message delivery methods is implemented.
[0068] In a fifth aspect, an embodiment of the present application provides a computer program product. When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device can execute any one of the above-mentioned notification message delivery methods.
[0069] The notification message delivery method, system, device, storage medium and program product of the embodiments of the present application obtain configured notification information and user portrait indicators, wherein the notification information includes notification content and a terminal type corresponding to the notification content, obtain a user list and a customer group identifier of a customer group corresponding to the user portrait indicator, store the customer group identifier and the notification content in a relational database, and generate a corresponding notification identifier, generate a notification mapping field corresponding to each user based on information other than the notification content in the notification information, the notification identifier and the user identifier of each user in the user list, save the notification mapping field in a full-text search engine database, and in response to receiving a query request sent by a terminal, search the full-text search engine database for a first notification mapping field that matches the query request, obtain a first notification content corresponding to the first notification mapping field from the relational database, and push the first notification content to the terminal. According to this embodiment, by configuring the terminal type corresponding to the user portrait information and the notification content, the notification content can be pushed to the designated terminal and customer group. By utilizing the fast query speed of the full-text search engine database, the response speed of multi-condition query notification messages is improved, the response time is shortened, and a large number of users are supported. It can still provide extremely fast response speed during high concurrent access. In addition, through the relational database and the full-text search engine database and reasonable application, only one copy of the repeated notification content is stored in the relational database, and the notification mapping fields used for screening are stored in the full-text search engine database, thereby greatly compressing the data storage space under millions of users. BRIEF DESCRIPTION OF THE DRAWINGS
[0070] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0071] Figure 1 It is a schematic diagram of a notification message delivery system provided in an embodiment of the present application;
[0072] Figure 2 It is a flowchart of a notification message delivery method provided in an embodiment of the present application;
[0073] Figure 3 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0074] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.
[0075] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0076] It should be noted that the acquisition, storage, use and processing of data in the embodiments of the present application are in compliance with the relevant provisions of national laws and regulations.
[0077] It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0078] The terms involved in the embodiments of this application are explained as follows:
[0079] Full-text search engine database: refers to a database that supports inverted index, also known as a full-text search database. In this type of database, the inverted index is a very important data structure. It uses the words in the document as index items, and records information such as which documents each word appears in and where it appears. In this way, when a query is performed, relevant documents can be quickly found in the inverted index based on the query words, greatly improving the efficiency of the query.
[0080] A relational database is a database that uses a relational model to organize data. It stores data in the form of rows and columns to facilitate user understanding. This series of rows and columns in a relational database is called a table, and a group of tables constitutes a database. Users retrieve data from a database through queries, and a query is an execution code used to limit certain areas in a database. The relational model can be simply understood as a two-dimensional table model, and a relational database is a data organization consisting of two-dimensional tables and the relationships between them. The primary key is a field or combination of fields in a relational database table that uniquely identifies each record in the table.
[0081] A distributed database is a database system that stores data in multiple physical locations. In a distributed database, rowkey is used to represent the unique identifier of each record, similar to the ID in a traditional database.
[0082] In order to solve the problems of the prior art, an embodiment of the present invention provides a notification message delivery method, system, device, storage medium and program product.
[0083] The technical solution provided in the embodiment of the present application can be applied to the scenario of notification message push of application programs, and the notification messages include but are not limited to marketing messages, system announcements, etc.
[0084] The following first introduces the notification message delivery system provided by an embodiment of the present invention.
[0085] See also Figure 1 , is a schematic diagram of a notification message reaching system provided in an embodiment of the present application. The notification message reaching system is a system for transmitting and processing messages. Figure 1As shown, the notification message delivery system 100 includes a presentation layer, an application layer and a data layer, wherein the presentation layer includes a notification configuration interface 101, the application layer includes a notification management system 104, and the data layer includes a user portrait platform 102 and a storage system 103.
[0086] The notification configuration interface 101 is used to obtain the configured notification information and user portrait indicators. The notification information at least includes the notification content and the terminal type corresponding to the notification content.
[0087] In some embodiments of the present application, application developers can configure notification messages to be published through the notification configuration interface 101, wherein the notification messages include but are not limited to activity pop-ups, system announcements and other types of messages. When configuring the notification message, the configured content is used as notification information, wherein the configured notification information at least includes the notification content and the terminal type corresponding to the notification content. Among them, the notification content refers to the specific content of the notification message, and the notification content includes but is not limited to text, pictures, picture URL addresses, etc. The terminal type corresponding to the notification content refers to the type of terminal used to display the notification content, wherein the terminal type includes but is not limited to mobile phones, POS, smart large screens, etc. For example, if the configured notification content is a notification message that can only be displayed on a mobile phone, then the terminal type corresponding to the notification content is a mobile phone.
[0088] In some embodiments of the present application, the notification content can be configured differently according to different requirements of different types of terminals for notification messages. For example, different types of terminals support different picture resolutions, so notification content with different resolutions can be configured for different terminal types.
[0089] In some embodiments of the present application, in addition to the notification content and the terminal type used to display the notification, the notification information may also include the notification effective time, a brief description of the notification message, etc. Among them, the brief description of the notification message includes but is not limited to the notification message title, thumbnail icon, and other brief contents used to simply describe the notification content, and the memory occupied by the brief description of the notification message is less than the memory occupied by the notification content.
[0090] In some embodiments of the present application, a user portrait platform interface may be embedded in the notification configuration interface 101. Thus, when configuring notification information, the user portrait indicator corresponding to the notification information may be synchronously configured through the user portrait platform interface. The user portrait indicator is the user portrait indicator of the customer group corresponding to the configured notification information. Considering that different terminals correspond to different objects, and that some notifications may only need to be displayed to a specified customer group, different notification information may correspond to different user portrait indicators. For example, for notification information used to market financial products, the corresponding user portrait indicators include but are not limited to users whose deposits reach a certain amount, active users, and users whose in-app consumption amounts reach a certain amount.
[0091] The user portrait platform 102 is used to obtain a user list and customer group identifiers of customer groups that meet the user portrait indicators. The user list includes user identifiers corresponding to users that meet the user portrait indicators.
[0092] In some embodiments of the present application, the user profile platform 102 stores user information and user profiles of multiple users. After the developer configures the user profile index in the notification configuration interface 101, the user profile index can be transmitted to the user profile platform 102, so that the user profile platform 102 can filter the user information stored therein based on the user profile index, thereby filtering out a customer group that meets the user profile index, the customer group includes one or more users, and the user information of all users in the customer group is combined into a user list. Among them, the user information corresponding to the user includes at least the user ID of the user, and in addition, it can also include user data, wherein the user data includes but is not limited to information such as the user name and the user gender.
[0093] In some embodiments of the present application, in order to facilitate the distinction of customer groups, the user portrait platform 102 further generates a customer group identifier for the customer group corresponding to the user portrait index, and uses the customer group identifier as the customer group identifier corresponding to the user list screened based on the user portrait index. The customer group identifier may be a randomly generated code consisting of at least one of text, symbols, numbers, and letters.
[0094] The storage system 103 is used to store the notification content as the notification content corresponding to the customer group identifier in a relational database, and generate a notification identifier corresponding to the notification content.
[0095] In some embodiments of the present application, after obtaining the customer group identifier generated by the user portrait platform 102, the customer group identifier and the configured notification content may be stored in a relational database correspondingly, wherein the relational database includes but is not limited to Oracle, MySQL, SQL Server, Access, etc.
[0096] In some embodiments of the present application, the storage system 103 generates a globally unique notification identifier when storing the customer group identifier and notification content, and uses the notification identifier as the primary key corresponding to the customer group identifier and notification content in the relational database, so that the corresponding customer group identifier and notification content can be obtained from the relational database based on the notification identifier.
[0097] In some embodiments of the present application, the notification identifier may be a randomly generated code consisting of at least one of text, symbols, numbers, and letters.
[0098] The notification management system 104 is used to generate notification mapping fields corresponding to each user in the user list based on information other than the notification content in the notification information, the notification identifier and the user identifier of each user in the user list, and save the notification mapping fields to the full-text search engine database. Exemplarily, the full-text search engine database includes but is not limited to Elasticsearch, Solr, Lucene, Azure Cosmos DB, Doris, Whoosh, etc.
[0099] For example, the notification mapping field can be saved to Elasticsearch, which is referred to as ES. It is an open source, highly scalable, distributed, multi-user full-text search engine. It is also a Lucene search-based server that can store and search data in near real time. In a cloud computing environment, Elasticsearch can achieve real-time search of data, and its performance is very stable, and it is also very convenient to install and use. Elasticsearch can be used in programming languages such as Java, .NET, PHP, Python, Apache Groovy, and Ruby. According to the ranking of DB-Engines, Elasticsearch is one of the most popular enterprise search engines.
[0100] In some embodiments of the present application, for each configured notification message, the notification management system 104 may generate a notification mapping field corresponding to each user according to the user ID of each user in the user list corresponding to the notification message, so that when a user in the application program queries for notification messages later, the notification message corresponding to the user may be filtered out based on the notification mapping field.
[0101] In some embodiments of the present application, the terminal type, notification identifier and user identifier corresponding to the notification information notification content can be used as the notification mapping field corresponding to the user. In this way, the notification message can be filtered from two aspects: terminal type and user identifier based on the notification mapping field.
[0102] In some embodiments of the present application, in order to facilitate the distinction of notification mapping fields, the notification management system 104 may also generate a field identifier corresponding to the notification mapping field, wherein the field identifier may be obtained by concatenating the notification identifier and the user identifier.
[0103] The notification management system 104 is further configured to search the full-text search engine database for a first notification mapping field matching the query request in response to receiving a query request sent by the terminal, wherein the query request includes at least the terminal type of the terminal and the user identifier corresponding to the terminal.
[0104] In some embodiments of the present application, a user can log in to an application in a terminal used by the user and query the notification messages of the application. When the user queries the notification messages, the terminal can generate a corresponding query request, which includes at least a user identifier and a terminal type. The terminal then sends the query request to the notification message reaching system, so that the notification management system 104 of the notification message reaching system can receive the query request sent by the terminal.
[0105] In some embodiments of the present application, after receiving the query request sent by the terminal, the notification management system 104 queries the full-text search engine database to obtain the first notification mapping field that matches the query request. As can be seen from the foregoing content, the notification mapping field stored in the full-text search engine database is generated based on the information in the notification information other than the notification content, the notification identifier, and the user identifier of the user, and the information in the notification information other than the notification content includes the terminal type corresponding to the configured notification content. Based on this, when determining the first notification mapping field, the notification mapping field containing the terminal type and user identifier in the query request can be used as the target mapping field.
[0106] The notification management system 104 is further configured to obtain the first notification content corresponding to the first notification mapping field from the relational database, and push the first notification content to the terminal.
[0107] In some embodiments of the present application, the notification mapping field is generated based on information in the notification information other than the notification content, the notification identifier and the user identifier of the user. Based on this, after determining the first notification mapping field, the target notification identifier corresponding to the first notification mapping field can be determined, so that the notification content with the target notification identifier as the primary key can be obtained from the relational database based on the target notification identifier, and the obtained notification content can be used as the first notification content corresponding to the first notification mapping field.
[0108] In some embodiments of the present application, after acquiring the first notification content, the notification management system 104 pushes the first notification content to the terminal, so that the first notification content can reach the user.
[0109] A notification message reaching system provided in this embodiment obtains configured notification information and user portrait indicators, wherein the notification information includes notification content and a terminal type corresponding to the notification content, obtains a user list and a customer group identifier of a customer group corresponding to the user portrait indicator, stores the customer group identifier and the notification content in a relational database, and generates a corresponding notification identifier, generates a notification mapping field corresponding to each user based on information other than the notification content in the notification information, the notification identifier and the user identifier of each user in the user list, saves the notification mapping field in a full-text search engine database, and in response to receiving a query request sent by a terminal, searches the full-text search engine database for a first notification mapping field that matches the query request, obtains a first notification content corresponding to the first notification mapping field from the relational database, and pushes the first notification content to the terminal. According to this embodiment, by configuring the terminal type corresponding to the user portrait information and the notification content, the notification content can be pushed to the designated terminal and customer group. By utilizing the fast query speed of the full-text search engine database, the response speed of multi-condition query notification messages is improved, the response time is shortened, and a large number of users are supported. It can still provide extremely fast response speed during high concurrent access. In addition, through the relational database and the full-text search engine database and reasonable application, only one copy of the repeated notification content is stored in the relational database, and the notification mapping fields used for screening are stored in the full-text search engine database, thereby greatly compressing the data storage space under millions of users.
[0110] In some embodiments, the user list includes user data corresponding to users that meet the user portrait indicators, and the data layer of the notification message reaching system 100 may also include a big data system 105.
[0111] The big data system 105 is used to generate a row key corresponding to each user in the user list based on the customer group identifier and the user identifier of each user in the user list, and store the user data of each user in a distributed database based on the row key corresponding to each user. Exemplarily, the distributed database includes but is not limited to HBase, Cassandra, OceanBase, Lustre, MaxCompute, Druid, etc. For example, the user data of each user can be stored in HBase.
[0112] The notification management system 104 is also used to obtain user data corresponding to users in the user list from the distributed database, and edit the notification content pushed to the terminal based on the user data to personalize the notification content and improve the user experience.
[0113] See also Figure 2 , is a flow chart of a notification message delivery method provided in an embodiment of the present application, which can be performed by Figure 1 The notification message shown reaches the system for execution. Figure 2 As shown, the method may include the following steps S21-S26, which are described in detail below.
[0114] S21. Obtain the configured notification information and user portrait indicators, where the notification information at least includes the notification content and the terminal type corresponding to the notification content.
[0115] In some embodiments of the present application, Figure 1 The notification configuration interface 101 shown obtains the notification information and user portrait indicators configured by the developer. The specific implementation method can refer to the above description of the notification configuration interface 101, which will not be repeated here.
[0116] S22. Obtain a user list and customer group identifiers of customer groups that meet the user portrait indicators, wherein the user list includes user identifiers corresponding to users that meet the user portrait indicators.
[0117] In some embodiments of the present application, Figure 1 The user portrait platform 102 shown obtains a user list and a customer group identifier of a customer group that meets the user portrait index. The specific implementation method can refer to the above description of the user portrait platform 102, which will not be repeated here.
[0118] S23. The notification content is stored in a relational database as the notification content corresponding to the customer group identifier, and a notification identifier corresponding to the notification content is generated.
[0119] In some embodiments of the present application, Figure 1 The storage system 103 shown stores the notification content as the notification content corresponding to the customer group identifier in a relational database, and generates a notification identifier corresponding to the notification content. The specific implementation method can be found in the above description of the storage system 103, which will not be repeated here.
[0120] S24. Based on the information in the notification information except the notification content, the notification identifier and the user identifier of each user in the user list, generate notification mapping fields corresponding to each user in the user list, and save the notification mapping fields to the full-text search engine database.
[0121] In some embodiments of the present application, Figure 1 The notification management system 104 shown generates notification mapping fields corresponding to the user and saves the notification mapping fields into the full-text search engine database. The specific implementation method can refer to the above description of the notification management system 104, which will not be repeated here.
[0122] S25. In response to receiving a query request sent by the terminal, searching a full-text search engine database for a first notification mapping field that matches the query request, wherein the query request includes at least a terminal type of the terminal and a user identifier corresponding to the terminal.
[0123] In some embodiments of the present application, Figure 1 The notification management system 104 shown receives the query request sent by the terminal and searches the full-text search engine database for the first notification mapping field that matches the query request. The specific implementation method can refer to the above description of the notification management system 104, which will not be repeated here.
[0124] S26. Obtain the first notification content corresponding to the first notification mapping field from the relational database, and return the first notification content to the terminal.
[0125] In some embodiments of the present application, Figure 1 The notification management system 104 shown obtains the first notification content corresponding to the first notification mapping field from the relational database, and pushes the first notification content to the terminal. The specific implementation method can refer to the above description of the notification management system 104, which will not be repeated here.
[0126] The present embodiment provides a notification message reaching system, which obtains configured notification information and user portrait indicators, wherein the notification information includes notification content and a terminal type corresponding to the notification content, obtains a user list and a customer group identifier of a customer group corresponding to the user portrait indicator, stores the customer group identifier and the notification content in a relational database, and generates a corresponding notification identifier, generates a notification mapping field corresponding to each user based on information other than the notification content in the notification information, the notification identifier and the user identifier of each user in the user list, saves the notification mapping field in a full-text search engine database, and in response to receiving a query request sent by a terminal, searches the full-text search engine database for a first notification mapping field that matches the query request, obtains a first notification content corresponding to the first notification mapping field from the relational database, and pushes the first notification content to the terminal. According to this embodiment, by configuring the terminal type corresponding to the user portrait information and the notification content, the notification content can be pushed to the designated terminal and customer group. By utilizing the fast query speed of the full-text search engine database, the response speed of multi-condition query notification messages is improved, and the response time is shortened. In addition, through the relational database and the full-text search engine database and reasonable application, only one copy of the repeated notification content is stored in the relational database, and the notification mapping fields used for screening are stored in the full-text search engine database, thereby greatly compressing the data storage space under millions of users.
[0127] In some embodiments, the notification information may also include the notification effective time and a brief description of the notification message. Based on this, in the above step S24, the notification mapping field corresponding to the user is generated based on the information in the notification information other than the notification content, the notification identifier and the user identifier of the user, which may include:
[0128] The terminal type and notification effective time in the notification message as well as the notification identifier and the user identifier of the user are used as notification screening conditions corresponding to the user;
[0129] Briefly describe the notification filter conditions and notification messages as the notification mapping fields corresponding to the user.
[0130] Here, the notification effective time refers to the time when the user can obtain the notification content. The user cannot obtain the notification content outside the notification effective time. For example, if the notification effective time corresponding to a notification content is 12:00 noon on May 12, 2023-12:00 noon on May 23, 2023, then before 12:00 noon on May 12, 2023 and after 12:00 noon on May 23, 2023, the user cannot query the notification content. The notification content can only be queried between 12:00 noon on May 12, 2023-12:00 noon on May 23, 2023. The reason for setting the notification effective time is that some notification messages have a certain timeliness.
[0131] Here, the brief description of the notification message is used to briefly describe the notification content, including but not limited to the notification message title, thumbnail icon, etc. By adding a brief description of the notification message in the notification mapping field, users can quickly understand the approximate content of the notification based on the notification mapping field, and thus can select the notification content to view based on the notification mapping field.
[0132] Accordingly, in the case where the notification mapping field includes the notification effective time, the query request also includes the query time. Based on this, in the above step S25, searching the full-text search engine database for the first notification mapping field that matches the query request includes:
[0133] Traversing the notification mapping fields stored in the full-text search engine database, searching for notification mapping fields whose notification screening conditions include the terminal type, user ID, and query time in the query request;
[0134] The found notification mapping field is used as the first notification mapping field.
[0135] In this way, notifications can be filtered from three dimensions: terminal type, user, and time.
[0136] In some embodiments, the user list includes user data corresponding to users that meet the user portrait index. In the above step S22, after obtaining the user list that meets the user portrait index, the following steps may also be performed:
[0137] Generate a row key corresponding to each user in the user list based on the customer group identifier and the user identifier of each user in the user list;
[0138] Based on the row key corresponding to each user, the user data of each user is stored in a distributed database.
[0139] In some embodiments of the present application, Figure 1 The big data system 105 shown stores user data.
[0140] Based on this, in the above step S26, returning the first notification content to the terminal may also include the following steps:
[0141] Determine a target customer group identifier corresponding to the first notification content in a relational database;
[0142] Determine a target row key of the distributed database based on the target customer group identifier and the user identifier in the query request;
[0143] Obtain target user data corresponding to the user identifier in the query request from the distributed database based on the target row key;
[0144] Edit the first notification content based on the target user data to obtain the second notification content;
[0145] Return the second notification content to the terminal.
[0146] In some embodiments of the present application, when the notification content is stored in a relational database, the notification content and the customer group identifier are stored correspondingly in the relational database. Therefore, after determining the target notification mapping field, the first notification content and the target customer group identifier corresponding to the first notification content can be obtained from the relational database based on the notification identifier in the target notification mapping field. In this way, a row key can be formed based on the target customer group identifier and the user identifier in the query request. The row key is used as the target row key, and based on the target row key, the target user data corresponding to the user identifier can be obtained from the distributed database.
[0147] In some embodiments of the present application, after the target user data is acquired, the first notification content may be edited based on the target user data to obtain the second notification content.
[0148] In some embodiments of the present application, editing the first notification content based on the target user data may include: splicing the target user data with the first notification content, so as to obtain a second notification content that includes the target user data and the first notification content, and returning the second notification content to the terminal, so that the user can obtain the corresponding user data synchronously when obtaining the notification of the first notification content.
[0149] In some embodiments of the present application, the target user data includes a user name and a user gender, and the notification content is edited based on the target user data to obtain the second notification content, which may include:
[0150] Determine the user title based on the user name and user gender in the target user data;
[0151] The user title is concatenated to the beginning of the first notification content to obtain the second notification content.
[0152] For example, if the user name in the target user data is Zhang San and the user gender is male, then the user title "Mr. Zhang San" can be obtained based on the user name and the user gender. By splicing the user title at the beginning of the first notification content, the notification content can be personalized, that is, different second notification content is obtained for different users, thereby improving the user experience.
[0153] In some embodiments, in order to improve the integrity of the notification content returned to the terminal, when returning the first notification content to the terminal, a notification mapping field corresponding to the first notification content may be added to the returned first notification content.
[0154] In some embodiments, the full-text search engine database may contain multiple first notification mapping fields that match the query request. If the notification contents corresponding to the multiple first notification mapping fields are obtained at the same time, it takes a long time. Therefore, in order to avoid the problem of long notification content loading time caused by simultaneously obtaining the notification contents corresponding to the multiple first notification mapping fields, in the above step S26, before obtaining the first notification content corresponding to the first notification mapping field from the relational database, the following steps may be performed first:
[0155] The first notification mapping field is returned to the terminal, so that the terminal displays the first notification mapping field.
[0156] In some embodiments of the present application, by returning the first notification mapping field to the terminal, the terminal can display the returned first notification mapping field. When the terminal displays the first notification mapping field, the user can select the second notification mapping field to be viewed from the first notification mapping field displayed by the terminal according to actual needs. Then, based on the user's selection operation, the terminal sends a viewing request corresponding to the second notification mapping field to the notification message access system, wherein the viewing request is used to indicate viewing of the notification content corresponding to the second notification mapping field.
[0157] Based on this, the above step S26, obtaining the first notification content corresponding to the first notification mapping field from the relational database, may include:
[0158] In response to receiving a viewing request corresponding to the second notification mapping field sent by the terminal, a notification corresponding to the second notification mapping field is obtained from the relational database as the first notification content.
[0159] In this way, only the notification content that the user wants to view can be returned to the terminal, thus reducing the time required to load the notification content.
[0160] In some embodiments, the notification mapping field may further include a notification message status. Before the notification content corresponding to the notification mapping field is viewed for the first time, the notification message status is unread. Based on this, after returning the first notification content to the terminal, the following steps may also be performed:
[0161] determining whether a view request corresponding to the second notification mapping field is received for the first time;
[0162] When it is determined that the viewing request corresponding to the second notification mapping field is received for the first time, the notification message status in the second notification mapping field is updated from unread to read.
[0163] In some embodiments of the present application, the notification message access system 100 may also include a message center. Exemplarily, the message center includes message middleware such as Kafka, RabbitMQ, ActiveMQ, RocketMQ, etc. For each first notification mapping field displayed in the terminal, when the user selects the first notification mapping field as the second notification mapping field for viewing for the first time, the terminal can send a message to the message center to indicate that the notification message status of the second notification mapping field is updated, and the notification management system 104 can consume the message in the message center. In this way, the notification management system 104 can update the notification message status in the second notification mapping field in the full-text search engine database by consuming the message in the message center that indicates that the notification message status of the second notification mapping field is updated, and update the notification message status from unread to read.
[0164] In this way, users can intuitively understand the content of their read and unread notifications based on the notification mapping fields, which helps users accurately select the notification content they need to view, reduces the situation of repeatedly viewing the same notification content, and improves the user experience.
[0165] Figure 3 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application is shown.
[0166] The electronic device 300 may include a processor 301 and a memory 302 storing computer program instructions.
[0167] Specifically, the processor 301 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0168] The memory 302 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 302 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 302 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 302 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 302 is a non-volatile solid-state memory.
[0169] The memory 302 may include a read-only memory (ROM), a random access memory (RAM), a disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Therefore, typically, the memory 302 includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software including computer executable instructions, and when the software is executed (e.g., by one or more processors), it can perform the operations described in any one of the notification message access methods in the above embodiments.
[0170] The processor 301 implements any one of the notification message delivery methods in the above embodiments by reading and executing computer program instructions stored in the memory 302.
[0171] In one example, the electronic device 300 may further include a communication interface 303 and a bus 310. Figure 3As shown, the processor 301, the memory 302, and the communication interface 303 are connected via a bus 310 and communicate with each other.
[0172] The communication interface 303 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.
[0173] Bus 310 includes hardware, software or both, and the parts of online data flow billing equipment are coupled to each other. For example, but not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front-end bus (FSB), hypertransport (HT) interconnection, industrial standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 310 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the present application considers any suitable bus or interconnection.
[0174] In addition, in combination with the notification message delivery method in the above embodiment, the embodiment of the present application can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by the processor, any one of the notification message delivery methods in the above embodiment is implemented.
[0175] An embodiment of the present application also provides a computer program product, including a computer program, which, when executed, implements any one of the notification message delivery methods in the above embodiments.
[0176] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.
[0177] The functional blocks shown in the above-described block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0178] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.
[0179] Aspects of the present disclosure are described above with reference to the flowchart and / or block diagram of the method, device (system) and computer program product according to the embodiment of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0180] The above are only specific implementation methods of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.
Claims
1. A notification message delivery method, It is characterized in that include: Obtaining configured notification information and user profile indicators, wherein the notification information includes at least notification content and the terminal type corresponding to the notification content; Obtaining a user list and customer group identifiers of customer groups that meet the user portrait indicators, wherein the user list includes user identifiers corresponding to users that meet the user portrait indicators; storing the notification content as the notification content corresponding to the customer group identifier in a relational database, and generating a notification identifier corresponding to the notification content; Based on the information in the notification information other than the notification content, the notification identifier and the user identifier of each user in the user list, respectively generate a notification mapping field corresponding to each user in the user list, and save the notification mapping field in a full-text search engine database; In response to receiving a query request sent by a terminal, searching the full-text search engine database for a first notification mapping field that matches the query request, wherein the query request includes at least a terminal type of the terminal and a user identifier corresponding to the terminal; Acquire first notification content corresponding to the first notification mapping field from the relational database, and return the first notification content to the terminal.
2. The notification message reaching method according to claim 1, It is characterized in that The notification information also includes the notification effective time and a brief description of the notification message. The generating of the notification mapping field corresponding to the user based on the information in the notification information other than the notification content, the notification identifier and the user identifier of the user includes: Using the terminal type and notification effective time in the notification message as well as the notification identifier and the user identifier of the user as notification screening conditions corresponding to the user; The notification screening condition and the notification message are briefly described as notification mapping fields corresponding to the user.
3. The notification message reaching method according to claim 2, It is characterized in that The query request also includes a query time, and searching the full-text search engine database for a first notification mapping field that matches the query request includes: Traversing the notification mapping fields stored in the full-text search engine database to find the notification mapping fields whose notification screening conditions include the terminal type, user identification and query time in the query request; The found notification mapping field is used as the first notification mapping field.
4. The notification message delivery method according to claim 1, It is characterized in that The user list includes user data corresponding to users that meet the user portrait index. After obtaining the user list that meets the user portrait index, the method further includes: Based on the customer group identifier and the user identifier of each user in the user list, generating a row key corresponding to each user in the user list; Based on the row key corresponding to each user, the user data of each user is stored in the distributed database.
5. The notification message reaching method according to claim 4, It is characterized in that The returning the first notification content to the terminal includes: Determine a target customer group identifier corresponding to the first notification content in the relational database; Determining a target row key of the distributed database based on the target customer group identifier and the user identifier in the query request; Based on the target row key, acquiring target user data corresponding to the user identifier in the query request from the distributed database; Editing the first notification content based on the target user data to obtain second notification content; The second notification content is returned to the terminal.
6. The notification message reaching method according to claim 5, It is characterized in that The target user data includes a user name and a user gender, and the notification content is edited based on the target user data to obtain the second notification content, including: Determine the user title based on the user name and user gender in the target user data; The user title is concatenated to the beginning of the first notification content to obtain the second notification content.
7. The notification message delivery method according to any one of claims 1 to 6, It is characterized in that Before acquiring the first notification content corresponding to the first notification mapping field from the relational database, the method further includes: Returning the first notification mapping field to the terminal so that the terminal displays the first notification mapping field; The acquiring, from the relational database, the first notification content corresponding to the first notification mapping field comprises: In response to receiving a viewing request corresponding to a second notification mapping field sent by the terminal, obtaining notification content corresponding to the second notification mapping field from the relational database as the first notification content, the second notification mapping field belonging to the first notification mapping field.
8. The notification message reaching method according to claim 7, It is characterized in that The notification mapping field includes a notification message status. Before the notification content corresponding to the notification mapping field is viewed for the first time, the notification message status is unread. After returning the first notification content to the terminal, the method further includes: determining whether it is the first time that a viewing request corresponding to the second notification mapping field is received; When it is determined that the viewing request corresponding to the second notification mapping field is received for the first time, the notification message status in the second notification mapping field is updated from unread to read.
9. A notification message reaching system, It is characterized in that include: Notification configuration interface, used to obtain configured notification information and user portrait indicators, the notification information at least includes notification content and the terminal type corresponding to the notification content; A user portrait platform, used to obtain a user list and customer group identifiers of customer groups that meet the user portrait indicators, wherein the user list includes user identifiers corresponding to users that meet the user portrait indicators; A storage system, used to store the notification content as the notification content corresponding to the customer group identifier in a relational database, and generate a notification identifier corresponding to the notification content; A notification management system, for generating notification mapping fields corresponding to each user in the user list based on information in the notification information other than the notification content, the notification identifier and the user identifier of each user in the user list, and saving the notification mapping fields into a full-text search engine database; The notification management system is further configured to, in response to receiving a query request sent by a terminal, search the full-text search engine database for a first notification mapping field that matches the query request, wherein the query request includes at least a terminal type of the terminal and a user identifier corresponding to the terminal; The notification management system is further configured to obtain first notification content corresponding to the first notification mapping field from the relational database, and return the first notification content to the terminal.
10. The notification message reaching system according to claim 9, It is characterized in that The user list includes user data corresponding to users that meet the user portrait indicators, and the notification message reaching system also includes: The big data system is used to generate a row key corresponding to each user in the user list based on the customer group identifier and the user identifier of each user in the user list; and store the user data of each user in a distributed database based on the row key corresponding to each user.
11. An electronic device, It is characterized in that The device includes: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, the notification message delivery method as described in any one of claims 1-8 is implemented.
12. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by the processor, the notification message delivery method according to any one of claims 1 to 8 is implemented.
13. A computer program product, It is characterized in that When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device is enabled to execute the notification message delivery method as described in any one of claims 1-8.
Citation Information
Patent Citations
Message push method and push server
CN106612300A
Data retrieval method, system and device and storage medium
CN111309760A
Information pushing method, device and equipment and computer storage medium
CN116128631A
Notification information pushing method and device, equipment and computer storage medium
CN117221390A
