User state processing method, user state processing device, storage medium and electronic equipment
By synchronizing the full data first and then synchronizing incremental data in the central management node, the consistency problem of user status data in memory and persistent storage is solved, ensuring the accuracy and completeness of the data, and is suitable for the synchronization scenario of user status data.
Patent Information
- Application Number
- CN202510405245.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-01
- Publication Date
- 2025-07-18
AI Technical Summary
The prior art is difficult to effectively ensure the consistency between the user status data stored in memory and the user's actual status data, especially in the synchronization process of incremental data and full data, data omission or inconsistency is prone to occur.
By setting the first storage node and the second storage node in the central management node, the full data of the user status data is first synchronized to the second storage node, and then the incremental data is added to the message queue, and after the synchronization of the full data is completed, the incremental data is synchronized to the second storage node to ensure the consistency of the data.
It realizes the accuracy and consistency of user status data, avoids data omission, has strong capacity expansion, and has a wide range of applications.
Smart Images

Figure CN120336427A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the field of data processing technologies. More specifically, embodiments of the present disclosure relate to a user status processing method, a user status processing device, a computer-readable storage medium, and an electronic device. Background Art
[0002] This section aims to provide background or context for the embodiments of the present disclosure recited in the claims. The description herein is not admitted to be prior art merely by virtue of being included in this section.
[0003] In the field of instant messaging, how to effectively and accurately maintain the data status of users is one of the concerns. In related scenarios, when the server sends data, it will first determine the user status, such as whether the user is online, and then select whether to use a corresponding method for data transmission. In this process, how to determine the user status is crucial. The general method in the prior art is to directly store user status data through storage methods such as memory, and directly judge the user status through the data stored in the memory. However, when the user status data changes, relevant incremental data will be generated, and it is difficult for the prior art to effectively ensure the consistency between the user status data stored in the memory and the actual user status data. Summary of the Invention
[0004] However, currently, the prior art lacks an effective way to ensure the consistency between the user status data stored in the memory and the actual user status data.
[0005] In the related art, in order to quickly determine whether a user is online, the user online status is generally stored in both memory and persistent storage, and the user status is directly judged through the memory. However, how to ensure data consistency among the memory, the persistent storage, and the actual online status of the user is a problem, which requires consideration from both memory incremental synchronization and full synchronization for guarantee. However, the prior art lacks such a method.
[0006] Therefore, there is a great need for a user status processing method that can ensure the consistency between the incremental data and the full data of the synchronized user status data.
[0007] In this context, embodiments of the present disclosure are expected to provide a user status processing method, a user status processing device, a computer-readable storage medium, and an electronic device.
[0008] According to a first aspect of the present disclosure, there is provided a user status processing method applied to a central management node, where the central management node includes at least a first storage node and a second storage node, and the first storage node is at least used to store all the user status data of a target application; the method includes: obtaining incremental data of the user status data, and storing the incremental data of the user status data in the first storage node; when detecting the startup of the target application, synchronizing all the user status data stored in the first storage node to the second storage node, and adding the incremental data of the user status data to a message queue; after completing the synchronization of all the user status data, synchronizing the incremental data of the user status data in the message queue to the second storage node.
[0009] In one implementation, adding the incremental data of the user status data to the message queue includes: adding the incremental data of the user status data belonging to the same user to the same message queue in the order of timestamps.
[0010] In one implementation, the method further includes: when detecting that the user status data of a first user in the first storage node is inconsistent with the user status data of the first user in the second storage node, sending a message request to a regional management node, so that the regional management node queries the current user status data of the first user, and updates the user status data of the first user in the first storage node and / or the second storage node according to the current user status data of the first user.
[0011] In one implementation, the user status data includes a user connection status; when detecting that the user status data of a first user in the first storage node is inconsistent with the user status data of the first user in the second storage node, sending a message request to a regional management node, so that the regional management node queries the current user connection status of the first user, includes: when detecting that the user connection status of the first user in the first storage node is a connected status and the user connection status of the first user in the second storage node is a non-connected status, sending a message request to the regional management node, so that the regional management node queries the current user connection status of the first user.
[0012] In one implementation, updating the user status data of the first user in the first storage node and / or the second storage node according to the current user status data of the first user includes: receiving a user status change notification sent by the regional management node; the user status change notification is determined according to the current user connection status; updating the user connection status of the first user in the first storage node and / or the second storage node according to the user status change notification.
[0013] In one embodiment, updating the user connection status of the first user in the first storage node and / or the second storage node according to the user status change notification includes: when it is determined that the user status change notification is a change notification determined by the area management node when the currently queried user connection status of the first user is the unconnected state, updating the user connection status of the first user in the first storage node.
[0014] In one embodiment, there are multiple second storage nodes; completing the full synchronization of the user status data includes: when each second storage node obtains the full data of the user status data from the first storage node, it is determined that the full synchronization of the user status data is completed.
[0015] According to a second aspect of the present disclosure, there is provided a user status processing device applied to a central management node. The central management node at least includes a first storage node and a second storage node. The first storage node is at least used to store the full data of the user status data of the target application program. The device includes: a status data acquisition module, configured to acquire the incremental data of the user status data and store the incremental data of the user status data in the first storage node; a first data synchronization module, configured to synchronize the full data of the user status data stored in the first storage node to the second storage node and add the incremental data of the user status data to the message queue when it is detected that the target application program is started; a second data synchronization module, configured to synchronize the incremental data of the user status data in the message queue to the second storage node after the full synchronization of the user status data is completed.
[0016] According to a third aspect of the present disclosure, there is provided a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the user status processing method of the first aspect and its possible implementation manners.
[0017] According to a fourth aspect of the present disclosure, there is provided an electronic device, including: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the user status processing method of the first aspect and its possible implementation manners by executing the executable instructions.
[0018] In the solution of the present disclosure, on the one hand, the present exemplary embodiment proposes a new user status processing method. Compared with the prior art that only considers data synchronization issues from the dimension of full data, the present exemplary embodiment can consider from both the full data and incremental data aspects, synchronize the user status data to the second storage node of the central management node, effectively ensuring the accuracy of the user status data in the second storage node and the consistency of the synchronized data. On the other hand, the present exemplary embodiment proposes to synchronize the full data first, and then synchronize the incremental data when the synchronization of the full data is completed, which can ensure the comprehensiveness of the synchronized data, avoid data omission or incomplete synchronized data. In addition, the present exemplary embodiment can effectively manage the incremental data by synchronizing the incremental data through a queue, and has strong expansion ability, with a wide range of applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 FIG. shows a schematic diagram of a system architecture for user status processing in the present exemplary embodiment;
[0020] Figure 2 FIG. shows a flowchart of a user status processing method in the present exemplary embodiment;
[0021] Figure 3 FIG. shows another schematic diagram of a system architecture for user status processing in the present exemplary embodiment;
[0022] Figure 4 FIG. shows a schematic diagram of the structure of a user status processing device in the present exemplary embodiment;
[0023] Figure 5 FIG. shows a schematic diagram of the structure of an electronic device in the present exemplary embodiment.
[0024] In the drawings, the same or corresponding reference numerals indicate the same or corresponding parts. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0025] Hereinafter, the principles and spirit of the present disclosure will be described with reference to several exemplary embodiments. It should be understood that these embodiments are only given to enable those skilled in the art to better understand and then implement the present disclosure, and do not limit the scope of the present disclosure in any way. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to be able to fully convey the scope of the present disclosure to those skilled in the art.
[0026] The embodiments of the present disclosure can be implemented as a system, device, equipment, method or computer program product. Therefore, the present disclosure can be specifically implemented in the following forms: completely hardware, completely software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.
[0027] The principles and spirit of the present disclosure will be elaborated in detail below with reference to several representative embodiments of the present disclosure. Summary of the Invention
[0029] The inventor of the present invention has found that there is currently no effective way in the prior art to ensure the consistency between the user status data stored in the memory and the actual user status data.
[0030] In view of the above, the present disclosure provides a user status processing method, a user status processing device, a computer-readable storage medium, and an electronic device. Obtain the incremental data of the user status data, and store the incremental data of the user status data in the first storage node; when it is detected that the target application program is started, synchronize the full amount of the user status data stored in the first storage node to the second storage node, and add the incremental data of the user status data to the message queue; after the synchronization of the full amount of the user status data is completed, synchronize the incremental data of the user status data in the message queue to the second storage node. On the one hand, this exemplary embodiment proposes a new user status processing method. Compared with the prior art that only considers data synchronization problems from the dimension of full amount of data, this exemplary embodiment can consider from both the full amount of data and the incremental data, and synchronize the user status data to the second storage node of the central management node, effectively ensuring the accuracy of the user status data in the second storage node and the consistency of the synchronized data; on the other hand, this exemplary embodiment proposes to synchronize the full amount of data first, and then synchronize the incremental data when the synchronization of the full amount of data is completed, which can ensure the comprehensiveness of the synchronized data, avoid data omission or incomplete synchronized data. In addition, this exemplary embodiment can effectively manage the incremental data by synchronizing the incremental data through the queue, and has strong expansion ability, with a wide range of applications.
[0031] The various non-limiting embodiments of the present disclosure will be specifically introduced below.
[0032] Overview of Application Scenarios
[0033] It should be noted that the following application scenarios are only shown for the convenience of understanding the spirit and principles of the present disclosure, and the embodiments of the present disclosure are not limited in this regard. On the contrary, the embodiments of the present disclosure can be applied to any applicable scenario.
[0034] The embodiments of the present disclosure can be applied to related scenarios of synchronization of user status data. The effectiveness and consistency of user status data synchronization can be considered from two aspects: incremental synchronization and full amount synchronization. The specific application scenarios will be described below in combination with the system architecture.
[0035] Figure 1A schematic diagram of a system architecture for user status processing is shown. The system architecture includes a regional management node 110 and a central management node 120. Among them, the regional management node 110 is used to manage the user status data of users in each region, which can be terminal devices or servers in computer rooms in various places. The regional management node 110 can report the user status data to the central management node 120, so that the central management node 120 can synchronize the user status data to the relevant storage area. The central management node 120 can be a central management system, such as a server or a server cluster used to execute central management functions, etc.
[0036] Exemplary Method
[0037] Exemplary embodiments of the present disclosure provide a method for user status processing. Applied to the central management node, the central management node can be a central server. For example, different regions or areas can each correspond to a terminal device or a server for managing user status data. In addition, the central server or the server cluster can be used to uniformly maintain and manage the terminal devices or servers corresponding to different regions or areas. The central server or the server cluster can be used as the central management node. The central management node at least includes a first storage node and a second storage node. Among them, the first storage node can at least be used to store the full amount of user status data of the target application program, and can also be used to store the incremental data of the user status data of the target application program.
[0038] Reference Figure 2 As shown, the method can include steps S210 to S230. The following will Figure 2 make a specific description of each step in.
[0039] In step S210, obtain the incremental data of the user status data, and store the incremental data of the user status data in the first storage node.
[0040] Among them, the user status data refers to the data used to reflect the user connection status. According to the user status data, it can be determined what connection status the current user is in. For example, the user is in an online, offline, or disconnected state, etc. The full amount of user status data refers to all the user status data at a certain moment. The incremental data of the user status data refers to the changed or newly added user status data. For example, at time t0, the user status data is D1, and at time t1, the user status data is D2. From time t0 to time t1, the connection status of some users may change, such as changing from the online state to the offline state, or new users join the network connection, generating new user status data, etc. Then the newly added or changed user status data can be regarded as the incremental data of the user status data.
[0041] The first storage node refers to a node used to store user status data. Among them, it can store the full amount of user status data or the incremental data of user status data. It can be considered that the full amount of user status data can be saved in the first storage node. When new incremental data is generated, it can also be saved in the first storage node. For example, through a persistent storage module maintained by a preset database, such as storing the full amount of user status data through a MySQL database and storing the incremental data of user status data, etc.
[0042] In this exemplary embodiment, the central management node can receive a user status change notification sent by the regional management node. The user status change notification includes user status incremental data. Then, according to the user status change notification, the user status incremental data is stored in the first storage node. Among them, the regional management node can be a management node of a certain region or area, such as a service cluster in a certain area. When it detects that the user status has changed, the changed status data can be added as an incremental data to the user status change notification and sent to the central management node.
[0043] In step S220, when it is detected that the target application program is started, the full amount of user status data stored in the first storage node is synchronized to the second storage node, and the incremental data of user status data is added to the message queue.
[0044] Among them, the second storage node refers to a storage area used to store the synchronized user status data. The second storage node needs to be synchronized with the full amount of user status data and the incremental data to ensure consistency with the current user status data. In this exemplary embodiment, the central management node can maintain multiple second storage nodes, and each second storage node can store a copy of the data for storing the user status data reported by different regional management nodes.
[0045] The target application program refers to a software program related to the user's online status. For example, when the program starts, the user can perform related operations in an online connection state. Considering that when the program starts, there may be a situation where the user status data changes or the current status cannot be synchronized in time. Therefore, in this exemplary embodiment, when it is detected that the target application program is started, the user status processing process can be executed. First, the full amount of data stored in the first storage node is synchronized to the second storage node, and the incremental data of user status data is added to the message queue MQ (Message Queue).
[0046] In this exemplary embodiment, a first storage node, a second storage node, and a message queue can be configured in a central management node. The full amount of data is maintained in the first storage node, and the incremental data is first stored in the first storage node. When it is detected that the target application starts, the full amount of data can be synchronized to the second storage node, and the incremental data is first added to the message queue without performing the synchronization of the incremental data first.
[0047] In step S230, after the synchronization of the full amount of user status data is completed, the incremental data of the user status data in the message queue is synchronized to the second storage node.
[0048] To ensure the integrity of the synchronized data and avoid data omission during the synchronization process of the full amount of data or incremental data, in this exemplary embodiment, after the synchronization of the full amount of user status data is completed, the incremental data of the user status data added to the message queue is notified to the second storage node.
[0049] It should be noted that in this exemplary embodiment, the user status data of the area management node can all be first sent to the first storage node. When synchronizing the full amount of data to the second storage node, the corresponding full amount of data can be directly pulled from the first storage node, and the incremental data can be first added to the first storage node and then added to the message queue, waiting for the synchronization process of the incremental data. If some incremental data is pulled during the process of pulling the full amount of data from the first storage node, then when synchronizing the incremental data from the message queue, the complete incremental data will overwrite the incomplete incremental data. The user status processing method of this exemplary embodiment has high real-time performance. By using the first storage node to store data, using the message queue to store the incremental data to be synchronized, and the method of transmitting and storing the user status data according to the user status change notification, the consistency of the currently synchronized status data can be accurately guaranteed.
[0050] In an exemplary embodiment, adding the incremental data of the user status data to the message queue can include:
[0051] Adding the incremental data of the user status data belonging to the same user to the same message queue in the order of timestamps.
[0052] Considering that the user status data has a certain timeliness, its corresponding time sequence is particularly important. To avoid the situation of inconsistent status data during the process of synchronizing incremental data to the second storage node, in this exemplary embodiment, the incremental data of the user status data belonging to the same user can be added to the same message queue in the order of the timestamps corresponding to the data. For example, different message queues can include different partitioning logics, and the incremental data of the user status data of the same user can be added to the same partition of the same message queue to ensure the order of the data. Specifically, the user status data of different users can correspond to their respective user IDs (Identifies, unique identifiers). Based on the user IDs corresponding to different data, the incremental data of the user status data of the same user can be added to the same partition of the same message queue.
[0053] In an exemplary embodiment, the above user status processing method may further include:
[0054] When it is detected that the user status data of the first user in the first storage node is inconsistent with the user status data of the first user in the second storage node, a message request is sent to the area management node, so that the area management node queries the current user status data of the first user and updates the user status data in the first storage node and / or the second storage node according to the current user status data.
[0055] In this exemplary embodiment, the first storage node may be an actual database, such as a MySQL database, and the second storage node may be the memory storage module in the central management node. The full amount of data and incremental data ultimately need to be synchronized to the memory storage module. When it is detected that the user status data of the first user in the first storage node is inconsistent with the user status data of the first user in the second storage node, it indicates that the data has not been fully synchronized. Then, a message request needs to be sent to the area management node. This message request may be a request to query the user status data of the first user, so that the area management node queries the current user status data of the first user and updates the user status data in the first storage node and / or the second storage node according to the current user status data. Among them, the first user may be any one or more users, and the area management node refers to the management node of the area where the first user is located. The area management node can maintain the user status data of the first user and send it to the central management node. Specifically, the update of the user status data in the first storage node and the second storage node also needs to be determined according to the comparison result between the currently queried user status and the user status data stored in the first storage node and the second storage node. For example, when the queried status is consistent with the status stored in the first storage node, the user status data stored in the second storage node can be updated; when the queried status is consistent with the status stored in the second storage node, the user status data stored in the first storage node can be updated, etc.
[0056] In one exemplary embodiment, the user status data includes the user connection status; when it is detected that the user status data of the first user in the first storage node is inconsistent with the user status data of the first user in the second storage node, sending a message request to the area management node to enable the area management node to query the current user status data of the first user may include:
[0057] When it is detected that the user connection status of the first user in the first storage node is the connected status and the user connection status of the first user in the second storage node is the unconnected status, send a message request to the area management node to enable the area management node to query the current user connection status of the first user.
[0058] Among them, the connected state can be the state where the user is online, and the unconnected state can be the state where the user is offline, such as the user being offline or disconnected. When the user connection state of the first user in the first storage node is the connected state, and the user connection state of the first user in the second storage node is the unconnected state, for example, when there is a situation where the first user is in an online state in the memory storage module of the central management node, but the first user is in an offline state in the actual database (MySQL database), or the gateway has actually disconnected from the first user, a message request can be sent to the area management node to enable the area management node to query the current user connection state of the first user. For example, when data inconsistency occurs, active repair is not performed first. Instead, when messages are sent, it is first determined that the user is in an online state, and then messages are sent. Until each area management node or the network management side queries the user connection state of the first user and does not find the first user connected, a status change notice can be reported, thereby changing the data with problems stored in the central management node.
[0059] In an exemplary embodiment, the updating of the user state data of the first user in the first storage node and / or the second storage node according to the current user state data of the first user may include:
[0060] Receiving a user state change notice sent by the area management node; the user state change notice is determined according to the current user connection state;
[0061] Updating the user connection state of the first user in the first storage node and / or the second storage node according to the user state change notice.
[0062] The user state change notice refers to information used to notify that the user state has changed, which may include specific change information, such as the user state changing to the offline state, or the user state changing to the unconnected state, etc. After receiving the message request sent by the central management node, the area management node can query the current user connection state of the first user and generate a user state change notice according to the current user state data of the first user, and return it to the central management node. After receiving the user state change notice, the central management node can determine the current user connection state of the first user, so it can update the user connection state of the first user stored in the first storage node and / or the second storage node according to the user state change notice.
[0063] In an exemplary embodiment, the updating of the user connection state of the first user in the first storage node and / or the second storage node according to the user state change notice may include:
[0064] When determining the user status change notification, which is the change notification determined by the regional management node based on the fact that the current user connection status of the first user is the unconnected status, update the user connection status of the first user in the first storage node.
[0065] When the user status change notification received by the central management node is the change notification determined based on the fact that the current user connection status of the first user is the unconnected status, that is, the user status change notification includes the current status of the user being unconnected. If the first user in the first storage node is in the connected status while the first user in the second storage node is in the unconnected status, it indicates that the user connection status of the first user stored in the first storage node is incorrect. Therefore, the user connection status of the first user in the first storage node can be updated to the unconnected status to ensure the accuracy and consistency of the user status update.
[0066] In practical applications, it is inevitable that some data inconsistencies may occur during the data transmission or synchronization process. However, in this exemplary embodiment, through the above method, the user status change notification is reported through the feedback mechanism, further ensuring the ultimate consistency of the data and improving the accuracy of the synchronized data.
[0067] In an exemplary embodiment, the above-mentioned second storage nodes are multiple; completing the synchronization of the full amount of user status data may include:
[0068] When each second storage node obtains the full amount of user status data from the first storage node, it is determined that the synchronization of the full amount of user status data is completed.
[0069] In this exemplary embodiment, the central management node can maintain multiple second storage nodes, and each node can act as an independent consumer to consume incremental data. In this exemplary embodiment, the full amount of data and incremental data can be synchronized to each second storage node through the above method, thereby ensuring that each node synchronizes the data changes. At the same time, after each second storage node completes the synchronization of the full amount of data, the synchronization of the complete full amount of data is determined, ensuring the integrity and consistency of the data of each node.
[0070] Figure 3 Fig. shows a schematic diagram of the system architecture for user status processing in this exemplary embodiment. The system may include one or more regional management nodes 310 and a central management node 320. Among them, the regional management node may be a node for managing user status data in a certain region or area, such as the user management module in each local computer room, and the central management node may be a central node for managing user status data in each local computer room, such as the central user management system.
[0071] The area management node 310 may include a gateway 311. The user monitors the user status data of the user, such as the status of whether the user is online or whether the online status has changed, etc.; a user management module 312, which is an area in the area management node 310 for storing and managing user status data, for example, a storage module or area in each local computer room or each local service cluster for storing user status data within its respective area.
[0072] The central management node 320 may include a persistent storage module 321, a MySQL database 322, a data queue 323, and multiple in-memory storage modules 324. Among them, the persistent storage module 321 and the MySQL database 322 are the first storage nodes, and the in-memory storage module 324 is the second storage node.
[0073] In this exemplary embodiment, the gateway 311 in the area management node can monitor and obtain the user status data of the user. For example, the gateways in computer rooms in different regions can monitor whether the online status of the user has changed, and when a change occurs, send a status change request to the user management module 312 and write the changed user status data into the user management module 312; then, the area management node can write the changed user status data into the persistent storage module 321, and the persistent storage module 321 can be stored through the MySQL database 322. For example, the user management module in each local computer room writes the user online change status into the persistent storage module, and this module stores the user online change status through the MySQL database; further, the persistent storage module 321 can first synchronize the full amount of online data to the in-memory storage module 324, and then send the incremental data of the online status change to the message queue 323. After the synchronization of the full amount of data is completed, the central management node will synchronize the incremental data of the online status change to multiple in-memory storage modules 324 through the message queue 323.
[0074] Exemplary Device
[0075] The exemplary embodiment of the present disclosure also provides a user status processing device. Refer to Figure 4 As shown, the user status processing device 400 may include the following program modules: a status data acquisition module 410, which is used to acquire the incremental data of the user status data and store the incremental data of the user status data in the first storage node; a first data synchronization module 420, which is used to synchronize the full amount of user status data stored in the first storage node to the second storage node and add the incremental data of the user status data to the message queue when it is detected that the target application program is started; a second data synchronization module 430, which is used to synchronize the incremental data of the user status data in the message queue to the second storage node after the synchronization of the full amount of user status data is completed.
[0076] In one embodiment, the first data synchronization module 420 includes: a message queue adding unit, configured to add incremental data of user status data belonging to the same user to the same message queue in the order of timestamps.
[0077] In one embodiment, the user status processing device further includes: a status data consistency detection module, configured to, when detecting that the user status data of the first user in the first storage node is inconsistent with the user status data of the first user in the second storage node, send a message request to the area management node, so that the area management node queries the current user status data of the first user, and updates the user status data of the first user in the first storage node and / or the second storage node according to the current user status data of the first user.
[0078] In one embodiment, the user status data includes a user connection state; the status data consistency detection module includes: a connection state detection unit, configured to, when detecting that the user connection state of the first user in the first storage node is a connected state and the user connection state of the first user in the second storage node is a non-connected state, send a message request to the area management node, so that the area management node queries the current user connection state of the first user.
[0079] In one embodiment, the status data consistency detection module includes: a change notification receiving unit, configured to receive a user status change notification sent by the area management node; the user status change notification is determined according to the current user connection state; a connection state updating unit, configured to update the user connection state of the first user in the first storage node and / or the second storage node according to the user status change notification.
[0080] In one embodiment, the connection state updating unit includes: a connection state updating subunit, configured to, when determining that the user status change notification is a change notification determined by the area management node according to querying that the current user connection state of the first user is a non-connected state, update the user connection state of the first user in the first storage node.
[0081] In one embodiment, there are multiple second storage nodes; the second data synchronization module 430 includes: a full amount data synchronization unit, configured to determine that the synchronization of the full amount data of the user status data is completed when each second storage node obtains the full amount data of the user status data from the first storage node.
[0082] In addition, other specific details of the embodiments of the present disclosure have been described in detail in the embodiments of the above method, and will not be repeated here.
[0083] Exemplary Storage Medium
[0084] Exemplary embodiments of the present disclosure also provide a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the above methods of the present disclosure are implemented. The above methods can be implemented by a program product. For example, a portable compact disc read-only memory (CD-ROM) can be used and includes program code, and can be run on a device, such as a personal computer. However, the program product of the present disclosure is not limited thereto. In this document, the readable storage medium can be any tangible medium that contains or stores a program, and the program can be used by or in combination with an instruction execution system, apparatus, or device.
[0085] The program product can adopt any combination of one or more readable media. The readable media can be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples (non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0086] The computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, in which the readable program code is carried. Such a propagated data signal can take various forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The readable signal medium can also be any readable medium other than the readable storage medium, and the readable medium can send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device.
[0087] The program code contained on the readable medium can be transmitted by any suitable medium, including but not limited to wireless, wired, optical cable, RE, etc., or any suitable combination of the above.
[0088] The program code for performing the operations of the present disclosure can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and also including conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computing device, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device can be connected to the user's computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., by connecting through the Internet using an Internet service provider).
[0089] Exemplary Electronic Device
[0090] Exemplary embodiments of the present disclosure also provide an electronic device, which can be any device in Figure 1 The electronic device includes a processor and a memory, and the memory is used to store executable instructions for the processor. The processor is configured to execute the above-described method of the present disclosure by executing the executable instructions.
[0091] Refer to Figure 5 to describe the electronic device of the exemplary embodiments of the present disclosure. Figure 5 The displayed electronic device 500 is merely an example and should not impose any limitations on the functions and usage scope of the embodiments of the present disclosure.
[0092] As Figure 5 shown, the electronic device 500 is presented in the form of a general-purpose computing device. The components of the electronic device 500 may include, but are not limited to: at least one processing unit 510, at least one storage unit 520, and a bus 530 connecting different system components (including the storage unit 520 and the processing unit 510).
[0093] Among them, the storage unit stores program code, and the program code can be executed by the processing unit 510, so that the processing unit 510 executes the steps according to various exemplary embodiments of the present disclosure described in the above "Exemplary Method" section of this specification. For example, the processing unit 510 can execute the method steps as Figure 2 shown, etc.
[0094] The storage unit 520 may include a volatile storage unit, such as a random access storage unit (RAM) 521 and / or a cache storage unit 522, and may further include a read-only storage unit (ROM) 523.
[0095] The storage unit 520 may also include a program / utilities 524 having a set (at least one) of program modules 525, such program modules 525 including but not limited to: an operating system, one or more application programs, other program modules, and program data, with the implementation of a network environment being possible in each or some combination of these examples.
[0096] The bus 530 may include a data bus, an address bus, and a control bus.
[0097] The electronic device 500 may also communicate with one or more external devices 600 (such as a keyboard, a pointing device, a Bluetooth device, etc.), and such communication may be carried out through the input / output (I / O) interface 540. The electronic device 500 may also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through the network adapter 550. As shown in the figure, the network adapter 550 communicates with other modules of the electronic device 500 through the bus 530. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 500, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.
[0098] It should be noted that although several modules or sub-modules of the apparatus are mentioned in the above detailed description, such a division is merely exemplary and not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more of the above-described units / modules may be embodied in one unit / module. Conversely, the features and functions of one unit / module described above may be further divided and embodied by multiple units / modules.
[0099] In addition, although the operations of the method of the present disclosure are described in a specific order in the drawings, this does not require or imply that these operations must be performed in that specific order, or that all of the shown operations must be performed to achieve the desired result. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step for execution, and / or one step may be decomposed into multiple steps for execution.
[0100] Although the spirit and principles of the present disclosure have been described with reference to several specific embodiments, it should be understood that the present disclosure is not limited to the specific embodiments disclosed, and the division of each aspect does not mean that the features in these aspects cannot be combined for benefits. Such a division is only for the convenience of expression. The present disclosure aims to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.
Claims
1. A user status processing method, characterized in that, Applied to a central management node, the central management node at least includes a first storage node and a second storage node, and the first storage node is at least used to store the full amount of user status data of the target application; the method includes: Obtain the incremental data of the user status data, and store the incremental data of the user status data in the first storage node; When it is detected that the target application is started, synchronize the full amount of user status data stored in the first storage node to the second storage node, and add the incremental data of the user status data to the message queue; After the synchronization of the full amount of the user status data is completed, synchronize the incremental data of the user status data in the message queue to the second storage node.
2. The method according to claim 1, wherein The adding the incremental data of the user status data to the message queue includes: Add the incremental data of the user status data belonging to the same user to the same message queue in the order of the time stamp.
3. The method according to claim 1, wherein The method further includes: When it is detected that the user status data of the first user in the first storage node is inconsistent with the user status data of the first user in the second storage node, send a message request to the area management node, so that the area management node queries the current user status data of the first user, and updates the user status data of the first user in the first storage node and / or the second storage node according to the current user status data of the first user.
4. The method according to claim 3, wherein The user status data includes the user connection status; when it is detected that the user status data of the first user in the first storage node is inconsistent with the user status data of the first user in the second storage node, and a message request is sent to the area management node, so that the area management node queries the current user status data of the first user, including: When it is detected that the user connection status of the first user in the first storage node is the connected state, and the user connection status of the first user in the second storage node is the unconnected state, send a message request to the area management node, so that the area management node queries the current user connection status of the first user.
5. The method according to claim 4, wherein The updating the user status data of the first user in the first storage node and / or the second storage node according to the current user status data of the first user includes: Receive the user status change notification sent by the area management node; the user status change notification is determined according to the current user connection status; Update the user connection status of the first user in the first storage node and / or the second storage node according to the user status change notification.
6. The method according to claim 5, wherein The updating the user connection status of the first user in the first storage node and / or the second storage node according to the user status change notification includes: When it is determined that the user status change notification is the change notification determined by the area management node according to the query that the current user connection status of the first user is the unconnected state, update the user connection status of the first user in the first storage node.
7. The method according to claim 1, characterized in that, There are multiple second storage nodes; the completion of the synchronization of the full amount of the user status data includes: When each second storage node obtains all the data of the user status data from the first storage node, it is determined that the synchronization of all the data of the user status data is completed.
8. A user status processing device, characterized in that, Applied to a central management node, the central management node includes at least a first storage node and a second storage node, and the first storage node is at least used to store all the data of the user status data of the target application; the device includes: A status data acquisition module, configured to acquire incremental data of user status data and store the incremental data of the user status data in the first storage node; A first data synchronization module, configured to synchronize all the data of the user status data stored in the first storage node to the second storage node and add the incremental data of the user status data to the message queue when it is detected that the target application is started; A second data synchronization module, configured to synchronize the incremental data of the user status data in the message queue to the second storage node after the synchronization of all the data of the user status data is completed.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, The computer program, when executed by a processor, implements the method according to any one of claims 1 to 7.
10. An electronic device, characterized in that, Including: A processor; And A memory, configured to store executable instructions of the processor; Wherein, the processor is configured to execute the method according to any one of claims 1 to 7 by executing the executable instructions.