Member information updating method and device

The server determines the update data type based on the version number and characteristic value matching results and sends it to the client, which solves the problem of traffic waste and low efficiency in updating group chat member information, improves update efficiency and adaptability, and avoids the need for client data Dirty.

CN115589343BActive Publication Date: 2024-09-10TENCENT TECH (CHENGDU) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110756863.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-05
Publication Date
2024-09-10
Estimated Expiration
2041-07-05

AI Technical Summary

Technical Problem

When updating group chat member information in the existing technology, client traffic is seriously wasted and the update efficiency is low.

Method used

The server determines the member information version number and characteristic value of the target group, determines the type of update data (full update or incremental update) based on the matching result of the version number and characteristic value, and sends the type identification to the client. The client Select the update method to update local member information based on the identification.

Benefits of technology

It reduces the probability of the client pulling all member information, alleviates the problems of traffic waste and low update efficiency, improves the adaptability and efficiency of member information updates, and avoids the client retaining dirty data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115589343B
    Figure CN115589343B
Patent Text Reader

Abstract

The present application discloses a member information update method and device. The method includes: in response to a member information update request indicating a target group sent by a client, determining a first version number and a first characteristic value of the first local member information indicating the target group; determining the update data to be returned and the type of the update data based on the version number matching results for the first version number and the second version number and the characteristic value matching results for the first characteristic value and the second characteristic value; sending update data carrying a type identifier to the client, so that the client determines the corresponding update method according to the type identifier, and updates the second local member information based on the update method and the update data. This can reduce the probability of the client pulling the full amount of member information, thereby alleviating the situation of serious traffic waste and low update efficiency. The application of the type of update data can improve the adaptability and efficiency of the client in updating member information in the face of the received update data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of Internet communication technology, and in particular to a member information updating method and device. Background Art

[0002] With the rapid development of Internet technology, Internet products provide group chat functions to enrich users' communication methods. Group chat functions involve group creation, message sending and receiving, etc. Different members can use corresponding clients to experience group chat, and the server can provide corresponding background services for these clients. For example, member AD is a member of a group, member A sends a group message through the client, and member BD reads the group message through the corresponding client with the help of the server.

[0003] As new members join or members leave, the membership of the group changes accordingly. In related technologies, for the update of member information, the client and the server often agree on a full update method, that is, in response to a member information update request of group A sent by the client, the server sends the full member information of group A currently stored to the client, and the client uses the received full member information to overwrite the local member information indicating group A. However, this often results in serious waste of client traffic and low update efficiency. Summary of the invention

[0004] In order to solve the problems of serious client traffic waste and low update efficiency when updating member information in the existing technology, the present application provides a member information update method and device:

[0005] According to a first aspect of the present application, a member information updating method is provided, the method comprising:

[0006] In response to a member information update request indicating a target group sent by a client, determine a first version number and a first characteristic value of first local member information indicating the target group; wherein the member information update request carries a second version number and a second characteristic value, the second version number and the second characteristic value represent second local member information indicating the target group stored in the client, and the first characteristic value and the second characteristic value are respectively obtained by calculating the corresponding local member information using the same preset algorithm;

[0007] Based on the version number matching results for the first version number and the second version number and the feature value matching results for the first feature value and the second feature value, determine the update data to be returned and the type of the update data; wherein the type is a full update type or an incremental update type;

[0008] Sending update data carrying the type identifier to the client, so that the client determines a corresponding update method according to the type identifier, and updates the second local member information based on the update method and the update data.

[0009] According to a second aspect of the present application, a member information updating method is provided, the method comprising:

[0010] Sending a member information update request indicating a target group to a server; wherein the member information update request carries a second version number and a second characteristic value, and the second version number and the second characteristic value represent second local member information indicating the target group;

[0011] Receive update data carrying a type identifier returned by the server; wherein the type is a full update type or an incremental update type, the update data and the type identifier are determined by the server based on a version number matching result for a first version number and a second version number and a feature value matching result for a first feature value and a second feature value, the first version number and the first feature value are determined by the server in response to the member information update request, the first version number and the first feature value represent first local member information indicating the target group stored in the server, and the first feature value and the second feature value are respectively obtained by calculating the corresponding local member information using the same preset algorithm;

[0012] A corresponding update method is determined according to the type identifier, and the second local member information is updated based on the update method and the update data.

[0013] According to a third aspect of the present application, a member information updating device is provided, the device comprising:

[0014] A response module: used to respond to a member information update request indicating a target group sent by a client, and determine a first version number and a first characteristic value of first local member information indicating the target group; wherein the member information update request carries a second version number and a second characteristic value, the second version number and the second characteristic value represent the second local member information indicating the target group stored in the client, and the first characteristic value and the second characteristic value are respectively obtained by calculating the corresponding local member information using the same preset algorithm;

[0015] A determination module: used to determine the update data to be returned and the type of the update data based on the version number matching result for the first version number and the second version number and the feature value matching result for the first feature value and the second feature value; wherein the type is a full update type or an incremental update type;

[0016] Return module: used for sending update data carrying the identification of the type to the client, so that the client determines the corresponding update method according to the identification of the type, and updates the second local member information based on the update method and the update data.

[0017] According to a fourth aspect of the present application, a member information updating device is provided, the device comprising:

[0018] A sending module: used for sending a member information update request indicating a target group to a server; wherein the member information update request carries a second version number and a second characteristic value, and the second version number and the second characteristic value represent second local member information indicating the target group;

[0019] A receiving module: used for receiving update data carrying a type identifier returned by the server; wherein the type is a full update type or an incremental update type, and the update data and the type identifier are determined by the server based on a version number matching result for a first version number and a second version number and a feature value matching result for a first feature value and a second feature value, wherein the first version number and the first feature value are determined by the server in response to the member information update request, wherein the first version number and the first feature value represent first local member information indicating the target group stored in the server, and the first feature value and the second feature value are respectively obtained by calculating the corresponding local member information using the same preset algorithm;

[0020] Update module: used to determine the corresponding update method according to the type identification, and update the second local member information based on the update method and the update data.

[0021] According to the fifth aspect of the present application, an electronic device is provided, comprising a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the member information update method described in the first aspect or the member information update method described in the second aspect.

[0022] According to the sixth aspect of the present application, a computer-readable storage medium is provided, in which at least one instruction or at least one program is stored, and the at least one instruction or the at least one program is loaded and executed by a processor to implement the member information update method described in the first aspect or the member information update method described in the second aspect.

[0023] According to a seventh aspect of the present application, a computer program product or a computer program is provided, the computer program product or the computer program comprising computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the member information updating method described in the first aspect or the member information updating method described in the second aspect.

[0024] The member information updating method and device provided by the present application have the following technical effects:

[0025] The present application determines the first version number and the first characteristic value of the first local member information indicating the target group through the server; then determines the update data to be returned and the type of the update data based on the version number matching results for the first version number and the second version number and the characteristic value matching results for the first characteristic value and the second characteristic value; thereby sending the update data carrying the identifier of the type to the client, so that the client determines the corresponding update method according to the identifier of the type, and updates the second local member information indicating the target group based on the update method and the update data. Among them, the second version number and the second characteristic value are carried by the member information update request indicating the target group sent by the client, the second version number and the second characteristic value indicate the second local member information, the first characteristic value and the second characteristic value are respectively calculated using the same preset algorithm to obtain the corresponding local member information, and the type of the update data is a full update type or an incremental update type. In the member information update scheme provided by the present application, the server uses the version number matching results and the characteristic value matching results to determine the update data to be returned and the type of the update data (full update type or incremental update type), and then guides the client to select the corresponding update method to update the member information. The server determines whether to send the full member information based on the matching results, which can reduce the probability of the client pulling the full member information, thereby alleviating the serious waste of traffic and low update efficiency. The application of the type of updated data can improve the adaptability and efficiency of the client in updating member information in the face of the received update data. The eigenvalue matching results of the first eigenvalue and the second eigenvalue can effectively detect whether the local member information currently stored by the client is dirty data, which can be used as a reference for the server to determine the updated data to be returned, so as to avoid the situation where the corresponding update data is not sent in time and the client continues to retain dirty data. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present application or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0027] Figure 1 is a schematic diagram of an application environment provided by an embodiment of the present application;

[0028] Figure 2 It is a flowchart of a member information updating method provided in an embodiment of the present application;

[0029] Figure 3 This is a schematic diagram of determining a first characteristic value indicating first local member information of a target group provided by an embodiment of the present application;

[0030] Figure 4 It is a schematic diagram of determining the update data to be returned and the type of the update data provided by an embodiment of the present application;

[0031] Figure 5 It is also a flow chart of a method for updating member information provided by an embodiment of the present application;

[0032] Figure 6 It is a schematic diagram of the architecture of the member information updating system provided in the embodiment of the present application;

[0033] Figure 7 It is a block diagram of a member information updating device provided in an embodiment of the present application;

[0034] Figure 8 This is a schematic diagram of a blockchain system provided by an embodiment of the present application;

[0035] Fig. 9 It is a schematic diagram of a block structure provided in an embodiment of the present application;

[0036] Fig.10 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0037] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0038] It should be noted that the terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0039] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.

[0040] Group chat: a chat method in which multiple people can participate at the same time.

[0041] Full update: For each query request from the client, the server queries the full data and returns it, and the client uses the full data to overwrite the local data.

[0042] Incremental update: For client query requests, the server only queries the difference between the client version and the server version each time to determine the incremental data and return it. The client updates the local data based on the incremental data corresponding to this difference.

[0043] See also Figure 1 , Figure 1 1 is a schematic diagram of an application environment provided by an embodiment of the present application, and the application environment may include a client 10 and a server 20. The client 10 and the server 20 may be directly or indirectly connected via wired or wireless communication. The client 10 sends a member information update request indicating a target group to the server 20, and the server 20 responds to the request to determine the update data to be returned and sends it to the client 10, and the client 10 updates the local member information based on the update data. It should be noted that Figure 1 Just an example.

[0044] The client 10 may include physical devices such as smart phones, desktop computers, tablet computers, laptop computers, augmented reality (AR) / virtual reality (VR) devices, digital assistants, smart speakers, smart wearable devices, etc., and may also include software running in physical devices, such as computer programs. The operating system corresponding to the client may include Android system (Android system), IOS system (a mobile operating system developed by Apple), Linux (an operating system), Microsoft Windows (Microsoft Windows operating system), etc.

[0045] The server 20 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. The server can include a network communication unit, a processor, a memory, etc. The server can provide background services for the corresponding client.

[0046] In actual applications, the client and the server can jointly serve Internet products that provide group chat functions, and the Internet products can be instant messaging products, online office products, game products, navigation products, live broadcast products, etc.

[0047] The following describes a specific embodiment of a member information updating method of the present application. Figure 2 It is a flow chart of a member information update method provided in an embodiment of the present application. The present application provides method operation steps as described in the embodiment or flow chart, but may include more or fewer operation steps based on conventional or non-creative labor. The order of steps listed in the embodiment is only one way of executing the steps among many orders, and does not represent the only order of execution. When the actual system or product is executed, it can be executed in sequence or in parallel (for example, in a parallel processor or multi-threaded processing environment) according to the method shown in the embodiment or the accompanying drawings. Specifically, Figure 2 As shown, the method may include:

[0048] S201: The client sends a member information update request indicating a target group to the server; wherein the member information update request carries a second version number and a second characteristic value, and the second version number and the second characteristic value represent second local member information indicating the target group;

[0049] In an embodiment of the present application, the client sends a member information update request indicating a target group to the server. The member information update request carries a second version number and a second characteristic value, and the second version number and the second characteristic value represent the second local member information indicating the target group. The second local member information is the member information indicating the target group stored locally by the current client, such as the user identifiers and nicknames of the members 1-5 of group A. Since the member composition of the group also changes accordingly with the addition of new members and the withdrawal of members, an increasing record version number is set according to the time sequence of the changes. The second version number is used to describe the current version of the second local member information stored in the client. Since the second local member information contains relevant information about the constituent members, and the data types of this information (such as the user identifier is a numeric type and the nickname is a character type) may be different, and this information is relatively discrete based on the dimension of the constituent members, the second characteristic value is used to represent the second local member information, and a specific characterization value is used as the characteristic expression of the second local member information, so that it is convenient to judge the consistency between the first local information (corresponding to the server) and the second local information, so that the judgment efficiency is higher. In addition, since the member information update request indicates the target group, it can also be understood that the member information update request carries the target group identifier (group id).

[0050] In actual applications, the member information update request can be triggered by the target object (such as a user, a simulator) to the client via the interactive interface provided by the client. Considering the viewing authority for group members, the target object needs to have the identity of a member of the target group.

[0051] S202: The server determines a first version number and a first characteristic value indicating first local member information of the target group; wherein the first characteristic value and the second characteristic value are respectively obtained by calculating corresponding local member information using the same preset algorithm;

[0052] In an embodiment of the present application, the server receives a member information update request indicating a target group, thereby determining a first version number and a first characteristic value of the first local member information indicating the target group. The first version number and the first characteristic value represent the first local member information indicating the target group. The first local member information is the constituent member information of the target group currently stored locally by the server. For the "first local member information", "first version number" and "first characteristic value", please refer to the relevant records of the "second local member information", "second version number" and "second characteristic value" in the aforementioned step S201, which will not be repeated here. It should be noted that the first characteristic value and the second characteristic value are respectively obtained by calculating the corresponding local member information using the same preset algorithm. That is, the server uses a preset algorithm to calculate the first local member information to obtain the first characteristic value, and the client uses the same preset algorithm to calculate the second local member information to obtain the second characteristic value.

[0053] As new members join or members leave, the server can calculate the first eigenvalue in real time, and then obtain the calculated first eigenvalue when receiving a member information update request; the server can also calculate the first eigenvalue after receiving a member information update request. The client can calculate the second eigenvalue after the last local member information update, and then obtain the calculated second eigenvalue when a member information update request needs to be sent; the client can also calculate the second eigenvalue before sending a member information update request. The following will introduce two implementation methods of the server using a preset algorithm to calculate the first local member information to obtain the first eigenvalue:

[0054] 1) When the first local member information includes characteristic information of multiple members, first, the characteristic information of the multiple members is concatenated to obtain a characteristic information sequence; then, a hash value corresponding to the characteristic information sequence is determined using a preset hash function, and the hash value is used as the first characteristic value.

[0055] The first local member information includes characteristic information of multiple members, and the characteristic information of each member can indicate the user identification and / or nickname of the member. The characteristic information of multiple members can be spliced ​​together to obtain a characteristic information sequence, for example, the characteristic information of multiple members includes user identification 1 (corresponding to member 1), user identification 2 (corresponding to member 2), user identification 3 (corresponding to member 3), user identification 4 (corresponding to member 4) and user identification 5 (corresponding to member 5). If these user identifications are all numerical, then the spliced ​​characteristic information sequence is a string of numbers. For example, the characteristic information of multiple members includes nicknames of members 1-5. If these nicknames are all character-type, then the spliced ​​characteristic information sequence is a string of characters. Of course, the characteristic information of multiple members can also include user identifications and nicknames of members 1-5. It should be noted that if the server uses a preset hash function to determine the hash value corresponding to the characteristic information sequence indicating the first local member information, then the client also uses a preset hash function to determine the hash value corresponding to the characteristic information sequence indicating the second local member information. The preset hash functions used are also the same, for example, both use the MD5 information digest algorithm. The client obtains the characteristic information sequence indicating the second local member information in the same manner as the server obtains the characteristic information sequence indicating the first local member information. The sorting order used is also the same, for example, both use the time sequence of members joining the group and both use the ascending order of the member's user identification indication value.

[0056] Here, the preset (password) hash function is used as the preset algorithm, and the preset (password) hash function can specifically be the MD5 information digest algorithm. The hash value obtained based on the characteristic information sequence and the preset hash function can be used as a unique identifier of the characteristic information sequence, and can also be used as a valid identifier of the first local member information. The first characteristic value can be obtained stably and quickly using the preset hash function. At the same time, the uniqueness of the first characteristic value for the characteristic information sequence can be used as the basis for judging the consistency between the first local information and the second local information (corresponding to the client), providing accurate and reliable judgment parameters.

[0057] 2) When the first local member information includes characteristic information of multiple members, first determine the reference value corresponding to the characteristic information of each member in the characteristic information of the multiple members; then, perform an XOR operation on the reference value corresponding to the characteristic information of each member in the characteristic information of the multiple members, and use the result of the XOR operation as the first characteristic value.

[0058] The first local member information includes characteristic information of multiple members, and the characteristic information of each member may indicate the user ID and / or nickname of the member. The reference value corresponding to the characteristic information of each member may be determined according to a preset conversion rule. If the data type of the characteristic information is a numeric type, then the characteristic information may be used and converted to binary to obtain a reference value, such as converting 3 to a reference value of 0011, 1 to a reference value of 0001, and 4 to a reference value of 0100. If the data type of the characteristic information is a character type, then its data type may be first converted to a numeric type, and then converted to binary to obtain a reference value.

[0059] Here, the XOR algorithm is used as the preset algorithm. In the XOR operation, if the numbers on the corresponding positions of the two reference values ​​are the same, the XOR result here is 0, and if they are different, the XOR result here is 1. For example, the XOR operation is performed on the reference values ​​0001, 0011 and 0100, then 0001xor0011=0010, 0001xor0011xor0100=0110. The XOR operation result 0110 (or its corresponding decimal value 6) can be used as the first characteristic value. It should be noted that if the server uses the XOR algorithm to determine the first characteristic value, the client also uses the XOR algorithm to determine the second characteristic value. Among them, the way the client determines the reference value corresponding to the characteristic information of each member is also the same as the way the server determines the reference value corresponding to the characteristic information of each member. The use of the XOR algorithm here uses the XOR operation result as the characteristic expression of the first / second local member information, which ensures that the first / second characteristic value will not cause a large amount of data due to the local member information indicating more members, thereby improving the efficiency of the server in matching characteristic values.

[0060] In an exemplary embodiment, Figure 3 As shown, the determining a first characteristic value indicating first local member information of the target group includes:

[0061] S301: Determine a first member information sequence corresponding to the first local member information based on a preset sorting rule;

[0062] S302: extract at least two member information separated from each other from the first member information sequence according to a specified extraction rule; wherein the specified extraction rule is determined by the server based on the last member information update request of the client and sent to the client, the specified extraction rule instructs the client to extract the member information to be calculated from the second member information sequence to calculate using the preset algorithm, and the second member information sequence is determined by the client based on the preset sorting rule and the second local member information;

[0063] S303: Calculate the at least two member information using the preset algorithm to obtain the first feature value.

[0064] For local member information containing information of multiple members, it is more efficient to determine the feature value using the information of some members than using the information of all members to determine the feature value, especially for scenarios with more group members. At the same time, considering that the second feature value indicating the second local member information determined by the client and the first feature value indicating the first local member information determined by the server need to be based on the same calculation rules, the extraction of some members' information is limited by presetting sorting rules and specifying extraction rules. In order to avoid the possibility of long-term unchanged sequence segments in the sequence, the extraction rule is specified to indicate the interval extraction method, which can ensure that the information of some members extracted can reflect the situation of each sequence segment of the sequence, thereby ensuring that the feature value determined thereby is an effective expression of the local member information.

[0065] Exemplarily, the first local member information has user identifiers of members 1-5, and the first member information sequence obtained by sorting according to the chronological order of the members joining the group is: user identifier 1 (corresponding to member 1) -> user identifier 2 (corresponding to member 2) -> user identifier 3 (corresponding to member 3) -> user identifier 4 (corresponding to member 4) -> user identifier 5 (corresponding to member 5). According to the specified extraction rule, at least two member information separated from each other are extracted from the first member information sequence: user identifier 1 and user identifier 5, and the extraction interval in the specified extraction rule is 3 (information of members). The user identifier 1 and user identifier 5 are calculated using a preset algorithm to obtain a first characteristic value. The preset algorithm here can be the preset (cryptographic) hash function or XOR algorithm recorded above, which will not be repeated here. It should be noted that the specified extraction rule is determined by the server based on the client's last member information update request and sent to the client, and the calculation of the second characteristic value carried in the member information update request sent by the client this time uses the specified extraction rule. As for the preset algorithm and preset sorting rule agreed upon by the server and the client, they can also be adjusted as needed, but it is necessary to ensure that the server and the client use the same preset algorithm and the same preset sorting rule.

[0066] As new members join and members leave, the group's membership composition also changes accordingly. For scenarios where group members change frequently, the server can calculate the first eigenvalue based on a preset time interval to avoid consumption of computing resources caused by real-time calculations, and to avoid wasted calculations when there is no member information update request to respond to. When a member information update request is received from a client, the most recently calculated first eigenvalue in the "preset time interval" mode can be obtained for eigenvalue matching, or the latest first eigenvalue can be calculated for eigenvalue matching.

[0067] Further, in response to the member information update feedback for the client, when the member information update feedback indicates an abnormality, the extraction interval in the specified extraction rule determined based on the next member information update request of the client is reduced. In order to take into account the efficiency and accuracy of the characteristic value calculation, the extraction interval in the specified extraction rule can be adjusted according to the feedback. For example, according to the feedback, it is known that the calculation of the characteristic value causes the computing resource consumption of the server to exceed the threshold, then the extraction interval in the specified extraction rule determined based on the next member information update request of the client can be enlarged, such as enlarging the extraction interval in the specified extraction rule from 3 (member information) to 5 (member information). When the member information update feedback indicates an abnormality, the extraction interval in the specified extraction rule determined based on the next member information update request of the client can be reduced, such as enlarging the extraction interval in the specified extraction rule from 3 (member information) to 2 (member information). The member information update feedback can be sent by the client. The member information update feedback indicates an exception. The first characteristic value fails to accurately express the first local member information and / or the second characteristic value fails to accurately express the second local member information. For example, the first local member information and the second local member information are obviously different, but the information of the members extracted at intervals happens to be the same, causing the server to believe that the characteristic value match is successful and there is no need to send the full member information to the client.

[0068] In an exemplary embodiment, the member information update request carries a target member identifier (user ID) and a group identifier (group ID) indicating the target group. Before determining the first version number and the first characteristic value of the first local member information indicating the target group, the method also includes the following steps: first, determining whether the group identifier exists in the first preset identifier list, and determining whether the target member identifier exists in the second preset identifier list; then, when the group identifier exists in the first preset identifier list and the target member identifier exists in the second preset identifier list, determining whether the target member identifier has a preset association relationship with the group identifier; finally, when the preset association relationship exists, triggering the step of determining the first version number and the first characteristic value of the first local member information indicating the target group.

[0069] The existence judgment and the preset association judgment involved here can be used as the legitimacy check for member information update requests. For example, if the target member ID and the group ID do not have a preset association, it means that the user is not in the group and has no pull capability. Based on the legitimacy check, illegal requests can be effectively filtered out to avoid the server's response speed to legal requests being reduced due to responding to illegal requests, which can ensure the efficiency of the client's member information update and the user experience.

[0070] In practical applications, see Figure 6 The access layer can be used to verify whether the login is normal and whether the user's related parameters are correct. The group service module can be used to verify the legitimacy of the user ID and the group ID, so as to determine whether to initiate a query request to the group storage database.

[0071] S203: The server determines the update data to be returned and the type of the update data based on the version number matching results for the first version number and the second version number and the feature value matching results for the first feature value and the second feature value; wherein the type is a full update type or an incremental update type;

[0072] In an embodiment of the present application, the server determines the update data to be returned and the type of the update data based on the version number matching results for the first version number and the second version number and the feature value matching results for the first feature value and the second feature value. The version number matching result generally has the situation that the first version number is greater than the second version number and the first version number is equal to the second version number. The feature value matching result has the situation that the first feature value is equal to the second feature value and the first feature value is not equal to the second feature value. The update data can indicate the full member information (all of the first member information) or the incremental member information (the part of the first member information that indicates the version number difference). Accordingly, the type of the former is the full update type, and the type of the latter is the incremental update type.

[0073] In an exemplary embodiment, Figure 4 As shown, the determining the update data to be returned and the type of the update data based on the version number matching result for the first version number and the second version number and the feature value matching result for the first feature value and the second feature value includes:

[0074] S401: Match the first version number and the second version number;

[0075] S402: When the version number matching result indicates that the first version number is greater than the second version number, determining first update data indicating a difference between the first version number and the second version number from the first local member information, and determining that a type of the first update data is an incremental update type;

[0076] S403: When the version number matching result indicates that the first version number is equal to the second version number, the first feature value and the second feature value are matched; and when the feature value matching result indicates that the first feature value is not equal to the second feature value, the first local member information is used as the second update data and the type of the second update data is determined to be a full update type.

[0077] The server can first match the version numbers. If there is a difference between the two version numbers, the server can determine the first update data indicating the difference between the first version number and the second version number from the first local member information, and determine that the type of the first update data is an incremental update type. If there is no difference between the two version numbers, feature value matching is performed. If the two feature values ​​are different, the first local member information is used as the second update data, and the type of the second update data is determined to be a full update type; otherwise, there is no need to return update data to the client. If the first version number is greater than the second version number, it means that the member composition of the target group has changed between the client's last member information update request and this member information update request. Therefore, the client can synchronize local member information based on incremental updates. Pulling incremental member information can reduce traffic consumption and increase the success rate of downloading update data. The first version number is equal to the second version number and the first characteristic value is not equal to the second characteristic value, which means that the member composition of the target group has not changed between the last member information update request and the current member information update request of the client. However, the second local information may become dirty data due to data errors or failure to update local data and is inconsistent with the first local information. Therefore, the client can synchronize local member information based on a full update method, clean up dirty data in time, and effectively avoid the situation where the server fails to send the corresponding update data in time and the client continues to retain dirty data.

[0078] The member information update solution provided by this application allows the client to quickly switch between incremental updates and full updates through background control, thereby achieving a smoother upgrade migration. In actual applications, the client can synchronize the changes in the group's membership composition in a timely manner. For users, it is not possible to perceive whether the local member information is synchronized by full update or incremental update.

[0079] S204: The server sends update data carrying the type identifier to the client;

[0080] In an embodiment of the present application, the server sends update data carrying the identifier of the type to the client. The server may send full member information carrying the identifier of the full update type to the client. The server may also send incremental member information carrying the identifier of the incremental update type to the client.

[0081] S205: The client determines a corresponding update method according to the type identifier, and updates the second local member information based on the update method and the update data.

[0082] In an embodiment of the present application, the client determines the corresponding update method according to the identifier of the type, and updates the second local member information based on the update method and the update data. The identifier of the full update type indicates the full update method, which guides the client to overwrite the original local member information with the full member information. The identifier of the incremental update type indicates the incremental update method, which guides the client to compare the incremental member information with the original local member information for updating. For example, if the nickname of member 3 is found to have changed after comparison, the original nickname is replaced with the new nickname.

[0083] It can be seen from the technical solution provided by the above embodiment of the present application that in the embodiment of the present application, the server uses the version number matching result and the feature value matching result to determine the update data to be returned and the type of the update data (full update type or incremental update type), and then guides the client to select the corresponding update method to update the member information. The server determines whether to send the full member information based on the matching result, which can reduce the probability of the client pulling the full member information, thereby alleviating the situation of serious traffic waste and low update efficiency. The application of the type of update data can improve the adaptability and efficiency of the client in updating the member information in the face of the received update data. Under the premise of ensuring the update speed, the accuracy of the update data is also guaranteed, and the user experience is improved. For the feature value matching results of the first feature value and the second feature value, it can effectively detect whether the local member information currently stored by the client is dirty data, so as to serve as a reference for the server to determine the update data to be returned, so as to avoid the situation where the corresponding update data is not sent in time and the client continues to retain dirty data.

[0084] The following takes the server as the execution subject, such as Figure 5 As shown, a member information updating method provided by an embodiment of the present application is introduced, and the method includes:

[0085] S501: In response to a member information update request indicating a target group sent by a client, determine a first version number and a first characteristic value of first local member information indicating the target group; wherein the member information update request carries a second version number and a second characteristic value, the second version number and the second characteristic value represent second local member information indicating the target group stored in the client, and the first characteristic value and the second characteristic value are respectively obtained by calculating the corresponding local member information using the same preset algorithm;

[0086] S502: Determine the update data to be returned and the type of the update data based on the version number matching results for the first version number and the second version number and the feature value matching results for the first feature value and the second feature value; wherein the type is a full update type or an incremental update type;

[0087] S503: Send update data carrying the type identifier to the client, so that the client determines a corresponding update method according to the type identifier, and updates the second local member information based on the update method and the update data.

[0088] The present application also provides a member information updating device. Figure 7 As shown, the member information updating device 700 includes:

[0089] Response module 701: used to respond to a member information update request indicating a target group sent by a client, and determine a first version number and a first characteristic value of first local member information indicating the target group; wherein the member information update request carries a second version number and a second characteristic value, the second version number and the second characteristic value represent the second local member information indicating the target group stored in the client, and the first characteristic value and the second characteristic value are respectively obtained by calculating the corresponding local member information using the same preset algorithm;

[0090] Determining module 702: used to determine the update data to be returned and the type of the update data based on the version number matching result for the first version number and the second version number and the feature value matching result for the first feature value and the second feature value; wherein the type is a full update type or an incremental update type;

[0091] Return module 703: used for sending update data carrying the type identifier to the client, so that the client determines the corresponding update method according to the type identifier, and updates the second local member information based on the update method and the update data.

[0092] It should be noted that the device in the device embodiment and the method embodiment are based on the same inventive concept.

[0093] The following describes a method for updating member information provided by an embodiment of the present application, taking the client as the execution subject. The method includes:

[0094] Sending a member information update request indicating a target group to a server; wherein the member information update request carries a second version number and a second characteristic value, and the second version number and the second characteristic value represent second local member information indicating the target group;

[0095] Receive update data carrying a type identifier returned by the server; wherein the type is a full update type or an incremental update type, the update data and the type identifier are determined by the server based on a version number matching result for a first version number and a second version number and a feature value matching result for a first feature value and a second feature value, the first version number and the first feature value are determined by the server in response to the member information update request, the first version number and the first feature value represent first local member information indicating the target group stored in the server, and the first feature value and the second feature value are respectively obtained by calculating the corresponding local member information using the same preset algorithm;

[0096] A corresponding update method is determined according to the type identifier, and the second local member information is updated based on the update method and the update data.

[0097] The present application also provides a member information updating device, the device comprising:

[0098] A sending module: used for sending a member information update request indicating a target group to a server; wherein the member information update request carries a second version number and a second characteristic value, and the second version number and the second characteristic value represent second local member information indicating the target group;

[0099] A receiving module: used for receiving update data carrying a type identifier returned by the server; wherein the type is a full update type or an incremental update type, and the update data and the type identifier are determined by the server based on a version number matching result for a first version number and a second version number and a feature value matching result for a first feature value and a second feature value, wherein the first version number and the first feature value are determined by the server in response to the member information update request, wherein the first version number and the first feature value represent first local member information indicating the target group stored in the server, and the first feature value and the second feature value are respectively obtained by calculating the corresponding local member information using the same preset algorithm;

[0100] Update module: used to determine the corresponding update method according to the type identification, and update the second local member information based on the update method and the update data.

[0101] It should be noted that the device in the device embodiment and the method embodiment are based on the same inventive concept.

[0102] The member information update system involved in the embodiment of the present application can be a distributed system formed by connecting a client and multiple nodes (any form of computing devices in the access network, such as a server and a user terminal) through network communication.

[0103] Take the distributed system as the blockchain system as an example, see Figure 8 , Figure 8 This is an optional structural diagram of the distributed system 100 provided in the embodiment of the present application applied to the blockchain system, which is formed by multiple nodes (any form of computing devices in the access network, such as servers, user terminals) and clients, and the nodes form a peer-to-peer (P2P, Peer ToPeer) network. The P2P protocol is an application layer protocol running on the Transmission Control Protocol (TCP, Transmission Control Protocol) protocol. In a distributed system, any machine such as a server or a terminal can join and become a node, and the node includes a hardware layer, an intermediate layer, an operating system layer, and an application layer.

[0104] See also Figure 8 The functions of each node in the blockchain system shown include:

[0105] 1) Routing: a basic function of a node, used to support communication between nodes.

[0106] In addition to the routing function, the node can also have the following functions:

[0107] 2) Applications are deployed in the blockchain to implement specific businesses based on actual business needs, record data related to the implementation of functions to form record data, carry digital signatures in the record data to indicate the source of the task data, and send the record data to other nodes in the blockchain system for other nodes to add the record data to a temporary block when they successfully verify the source and integrity of the record data.

[0108] For example, the services implemented by the application include:

[0109] 2.1) Wallet, used to provide the function of conducting electronic currency transactions, including initiating transactions (i.e., sending the transaction record of the current transaction to other nodes in the blockchain system. After the other nodes successfully verify the transaction, as a response to acknowledge the validity of the transaction, the transaction record data is stored in the temporary block of the blockchain; of course, the wallet also supports querying the remaining electronic currency in the electronic currency address;

[0110] 2.2) Shared ledger, which is used to provide functions such as storage, query and modification of account data. The record data of the operation on the account data is sent to other nodes in the blockchain system. After other nodes verify the validity, as a response to acknowledging the validity of the account data, the record data is stored in a temporary block, and a confirmation can also be sent to the node that initiated the operation.

[0111] 2.3) Smart contracts are computerized protocols that can execute the terms of a contract. They are implemented by deploying code on a shared ledger that is executed when certain conditions are met. The code is used to complete automated transactions based on actual business needs, such as querying the logistics status of the goods purchased by the buyer and transferring the buyer's electronic currency to the merchant's address after the buyer signs for the goods. Of course, smart contracts are not limited to executing contracts for transactions, but can also execute contracts for processing received information.

[0112] 3) Blockchain, including a series of blocks that are connected to each other in the order of their generation. Once a new block is added to the blockchain, it will not be removed. The block records the record data submitted by the nodes in the blockchain system.

[0113] See also Fig. 9 , Fig. 9 This is an optional schematic diagram of the block structure provided by the embodiment of the present application. Each block includes the hash value of the transaction record stored in this block (the hash value of this block) and the hash value of the previous block. Each block is connected by the hash value to form a blockchain. In addition, the block can also include information such as the timestamp when the block was generated. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains relevant information for verifying the validity of its information (anti-counterfeiting) and generating the next block.

[0114] An embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the member information updating method provided in the above method embodiment.

[0115] Further, Fig.10 The hardware structure diagram of an electronic device for implementing the member information updating method provided in the embodiment of the present application is shown. The electronic device may participate in forming or include the member information updating device provided in the embodiment of the present application. Fig.10As shown, the electronic device 100 may include one or more (1002a, 1002b, ..., 1002n are used to illustrate) processors 1002 (the processor 1002 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 1004 for storing data, and a transmission device 1006 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Fig.10 The structure shown is only for illustration and does not limit the structure of the above electronic device. Fig.10 More or fewer components as shown, or with Fig.10 Different configurations are shown.

[0116] It should be noted that the one or more processors 1002 and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the electronic device 100 (or mobile device). As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).

[0117] The memory 1004 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the member information update method described in the embodiment of the present application. The processor 1002 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, to implement the above-mentioned member information update method. The memory 1004 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 1004 may further include a memory remotely arranged relative to the processor 1002, and these remote memories may be connected to the electronic device 100 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0118] The transmission device 1006 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the electronic device 100. In one example, the transmission device 1006 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one embodiment, the transmission device 1006 can be a radio frequency (Radio Frequency, RF) module, which is used to communicate with the Internet wirelessly.

[0119] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the electronic device 100 (or mobile device).

[0120] An embodiment of the present application also provides a computer-readable storage medium, which can be set in an electronic device to store at least one instruction or at least one program related to a member information updating method in a method embodiment. The at least one instruction or the at least one program is loaded and executed by the processor to implement the member information updating method provided by the above method embodiment.

[0121] Optionally, in this embodiment, the storage medium may be located in at least one of the multiple network servers of the computer network. Optionally, in this embodiment, the storage medium may include, but is not limited to, various media that can store program codes, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.

[0122] It should be noted that the above-mentioned sequence of the embodiments of the present application is for description only and does not represent the advantages and disadvantages of the embodiments. The above-mentioned specific embodiments of the present application are described. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0123] Each embodiment in this application is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and electronic device embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0124] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0125] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims

1. A member information updating method, characterized in that: The method comprises: In response to a member information update request indicating a target group sent by a client, determine a first version number and a first characteristic value of first local member information indicating the target group; wherein the member information update request carries a second version number and a second characteristic value, the second version number and the second characteristic value represent second local member information indicating the target group stored in the client, and the first characteristic value and the second characteristic value are respectively obtained by calculating the corresponding local member information using the same preset algorithm; Based on the version number matching results for the first version number and the second version number and the feature value matching results for the first feature value and the second feature value, determine the update data to be returned and the type of the update data; wherein the type is a full update type or an incremental update type; Sending update data carrying the type identifier to the client, so that the client determines a corresponding update method according to the type identifier, and updates the second local member information based on the update method and the update data.

2. The method according to claim 1, characterized in that The determining, based on the version number matching result for the first version number and the second version number and the feature value matching result for the first feature value and the second feature value, the update data to be returned and the type of the update data includes: Matching the first version number and the second version number; When the version number matching result indicates that the first version number is greater than the second version number, determining first update data indicating a difference between the first version number and the second version number from the first local member information, and determining that a type of the first update data is an incremental update type; When the version number matching result indicates that the first version number is equal to the second version number, the first feature value and the second feature value are matched; and when the feature value matching result indicates that the first feature value is not equal to the second feature value, the first local member information is used as the second update data and the type of the second update data is determined to be a full update type.

3. The method according to claim 1, characterized in that The first local member information includes characteristic information of a plurality of members, and the method further includes: splicing the feature information of the plurality of members to obtain a feature information sequence; A hash value corresponding to the characteristic information sequence is determined using a preset hash function, and the hash value is used as the first characteristic value.

4. The method according to claim 1, characterized in that: The first local member information includes characteristic information of a plurality of members, and the method further includes: Determine a reference value corresponding to the characteristic information of each member among the characteristic information of the plurality of members; An exclusive OR operation is performed on a reference value corresponding to the feature information of each member in the feature information of the multiple members, and a result of the exclusive OR operation is used as the first feature value.

5. The method according to any one of claims 1 or 2, characterized in that: The determining a first characteristic value indicating first local member information of the target group includes: Determine a first member information sequence corresponding to the first local member information based on a preset sorting rule; Extracting at least two member information separated from each other from the first member information sequence according to a specified extraction rule; wherein the specified extraction rule is determined by the server based on the last member information update request of the client and sent to the client, the specified extraction rule instructs the client to extract the member information to be calculated from the second member information sequence to calculate using the preset algorithm, and the second member information sequence is determined by the client based on the preset sorting rule and the second local member information; The preset algorithm is used to calculate the at least two member information to obtain the first eigenvalue.

6. The method according to claim 5, characterized in that The method further comprises: In response to member information update feedback for the client, when the member information update feedback indicates an abnormality, shortening an extraction interval in a specified extraction rule determined based on a next member information update request of the client.

7. The method according to claim 1, characterized in that The member information update request carries a target member identifier and a group identifier indicating the target group. Before determining a first version number and a first characteristic value of first local member information indicating the target group, the method further includes: Determine whether the group identifier exists in the first preset identifier list, and determine whether the target member identifier exists in the second preset identifier list; When the group identifier exists in the first preset identifier list and the target member identifier exists in the second preset identifier list, determining whether the target member identifier has a preset association relationship with the group identifier; When the preset association relationship exists, the step of determining a first version number and a first characteristic value indicating the first local member information of the target group is triggered.

8. A member information updating method, characterized in that: The method comprises: Sending a member information update request indicating a target group to a server; wherein the member information update request carries a second version number and a second characteristic value, and the second version number and the second characteristic value represent second local member information indicating the target group; Receive update data carrying a type identifier returned by the server; wherein the type is a full update type or an incremental update type, the update data and the type identifier are determined by the server based on a version number matching result for a first version number and a second version number and a feature value matching result for a first feature value and a second feature value, the first version number and the first feature value are determined by the server in response to the member information update request, the first version number and the first feature value represent first local member information indicating the target group stored in the server, and the first feature value and the second feature value are respectively obtained by calculating the corresponding local member information using the same preset algorithm; A corresponding update method is determined according to the type identifier, and the second local member information is updated based on the update method and the update data.

9. A member information updating device, characterized in that: The device comprises: A response module: used to respond to a member information update request indicating a target group sent by a client, and determine a first version number and a first characteristic value of first local member information indicating the target group; wherein the member information update request carries a second version number and a second characteristic value, the second version number and the second characteristic value represent the second local member information indicating the target group stored in the client, and the first characteristic value and the second characteristic value are respectively obtained by calculating the corresponding local member information using the same preset algorithm; A determination module: used to determine the update data to be returned and the type of the update data based on the version number matching result for the first version number and the second version number and the feature value matching result for the first feature value and the second feature value; wherein the type is a full update type or an incremental update type; Return module: used for sending update data carrying the identification of the type to the client, so that the client determines the corresponding update method according to the identification of the type, and updates the second local member information based on the update method and the update data.

10. A member information updating device, characterized in that: The device comprises: A sending module: used for sending a member information update request indicating a target group to a server; wherein the member information update request carries a second version number and a second characteristic value, and the second version number and the second characteristic value represent second local member information indicating the target group; A receiving module: used for receiving update data carrying a type identifier returned by the server; wherein the type is a full update type or an incremental update type, and the update data and the type identifier are determined by the server based on a version number matching result for a first version number and a second version number and a feature value matching result for a first feature value and a second feature value, wherein the first version number and the first feature value are determined by the server in response to the member information update request, wherein the first version number and the first feature value represent first local member information indicating the target group stored in the server, and the first feature value and the second feature value are respectively obtained by calculating the corresponding local member information using the same preset algorithm; Update module: used to determine the corresponding update method according to the type identification, and update the second local member information based on the update method and the update data.