Account data synchronization methods, devices, electronic devices and computer-readable media
By synchronizing and processing window display information and sub-account information in shared memory, the problems of data chaos and high cost caused by inter-process data synchronization are solved, and seamless switching between the main account window and the sub-account window is achieved.
Patent Information
- Application Number
- CN202210429206.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-22
- Publication Date
- 2026-11-17
- Estimated Expiration
- 2042-04-22
AI Technical Summary
In existing technologies, frequent data synchronization between processes leads to data chaos, increases development and maintenance costs, and makes it impossible to quickly achieve seamless switching between the main account window and the sub-account window.
By responding to window display updates or sub-account updates, data is synchronized to shared memory. When a sub-account switching operation is detected, window display information and sub-account information are retrieved from shared memory and displayed directly in shared memory, avoiding frequent data synchronization between processes.
It enables seamless switching between the main account window and the sub-account window, avoiding data chaos and reducing development and maintenance costs.
Smart Images

Figure CN114816793B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of this disclosure relate to the field of computer technology, and more specifically to account data synchronization methods, apparatus, electronic devices, and computer-readable media. Background Technology
[0002] With the development of computer technology and the need for simultaneous login of multiple accounts, a main account can be bound to multiple sub-accounts. Logging into the main account will display all the sub-accounts logged in. Currently, the common method for synchronizing data between a main account and its sub-accounts is as follows: logging into the main account starts the main account's process, which in turn starts the processes of each sub-account. Data is then sent to other sub-accounts via postMessage. Once a sub-account's process starts, if there is data interaction, it then sends the data back to the main account's process.
[0003] However, when using the above method for data synchronization, the following technical problems often arise: frequent data synchronization between processes causes data chaos, high development and maintenance costs; data interaction between processes makes it impossible to quickly achieve seamless switching between the main account window and the sub-account window. Summary of the Invention
[0004] The summary portion of this disclosure is intended to provide a brief overview of the concepts, which will be described in detail in the detailed description portion. This summary portion is not intended to identify key or essential features of the claimed technical solutions, nor is it intended to limit the scope of the claimed technical solutions.
[0005] Some embodiments of this disclosure provide account data synchronization methods, apparatuses, electronic devices, and computer-readable media to address one or more of the technical problems mentioned in the background section above.
[0006] In a first aspect, some embodiments of this disclosure provide an account data synchronization method, the method comprising: in response to detecting window display update information or sub-account update information for a target main account, synchronizing the window display update information or the sub-account update information to a shared memory corresponding to the target main account, wherein the target main account corresponds to at least one sub-account; in response to detecting a switching operation of a sub-account for the target main account, obtaining window display information and sub-account information corresponding to the sub-account from the shared memory, wherein the sub-account information includes a sub-account identifier; and displaying a window corresponding to the sub-account identifier according to the obtained window display information and sub-account information.
[0007] Optionally, the shared memory includes a public data segment and a private data segment; and the above-mentioned synchronization of the window display update information or the sub-account update information to the shared memory corresponding to the target main account includes: synchronizing the window display update information to the public data segment; and synchronizing the sub-account update information to the private data segment.
[0008] Optionally, the method further includes: in response to detecting a logout operation of a sub-account corresponding to the target master account, deleting the sub-account information corresponding to the logout operation from the shared memory.
[0009] Optionally, before obtaining window display information and corresponding sub-account information from the shared memory in response to detecting a switching operation for a sub-account of the target master account, the method further includes: obtaining a set of sub-account identifiers from the shared memory; and performing visualization processing on each sub-account corresponding to the set of sub-account identifiers.
[0010] Optionally, before synchronizing the window display update information or the sub-account update information to the shared memory corresponding to the target main account in response to detecting window display update information or sub-account update information for the target main account, the method further includes: in response to the successful login of the target main account, obtaining a set of sub-account identifiers corresponding to the main account identifier of the target main account; determining the account group identifier corresponding to the target main account based on the main account identifier; performing login processing on the sub-account corresponding to each sub-account identifier in the sub-account identifier set; and determining the main account shared memory corresponding to the account group identifier as shared memory.
[0011] Optionally, determining the shared memory of the main account corresponding to the account group identifier as shared memory includes: in response to determining that there is a previously created shared memory of the main account corresponding to the account group identifier, determining the shared memory of the main account as the shared memory corresponding to the account group identifier; in response to determining that there is no previously created shared memory of the main account corresponding to the account group identifier, creating the shared memory of the main account corresponding to the account group identifier as shared memory.
[0012] Optionally, before determining the main account shared memory corresponding to the aforementioned account group identifier as shared memory, the method further includes: synchronizing the aforementioned account group identifier to the main account group shared memory; and activating the aforementioned account group identifier stored in the main account group shared memory.
[0013] Optionally, the method further includes: in response to detecting the logout operation of the target master account, deleting the account group identifier from the shared memory of the master account group.
[0014] Optionally, the method further includes: in response to detecting that the account group identifier of the shared display account corresponding to the target main account is deleted from the shared memory of the main account group, deleting the display content related to the shared display account from the window of the target main account, wherein the shared display account is the account whose display content is displayed in the window of the target main account.
[0015] Secondly, some embodiments of this disclosure provide an account data synchronization device, comprising: a synchronization unit configured to synchronize the window display update information or the sub-account update information to a shared memory corresponding to the target main account in response to detecting window display update information or sub-account update information for a target main account, wherein the target main account corresponds to at least one sub-account; an acquisition unit configured to acquire window display information and sub-account information corresponding to the sub-account from the shared memory in response to detecting a sub-account switching operation for the target main account, wherein the sub-account information includes a sub-account identifier; and a display unit configured to display the window corresponding to the sub-account identifier based on the acquired window display information and sub-account information.
[0016] Optionally, the shared memory mentioned above includes a public data segment and a private data segment.
[0017] Optionally, the synchronization unit is further configured to: synchronize the window display update information to the public data segment; and synchronize the sub-account update information to the private data segment.
[0018] Optionally, the account data synchronization device further includes a deletion unit configured to delete the sub-account information of the sub-account corresponding to the login operation from the shared memory in response to detecting a login logout operation of a sub-account corresponding to the target master account.
[0019] Optionally, prior to the acquisition unit, the account data synchronization device further includes a first sub-account identifier set acquisition unit and a visualization unit. The first sub-account identifier set acquisition unit is configured to acquire the sub-account identifier set from the shared memory. The visualization unit is configured to perform visualization processing on each sub-account corresponding to the aforementioned sub-account identifier set.
[0020] Optionally, prior to the synchronization unit, the account data synchronization device further includes: a second sub-account identifier set acquisition unit, an account group identifier determination unit, a login unit, and a shared memory determination unit. The second sub-account identifier set acquisition unit is configured to, in response to successful login of the target main account, acquire a set of sub-account identifiers corresponding to the main account identifier of the target main account. The account group identifier determination unit is configured to determine the account group identifier corresponding to the target main account based on the main account identifier. The login unit is configured to perform login processing on the sub-account corresponding to each sub-account identifier in the sub-account identifier set. The shared memory determination unit is configured to determine the shared memory of the main account corresponding to the account group identifier as shared memory.
[0021] Optionally, the shared memory determining unit is further configured to: in response to determining that there is a previously created shared memory for the primary account corresponding to the aforementioned account group identifier, determine the aforementioned primary account shared memory as the shared memory corresponding to the aforementioned account group identifier; in response to determining that there is no previously created shared memory for the primary account corresponding to the aforementioned account group identifier, create the shared memory for the primary account corresponding to the aforementioned account group identifier as shared memory.
[0022] Optionally, prior to the shared memory determination unit, the account data synchronization device further includes an account group identifier synchronization unit and an activation unit. The account group identifier synchronization unit is configured to synchronize the aforementioned account group identifier to the main account group shared memory. The activation unit is configured to activate the aforementioned account group identifier stored in the main account group shared memory.
[0023] Optionally, the account data synchronization device further includes: an account group identifier deletion unit, configured to delete the account group identifier from the shared memory of the main account group in response to detecting the logout operation of the target main account.
[0024] Optionally, the account data synchronization device further includes: a display content deletion unit, configured to delete display content related to the shared display account from the window of the target main account in response to detecting that the account group identifier of the shared display main account corresponding to the target main account is deleted from the shared memory of the main account group, wherein the shared display main account is the account whose display content is displayed in the window of the target main account.
[0025] Thirdly, some embodiments of this disclosure provide an electronic device, including: one or more processors; and a storage device having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any implementation of the first aspect above.
[0026] Fourthly, some embodiments of this disclosure provide a computer-readable medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the method described in any of the implementations of the first aspect above.
[0027] The above embodiments of this disclosure have the following beneficial effects: the account data synchronization method of some embodiments of this disclosure avoids data chaos, reduces development and maintenance costs, and can quickly achieve seamless switching between the main account window and the sub-account window. Specifically, the reasons for data chaos, high development and maintenance costs, and the inability to achieve seamless switching between the main account window and the sub-account window in a timely manner are: frequent data synchronization between processes causes data chaos and high development and maintenance costs; data interaction between processes makes it impossible to quickly achieve seamless switching between the main account window and the sub-account window. Based on this, the account data synchronization method of some embodiments of this disclosure firstly, in response to detecting window display update information or sub-account update information for the target main account, synchronizes the window display update information or the sub-account update information to the shared memory corresponding to the target main account. The target main account corresponds to at least one sub-account. Thus, the processes of the main account and each of its sub-accounts can obtain the latest synchronized account-related data from the shared memory. Then, in response to detecting a switching operation for the sub-account of the target main account, window display information and sub-account information corresponding to the sub-account are obtained from the shared memory. The sub-account information mentioned above includes a sub-account identifier. Therefore, when a user switches to a sub-account for login, real-time account-related data can be retrieved from shared memory, including window display information for displaying the window and sub-account information for displaying the content corresponding to that sub-account within the window. Finally, based on the retrieved window display information and sub-account information, the window corresponding to the sub-account identifier is displayed. Thus, the window for that sub-account can be displayed based on the window display information and sub-account information retrieved from shared memory. Because the sub-account process can directly retrieve account-related data from shared memory, frequent data synchronization between processes can be avoided, thus preventing data corruption and reducing development and maintenance costs. Furthermore, by avoiding direct interaction between processes, seamless switching between the main account window and the sub-account window can be quickly achieved. Therefore, data corruption is avoided, development and maintenance costs are reduced, and seamless switching between the main account window and the sub-account window can be quickly achieved. Attached Figure Description
[0028] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and elements are not necessarily drawn to scale.
[0029] Figure 1-2 This is a schematic diagram illustrating an application scenario of an account data synchronization method according to some embodiments of this disclosure;
[0030] Figure 3 This is a flowchart of some embodiments of the account data synchronization method according to this disclosure;
[0031] Figure 4 This is a flowchart of some other embodiments of the account data synchronization method according to this disclosure;
[0032] Figure 5 This is a schematic diagram of the structure of some embodiments of the account data synchronization device according to the present disclosure;
[0033] Figure 6 This is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. Detailed Implementation
[0034] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0035] It should also be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings. Unless otherwise specified, the embodiments and features described in this disclosure can be combined with each other.
[0036] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.
[0037] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0038] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0039] This disclosure will now be described in detail with reference to the accompanying drawings and embodiments.
[0040] Figure 1-2This is a schematic diagram illustrating an application scenario of an account data synchronization method according to some embodiments of this disclosure.
[0041] exist Figure 1 In the application scenario, firstly, the computing device 101 can, in response to detecting window display update information 103 for a target main account 102, synchronize the window display update information 103 to the shared memory 104 corresponding to the target main account 102. The target main account 102 corresponds to at least one sub-account. For example, the window currently displayed by the computing device 101 can be the window of the target main account 102. The target main account 102 can be "main1" (main account identifier). The window display update information 103 can be (X: 100, Y: 200), indicating that the screen coordinates of the window in the screen coordinate system have been updated to (X: 100, Y: 200). Then, in response to detecting a switching operation for a sub-account 105 (e.g., sub-account "sub12") of the target main account 102, the computing device 101 can obtain window display information 106 and sub-account information 107 corresponding to the sub-account 105 from the shared memory 104. The sub-account information 107 includes a sub-account identifier. For example, window display information 106 can be (X: 100, Y: 200, Width: 600, Height: 500). Sub-account information 107 can be (sub-account identifier: sub12, sub-account status: offline). Finally, computing device 101 can display the window corresponding to the sub-account identifier based on the acquired window display information 106 and sub-account information 107. The sub-account information 107 can be displayed in the window corresponding to the sub-account identifier. The position and size of the window corresponding to the sub-account identifier on the screen are the same as the window of the target main account 102. At this time, seamless switching between the main account window and the sub-account window can be achieved.
[0042] exist Figure 2In the application scenario, firstly, the computing device 201 can, in response to detecting a sub-account update information 203 for a target main account 202, synchronize the sub-account update information 203 to the shared memory 204 corresponding to the target main account 202. The target main account corresponds to at least one sub-account. For example, the target main account 202 can be "main1" (main account identifier). The sub-account update information 203 can be (sub-account identifier: sub12, sub-account status: online). The sub-account corresponding to the target main account 202 is "sub12". The window currently displayed by the computing device 201 can be the window of the sub-account "sub12". Then, in response to detecting a switching operation for a sub-account 205 (e.g., sub-account "sub11") for the target main account, the computing device 201 can obtain window display information 206 and sub-account information 207 corresponding to the sub-account 205 from the shared memory 204. The sub-account information 207 includes a sub-account identifier. For example, window display information 206 can be (X: 200, Y: 200, Width: 600, Height: 500). Sub-account information 207 can be (sub-account identifier: sub11, sub-account status: online). Finally, computing device 201 can display the window corresponding to the sub-account identifier based on the acquired window display information 206 and sub-account information 207. The sub-account information 207 can be displayed in the window corresponding to the sub-account identifier. The position and size of the window corresponding to the sub-account identifier on the screen are the same as the window of sub-account "sub12". At this time, seamless switching between sub-account windows can be achieved.
[0043] It should be noted that computing device 101 and computing device 201 mentioned above can be the same computing device. Computing device 101 and computing device 201 can be hardware or software. When the computing device is hardware, it can be implemented as a distributed cluster composed of multiple servers or terminal devices, or as a single server or a single terminal device. When the computing device is software, it can be installed in the hardware devices listed above. It can be implemented as, for example, multiple software programs or software modules used to provide distributed services, or as a single software program or software module. No specific limitations are made here.
[0044] It should be understood that Figure 1-2 The number of computing devices shown is merely illustrative. Any number of computing devices can be used depending on implementation needs.
[0045] Continue to refer to Figure 3 The diagram illustrates a flow 300 of some embodiments of the account data synchronization method according to this disclosure. The account data synchronization method includes the following steps:
[0046] Step 301: In response to detecting window display update information or sub-account update information for the target main account, synchronize the window display update information or sub-account update information to the shared memory of the corresponding target main account.
[0047] In some embodiments, the entity executing the account data synchronization method (e.g.) Figure 1 or Figure 2 The computing device shown can, in response to detecting window display update information or sub-account update information for a target main account, synchronize the window display update information or the sub-account update information to the shared memory corresponding to the target main account. The target main account can be a main account logged into the execution entity. The target main account corresponds to at least one sub-account. The correspondence between the target main account and the at least one sub-account can include: the at least one sub-account can automatically log in after the target main account logs in, and the at least one sub-account can automatically log out after the target main account logs out (for example, the target main account can be a business account, and the at least one sub-account can be a store account under the business account).
[0048] The aforementioned window display update information can be information that updates the window display information, and may include at least one set of window display update items and window display update values. The aforementioned window display update items can be fields of window display information whose field values have been updated. The aforementioned window display update values can be field values of window display update items. The aforementioned window display information can be appearance display-related information of the window of the aforementioned target main account or sub-account displayed on the aforementioned execution entity, and may include, but is not limited to, at least one of the following: screen position information, window size, window background color, and an indicator indicating whether the display is maximized. The aforementioned screen position information can be information used to characterize the window's position on the display screen, and may include the window's horizontal and vertical coordinates. The aforementioned window size may include the window width and window height.
[0049] The aforementioned sub-account update information can be information that updates sub-account information, and may include a sub-account identifier and at least one set of sub-account update items and sub-account update values. The aforementioned sub-account update items can be fields of sub-account information whose values have been updated. The aforementioned sub-account update values can be field values of sub-account update items. The aforementioned sub-account information can be sub-account related information, including a sub-account identifier, and may also include, but is not limited to, at least one of the following: sub-account status, sub-account role. The sub-account identifier can uniquely identify a sub-account. The sub-account status can represent the login status of a sub-account, and may include, but is not limited to, one of the following: reception, suspended, offline. The sub-account role can represent the role attributes of a sub-account, and may include, but is not limited to, one of the following: self-operated, supplier. The aforementioned shared memory can be memory shared between the aforementioned target main account and at least one of the aforementioned sub-accounts.
[0050] In practice, the aforementioned execution entity may, in response to detecting the aforementioned window display update information and finding that no window display information exists in the shared memory, store the window display update information as window display information in the shared memory. Alternatively, in response to detecting the aforementioned window display update information and finding that window display information exists in the shared memory, the execution entity may, for each set of window display update items and window display update values included in the aforementioned window display update information, replace the field value corresponding to the aforementioned window display update item in the aforementioned window display information in the shared memory with the aforementioned window display update value.
[0051] In practice, the aforementioned execution entity may also, in response to detecting the aforementioned sub-account update information and finding that the sub-account information corresponding to the sub-account update information does not exist in the shared memory, store the sub-account update information as sub-account information in the shared memory. Furthermore, in response to detecting the aforementioned sub-account update information and finding that the sub-account information exists in the shared memory, for each group of sub-account update items and sub-account update values included in the aforementioned sub-account update information, replace the field value corresponding to the aforementioned sub-account update item included in the aforementioned sub-account information in the shared memory with the aforementioned sub-account update value.
[0052] In some optional implementations of certain embodiments, the shared memory may include a public data segment and a private data segment. The public data segment may be a data segment used to store public data of the main account and each sub-account. The private data segment may be a data segment used to store account-related data of the main account and each sub-account. The executing entity may synchronize the window display update information to the public data segment. It may also synchronize the sub-account update information to the private data segment. Thus, the window display update information and the sub-account update information can be stored separately.
[0053] Step 302: In response to detecting a switching operation for a sub-account of the target main account, obtain window display information and sub-account information of the corresponding sub-account from shared memory.
[0054] In some embodiments, the execution entity may, in response to detecting a switching operation for a sub-account of the target master account, obtain window display information and sub-account information corresponding to the sub-account from the shared memory. The sub-account information includes the sub-account identifier. The switching operation may be an operation to switch to the sub-account to display its window. For example, the switching operation may be an operation to click on the area corresponding to the sub-account from a drop-down list.
[0055] Optionally, the aforementioned execution entity may also, in response to detecting a logout operation of a sub-account corresponding to the target main account, delete the sub-account information of the sub-account corresponding to the logout operation from the shared memory. The logout operation can be an operation whereby a user logs out of a sub-account. For example, the logout operation can be a click operation on a logout button for a sub-account. Therefore, after a user logs out of a sub-account, the sub-account information of that sub-account can be deleted from the shared memory, thus saving shared memory space.
[0056] Optionally, before step 302, the executing entity can obtain the sub-account identifier set from the shared memory. Then, the individual sub-accounts corresponding to the sub-account identifier set can be visualized. In practice, the sub-account identifier set can be displayed in the currently displayed window. The executing entity can also display the avatars or nicknames of the individual sub-accounts corresponding to the sub-account identifier set in the window. Thus, the latest sub-account identifier set can be obtained from the shared memory for visualization, preventing users from selecting sub-accounts that have already logged out.
[0057] Step 303: Based on the obtained window display information and sub-account information, display the window corresponding to the sub-account identifier.
[0058] In some embodiments, the executing entity can display the window corresponding to the sub-account identifier based on the acquired window display information and sub-account information. In practice, the executing entity can adjust the window to the window represented by the window display information. Then, the sub-account information can be displayed in the adjusted window.
[0059] As an example, window display information may include screen position information, window size, window background color, and a flag indicating whether the window is maximized. The aforementioned execution entity may display the window at the position indicated by the screen position information. It may adjust the window size to the specified window size. It may adjust the window background to the specified window background color. It may maximize the window in response to the flag indicating maximized display.
[0060] Optionally, the aforementioned execution entity may also, in response to detecting master account update information for the target master account, synchronize the master account update information to the aforementioned shared memory. Then, in response to detecting a switching operation for the target master account, it may retrieve window display information and master account information corresponding to the target master account from the aforementioned shared memory, wherein the master account information includes a master account identifier. Based on the retrieved window display information and master account information, the window corresponding to the master account identifier is displayed. The aforementioned master account update information may be information that updates master account information, and may include a master account identifier and at least one set of master account update items and master account update values. The aforementioned master account update items may be fields with updated master account information in their field values. The aforementioned master account update values may be field values of master account update items. The aforementioned master account information may be master account-related information, and may include, but is not limited to, master account identifier, and may also include, but is not limited to, at least one of the following: master account status, master account role. The master account identifier may uniquely identify the master account. The master account status may represent the login status of the master account, and may be, but is not limited to, one of the following: received, suspended, offline. The master account role may represent the role attribute of the master account, for example, it may be "enterprise account". Therefore, when a user switches to the target main account to log in, the window for the target main account can be displayed based on the obtained real-time window display information and main account information.
[0061] The above embodiments of this disclosure have the following beneficial effects: the account data synchronization method of some embodiments of this disclosure avoids data chaos, reduces development and maintenance costs, and can quickly achieve seamless switching between the main account window and the sub-account window. Specifically, the reasons for data chaos, high development and maintenance costs, and the inability to achieve seamless switching between the main account window and the sub-account window in a timely manner are: frequent data synchronization between processes causes data chaos and high development and maintenance costs; data interaction between processes makes it impossible to quickly achieve seamless switching between the main account window and the sub-account window. Based on this, the account data synchronization method of some embodiments of this disclosure firstly, in response to detecting window display update information or sub-account update information for the target main account, synchronizes the window display update information or the sub-account update information to the shared memory corresponding to the target main account. The target main account corresponds to at least one sub-account. Thus, the processes of the main account and each of its sub-accounts can obtain the latest synchronized account-related data from the shared memory. Then, in response to detecting a switching operation for the sub-account of the target main account, window display information and sub-account information corresponding to the sub-account are obtained from the shared memory. The sub-account information mentioned above includes a sub-account identifier. Therefore, when a user switches to a sub-account for login, real-time account-related data can be retrieved from shared memory, including window display information for displaying the window and sub-account information for displaying the content corresponding to that sub-account within the window. Finally, based on the retrieved window display information and sub-account information, the window corresponding to the sub-account identifier is displayed. Thus, the window for that sub-account can be displayed based on the window display information and sub-account information retrieved from shared memory. Because the sub-account process can directly retrieve account-related data from shared memory, frequent data synchronization between processes can be avoided, thus preventing data corruption and reducing development and maintenance costs. Furthermore, by avoiding direct interaction between processes, seamless switching between the main account window and the sub-account window can be quickly achieved. Therefore, data corruption is avoided, development and maintenance costs are reduced, and seamless switching between the main account window and the sub-account window can be quickly achieved.
[0062] Further reference Figure 4 This illustrates a flow 400 of another embodiment of the account data synchronization method. Flow 400 of the account data synchronization method includes the following steps:
[0063] Step 401: In response to the successful login of the target main account, obtain the set of sub-account identifiers corresponding to the main account identifier of the target main account.
[0064] In some embodiments, the entity executing the account data synchronization method (e.g.) Figure 1 or Figure 2The computing device shown can, in response to successful login of the target main account, obtain a set of sub-account identifiers corresponding to the main account identifier from the server via a wired or wireless connection, based on the main account identifier of the target main account. The main account identifier uniquely identifies the target main account. It should be noted that the wireless connection method may include, but is not limited to, 3G / 4G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra-wideband) connection, and other currently known or future wireless connection methods.
[0065] Step 402: Determine the account group identifier of the corresponding target main account based on the main account identifier.
[0066] In some embodiments, the executing entity can determine the account group identifier corresponding to the target main account based on the main account identifier. In practice, the executing entity can determine the account group identifier as the MD5 value of the main account identifier. This ensures that the account group identifier of each main account is unique.
[0067] Step 403: Login process is performed on the sub-account corresponding to each sub-account identifier in the sub-account identifier set.
[0068] In some embodiments, the executing entity can perform login processing on the sub-account corresponding to each sub-account identifier in the aforementioned sub-account identifier set. In practice, the executing entity can automatically log in to the sub-account corresponding to each sub-account identifier in the aforementioned sub-account identifier set. It is understood that password verification is not required when logging into a sub-account. Therefore, each sub-account can be automatically logged in after the target main account has logged in.
[0069] Step 404: Determine the shared memory of the main account corresponding to the account group identifier as shared memory.
[0070] In some embodiments, the executing entity may determine the shared memory of the primary account corresponding to the account group identifier as shared memory. In practice, the executing entity may, in response to determining that a previously created shared memory corresponding to the primary account of the account group identifier exists, determine the shared memory of the primary account as the shared memory corresponding to the account group identifier. The shared memory of the primary account can be memory shared by the target primary account and at least one of its corresponding sub-accounts. In response to determining that a previously created shared memory corresponding to the primary account of the account group identifier does not exist, the shared memory of the primary account corresponding to the account group identifier is created as shared memory. Thus, the shared memory can be determined after the target primary account and its corresponding sub-accounts have successfully logged in.
[0071] Optionally, before step 404, the executing entity may synchronize the account group identifier to the main account group shared memory. The main account group shared memory can be memory shared by all main accounts. In practice, the account group identifier can be stored in the main account group shared memory. Then, the account group identifier stored in the main account group shared memory can be activated. In practice, the activation status corresponding to the account group identifier stored in the main account group shared memory can be determined as activated. Therefore, the main account corresponding to the activated account group identifier can share the main account group shared memory with other main accounts, avoiding frequent data synchronization between the processes of different main accounts.
[0072] Optionally, the aforementioned execution entity may also, in response to detecting a logout operation of the target main account, delete the account group identifier from the shared memory of the main account group. Thus, when a user logs out of the target main account, the account group identifier of the target main account can be deleted from the shared memory of the main account group, thereby saving memory space in the shared memory of the main account group.
[0073] It is understandable that the above logout operation does not include unexpected logout due to a crash of the target main account. That is, even if the target main account is logged out due to an unexpected crash, its corresponding sub-accounts remain logged in, and the target main account's account group identifier still exists in the shared memory of the main account group. This avoids the inability to synchronize data between sub-accounts when the main account unexpectedly crashes.
[0074] Optionally, the execution entity may also, in response to detecting that the account group identifier of the shared display account corresponding to the target main account has been deleted from the shared memory of the main account group, delete the display content related to the shared display account from the window of the target main account. Here, the shared display account is the account whose display content is displayed in the window of the target main account. For example, a user logs into two main accounts on the execution entity: target main account 001 and main account 002. Then, the user drags the window of main account 002 to a certain position within the window of target main account 001, then main account 002 becomes the shared display account of target main account 001. The deletion of the account group identifier of the shared display account from the shared memory of the main account group indicates that the user has logged out of the shared display account. Therefore, after the user logs out of the shared display account, the display content related to the shared display account can be deleted from the window of the target main account to achieve fast data synchronization between main accounts.
[0075] Step 405: In response to detecting window display update information or sub-account update information for the target main account, synchronize the window display update information or sub-account update information to the shared memory of the corresponding target main account.
[0076] Step 406: In response to detecting a switching operation for a sub-account of the target main account, obtain window display information and sub-account information of the corresponding sub-account from shared memory.
[0077] Step 407: Based on the obtained window display information and sub-account information, display the window corresponding to the sub-account identifier.
[0078] In some embodiments, the specific implementation of steps 405-407 and the resulting technical effects can be found in [reference needed]. Figure 3 Steps 301-303 in the corresponding embodiments will not be repeated here.
[0079] from Figure 4 It can be seen from this that, with Figure 3 Compared to the description of some corresponding embodiments, Figure 4 The process 400 of the account data synchronization method in some corresponding embodiments embodies the extended steps of logging into the target main account and its corresponding sub-accounts. Therefore, the scheme described in these embodiments can automatically log into each sub-account after the target main account logs in. This allows the shared memory to be determined after the target main account and each sub-account log in.
[0080] Further reference Figure 5 As an implementation of the methods shown in the above figures, this disclosure provides some embodiments of an account data synchronization device, which are similar to... Figure 3 Corresponding to the method embodiments shown, the device can be specifically applied to various electronic devices.
[0081] like Figure 5 As shown, an account data synchronization device 500 in some embodiments includes: a synchronization unit 501, an acquisition unit 502, and a display unit 503. The synchronization unit 501 is configured to, in response to detecting window display update information or sub-account update information for a target main account, synchronize the window display update information or the sub-account update information to the shared memory corresponding to the target main account, wherein the target main account corresponds to at least one sub-account; the acquisition unit 502 is configured to, in response to detecting a sub-account switching operation for the target main account, acquire window display information and sub-account information corresponding to the sub-account from the shared memory, wherein the sub-account information includes a sub-account identifier; the display unit 503 is configured to, based on the acquired window display information and sub-account information, display the window corresponding to the sub-account identifier.
[0082] Optionally, the shared memory mentioned above includes a public data segment and a private data segment.
[0083] Optionally, the synchronization unit 501 can be further configured to: synchronize the window display update information to the public data segment; and synchronize the sub-account update information to the private data segment.
[0084] Optionally, the account data synchronization device 500 may further include a deletion unit (not shown in the figure), configured to delete the sub-account information of the sub-account corresponding to the login operation from the shared memory in response to detecting a login logout operation of a sub-account corresponding to the target main account.
[0085] Optionally, prior to the acquisition unit 502, the account data synchronization device 500 may further include: a first sub-account identifier set acquisition unit and a visualization unit (not shown in the figure). The first sub-account identifier set acquisition unit is configured to acquire a sub-account identifier set from the shared memory. The visualization unit is configured to perform visualization processing on each sub-account corresponding to the sub-account identifier set.
[0086] Optionally, prior to the synchronization unit 501, the account data synchronization device 500 may further include: a second sub-account identifier set acquisition unit, an account group identifier determination unit, a login unit, and a shared memory determination unit (not shown in the figure). The second sub-account identifier set acquisition unit is configured to, in response to successful login of the target main account, acquire a set of sub-account identifiers corresponding to the main account identifier of the target main account. The account group identifier determination unit is configured to determine the account group identifier corresponding to the target main account based on the main account identifier. The login unit is configured to perform login processing on the sub-account corresponding to each sub-account identifier in the sub-account identifier set. The shared memory determination unit is configured to determine the shared memory of the main account corresponding to the account group identifier as shared memory.
[0087] Optionally, the shared memory determination unit can be further configured to: in response to determining that there is a previously created shared memory for the primary account corresponding to the aforementioned account group identifier, determine the aforementioned primary account shared memory as the shared memory corresponding to the aforementioned account group identifier; in response to determining that there is no previously created shared memory for the primary account corresponding to the aforementioned account group identifier, create the shared memory for the primary account corresponding to the aforementioned account group identifier as shared memory.
[0088] Optionally, prior to the shared memory determination unit, the account data synchronization device 500 may further include: an account group identifier synchronization unit and an activation unit (not shown in the figure). The account group identifier synchronization unit is configured to synchronize the aforementioned account group identifier to the main account group shared memory. The activation unit is configured to activate the aforementioned account group identifier stored in the main account group shared memory.
[0089] Optionally, the account data synchronization device 500 may further include: an account group identifier deletion unit (not shown in the figure), configured to delete the account group identifier from the shared memory of the main account group in response to detecting the logout operation of the target main account.
[0090] Optionally, the account data synchronization device 500 may further include: a display content deletion unit (not shown in the figure), configured to delete display content related to the shared display account from the window of the target main account in response to detecting that the account group identifier of the shared display main account corresponding to the target main account is deleted from the shared memory of the main account group, wherein the shared display main account is the account whose display content is displayed in the window of the target main account.
[0091] It is understandable that the units described in the device 500 are related to the reference. Figure 3 The steps in the described method correspond accordingly. Therefore, the operations, features, and beneficial effects described above for the method also apply to the device 500 and the units contained therein, and will not be repeated here.
[0092] The following is for reference. Figure 6 It illustrates electronic devices suitable for implementing some embodiments of this disclosure (e.g., Figure 1 or Figure 2 The diagram shows the structure of the computing device 600. In some embodiments of this disclosure, the electronic device may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 6 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments of this disclosure.
[0093] like Figure 6 As shown, electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 601, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 602 or a program loaded from storage device 608 into random access memory (RAM) 603. RAM 603 also stores various programs and data required for the operation of electronic device 600. Processing device 601, ROM 602, and RAM 603 are interconnected via bus 604. Input / output (I / O) interface 605 is also connected to bus 604.
[0094] Typically, the following devices can be connected to I / O interface 605: input devices 606 including, for example, a touchscreen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 607 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; and communication devices 609. Communication device 609 allows electronic device 600 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 6 An electronic device 600 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively. Figure 6 Each box shown can represent a device or multiple devices as needed.
[0095] In particular, according to some embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, some embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, it performs the functions defined above in the methods of some embodiments of this disclosure.
[0096] It should be noted that, in some embodiments of this disclosure, the computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium may be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In some embodiments of this disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In some embodiments of this disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0097] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.
[0098] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device. The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: in response to detecting window display update information or sub-account update information for a target main account, synchronize the window display update information or the sub-account update information to the shared memory corresponding to the target main account, wherein the target main account corresponds to at least one sub-account; in response to detecting a sub-account switching operation for the target main account, obtain window display information and sub-account information corresponding to the sub-account from the shared memory, wherein the sub-account information includes a sub-account identifier; and display the window corresponding to the sub-account identifier based on the obtained window display information and sub-account information.
[0099] Computer program code for performing operations of some embodiments of this disclosure can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0100] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0101] The units described in some embodiments of this disclosure can be implemented in software or hardware. The described units can also be located in a processor; for example, a processor may be described as including a synchronization unit, an acquisition unit, and a display unit. The names of these units do not necessarily limit the unit itself; for example, a synchronization unit may also be described as "a unit that, in response to detecting window display update information or sub-account update information for a target main account, synchronizes the window display update information or the sub-account update information to the shared memory corresponding to the target main account."
[0102] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0103] The above description is merely a selection of preferred embodiments of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in the embodiments of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described inventive concept. For example, technical solutions formed by substituting the above-described features with (but not limited to) technical features with similar functions disclosed in the embodiments of this disclosure.
Claims
1. A method for synchronizing account data, comprising: In response to detecting window display update information or sub-account update information for a target main account, the window display update information or the sub-account update information is synchronized to the shared memory corresponding to the target main account. The target main account corresponds to at least one sub-account. The shared memory is memory shared between the target main account and the at least one sub-account. The shared memory includes a public data segment and a private data segment. The public data segment is used to store common data between the main account and each sub-account. The private data segment is used to store account-related data between the main account and each sub-account, including: In response to detecting the window display update information and the absence of window display information in the shared memory, the window display update information is stored as window display information in the shared memory; In response to detecting the window display update information and the existence of window display information in the shared memory, for each set of window display update items and window display update values included in the window display update information, the field value corresponding to the window display update item included in the window display information in the shared memory is replaced with the window display update value; In response to detecting a switching operation for a sub-account of the target main account, window display information and sub-account information corresponding to the sub-account are obtained from the shared memory, wherein the sub-account information includes a sub-account identifier; Based on the obtained window display information and sub-account information, the window corresponding to the sub-account identifier is displayed.
2. The method according to claim 1, wherein, The step of synchronizing the window display update information or the sub-account update information to the shared memory of the corresponding target main account includes: Synchronize the window display update information to the public data segment; The sub-account update information is synchronized to the private data segment.
3. The method according to claim 1, wherein, The method further includes: In response to detecting a logout operation of a sub-account corresponding to the target main account, the sub-account information corresponding to the logout operation is deleted from the shared memory.
4. The method according to claim 3, wherein, Before retrieving window display information and corresponding sub-account information from the shared memory in response to detecting a switching operation for a sub-account of the target master account, the method further includes: Obtain the sub-account identifier set from the shared memory; The sub-accounts corresponding to the sub-account identifier set are visualized.
5. The method according to any one of claims 1-4, wherein, Before synchronizing the window display update information or the sub-account update information to the shared memory corresponding to the target main account in response to detecting window display update information or sub-account update information for the target main account, the method further includes: In response to the successful login of the target main account, a set of sub-account identifiers corresponding to the main account identifier of the target main account is obtained; Based on the main account identifier, determine the account group identifier corresponding to the target main account; Login processing is performed on the sub-account corresponding to each sub-account identifier in the sub-account identifier set; The shared memory of the main account corresponding to the account group identifier is determined as shared memory.
6. The method according to claim 5, wherein, The step of determining the shared memory of the main account corresponding to the account group identifier as shared memory includes: In response to determining that there exists a primary account shared memory corresponding to the previously created account group identifier, the primary account shared memory is determined as the shared memory corresponding to the account group identifier; In response to the determination that there is no previously created shared memory for the primary account corresponding to the account group identifier, the shared memory for the primary account corresponding to the account group identifier is created as shared memory.
7. The method according to claim 5, wherein, Before determining the shared memory of the primary account corresponding to the account group identifier as shared memory, the method further includes: Synchronize the account group identifier to the main account group's shared memory; The account group identifier stored in the shared memory of the main account group is activated.
8. The method according to claim 7, wherein, The method further includes: In response to detecting a logout operation of the target main account, the account group identifier is deleted from the shared memory of the main account group.
9. The method according to claim 7, wherein, The method further includes: In response to the detection that the account group identifier of the shared display account corresponding to the target main account is deleted from the shared memory of the main account group, the display content related to the shared display account is deleted from the window of the target main account, wherein the shared display account is the account whose display content is displayed in the window of the target main account.
10. An account data synchronization device, comprising: A synchronization unit is configured to, in response to detecting window display update information or sub-account update information for a target main account, synchronize the window display update information or the sub-account update information to the shared memory corresponding to the target main account. The target main account corresponds to at least one sub-account. The shared memory is memory shared between the target main account and the at least one sub-account. The shared memory includes a public data segment and a private data segment. The public data segment is used to store common data between the main account and each sub-account. The private data segment is used to store account-related data between the main account and each sub-account, including: In response to detecting the window display update information and the absence of window display information in the shared memory, the window display update information is stored as window display information in the shared memory; In response to detecting the window display update information and the existence of window display information in the shared memory, for each set of window display update items and window display update values included in the window display update information, the field value corresponding to the window display update item included in the window display information in the shared memory is replaced with the window display update value; The acquisition unit is configured to, in response to detecting a switching operation for a sub-account of the target main account, acquire window display information and sub-account information corresponding to the sub-account from the shared memory, wherein the sub-account information includes a sub-account identifier; The display unit is configured to display the window corresponding to the sub-account identifier based on the acquired window display information and sub-account information.
11. An electronic device, comprising: One or more processors; Storage device, on which one or more programs are stored, When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-9.
12. A computer-readable medium having a computer program stored thereon, wherein, When the program is executed by the processor, it implements the method as described in any one of claims 1-9.
Citation Information
Patent Citations
Account number login method and device
CN105915491A
Client and server interaction method and device
CN108470302A
Multi-account management method and system
CN113760569A
