Data processing method, system and apparatus, and electronic device and storage medium

By determining the target service node in the first service node of the group forwarding layer and processing requests according to the size of group members, the challenges of group communication performance optimization and user experience improvement are solved, and efficient data processing and cache utilization are achieved.

WO2024179343A1PCT designated stage expired Publication Date: 2024-09-06TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/077909
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-03-01
Filing Date
2024-02-21
Publication Date
2024-09-06

AI Technical Summary

Technical Problem

In the existing technology, as the number of group members increases in group interactive communication, there are challenges in performance optimization and user experience improvement. How to improve group communication performance and user perception is difficult to effectively solve.

Method used

By introducing the first service node in the group forwarding layer, the business processing request is obtained and the target service node is determined. The request is processed according to the size of the group members, the data processing process is optimized, resource waste is reduced, and cache utilization is improved.

Benefits of technology

It effectively improves the efficiency of group request processing, avoids request hot spots, improves cache utilization, reduces resource waste, and improves group communication performance and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024077909_06092024_PF_FP
    Figure CN2024077909_06092024_PF_FP
Patent Text Reader

Abstract

The embodiments of the present application relate to the fields of cloud technology, distributed storage, etc. Provided are a data processing method, system and apparatus, and an electronic device and a storage medium. The method comprises: acquiring a service processing request related to a target group; according to a first group identifier which is comprised in the service processing request, determining, from among a plurality of second service nodes, target service nodes corresponding to the service processing request, wherein the target service nodes are some nodes among the plurality of second service nodes, the target service nodes cache basic group data of the target group, and second service nodes other than the target service nodes do not cache the basic group data of the target group; and sending the service processing request to the target service nodes, such that the target service nodes perform processing according to relevant data of the target group, wherein the relevant data comprises the basic group data of the target group. On the basis of the method provided in the embodiments of the present application, the resource utilization rate can be effectively improved, and actual application requirements can be better satisfied.
Need to check novelty before this filing date? Find Prior Art

Description

Data processing method, system, device, electronic device and storage medium Technical Field

[0001] The present application belongs to the field of computer technology and may involve fields such as distributed storage and cloud technology. Specifically, the present application relates to a data processing method, system, device, electronic device and storage medium.

[0002] Background of the Invention

[0003] With the rapid development of technology and the improvement of people's living standards, a variety of applications have emerged one after another, becoming an indispensable part of people's daily lives. To better meet people's communication and interaction needs, more and more applications are providing communication services to their users, such as instant messaging services. Groups have become one of the more common features in such services, enabling interaction between multiple people.

[0004] Although current group interaction technologies can meet the communication needs of multiple people or even large groups of people, various problems arise as the number of group members increases. How to optimize the performance of group interaction communication and enhance user perception is one of the important issues that needs to be improved.

[0005] Summary of the Invention

[0006] The purpose of the embodiments of the present application is to provide a data processing method, system, device, electronic device, and storage medium that can improve group communication performance. To achieve this purpose, the technical solutions provided by the embodiments of the present application are as follows:

[0007] In one aspect, an embodiment of the present application provides a data processing method, the method comprising:

[0008] A first service node in the group forwarding layer obtains a service processing request related to a target group from the access layer, wherein the service processing request includes a first group identifier of the target group;

[0009] The first service node determines, based on the first group identifier, a target service node that caches the basic group data of the target group from a plurality of second service nodes in a group logic layer, wherein the target service node is a portion of the plurality of second service nodes;

[0010] The first service node sends the business processing request to the target service node, so that the target service node determines the member size of the target group based on the group basic information of the target group, and processes the business processing request based on the member size of the target group, wherein the relevant information includes the group basic information of the target group.

[0011] On the other hand, an embodiment of the present application provides a data processing device, which is provided in a first service node of a group forwarding layer, and includes:

[0012] a request receiving module, configured to obtain a service processing request related to a target group from an access layer, wherein the service processing request includes a first group identifier of the target group;

[0013] a target node determining module, configured to determine, based on the first group identifier, a target service node that caches the group basic data of the target group from a plurality of second service nodes in a group logic layer, wherein the target service node is a portion of the plurality of second service nodes;

[0014] The request forwarding module is used to send the business processing request to the target service node, so that the target service node determines the member size of the target group according to the group basic information of the target group and processes the business processing request according to the member size of the target group.

[0015] Optionally, the business processing request includes a request related to member information of at least one member in the target group; the business processing request further includes a first member identifier of each of the at least one member; and determining the member size of the target group based on the basic group information of the target group and processing the business processing request based on the member size of the target group includes:

[0016] When it is determined, based on the basic group information of the target group, that the number of members of the target group is greater than or equal to a first threshold, the target group is determined to be a set extra-large group, and based on a pre-established mapping relationship between the first group identifier and the first member identifier and the second member identifier, a second member identifier corresponding to each of the at least one member is determined according to the first group identifier and the at least one first member identifier in the service processing request;

[0017] According to the second member identifier of each member of the at least one member, a second target storage node corresponding to the member is determined from a plurality of second storage nodes, and member information of the member is obtained from the determined second target storage node.

[0018] Optionally, determining the member size of the target group according to the basic group information of the target group, and processing the service processing request according to the member size of the target group further includes:

[0019] When it is determined based on the group basic information of the target group that the number of members of the target group is less than the first threshold, the target group is determined to be a non-set extra-large group, and the first target storage node corresponding to the target group is determined based on the first group identifier, and the member information of the member is obtained from the first target storage node based on the first member identifier of the member.

[0020] Optionally, for any member of the target group, the second member identifier of the member is generated in the following manner:

[0021] When it is determined that the target group is a set extra-large group, determining a second group identifier of the target group and a third member identifier of the member;

[0022] Determine a target shard index corresponding to the member according to the first member identifier of the member and the total number of shards corresponding to the plurality of second storage nodes;

[0023] A second member identifier of the member is generated based on the second group identifier, the target shard index of the member, and the third member identifier.

[0024] Optionally, the second group identifiers of different groups adopt continuous digital codes, and the third member identifiers of each member in the target group adopt continuous digital codes;

[0025] For any member, the second member identifier of the member is a binary coded identifier, wherein, in descending order from high to low, the binary coded identifiers corresponding to the member include:

[0026] the binary representation of the first set number of bits corresponding to the second group identifier of the target group, the binary representation of the second set number of bits corresponding to the target shard index of the member, and the binary representation of the third set number of bits corresponding to the third member identifier of the member.

[0027] Optionally, the service processing request includes a group sending request of a target message, and determining the member size of the target group according to the basic group information of the target group and processing the service processing request according to the member size of the target group includes:

[0028] If the number of members of the target group is less than a second threshold, the target group is determined to be a set small group, and based on the first group identifier, member information of each member of the target group is obtained; for each member, based on the member information and the target message, a corresponding to-be-pushed message is generated, so that the first push server pushes the target message to the member based on the corresponding to-be-pushed message;

[0029] If the number of members of the target group is greater than or equal to the second threshold and less than the first threshold, the target group is determined to be a set large group, and a to-be-pushed message corresponding to the target group is generated, so that the second push server obtains member information of all members of the target group based on the first group indication information in the to-be-pushed message, and pushes the target message in the to-be-pushed message to each member based on the member information of each member;

[0030] If the number of members of the target group is greater than or equal to the first threshold, the target group is determined to be a set extra-large group, the number of groups corresponding to the target group is determined according to the number of members, and a corresponding number of group indexes are generated, wherein each group index corresponds to part of the members of the target group, different group indexes correspond to different members, and each group index corresponds to at least one shard;

[0031] For each of the group indexes, based on the target message and the group index, the information to be pushed corresponding to the group index is generated, so that the third server to be pushed can obtain the member information of each member corresponding to the group index in the target group according to the second group indication information in the information to be pushed, and push the target message in the information to be pushed corresponding to the group index to each member according to the member information of each member.

[0032] Optionally, the values ​​of the grouping indexes corresponding to the target group are 0, 1, 2, ..., N-1, respectively, where N is the number of groups and N-1 is the Nth grouping index. For any grouping index, the member information of each member corresponding to the grouping index is obtained in the following manner:

[0033] The lower and upper limits of the second member identifier corresponding to the group index are determined using the following expressions:

[0034] Mark lower limit =

[0035] NewGroupCode<<(shardShift+shardIndexBit)+((PushShardIndex*(2shardIndexBit / ShardNum))< <shardShift);

[0036] Upper limit of identification=NewGroupCode<<(shardShift+shardIndexBit)+(((PushShardIndex+1)*(2shardIndexBit / ShardNum))< <shardShift);

[0037] Wherein, NewGroupCode is the binary representation of the second group identifier, PushShardIndex represents the value of the group index, shardIndexBit is the second set bit number, shardShift is the third set bit number, and ShardNum=N (number of groups);

[0038] According to the lower limit and upper limit of the second member identifier corresponding to the group index, the member information of each member whose second member identifier is within the lower limit and upper limit is obtained, and the member information of each member obtained is the member information of each member corresponding to the group index.

[0039] Optionally, the service processing request includes a group sending request of a target message, and processing the service processing request according to the size of members of the target group includes:

[0040] If the number of members of the target group is less than a third threshold, determining that the target group is a set small group, obtaining member information of each member of the target group, and for each member of the target group, generating, based on the member information, information to be pushed corresponding to the member and containing the target message, so that the fourth push server pushes the target message to the member based on the information to be pushed;

[0041] If the number of members of the target group is greater than or equal to the third threshold, the target group is determined to be a non-set small group, and information to be pushed corresponding to the target group is generated, so that the fifth push server obtains the member information of each member of the target group based on the third group indication information in the information to be pushed, and pushes the target message in the information to be pushed to each member according to the member information of each member.

[0042] Optionally, obtaining member information of each member in the target group includes:

[0043] If the member information of each member in the target group exists in the local cache, obtaining the member information of each member in the target group from the local cache;

[0044] If the member information of each member in the target group does not exist in the local cache, the member information of each member in the target group is obtained from the target storage node storing the member information of each member in the target group, and the obtained member information is cached in the local cache.

[0045] Optionally, determining, according to the first group identifier, a target service node that caches the basic group data of the target group from a plurality of second service nodes in the group logic layer includes:

[0046] Determining, according to the first group identifier, a first mapping identifier corresponding to the first group identifier by using a preconfigured identifier mapping rule;

[0047] Obtaining a second mapping identifier of each of the plurality of second service nodes, wherein the second mapping identifier of each second service node is determined according to the node identifier of the second service node through a preconfigured target mapping rule;

[0048] The target service node is determined from the plurality of second service nodes according to a matching degree between the first mapping identifier and the second mapping identifiers of each second service node.

[0049] On the other hand, an embodiment of the present application further provides a data processing system, comprising at least one first service node of a group forwarding layer, and multiple second server nodes of a group logic layer communicatively connected to the at least one first service node, wherein, for any group, some of the multiple second service nodes cache group basic data of the group, and each second service node is associated with a first group identifier of at least one group;

[0050] The first service node is configured to receive a service processing request related to a target group from the access layer, determine, based on a first group identifier of the target group included in the service processing request, a target service node that has cached group basic data of the group from among the plurality of second service nodes, and send the service processing request to the target service node;

[0051] The second service node is configured to receive the service processing request sent by the first service node, determine the member size of the target group according to the basic group information of the target group, and process the service processing request according to the member size of the target group.

[0052] On the other hand, an embodiment of the present application further provides an electronic device, which includes a memory and a processor, wherein a computer program is stored in the memory, and the processor executes the computer program to implement the method provided in any optional embodiment of the present application.

[0053] On the other hand, an embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the method provided in any optional embodiment of the present application.

[0054] On the other hand, an embodiment of the present application further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the method provided in any optional embodiment of the present application.

[0055] The beneficial effects of the technical solution provided by the embodiments of the present application are as follows:

[0056] In the solution provided in the embodiment of the present application, a first service node is added, and the business processing request for the target group will only be sent to the target service node associated with the target group via the first service node, that is, a group is only associated with some nodes (can be one or more) of the multiple second service nodes, and each second service node can only cache the data of the group it is associated with, and there is no need to cache the data of unassociated groups. By adopting this solution, the processing efficiency of requests for the group can be effectively improved by caching the group's data in the target service node associated with the target group, and the occurrence of request hotspot problems can be avoided. Since the data of the target group only needs to be cached in some of the second service nodes associated with it, the cache utilization rate can also be effectively improved. In addition, since there is no need for each second service node to cache the data of all groups, resource waste can also be avoided.

[0057] BRIEF DESCRIPTION OF THE DRAWINGS

[0058] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for describing the embodiments of the present application.

[0059] FIG1 is a schematic diagram of the structure of a data processing system provided in an embodiment of the present application;

[0060] FIG2 is a schematic diagram of a processing principle of an information query request provided in an embodiment of the present application;

[0061] FIG3 is a schematic diagram of a processing principle of a group message request provided in an embodiment of the present application;

[0062] FIG4 is a flow chart of a data processing method provided in an embodiment of the present application;

[0063] FIG5 is a schematic diagram showing the principle of a group-related request processing solution provided in an embodiment of the present application;

[0064] FIG6 is a schematic diagram of a group-related request processing solution in the related art;

[0065] FIG7 is a schematic diagram of a principle of retrieving member information provided by an embodiment of the present application;

[0066] FIG8 is a schematic diagram showing the principle of a message push solution provided in an embodiment of the present application;

[0067] FIG9 is a schematic structural diagram of a data processing device provided in an embodiment of the present application;

[0068] FIG10 is a schematic diagram of the structure of a data processing system provided in an embodiment of the present application;

[0069] FIG11 is a schematic structural diagram of an electronic device provided in an embodiment of the present application.

[0070] Modes for Carrying Out the Invention

[0071] The following describes the embodiments of the present application in conjunction with the accompanying drawings. It should be understood that the embodiments described below in conjunction with the accompanying drawings are exemplary descriptions for explaining the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions of the embodiments of the present application.

[0072] Those skilled in the art will understand that, unless otherwise stated, the singular forms "a", "an", "said", and "the" used herein may also include plural forms. It should be further understood that the terms "including" and "comprising" used in the embodiments of the present application mean that the corresponding features can be implemented as the presented features, information, data, steps, operations, elements, and / or components, but do not exclude implementation as other features, information, data, steps, operations, elements, components, and / or combinations thereof supported by the present technical field. It should be understood that when we say that an element is "connected" or "coupled" to another element, the element can be directly connected or coupled to the other element, or it can refer to the element and the other element establishing a connection relationship through an intermediate element. In addition, the "connection" or "coupling" used here can include wireless connection or wireless coupling. The term "and / or" used here indicates at least one of the items defined by the term, for example, "A and / or B" can be implemented as "A", or as "B", or as "A and B". When describing multiple (two or more) items, if the relationship between the multiple items is not clearly defined, the multiple items may refer to one, multiple or all of the multiple items. For example, the description of "parameter A includes A1, A2, A3" can be implemented as parameter A including A1 or A2 or A3, and can also be implemented as parameter A including at least two of the three items A1, A2, and A3.

[0073] An embodiment of the present application provides a data processing method. By adopting this method, the resource utilization of service nodes in the data processing system, such as cache utilization, can be effectively improved, and the cache cost can be effectively reduced, thereby better meeting actual application needs.

[0074] Optionally, the data processing involved in the method provided in the embodiment of the present application can be implemented based on cloud technology. For example, the data storage involved in the embodiment of the present application (such as the storage of the group's basic information and the storage of the group's member information) can be implemented using cloud storage. For another example, the data calculation involved in the embodiment of the present application (such as the data calculation in the target service node corresponding to the business processing request based on the group identifier (such as consistent hash calculation)) can be implemented using cloud computing.

[0075] Cloud computing is a computing model that distributes computing tasks across a resource pool composed of a large number of computers, enabling various application systems to access computing power, storage space, and information services as needed. The network that provides these resources is called the "cloud." To users, the resources in the "cloud" appear infinitely scalable and can be accessed at any time, used on demand, and expanded at any time, with a pay-per-use fee. Cloud storage is a new concept that extends and develops from the concept of cloud computing. A distributed cloud storage system (hereafter referred to as a storage system) uses cluster applications, grid technology, and distributed storage file systems to bring together a large number of different types of storage devices (also called storage nodes) in the network through application software or application interfaces to work together and provide external data storage and service access capabilities.

[0076] It should be noted that in the optional embodiments of the present application, the object information and other related data involved, when the embodiments in the present application are applied to specific products or technologies, need to obtain the permission or consent of the object, and the collection, use and processing of the relevant data need to comply with the relevant laws, regulations and standards of the relevant countries and regions. In other words, if the embodiments of the present application involve data related to the object, it needs to be authorized and agreed by the object, authorized and agreed by the relevant departments, and in compliance with the relevant laws, regulations and standards of the country and region before it can be obtained. If personal information is involved in the embodiments, the acquisition of all personal information requires the consent of the individual. If sensitive information is involved, the separate consent of the information subject needs to be obtained. The embodiments also need to be implemented with the authorization and consent of the object.

[0077] The data processing method provided in the embodiment of the present application can be executed by any electronic device, such as a server. The method can be described from different angles, and the steps involving interaction between different nodes can be described from different node sides. For example, for the interaction steps between the first service node (such as the first server) and the second service node (such as the second server), the first service node can be used as the execution subject for description, or the second service node can be used as the execution subject for description, such as the first service node sending a business processing request to the second service node. Accordingly, the description can also be written as the second service node receiving a business processing request from the first service node.

[0078] In the embodiments of the present application, the server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. The server can receive a service processing request initiated by a user terminal and process the service processing request. Optionally, the server can also feed back the processing result of the service processing request to the user terminal.

[0079] The user terminal in the embodiments of the present application may be a smartphone, tablet computer, laptop computer, desktop computer, intelligent voice interaction device (such as a smart speaker), wearable electronic device (such as a smart watch), vehicle-mounted terminal, smart home appliance (such as a smart TV), AR / VR device, etc., but is not limited thereto. The user terminal and the server may be connected directly or indirectly via wired or wireless communication, which is not limited in the embodiments of the present application.

[0080] The method provided in the embodiments of this application is theoretically applicable to any application that provides group services. The application can be any type of application running on a mobile terminal or a fixed terminal, including but not limited to an app (Application), a web application, a mini-program, etc. The application can be a dedicated instant messaging tool or an application that provides both instant messaging services and other services.

[0081] In order to better understand and illustrate the method provided in the embodiments of the present application, some of the terms involved in the embodiments of the present application are explained below.

[0082] Access layer: Similar to a gateway, for example, an application's SDK (Software Development Kit) can request a backend server through the access layer.

[0083] Group forwarding layer: used to forward the group request forwarded by the access layer to the group logic layer.

[0084] Group logic layer: group-related logic processing services.

[0085] Consistent Hash: A load balancing strategy that forwards group requests to backend services based on certain information in the request (this information can be selected and configured based on actual needs). Unlike other load balancing strategies, requests with the same information will always be forwarded to the same machine or machines on the backend.

[0086] Community: A group that can support millions of people.

[0087] Small group: The number of group members is less than the first number, for example, the number of group members is less than 1,000.

[0088] Large group: The number of group members is greater than or equal to the first number, and less than the second number. For example, the number of group members is greater than 1,000 but less than 50,000.

[0089] Extra large group: The number of group members is greater than or equal to the second number, such as 50,000.

[0090] In actual applications, the thresholds (the first number and the second number) corresponding to the small group, the large group, and the extra-large group can be configured and adjusted according to actual application requirements.

[0091] To better understand and illustrate the method provided in the embodiments of the present application, the following first introduces the optional implementation methods of the method provided in the present application in conjunction with a specific scenario embodiment. This scenario embodiment is described using an instant messaging application as an example. In addition to providing group interaction functions, the instant messaging application can also integrate other functions (such as but not limited to data management, storage, etc.). The following describes this scenario embodiment from two aspects: querying group member information and sending group messages.

[0092] Figure 1 shows a structural diagram of an optional data processing system provided by an embodiment of this scenario. As shown in Figure 1, the data processing system may include: a user terminal 10, an access layer 20, a forwarding server 30 of a group forwarding layer, multiple logical servers of a group logic layer (such as a logical server 41, a logical server 42, ..., a logical server 4N), a storage server 50, and a push server cluster.

[0093] The user terminal 10 can be any terminal running an application / software with an instant messaging function. The user terminal can be a user's mobile phone or a computer, etc. The user terminal 10 can establish a communication connection with the server of the instant messaging application through the access layer 20. The user can use the various services provided by the application based on the user interface of the application displayed on the user terminal 10. For example, if the user is a member of a group, the user can send group messages. In the embodiment of the present application, the user terminal 10 can access the forwarding server 30 of the instant messaging application through the access layer 20. There can be one or more forwarding servers 30. The access layer 20 can send the service processing request of the user terminal 10 to the forwarding server 30 corresponding to the user terminal 10 according to the pre-configured forwarding policy. The forwarding server 30 communicates with the logic server of the instant messaging application, wherein the logic server can process the service processing request it receives. In the embodiment of this scenario, the storage server 50 can be a cloud server cluster, which can be used to store various data involved in instant messaging applications, such as but not limited to the basic group information of each group (such as group identification, group timeliness information (validity period), group owner information, group member limit, group creation time, identification of each member in the group, etc.), information of group members (which can include but not limited to member identification, time when members joined the group, member personal attribute information and other basic member information, and can also include the member's current status, such as whether they are online). Optionally, in the embodiment of the present application, the group basic information of the group and the member information of the members in the group can be stored separately, such as stored in different server clusters. Optionally, the member basic information and status information of the members can also be stored separately.

[0094] The forwarding server in this scenario embodiment is the first service node in the embodiments below this application, and the logic server is the second service node. Optionally, the first service node and / or the second service node can be a cloud server. The push server in the push server cluster can push group messages in the group.

[0095] In this scenario embodiment, any member of any group can query the basic information of any member in the group, and can also query the basic information of the group. The following describes a solution for querying the basic information of group members provided in this embodiment of the application in conjunction with FIG2. This solution is described using the example of member A in group querying the basic information of member B in group. The query process may include the following steps:

[0096] Step S11: the user terminal 10 of member a receives a member basic information query operation.

[0097] Optionally, member a can initiate a query request for member b's basic information by performing a set operation on the user interface of its user terminal 10. For example, the user interface can display a list of group members of the target group to which members a and member b belong, and the list can display identification information of each member in the group (such as member nicknames). Member a can click on the target area associated with member b (such as the name (such as nickname or remark name) display area of ​​member b in the user interface) (of course, other triggering methods can also be used). At this time, various optional operations associated with member b can be displayed on the user interface, such as "view information", "send message", etc. Member a can trigger a basic information query operation for member b by clicking "view information".

[0098] Step S12: the user terminal 10 sends a member basic information query request (information query request in FIG. 2 ) for member b to the forwarding server 30 , ie, the group forwarding layer, through the access layer 20 .

[0099] The member basic information query request includes the first group identifier of the target group and the member identifier of member b. The member identifier of member b can be the name of member b in the target group (such as a nickname), or it can be the first member identifier of member b (OriginUserID), for example, the unique identifier assigned to member b when joining the target group (such as the unique index of the member in the group assigned according to the time of joining the group, for example, the first member identifier of the member who created the group is 1, the first member identifier of the second member to join the group is 2, and so on. The group identifier and a first member identifier can uniquely identify a member in the group). If the information query request does not include the first member identifier of member b, the logical server that receives the request can determine the first member identifier of member b based on the other member identifiers of member b carried in the request. For example, the logical server stores a mapping relationship between the nicknames of each member in the group and the corresponding first member identifiers, and the first member identifier of member b in the group can be determined based on the mapping relationship. Therefore, it can also be referred to as including the first member identifier of member b in the member basic information query request.

[0100] Step S13: The forwarding server 30 determines the target logical server corresponding to the request, ie, the target group logical layer, according to the first group identifier in the basic data query request, and sends the request to the target group logical layer, such as the logical server 41 in FIG. 2 .

[0101] After receiving the basic information query request for member b, the forwarding server 30 can determine the target logical server for processing the request from the multiple logical servers in the group logical layer based on the first group identifier carried in the request, wherein each logical server in the multiple logical servers in the group logical layer can be associated with the first group identifier of one or more groups, and the first group identifier of a group is associated with a set number of logical servers in the multiple logical servers. The set number here can be one or more, and the set number is less than the total number of all logical servers in the group logical layer.

[0102] Optionally, a consistent hashing algorithm can be used to establish an association between the first group identifier of a group and the group logic layer. Optionally, assuming that the total number of logical servers in the group logic layer is 10, the aforementioned set number is 3. For each logical server, the specified parameters of the logical server (such as the node number or other identifier of the logical server) can be used to determine the first position of the logical server on the hash ring through a hash algorithm; for any group, the second position of the group on the hash ring can be determined based on the first group identifier of the group through a hash algorithm. Then, based on the degree of match between the second position and the first position corresponding to each logical server (such as distance, where a closer distance indicates a higher degree of match; or starting from the second position and moving clockwise and / or counterclockwise on the hash ring, with the order of passing through the first position as the degree of match, where the earlier the first position is passed, the higher the degree of match), the three logical servers corresponding to the first positions of the 10 logical servers whose first positions best match the second position can be determined as the target logical servers for the group.

[0103] Step S14: the target logic server 41 processes the received member basic information query request and sends the member basic information of member b (ie, the query result) to the user terminal of member a.

[0104] As shown in Figure 2, assuming that the target logical server is the logical server 41 in Figure 1, after receiving the member basic information query request, the server can obtain the member basic information of member b based on the first group identifier and the first member identifier of member b carried in the request, and send the information to the user terminal 10 of member a via the forwarding server 30 and the access layer 20 in turn, and the user terminal 10 will display the basic information of member b to member a.

[0105] In actual applications, since most or all business processing requests for a group require the use of the group's basic data, such as the member basic data query request mentioned above, it is also necessary to perform relevant verification based on the basic data of the target group corresponding to the request, such as verifying whether the target group is invalid, whether the member b targeted by the request belongs to the target group or is still in the target group, etc. Taking this into account, in an embodiment of the present application, each logical server can be associated with one or more groups (i.e., first group identifiers), and each logical server can pre-acquire the basic data of the group to which it is associated from the storage server 50 and cache it. Of course, it is also possible to perform a full or incremental update on the cached group basic data according to a pre-configured group basic data update policy. In this way, when a logical server receives a business processing request, it can quickly process the business processing request based on its cached group data. Since each group can be associated with only some logical servers, the method provided in the embodiment of the present application does not require all logical servers to cache the basic data of all groups, which can improve cache utilization and avoid waste of storage resources.

[0106] The following describes an optional process for a group messaging solution provided by an embodiment of the present application, in conjunction with the architecture shown in Figure 3 and the above-mentioned scenario embodiment. As shown in Figure 3, the message sending terminal 11 is the user terminal in the target group that sends the target message (group message), and the message receiving terminal 12 is the user terminal of any member of the target group. Taking the example below where the sending terminal 11 is the user terminal of member a in the target group (which can be any group), and the receiving terminal 12 is the user terminal of member b, the group messaging process may include the following steps:

[0107] Step S21: the sending terminal 11 receives a group message sending operation from member a to a target group.

[0108] Step S22: The sending terminal 11 sends the group message sending request to the forwarding server 30 through the access layer.

[0109] Optionally, member a can enter the message they want to send to a group on the group message sending interface of the instant messaging application on the sending terminal 11 and then click the "Send" control. After receiving member a's click operation, the sending terminal 11 can send a group message sending request to the forwarding server 30 via the access layer. The request includes the group message to be sent and the first group identifier of the target group.

[0110] Step S23: the forwarding server 30 determines the target logical server corresponding to the request according to the first group identifier in the group message sending request, and sends the request to the target logical server, such as the logical server 43 in FIG3 .

[0111] Step S24: the target logic server 43 determines the number of members corresponding to the target group according to the first group identifier in the group message sending request, and determines whether the target group is a small group, a large group or an extra-large group according to the number of members.

[0112] Step S241: If the target group is a small group, the target logic server 43 reads the member information of all members in the target group from the local cache or obtains it from the storage server 50 according to the first group identifier of the target group, generates information to be pushed for each member, and sends the information to the message center.

[0113] Step S242: If the target group is a large group, the target logic server 43 generates the information to be pushed corresponding to the target group according to the first group identifier of the target group, and sends the information to be pushed to the message queue for storage. The information to be pushed includes group indication information (such as the first group identifier) ​​and the target message.

[0114] Step S243: If the target group is an extra-large group, the target logic server 43 determines the number of groups in the target group based on the number of members in the target group, generates a corresponding number of group indexes, generates information to be pushed corresponding to each group index based on each group index, and sends the information to be pushed to the message queue for storage. The information to be pushed includes group indication information (such as the first group identifier and group index) and target information.

[0115] Among them, in the embodiment of the present application, the division of small groups, large groups and extra-large groups is based on the number of members in the group, and the member division thresholds of different groups can be configured and adjusted according to actual needs.

[0116] Step S25: the push server 60 consumes the information to be pushed in the message center or the message queue, and pushes the target message to each member in the group.

[0117] In order to better meet the push requirements of group messages in actual applications and improve push efficiency, two message push methods are provided in the embodiment of the present application, one is a fast channel push method for small groups, and the other is a slow channel push method for large groups and extra-large groups.

[0118] Specifically, when the target group is a small group with a relatively small number of members, the target logical server can generate the corresponding information to be pushed for each member based on the member information of each member in the target group. Of course, if the target logical server has previously obtained and cached the member information of each member in the target group, the target logical server can directly read the member information of each member in the target group from the cache, and generate the corresponding information to be pushed for each member based on the member information of each member. The corresponding information to be pushed for each member can be stored in the message center, and the push server consumes the information to be pushed stored in the message center. If the target logical server does not have cached member information, the logical server can obtain the member information from the storage server.

[0119] When the target group is a large group or an extra-large group, if the fast channel push method is still used, the processing time of the target logical server will be greatly increased. To address this issue, large groups and extra-large groups can use a slow channel push method. Among them, for large groups, the target logical server can generate information to be pushed based on the first group identifier of the target group. Optionally, the information to be pushed may include the first group identifier and the target message to be pushed (i.e., a group message). The information to be pushed can be stored in a message queue and consumed by the push server. When consuming the information to be pushed, the push server can obtain the member information of each member corresponding to the first group identifier from its cache or storage server based on the first group identifier, and based on the member information of each member, it can use an online or offline push method to push the target message to each member.

[0120] For very large groups, the target logical server can divide the target group into multiple groups based on the specific number of members in the target group. Each group can correspond to some members of the target group. The target logical server can generate information to be pushed corresponding to each group and store the information to be pushed corresponding to each group in a message queue for consumption by the push server. In this case, the information to be pushed corresponding to a group should not only include the target message to be pushed, but also the group indication information corresponding to the group. Based on the indication information, the push server can obtain the member information of each member of the group corresponding to the group from the storage server or its cache, and thus push the target message to each member corresponding to the group using an offline or online push method. The indication information in the information to be pushed corresponding to each group can be determined by the specific storage method of the member information of the group members. For example, based on the storage method of the member information, the member information can be obtained based on the group identifier and group index of the target group. In this case, the indication information can be the group identifier and group index.

[0121] That is, the group indication information corresponding to the large group is used to determine the relevant information of all members in the entire group, and the group indication information corresponding to the extra-large group is used to determine the relevant information of the members corresponding to a subgroup in the group.

[0122] Optionally, the push servers or server clusters corresponding to the fast channel push and the slow channel push may be the same or different. As shown in FIG3 , when the push server 60 consumes the information to be pushed in the message center, since the information to be pushed corresponds to each member, which at least includes information such as the member's status (whether online) and the member's push address, the push server 60 can send the target message to the user terminal of each member based on this information. Optionally, the push server 60 can send the target message to the message receiving terminal 12 through the access layer. For the messages to be pushed in the message queue, since the message queue contains indication information for obtaining member information, when the push server 60 consumes the information to be pushed in the message queue, it needs to first obtain the member information from its cache or storage server based on the indication information in the information to be pushed, and then push the target message based on the obtained member information.

[0123] The optional storage methods of the group basic information and the basic information of the group members in the embodiment of the present application, as well as the methods of obtaining the information, will be further described in conjunction with the optional methods below.

[0124] The following describes several exemplary embodiments to illustrate the technical solutions of the embodiments of the present application and the technical effects produced by the technical solutions of the present application. It should be noted that the following embodiments can refer to, learn from, or combine with each other, provided that there is no conflict between them. For the same terms, similar features, and similar implementation steps in different embodiments, the description will not be repeated.

[0125] FIG4 shows a flow chart of a data processing method provided in an embodiment of the present application. The method may be executed by a first service node (such as the forwarding server in FIG1 ). As shown in FIG4 , the data processing method provided in an embodiment of the present application may include the following steps:

[0126] Step S410: Obtain a service processing request related to a target group from the access layer, where the service processing request includes a first group identifier of the target group.

[0127] Step S420: Based on the first group identifier, determine a target service node corresponding to the service processing request from a plurality of second service nodes in the group logic layer. The target service node may be a subset of the plurality of second service nodes. In one embodiment, the target service node may cache basic group information for the target group.

[0128] Step S430: Send the service processing request to the target service node, so that the target service node processes the service processing request based on the relevant information of the target group. The relevant information may include basic group information of the target group. For example, in one embodiment, the target service node may determine the member size of the target group based on the basic group information of the target group and process the service processing request based on the member size of the target group.

[0129] The target group can be any group (or simply called a group) in the target application, such as a group in an instant messaging application, and a group should include at least one member. The specific request type of the above-mentioned business processing request is not limited in this embodiment of the application. It can be any business processing request for the target group, for example, a business processing request can be a group member information query request, a group information query request, a message group request, etc.

[0130] In this embodiment of the present application, the first group identifier of the target group can be called the original group identifier or original group number (OriginGroupCode) of the target group. This embodiment of the present application does not limit the method for determining the original group number, which can be a number or other method. The group number of a group can uniquely identify a group.

[0131] In this embodiment of the present application, a group can be associated with at least one second service node (such as the logical server in Figure 1), which is a subset of all second service nodes. A service processing request for a group is sent by the first service node to the second service node associated with the group, where it is processed by pre-configured service processing logic in the second service node.

[0132] For the convenience of description, in some of the following embodiments, the first service node may be referred to as a group forwarding layer, and the second service node may be referred to as a group logic layer.

[0133] In an embodiment of the present application, the association between a group and its associated group logic layer can be established using the group's original group number. After receiving a service processing request, the group forwarding layer can determine the group logic layer corresponding to the request, that is, the target service node, based on the original group number carried in the request. The specific method of using the original group number to establish the association between the group and the second service node is not limited in this embodiment of the present application and may include, but is not limited to, a consistent hashing algorithm.

[0134] Optionally, for the above-mentioned target group, after receiving the service processing request for the group, the group forwarding layer can use the OriginGroupCode of the group as the key and forward the request to one or several group logic servers among the multiple group logic servers in the group logic layer using consistent hashing. The one or several group logic servers here are the target service nodes corresponding to the service processing request. Optionally, for a service processing request for the target group from any user terminal, the group forwarding layer can send the service processing request to the group logic server with the lighter load according to the load conditions of the various group logic layers corresponding to the target group.

[0135] FIG5 shows an optional processing flow of a business processing request provided by an embodiment of the present application. Taking the case where the business processing request is a group-related request for a target group as an example, the processing flow of the request may include: a user terminal may initiate a group-related request through the client of the instant messaging application on the terminal, the group-related request reaches the access layer, the access layer may send the group-related request to the group forwarding layer, the group forwarding layer determines the target group logic layer associated with the target group based on the original group number of the target group, and forwards the group-related request to the target group logic layer for processing. For example, the group-related request is a group basic information query request. After the target group logic layer receives the group basic information query request, it can find the group basic information of the target group based on the group number and send it to the group forwarding layer. The group forwarding layer sends the group basic information to the requesting user terminal through the access layer, and the user terminal displays the group basic information to the user.

[0136] Optionally, in an embodiment of the present application, the target service node of the target group may cache the target group's basic group information, while a second service node other than the target service node does not cache the target group's basic group information. When processing a received service processing request, the target service node may perform processing based on the relevant information of the target group. The relevant information includes the target group's basic group information.

[0137] In actual applications, during the application initialization phase, if the group logic layer associated with a group does not cache the group's basic group data, upon receiving a business processing request corresponding to the group, the group logic layer may first retrieve the group's basic group data from the storage server storing the group's basic data based on the group's original group number and cache it. Optionally, the data cache in the group logic layer may be a short-term cache. For example, after the cache duration exceeds a set time (e.g., 2 seconds), the cached data will be deleted to reduce the storage resource usage of the group logic layer. When the group logic layer receives another business processing request, it can again pull the relevant data from the storage server storing the group's basic data. Of course, if the group logic layer has sufficient storage capacity, the group logic layer can theoretically also periodically update its cached group basic data. For example, the group logic layer can periodically request updated group basic data from the storage server, or the storage server can send the updated data to the group logic server associated with the group when the group's basic data is updated. The update can be a full update or an incremental update.

[0138] For applications that provide group-related services (such as instant messaging (IM) software), there are usually two main data (group-related data): one is the basic information of the group, and the other is the basic information of the group members. Most group-related requests require verification of these two data (for example, whether the group still exists, whether all members are in the group, and if the request involves permission verification, whether the requesting end has permission). For groups, when the group is small, it can usually run stably. However, when the number of group members reaches a certain level (such as reaching the level of 10,000), due to the large number of group members, the number of requests to the same group will be relatively large, which can easily cause hot request problems. A large number of requests to the same group may drag down the server.

[0139] Because group member basic data is relevant to group members, it typically doesn't present hotspot issues. Distributed storage can be used to address the high volume of requests for group member data. However, this doesn't apply to group basic data. Since all group members use the same copy of the data, it's updated when members join or leave the group, when messages are sent, and so on. It's also read when a group member logs into an application, when the application switches from the background to the foreground, and when a group member reads a message. Consequently, the group will experience a large number of concurrent reads of the data. Using standard distributed storage without special processing can easily lead to resource imbalance. For example, if the basic data of a group of one million people is distributed and stored on a single machine, to accommodate the large number of read requests, the storage machine must be configured very high, or a large number of replicas must be enabled to handle the reads. This also increases the configuration of other distributed storage machines that don't store the millions of people, resulting in wasted resources. Optionally, to optimize resource utilization, local caching can be added to the group logic layer, caching the basic data within the group logic layer. However, in current related technologies, such as the one shown in Figure 6, when the access layer receives a group-related request from a user terminal, it forwards the request to the group logic layer, such as the group logic layer with the lowest load determined by the load balancing policy. Because a group request can be sent to any group logic layer, adding a local cache to the group logic layer would require all machines in the group logic layer to cache the basic group data for all groups, resulting in low cache utilization.

[0140] In order to avoid the problem of hot requests and improve the utilization of storage resources, the data processing method provided in the embodiment of the present application adds a group forwarding layer, namely the above-mentioned first service node, and each group is only associated with some machines in the logic layer, namely some second service nodes. Each second service node can be associated with one or more groups (optionally, it can be a part of the group). In this way, each second service node only needs to cache the group basic information of the group it is associated with, without caching the group basic information of other unrelated groups. Accordingly, when the group forwarding layer receives a business processing request related to the group, it only needs to forward the request to the group logic layer associated with the group. By adding a local cache in the group logic layer, the efficiency of obtaining the group basic information can be greatly improved, and the hot spot problem caused by a large number of requests for the same group can be avoided. By adding a group forwarding layer and establishing an association between the group and the part of the group logic layer associated with the group, the relevant requests of the same group will only be processed by the part of the group logic layer associated with the group, and the relevant information of the group only needs to be cached in the part of the group logic layer, thereby effectively improving the cache utilization and avoiding resource waste.

[0141] For the member information of each member in the target group, it may include at least one of the member basic information or member status information. The member basic information may include but is not limited to the member nickname, member avatar, the time when the member joined the group, the member type in the group (such as whether it is the group creator, whether it is the group administrator, etc.) and other basic information. The member status information refers to whether the member is currently online or offline. The member basic information and member status information of the group members may be stored in the same storage server cluster or in different storage server clusters. Optionally, the member basic information of each member of the target group may be stored in the basic information storage server, and the member status information may be stored in the status storage server.

[0142] In current related technologies, for a group, member data of the group is typically distributedly stored according to the group ID (e.g., GroupCode). For example, the group ID is used as a key to calculate the storage server corresponding to the group, and the member data of all group members is stored in this storage server, such as based on the member's first member ID. However, as the number of group members continues to grow, the resource requirements of some machines storing millions of people will increase, necessitating a unified upgrade of the configuration of all group storage machines, resulting in a waste of resources.

[0143] In order to solve or improve the above-mentioned problem caused by the storage of group member information, in an optional embodiment of the present application, the member information of each member in the target group can be stored in the following manner:

[0144] Obtain the second member identifier of each member in the target group;

[0145] For any member in the target group, a second target storage node corresponding to the member is determined from a plurality of second storage nodes according to the second member identifier of the member, and the member information of the member is stored in the second target storage node.

[0146] This alternative solution of the present application proposes a solution for storing group member-related data separately, rather than storing all group member-related information on a single server. A member's second member identifier is information that uniquely identifies the member. The second member identifier of each member in a group can be obtained according to preconfigured identifier generation rules. The second member identifier can be called a MemberId.

[0147] For each member in the target group, its second member identifier can be used as a storage basis, and the second target storage node (such as a cloud server or other type of server) storing the member's member information can be determined based on the identifier. Optionally, the member's member information can also be stored in the target node based on the second member identifier, that is, it is possible to determine which storage node the member information is stored in based on the second member identifier, and also to read the member's member information from the corresponding storage node based on the second member identifier.

[0148] Among them, the specific implementation method of determining the second target storage node corresponding to a member based on the second member identifier of the member is not limited in the embodiments of the present application. In theory, any method that can establish an association relationship between the second member identifier and the second target storage node corresponding to the identifier is acceptable. Optionally, for any member, its second member identifier can be used as an index to retrieve the member information. When it is necessary to obtain the member information of the member, the member information of the member can be directly found from the local cache based on the index, or the second target storage node corresponding to the member can be found based on the index, and the member information of the member can also be read from the second target storage node based on the index.

[0149] As an optional solution, the specific implementation of the above-mentioned acquisition of the second member identifier of each member in the target group may include:

[0150] Determine the number of members in the target group;

[0151] If the number of members is greater than or equal to the first threshold, a second member identifier is generated for each member in the target group, and a mapping relationship between the old identifier and the second member identifier of each member is recorded and stored, where the old identifier of a member includes the first member identifier of the member and the first group identifier of the target group;

[0152] If the number of members is less than the first threshold, the member information of each member in the target group can be stored in the following manner:

[0153] Determining, according to the first group identifier, a first target storage node corresponding to the target group from the plurality of first storage nodes;

[0154] Based on the first member identifier of each member in the target group, the member information of each member in the target group is stored in the first target storage node.

[0155] This optional solution of the present application can determine the storage method of member information according to the number of members in the current group. If the number of group members is relatively small, that is, less than the above-mentioned first threshold, the group member information can still be distributedly stored according to the group number. When the number of group members exceeds a certain number, the group member information is migrated from the first target storage node to the second target storage node.

[0156] The specific value of the first threshold can be configured and adjusted based on actual application requirements. For ease of description, in the embodiments of the present application, a group with a number of members greater than or equal to the first threshold can be referred to as an extra-large group, and a group with a number of members less than the first threshold can be referred to as a non-extra-large group. A non-extra-large group can be either a small group or a large group. Optionally, a second threshold can be used to distinguish between large and small groups. A group with a number of members greater than or equal to the second threshold can be referred to as a large group, and a group with a number of members less than the second threshold can be referred to as a small group.

[0157] Optionally, in actual implementation, for non-extra-large groups, the members of the group may only have the first member identifier (which may be called the original member identifier OriginUserId), and the specific generation method of the identifier may also be configured according to needs. For example, it may be a digital number, for example, it may start from 1 and increase according to the time when the member joins the group. When the group reaches the scale of an extra-large group, a new group number (NewGroupCode, which is the second group identifier later) may be assigned to the group, and the generation method of the new group number may also be configured according to actual application needs. For example, it may start from 1 and increase, the new group number of the first group to be migrated is 1, and the new group number of the second group to be migrated is 2.

[0158] When the group reaches a very large size, a second member ID can be generated for each member in the group, which is the member ID required when obtaining member information. As an optional solution, for any member in the target group, the second member ID of the member can be generated by:

[0159] determining a second group identifier of the target group and a third member identifier of the member;

[0160] Determine a target shard index corresponding to the member according to the first member identifier of the member and the total number of shards corresponding to the plurality of second storage nodes;

[0161] A second member identifier of the member is generated based on the second group identifier, the target shard index of the member, and the third member identifier.

[0162] In this optional solution of the present application, the member information of the members in the target group can adopt a distributed storage solution of data sharding. The total number of shards corresponding to multiple second storage nodes can be pre-configured according to actual needs, and each second storage node can correspond to at least one shard. The use of data sharding can further speed up the efficiency of data query. In the embodiment of the present application, the second member identification MemberId of the member can be used as a shard key for distributed storage, and each shard has its own shard index (ShardIndex). A shard index uniquely identifies a shard. For any member in any group, the member information of the member can correspond to a shard.

[0163] A member's third member identifier (also known as NewUserId) can be a new member number assigned to a member when the group reaches a very large size. For each group, the member numbers can start at 1 and increase in number. For example, each member in the group can be assigned a number starting at 1 based on the time they joined the target group (or not). The third member identifier of the nth member is n.

[0164] In an embodiment of the present application, the target shard index corresponding to a member can be determined based on the first member identifier OriginUserId of the member and the total number of shards. The OriginUserId of a member in a group is associated with one shard. Optionally, the first member identifier can be a number, such as if there are m members in the group, the first member identifier of the j-th member is j. The shard index of all shards corresponding to multiple second storage nodes can also be a number, such as if the total number of shards is 256, and the shard index of the i-th shard is i-1. The calculation result of a member's OriginUserId%256 can be determined as the target shard index of the member, or called the target shard bit.

[0165] After determining the target shard index corresponding to the member, the second member identifier of the member can be generated based on the second group identifier of the group, the target shard index corresponding to the member and the third member identifier NewUserId of the member. The method of generating the second member identifier is simple and easy on the one hand, and the second group identifier and the third member identifier can ensure the uniqueness of the second member identifier on the other hand. In addition, the target shard index and the third member identifier can make the second member identifier have interval characteristics, which is convenient for searching. In the embodiment of the present application, when a certain group has been determined, the first member identifier and the third member identifier of the member can be the unique identifier of the member within the group (i.e., the identifier within the group, the local identifier of the member). The combination of the first group identifier of the group and the first member identifier of the member, or the combination of the second group identifier of the group and the third member identifier of the member (the unique identifier between groups, the global identifier of the member) can uniquely identify a member in a group. The combination of the second group identifier of the group, the third member identifier of the member and the target shard index corresponding to the member can find the second target storage node where the member's information is stored from multiple shards, and can also obtain the member information of the member from the second target storage node.

[0166] Optionally, the second group identifiers of different groups may use continuous digital codes as group identifiers, and the third member identifiers of each member in the target group may also use continuous digital codes. For any member, the second member identifier of the member may be a binary coded identifier, that is, a binary code. Among them, in order from high to low, the binary coded identifier corresponding to the member may include: a binary representation of a first set number of bits corresponding to the second group identifier of the target group, a binary representation of a second set number of bits corresponding to the target shard index of the member, and a binary representation of a third set number of bits corresponding to the third member identifier of the member. In this embodiment, the second member identifier uses binary representation to facilitate machine reading.

[0167] Among them, the first set number of bits, the second set number of bits, and the third set number of bits can all be pre-configured according to actual application requirements. The second set number of bits is the number of bits occupied by the binary representation of the total number of shards. For example, if the total number of shards is 256, the second set number of bits is 8. The third member identifiers NewUserId in the target group can be incremented starting from 1, and the shard indexes of each shard can also be incremented starting from 0. Then the shard index represented by binary 00000000 represents the first shard index, and the shard index represented by binary 00000001 represents the second shard index.

[0168] As an optional solution, the first set number of bits can be 28 bits, the second set number of bits can be 8 bits, and the third set number of bits can be 28 bits. Then the second member identifier MemberId (also called member data ID) of each member in a group can be expressed as follows:

[0169] Among them, the upper 28 bits of the second member identifier are NewGroupCode (that is, the binary representation of the new group number), the lower 28 bits are NewUserId, and the middle 8 bits are Shard shard bits ShardIndex, which can be calculated by OriginUserId%256, where OriginUserId can be a 64-bit integer data.

[0170] After generating the second member identifier MemberId for each group member, the MemberId of each member can be used as a sharding key to migrate the member's member information to a new storage node. Specifically, the second storage node where the member is located can be determined based on the MemberId, and the member information can be stored in the second storage node.

[0171] Among them, in order to be able to retrieve member information based on the member's first member identifier OriginUserId, when generating the second member identifier for the member, it is also necessary to add an index layer Member Index (MIndex) to store the mapping relationship between OriginGroupCode and OriginUserId to MemberId, that is, to record and store the mapping relationship between the member's old identifier and the member's second member identifier. Among them, the member's old identifier can be associated with the member's OriginUserId. Optionally, the member's old identifier can be the member's global identifier. For any member in the target group, the member's old identifier can include the member's first member identifier and first group identifier. Then, when it is necessary to obtain a member's information, the member's second member identifier MemberId can be found based on the member's first member identifier and first group identifier, and then the member's member information can be obtained from the second storage node using the MemberId.

[0172] Corresponding to the storage solution of the group member information provided in the embodiment of the present application, the member information of the members in the target group can be obtained in a corresponding manner. Optionally, for any member in the target group, the member information of the member can be obtained by:

[0173] Determine the number of members in the target group;

[0174] If the number of members is less than the first threshold, the first target storage node corresponding to the target group is determined based on the first group identifier, and the member information of the member is obtained from the first target storage node based on the first member identifier of the member; the traditional member information storage and retrieval scheme can be adopted to maintain the compatibility of the system.

[0175] If the number of members is greater than or equal to the first threshold, the second member identifier of the member is determined based on the old identifier and mapping relationship of the member, the second target storage node corresponding to the member is determined based on the second member identifier of the member, and the member information of the member is obtained from the determined second target storage node.

[0176] In an embodiment of the present application, when the number of group members is small (such as a small group and a large group), storage can still be performed in the original manner, such as using OriginGroupCode for sharding, using OriginGroupCode and OriginUserId to retrieve a group member, and determining the storage location of the member information of all members in the target group, i.e., the first target storage node, based on the OriginGroupCode. Furthermore, the member information of each member can be retrieved from the second target storage node based on the OriginUserId (or OriginGroupCode and OriginUserId) of each member. For example, for a storage node for the group member information of a group, if the member information of different groups is stored separately, the electronic device requesting the member information (such as a second service node or a group message push server) can request the member information based on the OriginGroupCode and OriginUserId. Of course, if you are requesting the information of all members in the group, you can also request it based on OriginGroupCode. After receiving the request, the storage node can find the information of all members in the group based on OriginGroupCode; if you are requesting the information of a certain member, the storage node can find the member information of the member from the information of all members in the group based on the OriginUserId of the member.

[0177] If the target group is an extra-large group, it is necessary to first determine the second member identifier MemberId of the group member according to the above mapping relationship, and then retrieve the member information according to the MemberId. As shown in Figure 7, a schematic diagram of the retrieval principle of the member information of a group member of an extra-large group is shown. For example, the service processing request sent by the user terminal is a request to obtain the basic information of member a. The service processing request includes the original group number OriginGroupCode of the target group and the first member identifier OriginUserId of member a. After receiving the service processing request sent by the group forwarding layer, the target service node, i.e., the target group logic layer corresponding to the target group, can first determine the number of members in the target group, such as the number of members based on the basic group information. If the target group is an extra-large group, the target group logic layer finds the MemberId (new UserID) of member a from the mapping relationship between the old identifier and MemberId of the member recorded (such as MIndex shown in Figure 7) according to the OriginGroupCode and OriginUserId (original UserId) in the service processing request. Based on this MemberId, the member information of member a can be retrieved.

[0178] The above-mentioned storage solution provided in the embodiment of the present application can convert the group members of a very large group (such as a group of one million people) from the original GroupCode shard to the new MemberId shard after migration, which can greatly increase the number of shard keys, and can use distributed storage to disperse the group member information of a group of one million people to multiple storage machines. Balancing storage resources can avoid piling up the information of all group members of a group on one machine, and can solve the bottleneck problem of paging to pull group member information or pulling group member information in full. Optionally, the migration operation of the above-mentioned group member information can be performed by the logic layer or by the migration server. Optionally, in order to avoid affecting the business processing of the group logic layer, the migration of group member information can adopt asynchronous migration. For example, when the number of group members reaches the scale of a very large group, the logic layer can notify the migration server to migrate the group member information of the target group.

[0179] In an embodiment of the present application, a business processing request for a target group may include a message group sending request, which includes a target message input by a sending terminal (wherein the target message may include but is not limited to one or more of various modal information such as text, image, voice or video), and the target message needs to be sent to each member of the target group. Optionally, for the group sending of the target message of the target group, the group logic layer may generate the information to be pushed corresponding to each member based on the member information of all members of the target group stored locally or obtained from the storage node, and the push server consumes the information to be pushed of each member and pushes the target message to each member, that is, sends it to the user terminal of each member. For online group members, an online push method can be adopted, and for offline group members, an offline push method can be adopted.

[0180] Although the above solution can meet the basic needs of group messaging, it requires the logic layer to first find out the member information of all group members in the group, and then decide whether to use online push or offline push based on the status of the group members. When the number of members in the target group reaches a certain number, if the target group queries all group member information every time a group message is sent, the push delay of the group message will become unacceptable. In order to increase the speed of message push, as an optional solution, the group member information can be cached locally (such as local memory) and updated regularly. Specifically, when a group message needs to be sent, the member information of each member in the target group can be obtained in the following ways:

[0181] If the member information of each member in the target group exists in the local cache, the member information of each member in the target group is obtained from the local cache;

[0182] If the membership information of each member of the target group does not exist in the local cache, the membership information of each member of the target group is obtained from the target storage node that stores the membership information of each member of the target group (such as the first target storage node corresponding to the target group, or the second target storage node corresponding to the member in the target group), and the obtained membership information is cached in the local cache.

[0183] Of course, if the group logic layer or push server caches member data, it can also update the cached data periodically or based on notifications. For example, the group logic layer or push server can pull the latest group member data from the member data storage node at regular intervals, or the push server can pull member data from the group logic layer.

[0184] In addition, for a target group with a large number of members (such as a large group or an extra-large group), if there is a group message for the group each time, the target group logic layer corresponding to the target group generates the corresponding information to be pushed for each member based on the member information of each member, that is, for each member, the target group logic layer needs to tell the push server the relevant information of the member and the group message required to push the message to the member, which will cause the group logic to spend a lot of resources and processing time. To address this problem, the embodiment of the present application also provides an optional solution, in which the target message to be sent to the group is sent by the target service node in the following way:

[0185] Determine the number of members in the target group;

[0186] If the number of members is less than a third threshold (the threshold may be the same as the second threshold or not), obtaining member information of each member in the target group, and for each member in the target group, generating a corresponding to-be-pushed message containing the target message based on the member's member information, so that the fourth push server pushes the target message to the member based on the to-be-pushed message;

[0187] If the number of members is greater than or equal to the third threshold, a to-be-pushed message corresponding to the target group is generated, so that the fifth push server obtains the member information of each member in the target group based on the third group indication information in the to-be-pushed message, and pushes the target message in the to-be-pushed message to each member based on the member information of each member.

[0188] The fourth push server and the fifth push server may be servers in the same push server cluster, or servers in different push server clusters.

[0189] In this optional solution of the present application, two different group message push solutions are provided, wherein the push method for when the number of members is less than the third threshold (such as a small group) can be called a fast channel push, and the push method for when the number of members is greater than or equal to the third threshold (such as a large group or an extra-large group) can be called a slow channel push. The main difference between these two methods is that the fast channel push is to generate the information to be pushed for each member by the target group logic layer, and the push server only needs to send the target message to the corresponding member based on the target message and the relevant information of the member included in the information to be pushed. In addition to the target message, the corresponding information to be pushed sent by the slow channel should also include the third group indication information. The push server needs to obtain the relevant information of the members required to push the target information based on the third group indication information, such as the member status (online or offline) and the relevant information of the member's user terminal. The push server sends the target message to each member corresponding to the third group indication information using offline push or online push based on the relevant information of each member obtained. In this way, for a target group with a large number of members (such as a large group and an extra-large group), every time there is a group message for the group, the target service node corresponding to the target group does not need to generate the corresponding information to be pushed for each member based on the member information of each member. That is, for each member, the target group logic layer does not need to tell the push server the relevant information of the member and the group message required to push the message to the member, thereby saving a lot of resources and processing time of the group logic.

[0190] The specific content of the group indication information described in the embodiments of the present application (such as the third group indication information described above, the first group indication information described below, and the second group indication information) is not limited in the embodiments of the present application, and can be associated based on group member information. In theory, as long as the push server can obtain the member information of each member to whom the target message needs to be pushed based on the group indication information, the member information here can be the relevant information required for message push.

[0191] Optionally, when the number of members is greater than or equal to the third threshold and less than the first threshold, such as when the target group is a large group, the information to be pushed corresponding to the target group may be the information to be pushed corresponding to all members of the group, and the third group indication information may include the first group identifier. The push server may obtain the member information of all members of the target group based on the first group identifier, and may push the target message to all members of the group based on the obtained member information. If the number of members is greater than the first threshold, such as when the target group is an extra-large group, the information to be pushed corresponding to the target group may include information to be pushed corresponding to multiple groups, each group corresponding to some members of the group, and the third group indication information may include the first group identifier and a group indication (such as a group index). For the information to be pushed corresponding to each group, the push server may determine and obtain the member information of some members corresponding to the group based on the third group indication information in the information, and push the target message in the information to be pushed to these members.

[0192] It should be noted that the aforementioned fast channel and slow channel push methods provided in the embodiments of this application are applicable to methods for storing group member information using existing related technologies, and are also applicable to any group member information storage method provided in the embodiments of this application. As long as the slow channel delivery solution is used, the push server can obtain the member information of each member in the group based on the group indication information in the information to be pushed.

[0193] As an optional solution, the target group member data can be stored in the following manner provided in the optional embodiment above:

[0194] If the number of members in the target group is less than the first threshold, the first target storage node corresponding to the target group is determined based on the first group identifier, and the member information of each member is stored in the first target storage node based on the first member identifier of each member; if the number of members is greater than or equal to the first threshold, the scheme provided in the previous article using a binary coded identifier as the second member identifier of each member is adopted to determine the second target storage node corresponding to each member, and the member information of each member is stored in the respective corresponding second target storage node.

[0195] For this storage method, when the service processing request of the target group is a group sending request of a target message, as an optional solution, the target message to be group sent can be sent by the target service node in the following manner:

[0196] If the number of members is less than the second threshold, obtaining member information of each member in the target group based on the first group identifier; generating corresponding information to be pushed for each member based on the member information and the target message, so that the first push server pushes the target message to the member based on the corresponding information to be pushed;

[0197] If the number of members is greater than or equal to the second threshold and less than the first threshold, a to-be-pushed message corresponding to the target group is generated, so that the second push server obtains the member information of all members of the target group based on the first group indication information in the to-be-pushed message, and pushes the target message in the to-be-pushed message to each member based on the member information of each member, that is, one to-be-pushed message corresponds to one group; wherein the second threshold is less than the first threshold;

[0198] If the number of members is greater than or equal to the first threshold, the number of groups corresponding to the target group is determined according to the number of members, and a corresponding number of group indexes are generated, wherein each group index corresponds to part of the members of the target group, and different group indexes correspond to different members, and each group index corresponds to at least one shard; for each group index, based on the target message and the group index, the information to be pushed corresponding to the group index is generated, so that the third server to be pushed can obtain the member information of each member corresponding to the group index in the target group according to the second group indication information in the information to be pushed, and push the target message in the information to be pushed corresponding to the group index to each member according to the member information of each member.

[0199] In this optional solution, different groups can be divided into three types based on the number of members: small groups, large groups, and extra-large groups. Small groups can use the fast channel delivery method, while large and extra-large groups can use the slow channel delivery method. Among them, extra-large groups can also use the slow channel delivery method of group push. The push method for large and extra-large groups in this optional solution is an optional implementation method mentioned above when the number of members in the target group is greater than or equal to the third threshold. The second threshold in this method is the third threshold, which is the threshold for dividing small groups from non-small groups.

[0200] In this optional solution, if the target group is an extremely large group, when pushing messages, the target group can be pushed in groups to avoid slow group message push due to the large number of group members. Optionally, the target group can be divided into at least two groups based on a preset threshold, and the preset threshold is used to limit the number of group members corresponding to each group. Using this grouping method, dynamic grouping can be achieved based on the number of members, and each group corresponds to at least one shard. Using this solution, when the push server pushes the target message, each push is targeted at one group. The push server can obtain the member information of each member corresponding to a group based on the group indication information corresponding to the group, and send the target message to each member corresponding to the group.

[0201] As an optional solution, if the target group is a large group, that is, the number of members is greater than or equal to the second threshold and less than the first threshold, the above-mentioned first group indication information may include the first group identifier; if the target group is an extra-large group, that is, the number of members is greater than or equal to the first threshold, the above-mentioned second group indication information may include the first group identifier and the grouping index, or may include the second group index and the grouping index.

[0202] Optionally, the values ​​of each group index corresponding to the target group are 0, 1, 2..., N-1, where N is the number of groups and N-1 is the Nth group index. For any group index, the member information of each member corresponding to the group index can be obtained by:

[0203] Based on the value of the second group identifier and the group index, the identifier lower limit and the identifier upper limit of the second member identifier corresponding to the group index are determined by the following expressions.

[0204] Identification lower limit lower limit = NewGroupCode << (shardShift + shardIndexBit) + ((PushShardIndex * (2shardIndexBit / ShardNum)) < <shardShift);

[0205] Upper limit = NewGroupCode << (shardShift + shardIndexBit) + (((PushShardIndex + 1) * (2shardIndexBit / ShardNum)) < <shardShift)。

[0206] Among them, NewGroupCode is the binary representation of the second group identifier, PushShardIndex represents the value of the grouping index, shardIndexBit is the second set number of bits in the previous text (that is, the storage bits occupied by the shard index), shardShift is the third set number of bits (that is, the storage bits occupied by the third member identifier of the member), and ShardNum is the number of groups, that is, ShardNum = N.

[0207] According to the lower limit and upper limit of the second member identifier corresponding to the grouping index, obtain the member information of each member whose second member identifier is within the lower limit and upper limit. The obtained member information of each member is the member information of each member corresponding to the grouping index.

[0208] Optionally, in actual implementation, when the target group is an extra-large group, if the group logic layer or the push server needs to obtain the group member information of the extra-large group (such as when there is no local cache or the cache needs to be updated), for each group, the upper limit and lower limit of the second member identifier corresponding to the group to be obtained can be determined based on the above expression, so that the member information of each member corresponding to the group can be pulled.

[0209] Specifically, for each group, all second member identifiers within the lower limit and upper limit of the second member identifier corresponding to the group (that is, all MemberIds that satisfy lower limit < MemberId <= upper limit) are the identifiers of some members corresponding to the group, and then the member information of all members corresponding to the shard can be obtained. It can be seen that adopting this method can ensure that the corresponding part of the members of the group can be accurately obtained, so that the member information of the members corresponding to the group can be accurately obtained.

[0210] It should be noted that the solution for obtaining group member information provided in each of the above optional embodiments of the present application can also be used as a solution for updating group member information. The group logic layer and the push server can update the cached information regularly or according to a notification based on the group identifier (such as the first group identifier).

[0211] To better understand and illustrate the group message push solution provided by the present application, an optional implementation solution of the present application will be further described below with reference to FIG. 8. To avoid the problem that when pushing group messages, if all group member information is pulled, the delay will increase after the number of group members increases to a certain threshold, and even become completely unavailable. As shown in FIG. 8, the optional implementation solution may include the following process:

[0212] Step 1: The forwarding layer receives a group sending request for group 1 sent by the message sender. The request includes the original group number OriginGroupCode of group 1.

[0213] Step 2: The forwarding layer uses OriginGroupCode as the key and uses consistent hashing to forward the group request to the target group logic layer corresponding to the OriginGroupCode.

[0214] Step 3: The target group logic layer determines the number of group members in the current group, i.e. the number of members. If it is a small group (small group), the message is pushed to the group members using the fast channel push method. If it is a large or extra-large group (large group), the message is sent to the group members using the slow channel.

[0215] Optionally, for small and large groups, the member information of the group members can be retrieved based on the group's OriginGroupCode and the member's OriginUserId (e.g., a 64-bit integer, where the ID of each member in the group can be incremented starting from 1). When the number of group members reaches a very large scale, the following methods can be used to migrate group members:

[0216] ① Assign a new group number NewGroupCode to the migrated group, starting from 1; assign a new NewUserId to each group member, which increases independently for each group, starting from 1.

[0217] ② Generate the second member identifier MemberId for each member. For each member, MemberId is a 64-bit binary code, with the upper 28 bits being the member's NewGroupCode, the lower 28 bits being the NewUserId, and the middle 8 bits being the Shard index, which can be calculated using OriginUserId%256.

[0218] ③ Add an index layer Member Index to store the mapping relationship between OriginGroupCode and OriginUserId to MemberId.

[0219] ④ Migrate group members to the new storage (second target storage node). When distributing storage, you can use each member’s MemberId as the shard key.

[0220] For this storage solution, when the target group logic layer determines that Group 1 is a small group, it can generate the corresponding information to be pushed for each member of Group 1 based on the relevant information of each member of the group cached locally, and store it in the message center shown in Figure 8. Optionally, the member status information of each member can be stored separately in the status server. The push servers in the push server cluster consume the information to be pushed in the message center. The push servers can choose to send the group message to the message receiving end of each member of Group 1 through the access layer in an online or offline manner based on the status of each member in the group obtained from the status server.

[0221] If the target group logic layer determines that group 1 is a large group, the push of group messages to the large group may include the following steps:

[0222] 1. The target group logic layer can use OriginGroupCode as the key to send the message to the message queue, that is, the information to be pushed stored in the message queue (which can be a message server) can include OriginGroupCode and the target message to be pushed.

[0223] 2. Optionally, the message queue uses consistent hash load balancing or other methods to select a group push server to consume the information in the queue based on the key.

[0224] 3. After the group push server obtains the information to be pushed, it can determine whether the local cache has the information of the group members in the group. If it does, it will send the target message to the message receiver through the access layer in an offline or online manner based on the basic information and status of the group members. If the local cache does not have the information of the group members in the group, the push server can perform the following operations:

[0225] a) Call the group logic service to pull the member information of all group members, such as pulling the member information of all members from the target group logic layer based on the OriginGroupCode. Optionally, the push server can pull the member information of all members in the group from the first target storage node (storage server) corresponding to the group based on the OriginGroupCode.

[0226] b) Calling the status service to obtain the status of corresponding group members, such as pulling the member status of all members in the group from the status server based on the basic information of the group members (such as the original member identification of the group members).

[0227] c) Select online push or offline push according to the member status pulled to send the message to each member in the group.

[0228] If the target group logic layer determines that group 1 is a very large group (e.g., a group of one million people), the push of group messages for the very large group may include the following steps:

[0229] 1. Get the current number of group members through the group basic information.

[0230] 2. Calculate how many shards (groups) the group members should be divided into based on the number of group members. Optionally, you can use the following formula to calculate the number of groups, ShardNum:

[0231] ShardNum=align2((MemberNum) / (Threshold))

[0232] Among them, MemberNum is the number of group members, that is, the number of group members, align 2 is to calculate the smallest power of 2 that is greater than or equal to the value being calculated, and Threshold is the threshold value, which can be configured and adjusted according to actual needs. As an example, assuming that MemberNum is 1 million and the threshold is 50,000, then MemberNum / Threshold = 20, because 2 4 <20<2 5 , align 2(20)=2 5 , so ShardNum=align 2(20)=32, which means the group can be divided into 32 groups.

[0233] For the above storage method, the total number of shards corresponding to distributed storage is 256. Therefore, when the number of groups is 32, one group can correspond to 8 shards. Optionally, the first group corresponds to shards with shard indices 0 to 7, the second group corresponds to shards with shard indices 8 to 15, and so on. The eighth group corresponds to shards with shard indices 248 to 255.

[0234] 3. Traverse ShardNum to generate the shard number PushShardIndex with an index value of 0 to ShardNum-1, that is, the group index. Each group index can be combined with the group number GroupCode as a key to be sent to the message queue. Specifically, for each group, the information to be pushed corresponding to each group is sent to the message queue. The information to be pushed corresponding to a group can carry the group number GroupCode, the group message and the group index of the group. Among them, the group number and the group index are group indication information, which are used to determine the members corresponding to the group and obtain the relevant information of each member so that the group message can be pushed by the push server to the members corresponding to the group. Optionally, the group number in the information to be pushed can be OriginGroupCode or NewGroupCode.

[0235] 4. The message queue uses consistent hash load balancing based on the key to select a group push machine, namely the push server for consumption.

[0236] 5. After the group push machine obtains the target message in the message queue, it can first determine whether the group member information of the group corresponding to the message to be pushed is cached locally. If it is cached, the group message can be pushed to each member directly based on the locally cached group member information. If it is not cached locally, the group push machine can perform the following operations:

[0237] a) Call the group logic service to retrieve the member information of all group members. Optionally, the group push server can retrieve member information from the target group logic layer based on the group ID in the information to be pushed. Optionally, if the group ID in the information to be pushed is NewGroupCode, the group push server can also retrieve the member information of each member in the group shard from the shards corresponding to the group based on the NewGroupCode.

[0238] b) Call the status service to obtain the status of the corresponding group members.

[0239] 6. Select online push or offline push to send the message to the user according to the status.

[0240] As an optional solution, for any group, the target group logic layer corresponding to the group can assign a version number Version each time a group member enters or leaves the group, and the version number increases from 1. Among them, whether a new member joins the group or a member leaves the group, the member version number of the new member is based on the original version number plus 1, and the change in the version number represents the change in the group members. The change may be the addition of members or the withdrawal of members. When there is a change in group members, the specific changes in group members can be identified by updating the version number and the specific changes (such as which member or members have been added, which member has withdrawn from the group, etc. compared to the version number before the update). By obtaining the current latest version number of the group, you can know whether the group members have changed. If there is a change, you can get the specific members that have changed. Of course, other methods can also be used to record changes in the number of group members. By recording changes in group member information, incremental updates of member information can be achieved. For example, when the push server needs to pull the latest information of group members, such as updating its cached basic information of group members, it can obtain the current latest version number V1 of the group and compare its cached group version numbers V0 and V1. If the two are the same, it means that the group members have not changed and no update is required. If the two are different, it means that the group member information has changed. The push server can go to the group logic layer to obtain the specific member changes. For example, compared to version V0, member a and member b have left the group, then the push server can delete the cached information of member a and member b.

[0241] In an embodiment of the present application, the group member information cached in the group logic layer or the push server, such as basic member information and status information, can be updated according to a pre-configured update strategy. For example, it can be updated according to a preset update interval. Of course, it can also be updated in real time each time the member information is needed. For example, when a group message is pushed, the push server obtains the member information of each member to be pushed based on the information to be consumed. The update intervals for the group basic information and status information can be different. For small groups, due to the small number of members, a full update strategy can be adopted, and of course an incremental update strategy can also be adopted. The following takes the example of the push server obtaining or updating the cached group member information to explain the optional acquisition schemes for large and extra-large groups.

[0242] For large groups, the local group member cache update solution in the group push service can adopt full pull, regular incremental update, or real-time notification update.

[0243] 1. The full pull process may include:

[0244] a) Obtain the group number OriginGroupCode by consuming the message push event.

[0245] b) Obtain the maximum version number of the current group members (for example, obtain it from the group logic layer that sends the push information to be consumed) through the group number OriginGroupCode, denoted as Vmax1.

[0246] c) Sort by version number, and based on the group number, paginate and retrieve the profiles of all group members with version number Version ≤ Vmax1 in the group corresponding to this group number.

[0247] 2. The timing update scheme for large groups (this scheme can be used to ensure eventual consistency in case of real-time notification failures) can include:

[0248] a) Obtain the maximum version number of the current group members, denoted as Vmaxn, which can be obtained from the group logic layer according to the group number OriginGroupCode.

[0249] b) Denote the maximum version number obtained from the previous full pull or timing update as Vmaxn-1.

[0250] c) Sort by version number, and paginate and retrieve all group members with version number Vmaxn-1 < Version <= Vmax1.

[0251] 3. The real-time notification methods for large groups can include:

[0252] a) The group logic service, that is, the group logic layer, can use OriginGroupCode as the key and send it to the message queue after a group member joins the group. At this time, the information sent to the message queue is used to notify the push server of the member change information in the group corresponding to the group number OriginGroupCode. Based on this information, the push server can know which members have been newly added to the group, so as to update the group member profiles cached locally by the push server in a timely manner. Then, when sending a group message to this group, it is necessary to push it to the newly added members as well, and there is no need to push it to the members who have exited.

[0253] b) The group logic service uses OriginGroupCode as the key and sends it to the message queue after a group member exits the group. At this time, the information sent to the message queue is used to notify the push server which members have exited the group, and there is no need to push messages to these members subsequently.

[0254] c) The group push service consumes group member change events (including member addition events or member exit events, that is, the information sent to the message queue in a) and b)) to update the local group member cache.

[0255] For extra-large groups, the large group local group member cache update scheme in the group push service can also adopt the methods of full pull, regular incremental update, or real-time notification update. Specifically as follows:

[0256] 1. Full pull:

[0257] a) Obtain the group number GroupCode and the push shard number PushShardIndex for the consumption message push event.

[0258] b) Obtain the maximum version number of the current group members, denoted as Vmax1.

[0259] c) Calculate the range of group member numbers MemberId belonging to the current shard number. The calculation formula is as follows:

[0260] lower limit (MemberId lower limit) = NewGroupCode << (shardShift + shardIndexBit) + ((PushShardIndex * (2shardIndexBit / ShardNum)) << shardShift);

[0261] upper limit (MemberId upper limit) = NewGroupCode << (shardShift + shardIndexBit) + (((PushShardIndex + 1) * (2shardIndexBit / ShardNum)) << shardShift);

[0262] Among them, shardShift = 64 - NewGroupCodeBit - ShardIndexBit, shardIndexBit is the number of binary digits of shardIndex, which is 8 bits, and NewGroupCodeBit is the number of binary digits of NewGroupCode, which is 28 bits.

[0263] d) Sort according to the version number and pull the group members in pages where lower limit < MemberId <= upper limit and all version numbers satisfy Version ≤ Vmax1.

[0264] 2. Timed incremental update (to ensure eventual consistency when real-time notification fails):

[0265] a) Obtain the maximum version number of the current group members, denoted as Vmaxn.

[0266] b) Denote the maximum version number of the group members obtained in the previous full pull or timed update as Vmaxn - 1.

[0267] c) Sort by version number and pull members in pages where lower limit < MemberId <= upper limit and the version number satisfies Vmaxn-1 < Version <= Vmax1.

[0268] 3. Real-time notification:

[0269] a) After a group member joins or leaves the group, the group logic service sends it to the message queue using GroupCode and the push shard number PushShardIndex to which the group member belongs. The calculation formula for PushShardIndex is as follows:

[0270] PushShardIndex = (MemberId >> NewUserIdBit) & (2shardIndexBit - 1)

[0271] Among them, NewUserIdBit is the number of binary digits of NewUserId, that is, the number of binary digits of the third member identifier.

[0272] b) After a group member joins or leaves the group, the group logic service sends it to the message queue using GroupCode and the push shard number PushShardIndex to which the group member belongs.

[0273] c) The group push service consumes the group member change event and updates the local group member cache.

[0274] For small groups, large groups, and extra-large groups, when pushing group messages, it is also necessary to update the status of the group members in the local cache to obtain the latest member status in a timely manner and determine whether to push messages offline or online to the members. Optionally, since the number of members in a small group is small, a full-pull scheme for member status can be adopted. For large groups and extra-large groups, a full-pull, regular update, or real-time update according to notifications can be adopted.

[0275] Optionally, for large groups, the update scheme for the local group member status required by the push service can be any of the following methods:

[0276] 1. Full-pull: After obtaining all group members (member basic information), call the status service to obtain the group member status.

[0277] 2. Regular update (to ensure eventual consistency in case of real-time notification failures): Call the status service to obtain the group member status for all group members (which can be implemented the same as full-pull).

[0278] 3. Real-time notification:

[0279] a) When the user status changes, the group logic layer obtains the list of members who have joined the group, traverses the group, and uses the group code GroupCode as the key to send it to the message queue (that is, adding the group member status change event to the message queue). It is used to notify the push server which members' status has changed, such as which members' status has changed from online to offline, and which members' status has changed from offline to online.

[0280] b) The group push service consumes group member status change events to update the local group member status cache.

[0281] Optionally, for very large groups, the update scheme for the local group member status required by the push service can be any of the following:

[0282] 1. Full pull: After obtaining all group members, call the status service to obtain the status of group members.

[0283] 2. Scheduled updates (used to ensure eventual consistency in the event of real-time notification of failures): All group members call the status service to obtain group member status.

[0284] 3. Real-time notification:

[0285] a) When the user status changes, the group logic obtains the list of groups the user has joined, traverses the group, and uses the group code GroupCode and the push shard number PushShardIndex to which the group members belong as the key to send it to the message queue to notify the push server of which group or groups have changed their status.

[0286] b) The group push service consumes group member status change events and updates the local group member status cache.

[0287] The various optional solutions provided in the embodiments of the present application can effectively solve one or more of the various problems caused by the continuous growth in the number of group members. The solution provided in the embodiments of the present application can well meet the communication needs of large groups and extra-large groups (such as groups of millions of people), solve the implementation difficulties of extra-large groups, and solve various core problems such as message sending and receiving, group member storage, and message push for million-level groups, thereby ensuring that the chat experience of members is consistent with that of small groups.

[0288] Based on the same principles as the data processing method provided herein, embodiments of the present application also provide a data processing device, which can be implemented as any electronic device, such as a server. As shown in FIG9 , the data processing device 100 may include a request receiving module 110 , a target node determining module 120 , and a request forwarding module 130 .

[0289] The request receiving module 110 is configured to obtain a service processing request related to a target group, where the service processing request includes a first group identifier of the target group.

[0290] The target node determination module 120 is used to determine the target service node corresponding to the business processing request from multiple second service nodes based on the first group identifier, wherein the target service node is a part of the multiple second service nodes, and the target service node caches the group basic information of the target group. The second service nodes other than the target service node do not cache the group basic information of the target group.

[0291] The request forwarding module 130 is configured to send the service processing request to the target service node, so that the target service node processes the service processing request according to relevant information of the target group, wherein the relevant information includes basic group information of the target group.

[0292] Optionally, the service processing request includes a request related to member information of at least one member in the target group; the member information of each member in the target group is stored in the following manner:

[0293] Get the second member ID of each member in the target group.

[0294] For any member in the target group, a second target storage node corresponding to the member is determined from a plurality of second storage nodes according to the second member identifier of the member, and the member information of the member is stored in the second target storage node.

[0295] Optionally, the second member identifier of each member is obtained in the following manner:

[0296] Determine the number of members in your target group.

[0297] If the number of members is greater than or equal to the first threshold, a second member identifier is generated for each member in the target group, and the mapping relationship between the old identifier and the second member identifier of each member is recorded and stored. The old identifier of a member includes the first member identifier and the first group identifier of the member.

[0298] If the number of members is less than the first threshold, the member information of each member in the target group is stored in the following manner:

[0299] According to the first group identifier, a first target storage node corresponding to the target group is determined from the plurality of first storage nodes.

[0300] Based on the first member identifier of each member in the target group, the member information of each member in the target group is stored in the first target storage node.

[0301] Optionally, for any member of the target group, the member's information is obtained in the following ways:

[0302] Determine the number of members in your target group.

[0303] If the number of members is less than the first threshold, a first target storage node corresponding to the target group is determined based on the first group identifier, and member information of the member is obtained from the first target storage node based on the first member identifier of the member.

[0304] If the number of members is greater than or equal to the first threshold, the second member identifier of the member is determined based on the old identifier and mapping relationship of the member, the second target storage node corresponding to the member is determined based on the second member identifier of the member, and the member information of the member is obtained from the determined second target storage node.

[0305] Optionally, for any member in the target group, the second member identifier of the member is generated in the following manner:

[0306] A second group identifier of the target group and a third member identifier of the member are determined.

[0307] Determine a target shard index corresponding to the member according to the first member identifier of the member and the total number of shards corresponding to the plurality of second storage nodes.

[0308] A second member identifier of the member is generated based on the second group identifier, the target shard index of the member, and the third member identifier.

[0309] Optionally, the second group identifiers of different groups adopt continuous digital codes, and the third member identifiers of each member in the target group adopt continuous digital codes.

[0310] For any member, the second member identifier of the member is a binary coded identifier, wherein, in descending order from high to low, the binary coded identifiers corresponding to the member include:

[0311] The binary representation of the first set number of bits corresponding to the second group identifier of the target group, the binary representation of the second set number of bits corresponding to the target shard index of the member, and the binary representation of the third set number of bits corresponding to the third member identifier of the member.

[0312] Optionally, the service processing request includes a group sending request for a target message. The target message is sent by the target service node in the following manner:

[0313] If the number of members is less than the second threshold, the member information of each member in the target group is obtained based on the first group identifier; for each member, the corresponding information to be pushed is generated according to the member's member information and the target message, so that the first push server pushes the target message to the member based on the corresponding information to be pushed.

[0314] If the number of members is greater than or equal to the second threshold and less than the first threshold, a to-be-pushed message corresponding to the target group is generated, so that the second push server obtains the member information of all members in the target group based on the first group indication information in the to-be-pushed message, and pushes the target message in the to-be-pushed message to each member based on the member information of each member.

[0315] If the number of members is greater than or equal to the first threshold, the number of groups corresponding to the target group is determined based on the number of members, and a corresponding number of group indexes are generated, where each group index corresponds to some members of the target group, and different group indexes correspond to different members, and each group index corresponds to at least one shard.

[0316] For each group index, based on the target message and the group index, the information to be pushed corresponding to the group index is generated, so that the third server to be pushed can obtain the member information of each member corresponding to the group index in the target group according to the second group indication information in the information to be pushed, and push the target message in the information to be pushed corresponding to the group index to each member according to the member information of each member.

[0317] Optionally, the values ​​of each group index corresponding to the target group are 0, 1, 2, ..., N-1, where N is the number of groups and N-1 is the Nth group index. For any group index, the member information of each member corresponding to the group index is obtained in the following manner:

[0318] The lower and upper limits of the second member identifier corresponding to the group index are determined using the following expressions:

[0319] Identification lower limit = NewGroupCode<<(shardShift+shardIndexBit)+((PushShardIndex*(2 shardInd exBit / ShardNum))< <shardShift);

[0320] Upper limit of identification=NewGroupCode<<(shardShift+shardIndexBit)+(((PushShardIndex+1)*(2shardIndexBit / ShardNum))< <shardShift);

[0321] Among them, NewGroupCode is the binary representation of the second group identifier, PushShardIndex represents the value of the group index, shardIndexBit is the second set bit number, shardShift is the third set bit number, and ShardNum=N.

[0322] According to the lower limit and upper limit of the second member identifier corresponding to the group index, the member information of each member whose second member identifier is within the lower limit and upper limit is obtained. The member information of each member obtained is the member information of each member corresponding to the group index.

[0323] Optionally, the service processing request includes a group sending request for a target message. The target message is sent by the target service node in the following manner:

[0324] Determine the number of members in your target group.

[0325] If the number of members is less than the third threshold, the member information of each member in the target group is obtained. For each member in the target group, based on the member's member information, the corresponding information to be pushed containing the target message is generated, so that the fourth push server can push the target message to the member based on the information to be pushed.

[0326] If the number of members is greater than or equal to the third threshold, a to-be-pushed message corresponding to the target group is generated, so that the fifth push server obtains the member information of each member in the target group based on the third group indication information in the to-be-pushed message, and pushes the target message in the to-be-pushed message to each member according to the member information of each member.

[0327] Optionally, the member information of each member in the target group is obtained by:

[0328] If the member information of each member in the target group exists in the local cache, the member information of each member in the target group is obtained from the local cache.

[0329] If the member information of each member in the target group does not exist in the local cache, the member information of each member in the target group is obtained from the target storage node storing the member information of each member in the target group, and the obtained member information is cached in the local cache.

[0330] Optionally, determining a target service node corresponding to the service processing request from a plurality of second service nodes according to the first group identifier includes:

[0331] According to the first group identifier, a first mapping identifier corresponding to the first group identifier is determined by a preconfigured identifier mapping rule.

[0332] A second mapping identifier of each of the plurality of second service nodes is obtained, wherein the second mapping identifier of each second service node is determined according to the node identifier of the second service node through a preconfigured target mapping rule.

[0333] A target service node is determined from the plurality of second service nodes according to a matching degree between the first mapping identifier and the second mapping identifiers of the second service nodes.

[0334] In the present application, by respectively determining the first mapping identifier and the second mapping identifier and then matching the two, the accuracy of the correspondence between the two can be ensured.

[0335] The device of the embodiment of the present application can execute the method provided by the embodiment of the present application, and its implementation principle is similar. The actions performed by each module in the device of each embodiment of the present application correspond to the steps in the method of each embodiment of the present application. For the detailed functional description of each module of the device, please refer to the description in the corresponding method shown in the previous text, and will not be repeated here.

[0336] The present application also provides a data processing system, as shown in FIG10 . The data processing system 200 may include at least one first service node 210 and multiple second service nodes 220 communicatively connected to the at least one first service node. For any group, some of the multiple second service nodes cache basic group data for the group, and each second service node is associated with a first group identifier of at least one group.

[0337] The first service node 210 is used to receive a business processing request related to a target group, determine a target service node corresponding to the business processing request from multiple second service nodes based on the first group identifier of the target group included in the business processing request, and send the business processing request to the target service node.

[0338] The second service node 220 is configured to receive the service processing request sent by the first service node and process the service processing request according to the cached relevant information of the group corresponding to the service processing request, where the relevant information of the group includes the basic information of the group.

[0339] Optionally, the system may further include at least one access node, with the first service node 210 receiving a service processing request sent by the access node. Optionally, the system may further include at least one push server, and when the service processing request is a group message sending request for a target message, the second service node 220 pushes the target message to each member of the target group via the push server.

[0340] An embodiment of the present application further provides an electronic device, comprising at least one processor configured to execute the steps of the method provided in any optional embodiment of the present application. Optionally, the electronic device may further comprise a transceiver and / or a memory coupled to the processor, wherein the memory stores a computer program, and when the processor executes the computer program, the solution provided in any optional embodiment of the present application may be implemented. Optionally, the electronic device may be a user terminal or a server.

[0341] FIG11 shows a schematic structural diagram of an electronic device applicable to an embodiment of the present invention. As shown in FIG11 , the electronic device may be a server or a user terminal, and the electronic device may be used to implement the method provided in any embodiment of the present invention.

[0342] As shown in Figure 11, the electronic device 2000 may mainly include at least one processor 2001 (one is shown in Figure 11), a memory 2002, a communication module 2003, and an input / output interface 2004. Optionally, the components may be connected and communicated via a bus 2005. It should be noted that the structure of the electronic device 2000 shown in Figure 11 is only schematic and does not constitute a limitation on the electronic devices to which the methods provided in the embodiments of the present application are applicable.

[0343] Memory 2002 can be used to store operating systems and application programs, etc. Application programs can include computer programs that implement the methods described in the embodiments of the present invention when called by processor 2001, and can also include programs for implementing other functions or services. Memory 2002 can be ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, RAM (Random Access Memory) or other types of dynamic storage devices that can store information and computer programs, or EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited to these.

[0344] The processor 2001 is connected to the memory 2002 via the bus 2005 and implements corresponding functions by calling the application program stored in the memory 2002. Among them, the processor 2001 can be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof, which can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of the present invention. The processor 2001 can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0345] The electronic device 2000 can be connected to a network via a communication module 2003 (which may include, but is not limited to, components such as a network interface) to communicate with other devices (such as a user terminal or a server) via the network to implement data interaction, such as sending data to or receiving data from other devices. The communication module 2003 may include a wired network interface and / or a wireless network interface, etc., that is, the communication module may include at least one of a wired communication module and a wireless communication module.

[0346] The electronic device 2000 can be connected to the required input / output devices, such as a keyboard, a display device, etc., through the input / output interface 2004. The electronic device 2000 itself can have a display device, and can also be connected to other external display devices through the interface 2004. Optionally, a storage device, such as a hard disk, can also be connected through the interface 2004 to store data in the electronic device 2000 in the storage device, read data from the storage device, and store data from the storage device in the memory 2002. It is understandable that the input / output interface 2004 can be a wired interface or a wireless interface. Depending on the actual application scenario, the device connected to the input / output interface 2004 can be a component of the electronic device 2000, or it can be an external device connected to the electronic device 2000 when needed.

[0347] Bus 2005, used to connect the various components, may include a path for transmitting information between the components. Bus 2005 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. Depending on their function, bus 2005 may be categorized as an address bus, a data bus, a control bus, or the like.

[0348] Optionally, for the solution provided in the embodiment of the present invention, the memory 2002 can be used to store a computer program for executing the solution of the present invention, and be run by the processor 2001. When the processor 2001 runs the computer program, the actions of the method or device provided in the embodiment of the present invention are implemented.

[0349] Based on the same principle as the method provided in the embodiment of the present application, the embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the corresponding content of the aforementioned method embodiment can be implemented.

[0350] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the corresponding content of the aforementioned method embodiment can be implemented.

[0351] It should be noted that the terms "first," "second," "third," "fourth," "1," "2," etc. (if any) in the specification and claims of this application and the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than that shown or described in the drawings.

[0352] It should be understood that, although each operation step is indicated by arrows in the flowchart of the embodiment of the present application, the order of implementation of these steps is not limited to the order indicated by the arrows. Unless otherwise clearly stated herein, in some implementation scenarios of the embodiment of the present application, the implementation steps in each flowchart can be performed in other orders according to demand. In addition, some or all of the steps in each flowchart can include multiple sub-steps or multiple stages based on actual implementation scenarios. Some or all of these sub-steps or stages can be executed at the same time, and each sub-step or stage in these sub-steps or stages can also be executed at different times respectively. Under different scenarios at the execution time, the execution order of these sub-steps or stages can be flexibly configured according to demand, and the embodiment of the present application does not limit this.

[0353] The above is only an optional implementation method for some implementation scenarios of this application. It should be pointed out that for ordinary technicians in this technical field, without departing from the technical concept of the solution of this application, the use of other similar implementation methods based on the technical ideas of this application also falls within the protection scope of the embodiments of this application.

Claims

1. A data processing method, characterized in that: The method comprises: The first service node in the group forwarding layer obtains a service processing request related to the target group from the access layer, wherein the service processing request includes a first group identifier of the target group; The first service node determines, according to the first group identifier, a target service node that caches the group basic data of the target group from a plurality of second service nodes in a group logic layer, wherein the target service node is a part of the plurality of second service nodes; The first service node sends the service processing request to the target service node, so that the target service node determines the member size of the target group according to the group basic information of the target group, and processes the service processing request according to the member size of the target group.

2. The method according to claim 1, characterized in that The business processing request includes a request related to the member data of at least one member in the target group; the business processing request further includes a first member identifier of each member of the at least one member; determining the member scale of the target group according to the group basic data of the target group, and processing the business processing request according to the member scale of the target group includes: When it is determined according to the group basic information of the target group that the number of members of the target group is greater than or equal to the first threshold, the target group is determined to be a set extra-large group, and based on a pre-established mapping relationship between the first group identifier and the first member identifier to the second member identifier, a second member identifier corresponding to each member of the at least one member is determined according to the first group identifier and the at least one first member identifier in the business processing request; from the plurality of second storages according to the second member identifier of each member of the at least one member The node determines a second target storage node corresponding to the member, and obtains member information of the member from the determined second target storage node.

3. The method according to claim 2, characterized in that Determining the member size of the target group according to the group basic information of the target group, and processing the business processing request according to the member size of the target group further includes: When it is determined based on the group basic information of the target group that the number of members of the target group is less than the first threshold, the target group is determined to be a non-set extra-large group, the first target storage node corresponding to the target group is determined based on the first group identifier, and the member information of the member is obtained from the first target storage node based on the first member identifier of the member.

4. The method according to claim 2 or 3, characterized in that: The second member identifier is generated in the following manner: When it is determined that the target group is a set extra large group, determining a second group identifier of the target group and a third member identifier of the member; Determine a target shard index corresponding to the member according to the first member identifier of the member and the total number of shards corresponding to the plurality of second storage nodes; A second member identifier of the member is generated based on the second group identifier, the target shard index of the member, and the third member identifier.

5. The method according to claim 4, characterized in that The second group identifiers of different groups are continuous digital codes, and the third member identifiers of each member in the target group are continuous digital codes; For any member, the second member identifier of the member is a binary coded identifier, wherein, in order from high to low, the binary coded identifiers corresponding to the member include: The binary representation of the first set number of bits corresponding to the second group identifier of the target group, the binary representation of the second set number of bits corresponding to the target shard index of the member, and the binary representation of the third set number of bits corresponding to the third member identifier of the member.

6. The method according to any one of claims 1 to 5, characterized in that The service processing request includes a group sending request of a target message, and determining the member size of the target group according to the group basic information of the target group, and processing the service processing request according to the member size of the target group includes: If the number of members of the target group is less than a second threshold, the target group is determined to be a set small group, and based on the first group identifier, member information of each member in the target group is obtained; for each member, information to be pushed corresponding to the member is generated according to the member information and the target message, so that the first push server pushes the target message to the member based on the information to be pushed corresponding to the member; If the number of members of the target group is greater than or equal to the second threshold and less than the first threshold, the target group is determined to be a set large group, and information to be pushed corresponding to the target group is generated, so that the second push server obtains member information of all members in the target group according to the first group indication information in the information to be pushed, and pushes the target message in the information to be pushed to each member according to the member information of each member; If the number of members of the target group is greater than or equal to the first threshold, the target group is determined to be a set extra large group, the number of groups corresponding to the target group is determined according to the number of members, and a corresponding number of group indexes are generated, wherein each of the group indexes corresponds to some members of the target group, different group indexes correspond to different members, and each of the group indexes corresponds to at least one shard; For each of the grouping indexes, based on the target message and the grouping index, the information to be pushed corresponding to the grouping index is generated, so that the third server to be pushed can send the information to the target message based on the information to be pushed. The second group indication information in the target group is used to obtain the member information of each member corresponding to the group index in the target group, and according to the member information of each member, the target message in the information to be pushed corresponding to the group index is pushed to each member.

7. The method according to claim 6, characterized in that The values ​​of the grouping indexes corresponding to the target group are 0, 1, 2, ..., N-1, respectively, where N is the number of groups, and N-1 is the Nth grouping index. For any grouping index, the member information of each member corresponding to the grouping index is obtained in the following manner: The lower and upper limits of the second member identifier corresponding to the group index are determined by the following expressions: Identification lower limit = NewGroupCode<<(shardShift+shardIndexBit)+((PushShardIndex*(2shardIndexBit / ShardNum))< <shardShift); Upper limit of identification=NewGroupCode<<(shardShift+shardIndexBit)+(((PushShardIndex+1)*(2shardIndexBit / ShardNum))< <shardShift); Wherein, NewGroupCode is the binary representation of the second group identifier, PushShardIndex represents the value of the group index, shardIndexBit is the second set bit number, shardShift is the third set bit number, and ShardNum=N; According to the identification lower limit and identification upper limit of the second member identifier corresponding to the grouping index, the member information of each member whose second member identifier is within the identification lower limit and identification upper limit is obtained, and the member information of each member obtained is the member information of each member corresponding to the grouping index.

8. The method according to any one of claims 1 to 5, characterized in that The service processing request includes a group sending request of a target message, and the processing of the service processing request according to the size of members of the target group includes: If the number of members of the target group is less than a third threshold, the target group is determined to be a set small group, member information of each member in the target group is obtained, and for each member in the target group, information to be pushed corresponding to the member and containing the target message is generated according to the member information of the member, so that the fourth push server pushes the target message to the member based on the information to be pushed; If the number of members of the target group is greater than or equal to the third threshold, the target group is determined to be a non-set small group, and information to be pushed corresponding to the target group is generated, so that the fifth push server obtains the member information of each member in the target group based on the third group indication information in the information to be pushed, and pushes the target message in the information to be pushed to each member according to the member information of each member.

9. The method according to any one of claims 6 to 8, characterized in that: The obtaining of member information of each member in the target group includes: If the member information of each member in the target group exists in the local cache, obtaining the member information of each member in the target group from the local cache; If the member data of each member in the target group does not exist in the local cache, the member data of each member in the target group is obtained from the target storage node storing the member data of each member in the target group, and the obtained member data is cached in the local cache.

10. The method according to any one of claims 1 to 8, characterized in that: The step of determining, according to the first group identifier, a target service node that caches the group basic data of the target group from a plurality of second service nodes in the group logic layer includes: According to the first group identifier, the first A first mapping identifier corresponding to the group identifier; Acquire a second mapping identifier of each of the plurality of second service nodes, wherein the second mapping identifier of each of the second service nodes is determined according to a node identifier of the second service node through a preconfigured target mapping rule; The target service node is determined from the plurality of second service nodes according to a matching degree between the first mapping identifier and the second mapping identifiers of each of the second service nodes.

11. A data processing system, characterized in that: The system comprises at least one first service node of a group forwarding layer, and a plurality of second service nodes of a group logic layer communicatively connected to the at least one first service node, wherein for any group, some of the plurality of second service nodes cache group basic data of the group, and each of the second service nodes is associated with a first group identifier of at least one group; The first service node is configured to receive a service processing request related to a target group from an access layer, determine a target service node that has cached group basic data of the group from among the plurality of second service nodes according to a first group identifier of the target group included in the service processing request, and send the service processing request to the target service node; The second service node is used to receive the service processing request sent by the first service node, determine the member size of the target group according to the group basic information of the target group, and process the service processing request according to the member size of the target group.

12. A data processing device, characterized in that: The device is arranged in a first service node of a group forwarding layer, and comprises: A request receiving module, configured to obtain a service processing request related to a target group from an access layer, wherein the service processing request includes a first group identifier of the target group; a target node determination module, configured to determine a target node from the group logic layer according to the first group identifier; Determining a target service node that caches the group basic data of the target group from among the plurality of second service nodes, wherein the target service node is a part of the plurality of second service nodes; The request forwarding module is used to send the business processing request to the target service node, so that the target service node determines the member size of the target group according to the group basic information of the target group, and processes the business processing request according to the member size of the target group.

13. An electronic device, characterized in that: The electronic device comprises a memory and a processor, wherein a computer program is stored in the memory, and the processor executes the method according to any one of claims 1 to 10 when running the computer program.

14. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 10 is implemented.

Citation Information

Patent Citations

  • Group joining method and device, storage medium and computer equipment

    CN112994906A

  • Group creating method and device

    CN113259139A

  • Group information processing method and device, equipment and medium

    CN115022106A

  • Data processing method, system and device, electronic equipment and storage medium

    CN116980241A

  • Automatic server cluster discovery

    US20190124162A1