Message pushing method and device, equipment and storage medium
By binding tenant ID, user ID and group tag information with the connection channel, generating connection binding information and adopting multiple push strategies, the problem of single push granularity in the SaaS system is solved, accurate multi-granularity push is achieved, and resource utilization is improved.
Patent Information
- Application Number
- CN202510904229.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-01
- Publication Date
- 2025-10-03
AI Technical Summary
In the existing technology, the message push method of the SaaS system only supports unicast and broadcast, and cannot be logically grouped within the tenant or isolated multicast across tenants. This results in a single push granularity, difficulty in achieving accurate push, and low resource efficiency.
By binding tenant identification information, user identification information, group tag information and connection channels, connection binding information is generated, the push scope and strategy are determined, and unicast, multicast, tenant broadcast and global broadcast strategies are adopted to achieve multiple push granularities and cover all business scenarios.
Based on unicast and broadcast push, multicast push with multiple push granularities can be implemented to cover all business scenarios, achieve accurate push, and improve resource utilization and push efficiency.
Smart Images

Figure CN120751004A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of message push technology, and in particular to a message push method, apparatus, device and storage medium. Background Art
[0002] Current SaaS (Software as a Service) system messaging technology primarily relies on unicast and broadcast push. Unicast push pushes messages to a single user's device based on WebSocket (a protocol for full-duplex communication over a single TCP connection) or HTTP (Hypertext Transfer Protocol) long polling, while broadcast push sends the same message to all subscribed clients. Because it only supports single-user or all-user broadcasts, it cannot logically group messages within a tenant or isolate multicast messages across tenants, resulting in a single push granularity. Because broadcast mode easily generates redundant traffic, unicast mode cannot meet group messaging needs, resulting in low resource efficiency. Furthermore, it lacks tenant-specific grouping strategies and tenant isolation capabilities, making tenant-level push scope control impossible.
[0003] The above content is only used to assist in understanding the technical solution of the present invention and does not constitute an admission that the above content is prior art. Summary of the Invention
[0004] The main purpose of this application is to provide a message push method, device, equipment and storage medium, aiming to solve the technical problem that in the existing technology, only unicast push and broadcast push methods are used for message push, the push granularity is relatively single, and it is difficult to achieve accurate push in all business scenarios.
[0005] To achieve the above objectives, the present application provides a message push method, which includes:
[0006] Bind the tenant identification information, user identification information, group tag information, and connection channel of the connected clients in each tenant to generate connection binding information for each tenant;
[0007] Receive a message to be pushed, analyze the message to be pushed, and determine a push scope and a push strategy for the message to be pushed, where the push strategy is any one of a unicast push strategy, a multicast push strategy, a tenant broadcast push strategy, and a global broadcast strategy;
[0008] Determining a target connection channel in the connection binding information based on the push scope and push policy of the message to be pushed;
[0009] Based on the target connection channel, the message to be pushed is pushed to the target client.
[0010] In one embodiment, the connection binding information includes at least a binding relationship between the group tag information and the user identification information and a binding relationship between the user identification information and the connection channel. The steps of receiving the message to be pushed, analyzing the message to be pushed, and determining a push policy for the message to be pushed include:
[0011] When the received message to be pushed carries target user identification information, determining that the push scope of the message to be pushed is a single user, and determining that the push strategy of the message to be pushed is a unicast push strategy;
[0012] When the received message to be pushed carries target tenant identification information and target group tag information, determining that the push scope of the message to be pushed is grouped users within the tenant, and determining that the push strategy of the message to be pushed is a multicast push strategy;
[0013] When the received message to be pushed carries target tenant identification information and does not carry target group tag information, determining that the push scope of the message to be pushed is all users in the tenant, and determining that the push strategy of the message to be pushed is the tenant broadcast push strategy;
[0014] When the received message to be pushed carries global identification information, the push scope of the message to be pushed is determined to be global users, and the push strategy of the message to be pushed is determined to be a global broadcast push strategy.
[0015] In one embodiment, the step of determining the target connection channel in the connection binding information based on the push scope and push policy of the message to be pushed includes:
[0016] When the push policy of the message to be pushed is a multicast push policy, determining target connection binding information based on the target tenant identification information;
[0017] Determining the bound user identification information corresponding to the target group label information based on the binding relationship between the group label information and the user identification information in the target connection binding information;
[0018] Deduplicating the bound user identification information corresponding to the target group label information to obtain deduplicated user identification information;
[0019] Determining the bound connection channel corresponding to the deduplicated user identification information based on the binding relationship between the user identification information and the connection channel in the target connection binding information;
[0020] The target connection channel is selected from the bound connection channels corresponding to the deduplicated user identification information, wherein one deduplicated user identification information corresponds to one target connection channel.
[0021] In one embodiment, the step of determining the target connection channel in the connection binding information based on the push scope and push policy of the message to be pushed includes:
[0022] When the push strategy of the message to be pushed is a tenant broadcast push strategy, determining target connection binding information based on the target tenant identification information;
[0023] Determining the bound connection channel corresponding to the target tenant identification information based on the binding relationship between the user identification information and the connection channel in the target connection binding information;
[0024] A valid channel is selected from the bound connection channels as the target connection channel.
[0025] In one embodiment, the step of determining the target connection channel in the connection binding information based on the push scope and push policy of the message to be pushed includes:
[0026] When the push policy of the message to be pushed is a unicast push policy, searching the binding relationship between the group tag information and the user identification information in the connection binding information based on the target user identification information to determine the binding connection channel corresponding to the target user identification information;
[0027] When the target user identification information has multiple bound connection channels, randomly selecting one bound connection channel as the target connection channel;
[0028] When the target user identification information has a single bound connection channel, the bound connection channel is used as the target connection channel.
[0029] In one embodiment, before the step of binding the tenant identification information, user identification information, group tag information, and connection channel of the connected clients in each tenant to generate connection binding information for each tenant, the step further includes:
[0030] Determining, based on the grouping request information of the connected client, a subscription grouping tag of the connected client, wherein the subscription grouping tag includes at least a department grouping tag and a role grouping tag;
[0031] Determining, based on the role grouping tag of the connected client, an associated grouping tag of the connected client;
[0032] Determining customized temporary rule information based on the tenant identification information of the connected client, and determining a temporary grouping tag that the connected client complies with based on the customized temporary rule information;
[0033] The group tag information of the connected client is generated based on the subscription group tag, the association group tag, and the temporary group tag.
[0034] In one embodiment, after the step of pushing the message to be pushed to the target client based on the target connection channel, the step further includes:
[0035] Obtain the most recent activity time of the connection channel of the connected client;
[0036] Determining an activity interval duration of the connection channel of the connected client based on a recent activity time of the connection channel of the connected client;
[0037] When the activity interval of the connection channel of the connected client is longer than a preset duration threshold, determining that the connection channel of the connected client is an idle channel;
[0038] The idle channel is released, and the connection binding information is updated.
[0039] In addition, to achieve the above-mentioned purpose, the present application also proposes a message push device, which includes:
[0040] The tenant management module is used to bind the tenant identification information, user identification information, group tag information and connection channel of the connected clients in each tenant to generate connection binding information for each tenant;
[0041] A message push module is used to receive messages to be pushed, analyze the messages to be pushed, and determine the push scope and push strategy of the messages to be pushed, where the push strategy is any one of a unicast push strategy, a multicast push strategy, a tenant broadcast push strategy, and a global broadcast strategy;
[0042] The message push module is further configured to determine a target connection channel in the connection binding information based on a push scope and a push policy of the message to be pushed;
[0043] The message pushing module is further configured to push the message to be pushed to the target client based on the target connection channel.
[0044] In addition, to achieve the above-mentioned purpose, the present application also proposes a message push device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the message push method as described above.
[0045] In addition, to achieve the above-mentioned purpose, the present invention also proposes a storage medium, which is a computer-readable storage medium. A computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the message push method as described above are implemented.
[0046] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements the steps of the message push method as described above.
[0047] The present application provides a message push method, which binds the tenant identification information, user identification information, group tag information and connection channel of the connected clients in each tenant to generate the connection binding information of each tenant; receives the message to be pushed, analyzes the message to be pushed, determines the push range and push strategy of the message to be pushed, and the push strategy is any one of the unicast push strategy, multicast push strategy, tenant broadcast push strategy and global broadcast strategy; based on the push range and push strategy of the message to be pushed, determines the target connection channel in the connection binding information; based on the target connection channel, pushes the message to be pushed to the target client. The present application groups the users in all tenants and binds the relationship between users and connections, and the relationship between groups and users. The corresponding physical connection can be found through the grouping, and the message can be pushed to the specified client, thereby realizing multicast push on the basis of unicast push and broadcast push, and then through multiple push granularities such as single user, group user, tenant-level user, global user, etc., it can cover all business scenarios and realize accurate push in different scenarios, solving the technical problem that only unicast push and broadcast push are used for message push, and the push granularity is relatively single, making it difficult to realize accurate push in all business scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0049] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0050] Figure 1 This is a flow chart of the first embodiment of the message push method of this application;
[0051] Figure 2 A schematic diagram of the overall architecture of the message push method provided in Example 1 of the present application;
[0052] Figure 3 This is a flow chart of the second embodiment of the message push method of this application;
[0053] Figure 4 A schematic diagram of the multicast push process of the message push method provided in Example 2 of the present application;
[0054] Figure 5 This is a flow chart of Example 3 of the message push method of this application;
[0055] Figure 6 This is a schematic diagram of the module structure of the message push device according to an embodiment of the present application;
[0056] Figure 7 This is a schematic diagram of the device structure of the hardware operating environment involved in the message push method in the embodiment of the present application.
[0057] The realization of the objectives, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0058] It should be understood that the specific embodiments described herein are merely used to explain the technical solutions of the present application and are not intended to limit the present application.
[0059] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0060] The main solution of the embodiment of the present application is: bind the tenant identification information, user identification information, group tag information and connection channel of the connected clients in each tenant to generate connection binding information for each tenant; receive the message to be pushed, analyze the message to be pushed, determine the push range and push strategy of the message to be pushed, and the push strategy is any one of the unicast push strategy, multicast push strategy, tenant broadcast push strategy and global broadcast strategy; based on the push range and push strategy of the message to be pushed, determine the target connection channel in the connection binding information; based on the target connection channel, push the message to be pushed to the target client.
[0061] Currently, SaaS systems only use unicast and broadcast push methods for message push, with a single push granularity. For tenant-level push ranges or smaller push ranges, the broadcast mode has a large number of redundant messages, and the unicast mode cannot meet group messaging needs. It requires continuous long polling, cannot push messages accurately, and has low resource utilization.
[0062] This application provides a solution that groups all users in the tenant and binds the relationship between users and connections, and the relationship between groups and users. The corresponding physical connection can be found through the grouping, and messages can be pushed to the specified client, thereby realizing multicast push on the basis of unicast push and broadcast push. Then, through multiple push granularities such as single user, group user, tenant-level user, global user, etc., it can cover all business scenarios and realize accurate push in different scenarios, solving the technical problem that only unicast push and broadcast push are used for message push, and the push granularity is relatively single, making it difficult to realize accurate push in all business scenarios.
[0063] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, mobile phone, etc., or an electronic device or message push device capable of performing the above functions, and this embodiment does not specifically limit this. The following uses the message push device of the server (SaaS system) as an example to illustrate this embodiment and the following embodiments.
[0064] The present application embodiment provides a message push method, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the message push method of this application.
[0065] In this embodiment, the message push method includes steps S10 to S40:
[0066] Step S10: Bind the tenant identification information, user identification information, group tag information, and connection channel of the connected clients in each tenant to generate connection binding information for each tenant;
[0067] It should be noted that tenants are usually enterprises / platforms that rent / use SaaS for message push. In this embodiment, the number of tenants can be single or multiple (two or more), determined according to actual conditions, and there is no specific limitation on this.
[0068] In addition, it should be noted that a connected client is a client / browser that has successfully established a connection. One client / browser usually corresponds to one user (a user using multiple clients / browsers can be considered different users). A connection must be established before message push. In other words, at this time, the connected client can perform message push.
[0069] In a feasible implementation, the step of establishing a connection includes: receiving a connection request initiated by the client to be authenticated based on identity authentication information, performing security authentication on the connection request of the client to be authenticated, wherein the identity authentication information includes at least tenant identification information, user identification information and group request information; when the connection request of the client to be authenticated passes the security authentication, establishing a connection with the client to be authenticated, and adding the client to be authenticated to the connected clients.
[0070] It should be noted that the client to be authenticated is the client / browser requesting a connection. The client to be authenticated actively initiates a WebSocket / HTTP connection request, and the connection request carries identity authentication information. The identity authentication message is the relevant information used for security authentication, including at least tenant identification information, user identification information, and group request information. The tenant identification information is the identification number of the tenant to which the client belongs, which can be a tenant ID (Identity Document). The user identification information is the identification number of the user corresponding to the client, which can be a user ID. This embodiment does not specifically limit this.
[0071] It is understood that security authentication generally consists of two parts: identity authentication and token authentication. Identity authentication is performed using the tenant ID and user ID. If identity authentication succeeds, the server returns a token to the client to be authenticated. The client uses the token to initiate a connection. If the token is verified, security authentication succeeds. The server then establishes a connection with the client to be authenticated, and the client is added to the list of connected clients.
[0072] It should be understood that each tenant can set up multiple groups. The group request information, that is, the group that the client requests to join, can be a single group or multiple groups, which is determined according to the actual situation. This embodiment does not make specific limitations on this. Generally speaking, the group request information is represented by the corresponding label. For example, the connection request is "(tenant01,userId01,[groupId01,groupId02])", which means that the user userId01, belonging to the tenant tenant01, needs to join the groupId01 and groupId02 groups. The connection request is "(tenant01,userId02,[groupId01])", which means that the user userId02, belonging to the tenant tenant01, needs to join the groupId01 group.
[0073] It is understandable that after successfully establishing a connection, the server will cache the connected client's tenant identification information, user identification information, group tag information, and connection channel, and bind them. When the server needs to push a message to the client, it will find the bound connection information (i.e., connection binding information) from the cache. At this time, the message to be pushed can be pushed to the corresponding client according to the connection binding information. The group tag information refers to the grouping of the connected client, and can also be considered as all group tags of the connected client. In addition to the tag of the group request information, other tags can also be set.
[0074] Furthermore, in a feasible implementation, based on the grouping request information of the connected client, the subscription grouping tag of the connected client is determined, and the subscription grouping tag includes at least a department grouping tag and a role grouping tag; based on the role grouping tag of the connected client, the association grouping tag of the connected client is determined; based on the tenant identification information of the connected client, custom temporary rule information is determined, and based on the custom temporary rule information, the temporary grouping tag that the connected client complies with is determined; based on the subscription grouping tag, the association grouping tag and the temporary grouping tag, the grouping tag information of the connected client is generated.
[0075] It should be noted that the subscription group tag is the tag of the group to which the connected client has subscribed, that is, the tag of the group requested to be joined in the group request information. Subscription groups are usually predefined logical groups, that is, groups that are forcibly configured by the server. Subscription group tags include at least department group tags (dept) and role group tags (role). Department group tags are tags representing the department to which the user belongs, for example: dept:dev (development department), dept:finance (finance department), dept:supply_chain (supply chain department). Role tags are tags representing the role to which the user belongs, for example: role:admin (administrator), role:approver (approver), role:warehouse_manager (warehouse manager). Associated group tags are tags associated with subscription group tags. For example, if a client joins group A, and the rule defines that joining group A requires joining group B, the client automatically joins group B. At this time, group B is the associated group, and the tag of group B is the associated group tag.
[0076] It is understandable that the customized temporary rule information is the tenant-customized grouping rule maintained within a specified time. Different customized temporary rule information usually corresponds to different groups. Therefore, according to the rules that the connected client complies with, the corresponding temporary grouping tag is determined, that is, the grouping tag maintained within the specified time. For example, during the promotion period, a temporary promotional group is created, and corresponding grouping rules are set, and clients that comply with the grouping rules are added to the promotional group, so that activity messages can be pushed to the clients of the promotional group during the promotion period. Based on the subscription grouping tag, the associated grouping tag and the temporary grouping tag, the grouping tag information of each connected client is generated.
[0077] It should be understood that a connection channel is a physical channel used by a client to establish a connection with a server. Each connection channel has a corresponding number, such as socket001 and socket002, and this is not specifically limited. In this embodiment, user identification information and group tag information are bound to obtain a binding relationship between the group tag information and the user identification information. The user identification information is then bound to the connection channel to obtain a binding relationship between the user identification information and the connection channel, thereby obtaining connection binding information for each tenant. The connection binding information includes at least the binding relationship between the group tag information and the user identification information, and the binding relationship between the user identification information and the connection channel. For example, the tenant identification information of the connected client C is tenant01, the user identification information is userId01, the group tag information is groupId01 and groupId02, and the connection channel is socket001. The tenant identification information of the connected client D is tenant01, the user identification information is userId02, the group tag information is groupId01, and the connection channel is socket002. Then the connection binding information of tenant tenant01 is userId01-socket001, userId02-socket002, groupId01-[userId01,userId02], and groupId02-[userId01].
[0078] Step S20: receiving a message to be pushed, analyzing the message to be pushed, and determining a push scope and a push strategy for the message to be pushed, wherein the push strategy is any one of a unicast push strategy, a multicast push strategy, a tenant broadcast push strategy, and a global broadcast strategy;
[0079] It should be noted that the message to be pushed is the message that needs to be pushed. In this embodiment, the message to be pushed can be any one of a unicast message, a multicast message, and a broadcast message. The push strategy is the way of pushing. In this embodiment, the push strategy is any one of a unicast push strategy, a multicast push strategy, a tenant broadcast push strategy, and a global broadcast strategy. The unicast push strategy is a unicast push method, which pushes the message to be pushed to a single user. The multicast push strategy is a multicast push method, which pushes the message to be pushed to all users in a single / multiple groups, which can be a group within a single tenant or a group within multiple tenants (a cross-tenant group). The tenant broadcast push strategy is a broadcast push method within a tenant, which pushes the message to be pushed to all users in a single / multiple tenants. The global broadcast push strategy is a global broadcast push method, which pushes the message to be pushed to all connected users.
[0080] In a feasible implementation, step S20 may include: when the received message to be pushed carries target user identification information, determining that the push scope of the message to be pushed is a single user, and determining that the push strategy of the message to be pushed is a unicast push strategy; when the received message to be pushed carries target tenant identification information and target group label information, determining that the push scope of the message to be pushed is grouped users within the tenant, and determining that the push strategy of the message to be pushed is a multicast push strategy; when the received message to be pushed carries target tenant identification information and does not carry target group label information, determining that the push scope of the message to be pushed is all users within the tenant, and determining that the push strategy of the message to be pushed is a tenant broadcast push strategy; when the received message to be pushed carries global identification information, determining that the push scope of the message to be pushed is global users, and determining that the push strategy of the message to be pushed is a global broadcast push strategy.
[0081] It should be noted that the target user identification information refers to the identification code of the target user, also known as the target user ID. The target tenant identification information refers to the identification code of the target tenant, also known as the target tenant ID. The target group label information refers to the label of the target group. The global identification information refers to a global identifier / flag, which can be set according to actual needs and is not specifically limited.
[0082] It can be understood that if the message to be pushed carries a single target user ID, it means that the message to be pushed needs to be pushed to a single user. At this time, the push scope is a single user, and the push strategy adopts a unicast push strategy; if the message to be pushed carries "target tenant ID + target group label", it means that the message to be pushed needs to be pushed to users in the target group within the target tenant. At this time, the push scope is grouped users within the tenant, and the push strategy adopts a multicast push strategy; if the message to be pushed only carries a single / multiple target tenant IDs, it means that the message to be pushed needs to be pushed to all users in the target tenant. At this time, the push scope is all users in the tenant, and the push strategy adopts a tenant broadcast push strategy; if the message to be pushed carries a global identifier, it means that the message to be pushed needs to be pushed to all connected users. At this time, the push scope is global users, and the push strategy adopts a global broadcast push strategy.
[0083] Step S30: determining a target connection channel in the connection binding information based on the push scope and push policy of the message to be pushed;
[0084] It should be noted that the target client is the client / browser to which the message needs to be pushed, and the target connection channel is the physical channel used by the server to push the message to the target client.
[0085] It is understandable that if the push strategy is a multicast push strategy, the target group's label is first found. The connection binding information is used to find the corresponding user ID. Then, the connection binding information is used to find the corresponding connection channel. Finally, the found channels are merged and deduplicated. Only one connection channel is retained for each user as the target connection channel. If different groups have the same user, the connection channel can be shared, reducing resource usage and improving the connection channel reuse rate. The tenant-specific grouping strategy is isolated from the logical channel to ensure that messages are sent only to the target tenant.
[0086] In a feasible implementation, when the push strategy of the message to be pushed is a tenant broadcast push strategy, the target connection binding information is determined based on the target tenant identification information; based on the binding relationship between the user identification information and the connection channel in the target connection binding information, the bound connection channel corresponding to the target tenant identification information is determined; and a valid channel is screened out from the bound connection channels as the target connection channel.
[0087] It should be understood that a deduplicated connection channel is a deduplicated bound connection channel. If the push policy is a tenant broadcast push policy, the target connection binding information is found according to the target tenant ID. This information is then used to find all connection channels bound to the target tenant. Deduplication is then performed, and a valid connection channel is found from the deduplicated bound connection channels as the final target connection channel. Tenant-specific grouping strategies are used to isolate logical channels, ensuring that messages are sent only to the target tenant.
[0088] In a feasible implementation, when the push strategy of the message to be pushed is a unicast push strategy, based on the target user identification information, the binding relationship between the group tag information and the user identification information in the connection binding information is retrieved to determine the binding connection channel corresponding to the target user identification information; when the target user identification information has multiple binding connection channels, a binding connection channel is randomly selected as the target connection channel; when the target user identification information has a single binding connection channel, the binding connection channel is used as the target connection channel.
[0089] It is understandable that if the push strategy is a unicast push strategy, a search is performed according to the target user ID to find the connection channel bound to the target user ID, ie, the bound connection channel, and a unique connection channel is selected from the bound connection channels as the target connection channel.
[0090] In a feasible implementation, when the push policy of the message to be pushed is a global broadcast push policy, a global valid connection channel is obtained, and the global valid connection channel is used as the target connection channel.
[0091] It is understood that the global valid connection channel is the valid channel among all tenants' connection channels. If the push policy is a global broadcast push policy, all valid channels are directly used as target connection channels.
[0092] Step S40: Push the message to be pushed to the target client based on the target connection channel.
[0093] It should be noted that the message to be pushed is pushed to the target client through the target connection channel.
[0094] In the specific implementation, refer to Figure 2 The overall architecture of the server includes the client access layer, the underlying network layer, the message routing layer, the tenant management layer, and the business gateway. The client access layer is used to maintain long client connections and supports Websocket protocol access. The underlying network layer is the underlying network channel, which keeps the connection active through the heartbeat mechanism. The message routing layer can support the push of unicast messages, broadcast messages, and multicast messages, and push messages to the corresponding connection channels through different push strategies. The tenant management layer is used to manage tenant grouping strategies (such as departments and roles), supports dynamic updates of grouping rules, registers groups when establishing long connections, and cleans up group information after the connection is disconnected. The business gateway is the entrance for business service push messages, and performs permission checks before pushing messages.
[0095] This embodiment provides a message push method, which binds the tenant identification information, user identification information, group tag information and connection channel of the connected clients in each tenant to generate connection binding information for each tenant; receives the message to be pushed, analyzes the message to be pushed, and determines the push scope and push strategy of the message to be pushed, where the push strategy is any one of a unicast push strategy, a multicast push strategy, a tenant broadcast push strategy and a global broadcast strategy; based on the push scope and push strategy of the message to be pushed, determines the target connection channel in the connection binding information; based on the target connection channel, pushes the message to be pushed to the target client. This embodiment groups the users in all tenants and binds the relationship between users and connections, and the relationship between groups and users. The corresponding physical connection can be found through the grouping, and the message can be pushed to the specified client, thereby realizing multicast push on the basis of unicast push and broadcast push, and then through multiple push granularities such as single user, group user, tenant-level user, global user, etc., it can cover all business scenarios and realize accurate push in different scenarios.
[0096] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above embodiment 1 can be referred to the above introduction and will not be described in detail later. Figure 3 , step S30 may include steps S301 to S305:
[0097] Step S301, when the push policy of the message to be pushed is a multicast push policy, determining target connection binding information based on the target tenant identification information;
[0098] It should be noted that each tenant has corresponding connection binding information. According to the target tenant ID, the connection binding information of the target tenant is found, that is, the target connection binding information.
[0099] Step S302: determining the bound user identification information corresponding to the target group label information based on the binding relationship between the group label information and the user identification information in the target connection binding information;
[0100] It is understandable that each group tag information has a bound user ID. According to the binding relationship between the group tag information and the user identification information in the target connection binding information, the user ID bound to the target group tag is found, that is, the bound user identification information.
[0101] Step S303, deduplicating the bound user identification information corresponding to the target group label information to obtain deduplicated user identification information;
[0102] It should be noted that since a user can join multiple groups, there may be duplicate users in the target group. That is to say, the binding user identification information corresponding to the target group label information may be duplicated. At this time, deduplication is required. The deduplicated binding user identification information is the deduplicated user identification information, that is, the deduplicated user ID, so as to avoid repeated occupation of channel resources.
[0103] Step S304: determining the bound connection channel corresponding to the deduplicated user identification information based on the binding relationship between the user identification information and the connection channel in the target connection binding information;
[0104] It is understandable that each user ID has a bound connection channel. According to the binding relationship between the user identification information and the connection channel in the target connection binding information, the connection channel bound to the deduplicated user ID is found, ie, the bound connection channel.
[0105] Step S305 : Selecting the target connection channel from the bound connection channels corresponding to the deduplicated user identification information, wherein one deduplicated user identification information corresponds to one target connection channel.
[0106] It is understandable that if a user ID is bound to multiple connection channels, using all of these connection channels as target connection channels for message push would result in a waste of resources. Therefore, it is necessary to select one of these connection channels as the target connection channel, typically a valid connection channel. This embodiment selects the target connection channel from all bound connection channels, using one deduplicated user identification information corresponding to one target connection channel.
[0107] It should be understood that, assuming each group has n users, if each group independently maintains a connection channel, N groups will require N*n connection channels. In this embodiment, when using a multicast push method, the relationship between the group and the user is maintained, and the connection channel and the group are linked. If different groups have the same user, the connection channel can be shared, reducing resource usage, improving the reuse rate of the connection channel (increased by 30%-50%), and reducing bandwidth consumption. For example, assuming user A belongs to both the "Finance Department" group and the "Administrator" group, only one connection channel is required to carry group messages from multiple groups.
[0108] In the specific implementation, refer to Figure 4The overall process consists of three stages: connection establishment, message push, and connection recovery. During the connection establishment stage, the client initiates a WebSocket connection with the tenant ID, user ID, and subscription tag. The tenant management layer verifies permissions and binds the user to the corresponding multicast channel. During the message push stage, the business service calls the backend service gateway API (Application Programming Interface) to specify the push scope. The message routing layer matches the subscription list according to the grouping strategy and pushes messages in batches through the physical channel. During the connection recovery stage, when the client disconnects, the subscription relationship is automatically cleaned up and the channel resources are released.
[0109] This embodiment provides a message push method. When the push strategy of the message to be pushed is a multicast push strategy, the target connection binding information is determined based on the target tenant identification information; the binding user identification information corresponding to the target group label information is determined based on the binding relationship between the group label information and the user identification information in the target connection binding information; the binding user identification information corresponding to the target group label information is deduplicated to obtain deduplicated user identification information; the binding connection channel corresponding to the deduplicated user identification information is determined based on the binding relationship between the user identification information and the connection channel in the target connection binding information; the target connection channel is selected from the binding connection channels corresponding to the deduplicated user identification information, wherein one deduplicated user identification information corresponds to one target connection channel. This embodiment groups users in all tenants and binds the relationship between users and connections, and the relationship between groups and users. The corresponding physical connection can be found through the grouping to push messages, and multicast push is realized on the basis of unicast push and broadcast push. In this process, if different groups have the same users, the connection channel can be shared, which reduces resource occupation and improves the reuse rate of the connection channel.
[0110] Based on the first embodiment of the present application, in the third embodiment of the present application, the same or similar contents as those in the above embodiment can be referred to the above introduction and will not be described in detail later. Figure 5 , step S40 may include steps S501 to S503:
[0111] Step S501: obtaining the most recent activity time of the connection channel of the connected client, and determining the activity interval duration of the connection channel of the connected client based on the most recent activity time of the connection channel of the connected client;
[0112] It should be noted that the most recent activity time is the time when the connection channel was most recently active. Based on the most recent activity time of the connection channel, the interval between the most recent activity time and the current time, ie, the activity interval duration, can be calculated.
[0113] Step S502: When the activity interval duration of the connection channel of the connected client is greater than a preset duration threshold, determining that the connection channel of the connected client is an idle channel;
[0114] It is understood that the preset duration threshold is a pre-set threshold, for example, 30 seconds, which is not specifically limited in this embodiment and can be flexibly adjusted according to actual needs. If the activity interval duration is longer than the preset duration threshold, it indicates that the connection channel is in an idle state and is considered an idle channel. If the activity interval duration is less than or equal to the preset duration threshold, it indicates that the connection channel is in a non-idle state.
[0115] Step S503: Release the idle channel and update the connection binding information.
[0116] It is understandable that this embodiment sets an idle channel timeout release mechanism, which releases a connection channel when its activity interval is longer than a preset time threshold, and simultaneously adjusts the connection binding information.
[0117] Furthermore, when there is a disconnected client among the connected clients, the disconnected client is deleted from the connected clients, and the related information of the disconnected client in the connection binding information is deleted, thereby releasing the channel resources.
[0118] This embodiment provides a message push method that obtains the most recent activity time of a connection channel of a connected client; determines the duration of an activity interval of the connection channel of the connected client based on the most recent activity time of the connection channel of the connected client; determines that the connection channel of the connected client is an idle channel when the duration of the activity interval of the connection channel of the connected client exceeds a preset duration threshold; releases the idle channel and updates the connection binding information. This embodiment reduces resource usage and server load by using an idle channel timeout release mechanism.
[0119] It should be noted that the above examples are only used to understand this application and do not constitute a limitation on the message push method of this application. More simple transformations based on this technical concept are all within the scope of protection of this application.
[0120] This application also provides a message push device, please refer to Figure 6 , the message push device includes:
[0121] The tenant management module 10 is used to bind the tenant identification information, user identification information, group tag information and connection channel of the connected clients in each tenant to generate connection binding information for each tenant;
[0122] The message push module 20 is used to receive messages to be pushed, analyze the messages to be pushed, and determine the push scope and push strategy of the messages to be pushed, where the push strategy is any one of a unicast push strategy, a multicast push strategy, a tenant broadcast push strategy, and a global broadcast strategy;
[0123] The message push module 20 is further configured to determine a target connection channel in the connection binding information based on a push scope and a push policy of the message to be pushed;
[0124] The message pushing module 20 is further configured to push the message to be pushed to the target client based on the target connection channel.
[0125] In a feasible implementation manner, the message push module 20 is further configured to, when the received message to be pushed carries target user identification information, determine that the push scope of the message to be pushed is a single user, and determine that the push strategy of the message to be pushed is a unicast push strategy;
[0126] When the received message to be pushed carries target tenant identification information and target group tag information, determining that the push scope of the message to be pushed is grouped users within the tenant, and determining that the push strategy of the message to be pushed is a multicast push strategy;
[0127] When the received message to be pushed carries target tenant identification information and does not carry target group tag information, determining that the push scope of the message to be pushed is all users in the tenant, and determining that the push strategy of the message to be pushed is the tenant broadcast push strategy;
[0128] When the received message to be pushed carries global identification information, the push scope of the message to be pushed is determined to be global users, and the push strategy of the message to be pushed is determined to be a global broadcast push strategy.
[0129] In a feasible implementation manner, the message push module 20 is further configured to determine target connection binding information based on the target tenant identification information when the push policy of the message to be pushed is a multicast push policy;
[0130] Determining the bound user identification information corresponding to the target group label information based on the binding relationship between the group label information and the user identification information in the target connection binding information;
[0131] Deduplicating the bound user identification information corresponding to the target group label information to obtain deduplicated user identification information;
[0132] Determining the bound connection channel corresponding to the deduplicated user identification information based on the binding relationship between the user identification information and the connection channel in the target connection binding information;
[0133] The target connection channel is selected from the bound connection channels corresponding to the deduplicated user identification information, wherein one deduplicated user identification information corresponds to one target connection channel.
[0134] In a feasible implementation manner, the message push module 20 is further configured to determine target connection binding information based on the target tenant identification information when the push strategy of the message to be pushed is a tenant broadcast push strategy;
[0135] Determining the bound connection channel corresponding to the target tenant identification information based on the binding relationship between the user identification information and the connection channel in the target connection binding information;
[0136] A valid channel is selected from the bound connection channels as the target connection channel.
[0137] In a feasible embodiment, the message push module 20 is further configured to, when the push policy of the message to be pushed is a unicast push policy, retrieve the binding relationship between the group tag information and the user identification information in the connection binding information based on the target user identification information, and determine the bound connection channel corresponding to the target user identification information;
[0138] When the target user identification information has multiple bound connection channels, randomly selecting one bound connection channel as the target connection channel;
[0139] When the target user identification information has a single bound connection channel, the bound connection channel is used as the target connection channel.
[0140] In a feasible implementation manner, the tenant management module 10 is further configured to determine a subscription group tag of the connected client based on the group request information of the connected client, wherein the subscription group tag includes at least a department group tag and a role group tag;
[0141] Determining, based on the role grouping tag of the connected client, an associated grouping tag of the connected client;
[0142] Determining customized temporary rule information based on the tenant identification information of the connected client, and determining a temporary grouping tag that the connected client complies with based on the customized temporary rule information;
[0143] The group tag information of the connected client is generated based on the subscription group tag, the association group tag, and the temporary group tag.
[0144] In a feasible implementation manner, the message push module 20 is further configured to obtain the most recent activity time of the connection channel of the connected client;
[0145] Determining an activity interval duration of the connection channel of the connected client based on a recent activity time of the connection channel of the connected client;
[0146] When the activity interval of the connection channel of the connected client is longer than a preset duration threshold, determining that the connection channel of the connected client is an idle channel;
[0147] The idle channel is released, and the connection binding information is updated.
[0148] The message push device provided in this application adopts the message push method in the above-mentioned embodiment, which can solve the technical problem that only unicast push and broadcast push methods are used for message push, and the push granularity is relatively simple, making it difficult to achieve accurate push in all business scenarios. Compared with the existing technology, the beneficial effects of the message push device provided in this application are the same as those of the message push method provided in the above-mentioned embodiment, and the other technical features of the message push device are the same as those disclosed in the above-mentioned embodiment method, which will not be repeated here.
[0149] The present application provides a message push device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the message push method in the above-mentioned embodiment one.
[0150] Reference below Figure 7 , which shows a schematic diagram of the structure of a message push device suitable for implementing the embodiments of the present application. The message push device in the embodiments of the present application may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), in-vehicle terminals (such as in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 7 The message push device shown is merely an example and should not limit the functions and scope of use of the embodiments of the present application.
[0151] like Figure 7As shown, the message push device may include a processing device 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes based on programs stored in ROM (Read Only Memory) 1002 or programs loaded from storage device 1003 into RAM (Random Access Memory) 1004. RAM 1004 also stores various programs and data required for the operation of the message push device. Processing device 1001, ROM 1002, and RAM 1004 are interconnected via bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to I / O interface 1006: input device 1007 including, for example, a touch screen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output device 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage device 1003 including, for example, a magnetic tape, hard disk, etc.; and communication device 1009. The communication device 1009 can allow the message push device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a message push device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or provided instead.
[0152] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program comprising program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0153] The message push device provided in this application adopts the message push method in the above-mentioned embodiment, which can solve the technical problem that only unicast push and broadcast push methods are used for message push, and the push granularity is relatively simple, making it difficult to achieve accurate push in all business scenarios. Compared with the existing technology, the beneficial effects of the message push device provided in this application are the same as those of the message push method provided in the above-mentioned embodiment, and the other technical features of the message push device are the same as those disclosed in the method of the previous embodiment, and are not further described here.
[0154] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0155] The above are only specific embodiments of the present application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
[0156] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer program) stored thereon, and the computer-readable program instructions are used to execute the message push method in the above embodiment.
[0157] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0158] The computer-readable storage medium may be included in the message push device, or may exist independently without being assembled into the message push device.
[0159] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the message push device, the message push device: binds the tenant identification information, user identification information, group label information and connection channel of the connected clients in each tenant to generate connection binding information for each tenant; receives the message to be pushed, analyzes the message to be pushed, determines the push range and push strategy of the message to be pushed, and the push strategy is any one of the unicast push strategy, multicast push strategy, tenant broadcast push strategy and global broadcast strategy; determines the target connection channel in the connection binding information based on the push range and push strategy of the message to be pushed; and pushes the message to be pushed to the target client based on the target connection channel.
[0160] Computer program code for performing the operations of the present application may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0161] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, program segment or a part of code, and the module, program segment or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the specified function or operation, or can be implemented by a combination of dedicated hardware and computer instructions.
[0162] The modules described in the embodiments of the present application may be implemented in software or hardware, wherein the name of a module does not necessarily limit the unit itself.
[0163] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-mentioned message push method. This can solve the technical problem that only unicast push and broadcast push methods are used for message push, and the push granularity is relatively simple, making it difficult to achieve accurate push in all business scenarios. Compared with the existing technology, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the message push method provided in the above-mentioned embodiment, and will not be repeated here.
[0164] The present application also provides a computer program product, including a computer program, which implements the steps of the message push method as described above when the computer program is executed by a processor.
[0165] The computer program product provided in this application can solve the technical problem of using only unicast and broadcast push methods for message push, which results in a relatively limited push granularity and makes it difficult to achieve accurate push in all business scenarios. Compared with the existing technology, the beneficial effects of the computer program product provided in this application are the same as those of the message push method provided in the above embodiment, and will not be elaborated here.
[0166] The above are only some embodiments of the present application and are not intended to limit the patent scope of the present application. All equivalent structural transformations made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect application in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A message push method, characterized in that: The method comprises: Bind the tenant identification information, user identification information, group tag information, and connection channel of the connected clients in each tenant to generate connection binding information for each tenant; Receive a message to be pushed, analyze the message to be pushed, and determine a push scope and a push strategy for the message to be pushed, where the push strategy is any one of a unicast push strategy, a multicast push strategy, a tenant broadcast push strategy, and a global broadcast strategy; Determining a target connection channel in the connection binding information based on the push scope and push policy of the message to be pushed; Based on the target connection channel, the message to be pushed is pushed to the target client.
2. The method according to claim 1, wherein The connection binding information includes at least a binding relationship between the group tag information and the user identification information and a binding relationship between the user identification information and the connection channel. The steps of receiving the message to be pushed, analyzing the message to be pushed, and determining a push strategy for the message to be pushed include: When the received message to be pushed carries target user identification information, determining that the push scope of the message to be pushed is a single user, and determining that the push strategy of the message to be pushed is a unicast push strategy; When the received message to be pushed carries target tenant identification information and target group tag information, determining that the push scope of the message to be pushed is grouped users within the tenant, and determining that the push strategy of the message to be pushed is a multicast push strategy; When the received message to be pushed carries target tenant identification information and does not carry target group tag information, determining that the push scope of the message to be pushed is all users in the tenant, and determining that the push strategy of the message to be pushed is the tenant broadcast push strategy; When the received message to be pushed carries global identification information, the push scope of the message to be pushed is determined to be global users, and the push strategy of the message to be pushed is determined to be a global broadcast push strategy.
3. The method according to claim 2, wherein The step of determining the target connection channel in the connection binding information based on the push scope and push strategy of the message to be pushed includes: When the push policy of the message to be pushed is a multicast push policy, determining target connection binding information based on the target tenant identification information; Determining the bound user identification information corresponding to the target group label information based on the binding relationship between the group label information and the user identification information in the target connection binding information; Deduplicating the bound user identification information corresponding to the target group label information to obtain deduplicated user identification information; Determining the bound connection channel corresponding to the deduplicated user identification information based on the binding relationship between the user identification information and the connection channel in the target connection binding information; The target connection channel is selected from the bound connection channels corresponding to the deduplicated user identification information, wherein one deduplicated user identification information corresponds to one target connection channel.
4. The method according to claim 2, wherein The step of determining the target connection channel in the connection binding information based on the push scope and push strategy of the message to be pushed includes: When the push strategy of the message to be pushed is a tenant broadcast push strategy, determining target connection binding information based on the target tenant identification information; Determining the bound connection channel corresponding to the target tenant identification information based on the binding relationship between the user identification information and the connection channel in the target connection binding information; A valid channel is selected from the bound connection channels as the target connection channel.
5. The method according to claim 2, wherein The step of determining the target connection channel in the connection binding information based on the push scope and push strategy of the message to be pushed includes: When the push policy of the message to be pushed is a unicast push policy, searching the binding relationship between the group tag information and the user identification information in the connection binding information based on the target user identification information to determine the binding connection channel corresponding to the target user identification information; When the target user identification information has multiple bound connection channels, randomly selecting one bound connection channel as the target connection channel; When the target user identification information has a single bound connection channel, the bound connection channel is used as the target connection channel.
6. The method according to claim 1, wherein Before the step of binding the tenant identification information, user identification information, group tag information, and connection channel of the connected clients in each tenant to generate connection binding information for each tenant, the following steps are further included: Determining, based on the grouping request information of the connected client, a subscription grouping tag of the connected client, wherein the subscription grouping tag includes at least a department grouping tag and a role grouping tag; Determining, based on the role grouping tag of the connected client, an associated grouping tag of the connected client; Determining customized temporary rule information based on the tenant identification information of the connected client, and determining a temporary grouping tag that the connected client complies with based on the customized temporary rule information; The group tag information of the connected client is generated based on the subscription group tag, the association group tag, and the temporary group tag.
7. The method according to any one of claims 1 to 6, characterized in that After the step of pushing the message to be pushed to the target client based on the target connection channel, the step further includes: Obtain the most recent activity time of the connection channel of the connected client; Determining an activity interval duration of the connection channel of the connected client based on a recent activity time of the connection channel of the connected client; When the activity interval of the connection channel of the connected client is longer than a preset duration threshold, determining that the connection channel of the connected client is an idle channel; The idle channel is released, and the connection binding information is updated.
8. A message push device, characterized in that: The device comprises: The tenant management module is used to bind the tenant identification information, user identification information, group tag information and connection channel of the connected clients in each tenant to generate connection binding information for each tenant; A message push module is used to receive messages to be pushed, analyze the messages to be pushed, and determine the push scope and push strategy of the messages to be pushed, where the push strategy is any one of a unicast push strategy, a multicast push strategy, a tenant broadcast push strategy, and a global broadcast strategy; The message push module is further configured to determine a target connection channel in the connection binding information based on a push scope and a push policy of the message to be pushed; The message pushing module is further configured to push the message to be pushed to the target client based on the target connection channel.
9. A message push device, characterized in that: The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the message push method according to any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the message pushing method according to any one of claims 1 to 7 are implemented.