Message pushing method and device and storage medium
By obtaining the user information matrix of the application and determining the push priority, the problem of time-consuming traditional full message push is solved, and the effect of fast push and efficient reach of time-sensitive users is achieved.
Patent Information
- Application Number
- CN202511031345.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-25
- Publication Date
- 2025-09-16
AI Technical Summary
The traditional full message push method takes a long time for a large number of users, causing some users to miss out on time-sensitive information, affecting user experience and push effectiveness.
By obtaining the user information matrix of the application, locating the target matrix row tuple according to the column target, and determining the push priority of the user information element, the message is pushed to the user terminal first, improving the information reading and writing speed and processing time.
It has achieved rapid message push for hundreds of millions of users, ensuring that time-sensitive users are reached first, and improving user experience and push effects.
Smart Images

Figure CN120658792A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer network technology, and in particular to a message pushing method, device and storage medium. Background Art
[0002] The rapid evolution of mobile internet technology has driven the trend of user behavior moving online and mobile. Various applications are striving to continuously improve user click-through rates, retention rates, and business conversion rates. Push notifications, a key way for applications to proactively reach users, have gained widespread adoption due to their low cost, efficiency, and convenience.
[0003] However, in popular apps with hundreds of millions of users, push notifications face significant technical challenges. Due to this large user base, traditional push notifications require individual notifications, resulting in lengthy push times. Some users may miss out on time-sensitive information (such as limited-time offers and real-time news), reducing push effectiveness and impacting both user experience and overall effectiveness. Summary of the Invention
[0004] The present invention provides a message push method, device and storage medium to solve the problem that the traditional full message push method causes the push to take a long time and some users miss out on time-sensitive information.
[0005] In a first aspect, an embodiment of the present invention provides a message push method, comprising:
[0006] Obtaining a first column identifier and a user information matrix of an application to which a message to be pushed belongs; the user information matrix including a preset number of matrix row tuples corresponding to each column in the application, the preset number of matrix row tuples including user information elements of registered users who follow the column; the preset number being greater than or equal to 1;
[0007] Locating a first target matrix row tuple in the user information matrix according to the first column identification;
[0008] Determine a push priority of each of the user information elements in the first target matrix row tuple, and push the message to be pushed to a user terminal corresponding to each of the user information elements in the first target matrix row tuple according to the push priority.
[0009] In a second aspect, an embodiment of the present invention provides an electronic device, comprising:
[0010] at least one processor;
[0011] and a memory communicatively coupled to the at least one processor;
[0012] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the message push method described in any embodiment of the present invention.
[0013] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the message push method described in any embodiment of the present invention when executed.
[0014] The technical solution of the embodiment of the present invention obtains the first column identifier and the user information matrix of the application to which the message to be pushed belongs; the user information matrix includes a preset number of matrix row tuples corresponding to each column in the application, and the preset number of matrix row tuples contains user information elements of registered users who follow the column; the preset number is greater than or equal to 1; the first target matrix row tuple in the user information matrix is located according to the first column identifier; the push priority of each user information element in the first target matrix row tuple is determined, and the message to be pushed is pushed to the user terminal corresponding to each user information element in the first target matrix row tuple according to the push priority. By adding a user information matrix to store user information elements based on the original database storage structure, the speed of the user information reading and writing steps is improved, thereby reducing the processing time of the entire push process, achieving rapid message push for hundreds of millions of users, and solving the problem of long push time caused by traditional full message push methods. In addition, the priority of message push is determined according to the user status, which can ensure that users who are sensitive to message timeliness are reached first, solving the problem of some users missing out on time-sensitive information, and improving user experience and message push effectiveness.
[0015] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0017] Figure 1 A flowchart of a message push method provided in Example 1 of the present invention;
[0018] Figure 2 A flowchart of a message push method provided in Example 2 of the present invention;
[0019] Figure 3 A schematic diagram of the principle of message push provided in the second embodiment of the present invention;
[0020] Figure 4 A timing diagram of updating a user information matrix based on a user registration request provided in the second embodiment of the present invention;
[0021] Figure 5 A timing diagram of updating a user information matrix based on a user connection management request provided in the second embodiment of the present invention;
[0022] Figure 6 A timing diagram of updating a user information matrix based on a user attention management request provided in the second embodiment of the present invention;
[0023] Figure 7 A timing diagram of updating a user information matrix based on a user notification management request provided in the second embodiment of the present invention;
[0024] Figure 8 A schematic structural diagram of a message push device provided in Embodiment 3 of the present invention;
[0025] Figure 9 A schematic diagram of the structure of an electronic device for implementing the message push method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0026] In order to enable those skilled in the art to better understand the present invention, embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein. Instead, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.
[0027] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0028] As used herein, the term "including" and its variations are open-ended, i.e., "including but not limited to." The term "based on" means "based, at least in part, on." The term "one embodiment" means "at least one embodiment," the term "another embodiment" means "at least one additional embodiment," and the term "some embodiments" means "at least some embodiments." Other terms are defined in the following description.
[0029] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0030] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".
[0031] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0032] It is understood that before using the technical solutions disclosed in each embodiment of the present disclosure, the user should be informed of the type, scope of use, and usage scenarios of the personal information involved in the present disclosure and obtain the user's authorization in an appropriate manner in accordance with relevant laws and regulations. For example, in response to receiving a user's active request, a prompt message is sent to the user to clearly remind the user that the operation requested will require the acquisition and use of the user's personal information. In this way, the user can independently choose whether to provide personal information to the electronic device, application, server, storage medium, or other software or hardware that performs the operation of the technical solution of the present disclosure based on the prompt message.
[0033] As an optional but non-limiting implementation, in response to receiving a user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. Furthermore, the pop-up window may also contain a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.
[0034] It is understood that the above notification and user authorization process is merely illustrative and does not limit the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure. It is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws and regulations and relevant provisions.
[0035] Example 1
[0036] Figure 1 This is a flowchart of a message push method provided in the first embodiment of the present invention. This embodiment is applicable to situations where push messages are to be pushed. The method can be executed by a message push device. The message push device can be implemented in the form of hardware and / or software. The message push device can be configured in an electronic device. Figure 1As shown, the method includes:
[0037] S110. Obtain the first column identifier and the user information matrix of the application to which the message to be pushed belongs; the user information matrix includes a preset number of matrix row tuples corresponding to each column in the application, and the preset number of matrix row tuples contains user information elements of registered users who follow the column, and the preset number is greater than or equal to 1.
[0038] The user information matrix can be understood as a matrix used to store user information on an application (APP). The user information matrix can include user information elements for each registered user. A registered user can be understood as a user registered on the application, and each registered user has a unique user ID. A user information element can be understood as an element consisting of a collection of user information for a single user in the user information matrix. A user information element can include at least a user ID and a user status. The user status can include at least a user connection status and a user notification status.
[0039] Pending messages can be understood as messages that need to be pushed. Columns can be considered the categories to which pending messages belong, and are customized by each application, such as service reminders, marketing messages, and interactive notifications. Each column has a unique column ID (column ID) that distinguishes different columns. The first column ID can be considered the column ID corresponding to the column to which the pending message belongs.
[0040] Specifically, the message to be pushed and the first column ID of the column to which the message belongs are obtained from the message push task, and the user information matrix of the application is obtained. For example, the first column ID of the column to which the message to be pushed belongs can be obtained directly from the message push task, or can be determined based on the category of the message to be pushed and the column IDs corresponding to the columns defined in the application.
[0041] In this embodiment, user information elements can be stored in different matrix row tuples in the user information matrix. The user information matrix includes user information of registered users who follow at least one (one or more) columns, that is, the user information matrix includes a matrix row tuple corresponding to one column or a plurality of matrix row tuples corresponding to multiple columns. Each column corresponds to a preset number (one or more) matrix row tuples, and the preset number of matrix row tuples corresponding to each column contain user information elements of all registered users who follow the column. In an optional embodiment, the matrix row tuple has a unique mapping relationship with the column in the application, and the matrix row tuple of a column contains the user information elements of the registered users who follow the column. The column identifier of the column corresponds one-to-one to the matrix row tuple identifier of the matrix row tuple, or the column identifier is directly used as the matrix row tuple identifier.
[0042] In another optional embodiment, the matrix row tuples have a many-to-one mapping relationship (preset number) with the columns in the application, and one column corresponds to a preset number of matrix row tuples. The number of matrix row tuples can be preconfigured, for example, determined or updated based on the expected number of registered users.
[0043] The row tuple identifiers of a preset number of matrix row tuples are obtained by combining the column identifiers of the matrix row tuple mapping column and natural numbers. The natural numbers in the row tuple identifiers of the preset number of matrix row tuples constitute a natural number sequence. For example, the data matrix maps hundreds of millions of user information into 200,000 matrix row tuples, with row tuple identifiers (serial numbers) ranging from 0 to 199,999, and each row tuple has a unique row tuple identifier. The data matrix only stores the user information that follows this column as matrix elements, and the user information that does not follow this column is not maintained in the matrix. The row tuple identifiers of the 200,000 matrix row tuples are A000000, A000001, ..., A199999, respectively. The format of the row tuple identifier can also be A-000000 or A_000000, etc. This embodiment does not limit the combination format of the row tuple identifier.
[0044] When the user ID is a sequence of natural numbers with a preset number of digits, a mapping relationship exists between the user ID and the natural numbers in the row tuple identifier, thereby establishing a correspondence between the user information element and the matrix row tuple. For example, the result of taking a modulus of a preset number (i.e., the remainder result) of the user ID is located in the matrix row tuple storing the user information element in the user information matrix.
[0045] This step adds a user information matrix to the original database storage structure to store user information elements, thereby increasing the speed of user information reading and writing steps, reducing the processing time of the overall message push process, and achieving rapid message push for hundreds of millions of users.
[0046] S120: Locate a first target matrix row tuple in the user information matrix according to the first column identification.
[0047] The first target matrix row tuple can be considered to be the matrix row tuple corresponding to the column to which the message to be pushed belongs. That is, the user information elements corresponding to the users who follow the column to which the message to be pushed belongs are stored in the first target matrix row tuple. It is understood that the first target matrix row tuple includes a preset number of matrix row tuples corresponding to the first column identifier.
[0048] Specifically, the row tuple identifiers of each matrix row tuple in the user information matrix are traversed, and each matrix row tuple corresponding to the row tuple identifier matching the first column identifier is determined as the first target matrix row tuple.
[0049] Exemplarily, the first column identifier and the row tuple identifier are successfully matched in that the first column identifier is the same as the row tuple identifier, or the column identifier portion in the combined row tuple identifier includes the first column identifier.
[0050] S130: Determine the push priority of each user information element in the first target matrix row tuple, and push the message to be pushed to the user terminal corresponding to each user information element in the first target matrix row tuple according to the push priority.
[0051] The push priority can be understood as the priority of pushing the message to be pushed.
[0052] Specifically, based on obtaining each user information element in the row tuple of the first target matrix, for each user information element, the push priority of the user information element is determined according to the user information contained in the user information element, and the message to be pushed is pushed to the user terminal corresponding to the user information element according to the push priority of the user information element.
[0053] Exemplary methods for determining the push priority of a user information element may be to determine the push priority based on the user status included in the user information element. For example, the user status includes the user connection status, and the push priority is determined based on the user connection status; the user status includes the user notification status, and the push priority is determined based on the user notification status; the user status includes the user connection status and the user notification status; and the push priority is determined based on the user connection status and the user notification status.
[0054] In order to implement push in batches, the user identifiers of user information elements of the same priority level may be added to a queue of the corresponding priority level, and the messages to be pushed may be pushed in batches according to the priority level.
[0055] This step determines the priority of message push based on the user status, which can ensure that users who are sensitive to message timeliness are reached first, thereby improving the effect of message push.
[0056] The technical solution of an embodiment of the present invention obtains the first column identifier and the user information matrix of the application to which the message to be pushed belongs; the user information matrix includes a preset number of matrix row tuples corresponding to each column in the application, and the preset number of matrix row tuples contains user information elements of registered users who follow the column; the preset number is greater than or equal to 1; the first target matrix row tuple in the user information matrix is located according to the first column identifier; the push priority of each user information element in the first target matrix row tuple is determined, and the message to be pushed is pushed to the user terminal corresponding to each user information element in the first target matrix row tuple based on the push priority. By adding a user information matrix to store user information elements based on the existing database storage structure, the speed of the user information reading and writing steps is improved, thereby reducing the processing time of the entire push process, and realizing rapid message push for hundreds of millions of users. In addition, the priority of message push is determined based on the user status, which can ensure that users who are sensitive to message timeliness are reached first, improving user experience and message push effectiveness.
[0057] Example 2
[0058] Figure 2 This is a flowchart of a message push method provided in Example 2 of the present invention. Based on the above embodiment, this embodiment further adds features: the method also includes: obtaining a user interaction request through the application; updating the user information matrix according to the user interaction request; wherein the user interaction request includes: one or more of: a user registration request, a user connection management request, a user attention management request and a user notification management request.
[0059] like Figure 2 As shown, the method includes:
[0060] S210. Obtain the first column identifier and the user information matrix of the application to which the message to be pushed belongs; the user information matrix includes a preset number of matrix row tuples corresponding to each column in the application, and the preset number of matrix row tuples contains user information elements of registered users who follow the column; the preset number is greater than or equal to 1.
[0061] S220: Locate a first target matrix row tuple in the user information matrix according to the first column identification.
[0062] S230: Determine the push priority of each user information element in the first target matrix row tuple, and push the message to be pushed to the user terminal corresponding to each user information element in the first target matrix row tuple according to the push priority.
[0063] In an optional embodiment, the user information elements include: user identification, user connection status, and user notification status; S230, determining the push priority of each of the user information elements in the first target matrix row tuple, and pushing the to-be-pushed message to the user terminal corresponding to each of the user information elements in the first target matrix row tuple according to the push priority, includes:
[0064] A1. For each user information element in the first target matrix row tuple, determine the push priority of the user information element according to the user connection status and user notification status in the user information element, and add the user identifier in the user information element to the corresponding priority queue according to the push priority.
[0065] The user connection status can be considered as the connection status between the user terminal and the application, which can include offline status and online status. The user notification status can be understood as whether the user terminal has enabled the message notification function, which can include notification enabled status and notification disabled status.
[0066] A priority queue can be understood as a queue that stores elements with the same priority. The number of priority queues corresponds to the priority level. If there are three priority levels, three priority queues corresponding to the priority levels are created.
[0067] Specifically, the user terminal corresponding to each user information element in the first target matrix row tuple is an object to which messages need to be pushed. Therefore, for each user information element in the first target matrix row tuple, the push priority of the user information element is determined according to the user connection status and user notification status in the user information element, and a queue corresponding to each push priority is created according to the number of push priorities, and the user identifier in the user information element is added to the corresponding priority queue according to the push priority corresponding to the user information element.
[0068] Exemplarily, for each user information element, if the user connection status is online (logged-in status), the push priority of the user information element is determined to be high priority, and the user identifier in the user information element is added to the high priority queue; if the user connection status is offline (logged-out status) and the user notification status is notification-on status, the push priority of the user information element is determined to be medium priority, and the user identifier in the user information element is added to the medium priority queue; if the user connection status is offline and the user notification status is notification-off status, the push priority of the user information element is determined to be low priority, and the user identifier in the user information element is added to the low priority queue.
[0069] A2. Push the message to be pushed to the user terminal corresponding to the user identifier in the priority queue according to the push priority of the priority queue.
[0070] Specifically, the message push task is executed according to the push priority of the priority queue, and the messages to be pushed are pushed to the user terminals corresponding to the user identifiers in the priority queue in sequence.
[0071] For example, the messages to be pushed are pushed to the user terminals corresponding to the user identifiers in the high priority queue first; then the messages to be pushed are pushed to the user terminals corresponding to the user identifiers in the medium priority queue; and finally the messages to be pushed are pushed to the user terminals corresponding to the user identifiers in the low priority queue.
[0072] In a specific example, Figure 3 A schematic diagram of the principle of message push provided in the second embodiment of the present invention. The user information matrix includes a preset number of matrix row tuples corresponding to each column in the application. Optionally, the row tuple identifier of the preset number of matrix row tuples is the column identifier of the column of interest and a natural number in the range of 0 to N. The modulo result of the user ID of the user information element stored in the matrix row tuple by the preset number is equal to the natural number in the row tuple identifier of the matrix row tuple. Through the mapping relationship between the row tuple identifier, the column identifier and the user identifier, the user data of hundreds of millions is converted into a preset number of micro-batch user data, and the original full-volume task is decomposed into micro-batch tasks with higher processing efficiency, thereby improving the processing efficiency of the message push task.
[0073] A preset number of matrix row tuples contain user information elements of registered users who follow the column; the preset number is greater than or equal to 1 ( Figure 3 The column identifier A of the column to be followed is set to N. User information elements include: User Identifier (UID), user connection status (offline or online), and user notification status (on or off). The 200,000 matrix row tuples are traversed, and the user IDs of the user information elements in each matrix row group are added to the corresponding priority queue according to the push priority.
[0074] This embodiment dynamically adjusts the message push priority of the user terminal according to the user status, sets the push priority of the online status to the highest, and stores user identifiers of the same priority through the priority queue, which can prioritize and ensure that time-sensitive online user terminals can receive push messages in time, thereby improving business conversion rate.
[0075] S240. Obtain a user interaction request through the application, and update the user information matrix according to the user interaction request; wherein the user interaction request includes: one or more of: a user registration request, a user connection management request, a user attention management request, and a user notification management request.
[0076] The user interaction request may be understood as a request issued during the interaction between the user and the application, and may include one or more of a user registration request, a user logout request, a user connection management request, a user follow management request, and a user notification management request.
[0077] A user registration request can be understood as an instruction requesting user registration on an application. A successfully registered user can be called a registered user, and unregistered users are assigned a unique user ID. A user deregistration request can be understood as an instruction requesting user deregistration on an application.
[0078] A user connection management request can be understood as an instruction requesting the user terminal to establish a connection with the application (log in to the application) or disconnect (log out of the application). Establishing a connection with the application can be manifested as the user being online, and a TCP long connection is established between the user terminal and the message push server; establishing a connection with the application can be manifested as the user being offline, and there is no connection between the user terminal and the message push server; a user connection management request may include: a user login request or a user logout request.
[0079] The user attention management request can be understood as an instruction for the user to request to follow a column provided by the application, and the user terminal can receive a push message for following the column. The user attention management request can include a user attention request and a user unfollow request.
[0080] A user notification management request can be understood as a user's instruction to manage whether to receive push messages while offline. When notifications are enabled, users can wake up the app and jump to the corresponding page by clicking on the notification message. User notification management requests can include user notification enable or user notification disable requests.
[0081] Specifically, the application obtains a user interaction request, generates or locates a user information element in the user information matrix according to the user interaction request, and updates the user information matrix. The update operation may include: adding, deleting, and modifying user information elements.
[0082] It is understandable that S240 may be executed before S210, or after S230, or may be executed synchronously with S210 to S230. The user information matrix may be updated at any time when a user interaction request is received.
[0083] Exemplarily, a user information element is generated based on a user registration request, a second target matrix row tuple corresponding to the user information element is located in the user information matrix, and the user information element is added to the second target matrix row tuple. Based on a user deregistration request, a second target matrix row tuple corresponding to the user information element corresponding to the user deregistration request is located in the user information matrix, and the user information element in the second target matrix row tuple is deleted.
[0084] Exemplarily, based on a user connection management request, the target user information element corresponding to the user connection management request is located in the user information matrix, and the user connection status in the target user information element is modified based on the user connection management request; for example, based on a user login request, the user connection status in the target user information element is modified to be online, and based on a user logout request, the user connection status in the target user information element is modified to be offline. Based on a user notification management request, the target user information element corresponding to the user notification management request is located in the user information matrix, and the user notification status in the target user information element is modified based on the user notification management request; for example, based on a user notification enable request, the user notification status in the target user information element is modified to be notification enabled, and based on a user notification disable request, the user notification status in the target user information element is modified to be notification disabled.
[0085] Exemplarily, based on the user follow management request, the second target matrix row tuple corresponding to the user follow management request in the user information matrix is located, and the target user information element corresponding to the user follow management request in the second target matrix row tuple is added or deleted based on the user follow management request; for example, based on the user follow request, the target user information element is added to the second target matrix row tuple, and based on the user unfollow request, the target user information element is deleted from the second target matrix row tuple.
[0086] In a first optional embodiment, the updating of the user information matrix according to the user interaction request includes: performing user registration in response to the user registration request, and obtaining a user ID and a user connection status; determining a second column ID of the registered user's attention column based on column attention configuration information; obtaining notification authority configuration information of the user terminal through the application, and setting a notification management status according to the notification authority configuration information; determining a user information element according to the user ID, user connection status, and user notification status; locating a second target matrix row tuple in the user information matrix according to the second column ID; and adding the user information element to the second target matrix row tuple.
[0087] The column attention configuration information can be understood as information used to configure the attention column, which can be the system default attention column or the attention column selected by the user during registration. The notification permission configuration information can be understood as information used to configure the notification permissions of the terminal device, which can be obtained with user authorization. The second column identifier can be understood as the column identifier of the user terminal's attention column. The second target matrix row tuple can be understood as the matrix row tuple located in the user information matrix based on the user request.
[0088] For example, Figure 4 This is a timing diagram of updating the user information matrix based on a user registration request provided by the second embodiment of the present invention. Figure 4 As shown, the process of updating the user information matrix based on the user registration request is as follows: 4.1 The user terminal submits a registration request to the registration / login module in the background of the message push server through the APP; 4.2 The message push server calls the registration / login module to complete the user information verification and obtain the user ID and user connection status. If the user has only registered but not logged in, the user connection status is offline. If the user has registered and logged in, the user connection status is online; 4.3 Call the attention management module to determine the attention relationship between the user and the column based on the user's column attention configuration information; 4.4 Call the attention management module to complete the column attention setting and obtain the second column identification of the attention column; 4.5 Call the notification management module to obtain the notification permission configuration information from the user terminal; 4.6 Call the notification management module to set the notification permission and confirm the notification management status of the user terminal; 4.7 Call the registration / login module to construct the user information element according to the user identification, user connection status and user notification status; and determine the target row tuple identification according to the user identification and the second column identification, and locate the second target matrix row tuple according to the target row tuple identification; 4.8 Call the registration / login module to add the user information element to the second target matrix row tuple to update the user information matrix; 4.9 Receive the returned user information matrix update result; 4.10 Return the registration result to the user terminal.
[0089] In the case of a new user registration, this embodiment adds the user information element corresponding to the user registration request to the second target matrix row tuple of the user information matrix to implement the update of the user information matrix.
[0090] In a second optional embodiment, the updating of the user information matrix according to the user interaction request includes: responding to the user connection management request of the registered user, obtaining the user ID of the registered user and the second column ID of the column of interest; the user connection management request includes: a user login request or a user logout request; locating the second target matrix row tuple in the user information matrix according to the second column ID; locating the target user information element in the second target matrix row tuple according to the user ID; and updating the user connection status in the target user information element based on the user connection management request.
[0091] For example, Figure 5 This is a timing diagram of updating the user information matrix based on a user connection management request provided in the second embodiment of the present invention. Figure 5 As shown, the process of updating the user information matrix based on the user connection management request is as follows: 5.1 The user terminal submits a user connection management request (user login request / user logout request) to the registration / login module in the background of the message push server through the APP; 5.2 After receiving the user connection management request, the message push server calls the registration / login module to obtain the user ID and the second column ID of the follow-up column, and locates the second target matrix row tuple in the user information matrix according to the user ID and the second column ID; 5.3 Locate the target user information element in the second target matrix row tuple according to the user ID, and update the user connection status in the target user information element to the online status corresponding to the user login request or the offline status corresponding to the user logout request, thereby updating the user information matrix; 5.4 Receive the returned user information matrix update result; 5.5 Return the user connection management request result to the user terminal.
[0092] In this embodiment, when a user requests to log in to or log out of an application, the user connection status in the user information element corresponding to the user information matrix is updated according to the user connection management request, thereby updating the user information matrix.
[0093] In a third optional embodiment, the updating of the user information matrix according to the user interaction request includes: responding to the user follow management request of the registered user, obtaining the second user identifier of the registered user and the second column identifier for requesting follow management; the user follow management request includes a user follow request or a user unfollow request; locating the second target matrix row tuple in the user information matrix according to the second column identifier; for the user follow request, determining the user information element according to the user identifier, user connection status and user notification status, and adding the user information element to the second target matrix row tuple; for the user unfollow request, locating the target user information element in the second target matrix row tuple according to the user identifier, and deleting the target user information element from the second target matrix row tuple.
[0094] Among them, the user's follow request can be understood as an instruction to request to follow a column, and the user's unfollow request can be understood as an instruction to request to unfollow a column.
[0095] For example, Figure 6 This is a timing diagram of updating the user information matrix based on a user attention management request provided in the second embodiment of the present invention. Figure 6 As shown, the process of updating the user information matrix based on the user follow management request is as follows: 6.1 The user terminal submits a user follow management request (user follow request / user unfollow request) to the follow management module in the background of the message push server through the APP. 6.2 After receiving the user follow management request, the message push server calls the follow management module to obtain the user ID and the second column ID of the follow column, and locates the second target matrix row tuple in the user information matrix according to the user ID and the second column ID; 6.3 If it is a user follow request, obtain the user connection status and user notification status, determine the user information element according to the user ID, user connection status and user notification status, and add the user information element to the second target matrix row tuple; if it is a user unfollow request, locate the target user information element in the second target matrix row tuple according to the user ID, delete the target user information element from the second target matrix row tuple, and update the user information matrix. 6.4 Receive the returned user information matrix update result; 6.5 Return the user follow management request result to the user terminal.
[0096] In this embodiment, when a user requests to follow or unfollow a column, user information elements are added or deleted from the matrix row tuple of the user information matrix according to the user connection management request, thereby updating the user information matrix.
[0097] In a fourth optional embodiment, the updating of the user information matrix according to the user interaction request includes: responding to the user notification management request of the registered user, obtaining the user identifier of the registered user and the second column identifier of the column of interest to the registered user; the user notification management request includes: a user notification on request or a user notification off request; locating the second target matrix row tuple in the user information matrix according to the second column identifier; locating the target user information element in the second target matrix row tuple according to the user identifier; and updating the user notification status in the target user information element according to the user notification management request.
[0098] For example, Figure 7 This is a timing diagram of updating the user information matrix based on a user notification management request provided in the second embodiment of the present invention. Figure 7 As shown, the process of updating the user information matrix based on the user notification management request is as follows: 7.1 The user terminal submits a user notification management request (user notification enable request / user notification disable request) to the notification management module in the background of the message push server through the APP; 7.2 After receiving the user notification management request, the message push server calls the notification management module to obtain the user ID and the second column ID of the attention column, and locates the second target matrix row tuple in the user information matrix according to the user ID and the second column ID; 7.3 Locate the target user information element in the second target matrix row tuple according to the user ID, and update the user notification status in the target user information element to the notification enable status corresponding to the user notification enable request or the notification disable status corresponding to the user notification disable request, thereby updating the user information matrix; 7.4 Receive the returned user information matrix update result; 7.5 Return the user notification management request result to the user terminal.
[0099] In this embodiment, when a user requests to enable or disable an application's notification service, the user notification status in the user information element corresponding to the user information matrix is updated according to the user notification management request, thereby updating the user information matrix.
[0100] Based on any one of the above-mentioned first to fourth optional embodiments, the row tuple identifier of the preset number of matrix row tuples is a combination of column identifiers and natural numbers, and the preset number of natural numbers constitutes a natural number sequence; the positioning of the second target matrix row tuple in the user information matrix according to the second column identifier includes: obtaining the modulo result of the user identifier with respect to the preset number; and positioning the second target matrix row tuple in the user information matrix according to the second column identifier and the modulo result.
[0101] Specifically, the user information matrix includes a preset number of matrix tuples, wherein the row tuple identifier of the matrix row tuple is a combination of a column identifier and a natural number, and the preset number of natural numbers constitutes a natural number sequence. A modulo result of the user identifier with respect to the preset number is obtained, where the modulo result is between 0 and the preset number - 1. Combining the second column identifier and the modulo result, the second target matrix row tuple where the user information element corresponding to the user identifier is located or should be located can be located.
[0102] For example, each column (column ID is A) in the user information matrix corresponds to 200,000 matrix row tuples, and the row tuples of the 200,000 matrix row tuples are identified as A_0 to A_199999. If the user ID is 200072 and the column ID of the column of interest is A, then the row tuple of the matrix row tuple corresponding to the user information element is identified as A_000072. It can be understood that when user IDs are generated evenly or randomly, the user information elements are distributed nearly uniformly in the matrix row tuples.
[0103] This embodiment benefits from a data matrix organization approach. Hundreds of millions of user information data has been distributed across a preset number of matrix row tuples, modulo each user ID. Each user information element uniquely belongs to a single matrix row tuple. Therefore, message push tasks can be conveniently divided by matrix row tuples, dividing hundreds of millions of users into a preset number of micro-batches for subsequent message push processing, significantly accelerating processing speed.
[0104] Example 3
[0105] Figure 8 This is a structural diagram of a message push device provided by the third embodiment of the present invention. Figure 8 As shown, the device includes: an acquisition module 810, a positioning module 820 and a push module 830; wherein:
[0106] An acquisition module 810 is configured to acquire a first column identifier and a user information matrix of an application program to which a message to be pushed belongs; the user information matrix comprising a preset number of matrix row tuples corresponding to each column in the application program, the preset number of matrix row tuples comprising user information elements of registered users who follow the column; the preset number being greater than or equal to 1;
[0107] A positioning module 820, configured to locate a first target matrix row tuple in the user information matrix according to the first column identification;
[0108] The push module 330 is configured to determine a push priority of each user information element in the first target matrix row tuple, and push the message to be pushed to the user terminal corresponding to each user information element in the first target matrix row tuple according to the push priority.
[0109] Optionally, the user information elements include: user identification, user connection status, and user notification status; the push module 830 is specifically configured to:
[0110] For each user information element in the row tuple of the first target matrix, determining a push priority of the user information element according to a user connection state and a user notification state in the user information element, and adding the user identifier in the user information element to a corresponding priority queue according to the push priority;
[0111] The message to be pushed is pushed to the user terminal corresponding to the user identifier in the priority queue according to the push priority of the priority queue.
[0112] Optionally, the method further includes:
[0113] An update module is used to obtain user interaction requests through the application and update the user information matrix according to the user interaction requests; wherein the user interaction requests include: one or more of: user registration requests, user connection management requests, user attention management requests and user notification management requests.
[0114] Optionally, the update module is specifically configured to:
[0115] Responding to the user registration request to perform user registration and obtain user identification and user connection status;
[0116] Determine a second column identifier of the column of interest to the registered user based on the column interest configuration information;
[0117] Obtaining notification permission configuration information of the user terminal through the application, and setting a notification management state according to the notification permission configuration information;
[0118] Determining a user information element based on the user identifier, user connection status, and user notification status;
[0119] Locating a second target matrix row tuple in the user information matrix according to the second column identification;
[0120] Add the user information element to the second target matrix row tuple.
[0121] Optionally, the update module is specifically configured to:
[0122] In response to the user connection management request of the registered user, obtaining the user ID of the registered user and the second column ID of the column of interest; the user connection management request includes: a user login request or a user logout request;
[0123] Locating a second target matrix row tuple in the user information matrix according to the second column identification;
[0124] Locating a target user information element in a row tuple of the second target matrix according to the user identifier;
[0125] The user connection status in the target user information element is updated based on the user connection management request.
[0126] Optionally, the update module is specifically configured to:
[0127] In response to the user follow management request of the registered user, obtaining the second user identifier of the registered user and the second column identifier of the requested follow management; the user follow management request includes a user follow request or a user unfollow request;
[0128] Locating a second target matrix row tuple in the user information matrix according to the second column identification;
[0129] For a user attention request, determining a user information element according to the user identifier, the user connection state, and the user notification state, and adding the user information element to a row tuple of the second target matrix;
[0130] For a user unfollow request, the target user information element in the second target matrix row tuple is located according to the user identifier, and the target user information element is deleted from the second target matrix row tuple.
[0131] Optionally, the update module is specifically configured to:
[0132] In response to the user notification management request of the registered user, obtaining the user ID of the registered user and the second column ID of the column of interest to the registered user; the user notification management request includes: a user notification on request or a user notification off request;
[0133] Locating a second target matrix row tuple in the user information matrix according to the second column identification;
[0134] Locating a target user information element in a row tuple of the second target matrix according to the user identifier;
[0135] According to the user notification management request, the user notification status in the target user information element is updated.
[0136] Optionally, the row tuple identifiers of the preset number of matrix row tuples are combinations of column identifiers and natural numbers, and the preset number of natural numbers constitute a natural number sequence; and locating the second target matrix row tuple in the user information matrix according to the second column identifier includes:
[0137] Obtaining a modulo result of the user identifier and the preset number;
[0138] Determine the target row tuple identifier according to the second column identifier and the modulo result;
[0139] Locate a second target matrix row tuple corresponding to the target row tuple identifier in the user information matrix.
[0140] The message push device provided by the embodiment of the present invention can execute the message push method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0141] Example 4
[0142] Figure 9 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.
[0143] like Figure 9 As shown, the electronic device 90 includes at least one processor 91 and a memory, such as a read-only memory (ROM) 92, a random access memory (RAM) 93, etc., which is communicatively connected to the at least one processor 91. The memory stores a computer program that can be executed by the at least one processor, and the processor 91 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 92 or the computer program loaded from the storage unit 98 into the random access memory (RAM) 93. Various programs and data required for the operation of the electronic device 90 can also be stored in the RAM 93. The processor 91, ROM 92, and RAM 93 are connected to each other via a bus 94. An input / output (I / O) interface 95 is also connected to the bus 94.
[0144] Multiple components in the electronic device 90 are connected to the I / O interface 95, including an input unit 96, such as a keyboard, a mouse, etc.; an output unit 97, such as various types of displays, speakers, etc.; a storage unit 98, such as a magnetic disk, an optical disk, etc.; and a communication unit 99, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 99 allows the electronic device 90 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0145] The processor 91 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of the processor 91 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors that run machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 91 executes the various methods and processes described above, such as the message push method.
[0146] In some embodiments, the message push method can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 98. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 90 via the ROM 92 and / or the communication unit 99. When the computer program is loaded into the RAM 93 and executed by the processor 91, one or more steps of the message push method described above can be performed. Alternatively, in other embodiments, the processor 91 can be configured to perform the message push method in any other appropriate manner (for example, by means of firmware).
[0147] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0148] In some embodiments, the message push method can be implemented as a computer program, which is invisibly included in a computer program product. The computer program implements the message push method of the present invention when executed by a processor. The computer program product can be understood as a software product that implements its solution mainly through a computer program. The computer program for implementing the method of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device so that the computer program, when executed by the processor, causes the functions / operations specified in the flowchart and / or block diagram to be implemented. The computer program can be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.
[0149] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0150] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0151] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0152] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.
[0153] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.
[0154] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.
Claims
1. A message push method, characterized in that: include: Get the first column ID of the message to be pushed and the user information matrix of the application; The user information matrix includes a preset number of matrix row tuples corresponding to each column in the application, and the preset number of matrix row tuples contain user information elements of registered users who follow the column; The preset number is greater than or equal to 1; Locating a first target matrix row tuple in the user information matrix according to the first column identification; Determine a push priority of each of the user information elements in the first target matrix row tuple, and push the message to be pushed to a user terminal corresponding to each of the user information elements in the first target matrix row tuple according to the push priority.
2. The method according to claim 1, characterized in that The user information elements include: user identification, user connection status, and user notification status; determining the push priority of each of the user information elements in the first target matrix row tuple, and pushing the to-be-pushed message to the user terminal corresponding to each of the user information elements in the first target matrix row tuple according to the push priority, includes: For each user information element in the row tuple of the first target matrix, determining a push priority of the user information element according to a user connection state and a user notification state in the user information element, and adding the user identifier in the user information element to a corresponding priority queue according to the push priority; The message to be pushed is pushed to the user terminal corresponding to the user identifier in the priority queue according to the push priority of the priority queue.
3. The method according to claim 1, characterized in that The method further comprises: Obtaining a user interaction request through the application, and updating the user information matrix according to the user interaction request; The user interaction request includes one or more of a user registration request, a user connection management request, a user attention management request, and a user notification management request.
4. The method according to claim 3, characterized in that The updating of the user information matrix according to the user interaction request includes: Responding to the user registration request to perform user registration and obtain user identification and user connection status; Determine a second column identifier of the column of interest to the registered user based on the column interest configuration information; Obtaining notification permission configuration information of the user terminal through the application, and setting a notification management state according to the notification permission configuration information; Determining a user information element based on the user identifier, user connection status, and user notification status; Locating a second target matrix row tuple in the user information matrix according to the second column identification; Add the user information element to the second target matrix row tuple.
5. The method according to claim 3, characterized in that The updating of the user information matrix according to the user interaction request includes: In response to the user connection management request of the registered user, obtaining the user ID of the registered user and the second column ID of the column of interest; the user connection management request includes: a user login request or a user logout request; Locating a second target matrix row tuple in the user information matrix according to the second column identification; Locating a target user information element in a row tuple of the second target matrix according to the user identifier; The user connection status in the target user information element is updated based on the user connection management request.
6. The method according to claim 3, characterized in that The updating of the user information matrix according to the user interaction request includes: In response to the user follow management request of the registered user, obtaining the second user identifier of the registered user and the second column identifier of the requested follow management; the user follow management request includes a user follow request or a user unfollow request; Locating a second target matrix row tuple in the user information matrix according to the second column identification; For a user attention request, determining a user information element according to the user identifier, the user connection state, and the user notification state, and adding the user information element to a row tuple of the second target matrix; For a user unfollow request, the target user information element in the second target matrix row tuple is located according to the user identifier, and the target user information element is deleted from the second target matrix row tuple.
7. The method according to claim 3, characterized in that The updating of the user information matrix according to the user interaction request includes: In response to the user notification management request of the registered user, obtaining the user ID of the registered user and the second column ID of the column of interest to the registered user; the user notification management request includes: a user notification opening request or a user notification closing request; Locating a second target matrix row tuple in the user information matrix according to the second column identification; Locating a target user information element in a row tuple of the second target matrix according to the user identifier; According to the user notification management request, the user notification status in the target user information element is updated.
8. The method according to any one of claims 4 to 7, characterized in that The row tuple identifiers of the preset number of matrix row tuples are combinations of column identifiers and natural numbers, and the preset number of natural numbers constitute a natural number sequence; The step of locating a second target matrix row tuple in the user information matrix according to the second column identification includes: Obtaining a modulo result of the user identifier and the preset number; Determine the target row tuple identifier according to the second column identifier and the modulo result; Locate a second target matrix row tuple corresponding to the target row tuple identifier in the user information matrix.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively coupled to the at least one processor; The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the message pushing method according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the message pushing method according to any one of claims 1 to 8 when executed.