Multi-terminal data synchronization method based on Bluetooth communication, medium and equipment

In the multi-terminal data synchronization system, the main communication terminal only records the changed status information of the data group elements, solving the problems of unstable Bluetooth connection and small data package capacity, achieving efficient data synchronization and timeliness improvement.

CN119497216APending Publication Date: 2025-02-21MOBILE TECH COMPANY CHINA TRAVELSKY HLDG
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411643600.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-18
Publication Date
2025-02-21

AI Technical Summary

Technical Problem

In an environment where no network is available or with strong electromagnetic shielding, when data synchronization is performed between multiple terminals through Bluetooth, due to unstable Bluetooth connection and small data packet capacity, data packet loss and synchronization efficiency are low, which affects the timeliness of data acquisition .

Method used

Using a multi-terminal data synchronization method based on Bluetooth communication, the initial data information of all data groups is updated through the main communication terminal, and only the changed status information of the element is recorded, without recording the relevant information of the change operation, thereby reducing the Update the space occupancy of data to avoid subcontracted transmission and data loss.

Benefits of technology

It realizes that while ensuring the availability of update data, significantly reduces the space usage of updated data, reduces data packet loss, and improves data synchronization efficiency and timeliness of data acquisition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119497216A_ABST
    Figure CN119497216A_ABST
Patent Text Reader

Abstract

The invention relates to the field of data synchronization, in particular to a multi-terminal data synchronization method based on Bluetooth communication, a medium and equipment. Comprising the following steps: initial data information comprises current state information corresponding to each element; the change operation information is state information after any element is changed; the main communication terminal performs initial data updating processing according to the obtained change operation information of any data group to generate corresponding updated data information; synchronously sending to each current communication terminal; and when the secondary communication terminal obtains the updated data information, the information is stored to the local. According to the method, the state of a certain element is represented by using bits of different sequences, and then the current corresponding state of the element is represented by a value. Therefore, the space occupation for updating the data can be greatly reduced. In the data sending process, subpackage transmission is not needed, the situation that synchronization cannot be completed due to synchronization information loss caused by data packet loss can be reduced, and meanwhile the data synchronization efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] Information interaction between multiple terminals refers to the transmission and synchronization of data between different devices (such as smartphones, tablets, personal computers, etc.). In the prior art, data interaction and update between multiple terminals are mostly based on network communication. For example, a centralized server is usually set up as an intermediary for data exchange, responsible for receiving data requests and confirming updates from each terminal. Common centralized servers can be backend services on cloud service providers (such as AWS, GCP, Azure). The centralized server then distributes the interactive update data corresponding to each terminal to each terminal through network data.

[0003] However, in some scenarios where there is no network available, such as in a cabin during flight or in some spaces with strong electromagnetic shielding. If multiple terminals want to maintain interactive updates between data, they need to communicate through Bluetooth networking. However, due to the instability of Bluetooth connections and the small capacity of single communication data packets, the existing synchronization information often records the operation information of each change operation in detail, and then superimposes it with the historical operation information to form the current global update data for synchronous transmission. Therefore, as the number of change operations increases, the synchronization data that needs to be sent will increase. For larger data synchronization information, Bluetooth needs to be transmitted in packets. In this case, it is easy for synchronization information to be lost due to data packet loss and synchronization cannot be completed. It will also cause data synchronization efficiency to decrease, affecting the timeliness of data acquisition. Summary of the invention

[0004] In view of the above technical problems, the technical solution adopted by the present invention is:

[0005] According to one aspect of the present invention, a multi-terminal data synchronization method based on Bluetooth communication is provided, which is applied to a first data update system. The data update system includes four communication terminals, each of which is connected to the remaining three communication terminals via Bluetooth communication. One of the four communication terminals is a primary communication terminal, and the remaining communication terminals are secondary communication terminals. Each communication terminal has a data group, and the primary communication terminal has initial data information of all data groups. All communication terminals perform change operations on their own data groups according to a preset update sequence. The method includes the following steps:

[0006] The initial data information includes the current state information corresponding to each element in all data groups; the change operation information is the state information after the change operation changes any element in the data group;

[0007] The main communication terminal performs initial data update processing according to the acquired change operation information of any data group, and generates corresponding update data information;

[0008] The main communication terminal synchronously sends the updated data information to each current communication terminal, so that each communication terminal has the latest status information of all data groups;

[0009] When the secondary communication terminal obtains the updated data information, the updated data information is saved locally in the secondary communication terminal;

[0010] The initial data update process includes:

[0011] The master communication terminal replaces the current state information of the corresponding element in the initial data information with the corresponding state information in the change operation information according to the acquired change operation information of any data group, so as to generate corresponding updated data information.

[0012] According to a second aspect of the present invention, a non-transitory computer-readable storage medium is provided, which stores a computer program. When the computer program is executed by a processor, the above-mentioned multi-terminal data synchronization method based on Bluetooth communication is implemented.

[0013] According to a third aspect of the present invention, there is provided an electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned multi-terminal data synchronization method based on Bluetooth communication when executing the computer program.

[0014] The present invention has at least the following beneficial effects:

[0015] In this embodiment, by using the 8 bits of each byte to establish a corresponding relationship with each element in all data groups, the bits of different order can be used to represent the state of a certain element, and then the available values ​​of each bit can be used to represent the current corresponding state of different elements. Therefore, when the main communication terminal updates the latest information of the current global data group each time, it only needs to send out the current value sequence corresponding to all bits. That is, the present invention only records the changed state of the element, and no longer records the relevant information of the change operation. Therefore, no matter how the element state in the data group is changed and how many times the change operation is performed, the size of the update information that needs to be sent will not be increased. The present invention uses the characteristics of the sequence and value of the bits in the byte to represent the latest state of all elements, thereby greatly reducing the space occupied by the update data while ensuring that the update data is available to other terminals. Therefore, there is no need for packet transmission in the process of data transmission, which can reduce the situation where the synchronization information is lost and the synchronization cannot be completed due to data packet loss, and at the same time, it will also improve the efficiency of data synchronization and the timeliness of data acquisition. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0017] Figure 1 A flowchart of a multi-terminal data interaction method based on Bluetooth communication provided by an embodiment of the present invention;

[0018] Figure 2 A schematic diagram of communication connection of a first data updating system provided by an embodiment of the present invention;

[0019] Figure 3 A flowchart of a multi-terminal data synchronization method based on Bluetooth communication provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0020] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0021] As a possible embodiment of the present invention, Figure 1As shown, a multi-terminal data interaction method based on Bluetooth communication is provided, which is applied to the first data update system. The data update system includes four communication terminals, each of which is connected to the remaining three communication terminals via Bluetooth communication. One of the four communication terminals is a main communication terminal, and the remaining communication terminals are all secondary communication terminals. Each communication terminal has a data group, and the main communication terminal has the initial data information of all data groups. All communication terminals change their own data groups according to the preset update sequence. For the above-mentioned first data update system, the number of communication terminals included therein can also be changed, such as 3 or 5 or 6 or more, which can be determined according to the number of terminals required in the corresponding task. For example, in some scenarios, it is necessary to operate the switches of the relevant functions on the terminals at different positions in the area in a space without network connection or severe electromagnetic shielding (such as an underground area with many pipeline connections) in sequence to finally turn on or off a certain function. Therefore, due to the different number of terminals participating in different functions, the number of communication terminals included in the data update system is different. In addition, if the usage scenario is to play chess and card games in the cabin of an airplane, the number of communication terminals included in the data update system may also be different due to the different numbers of players requiring different rest periods.

[0022] What needs to be ensured is that among the terminals included in the data update system, there needs to be a terminal that serves as the main communication terminal and serves as the centralized server for all terminals, responsible for confirming information changes on each terminal and maintaining and issuing global update information.

[0023] Specifically, the multi-terminal data interaction method based on Bluetooth communication includes the following steps:

[0024] S100: When the main communication terminal maintains connection with each communication terminal, the main communication terminal performs initial data update processing according to the acquired change operation information of any data group, so that each communication terminal has the latest status information of all data groups.

[0025] In an environment with a complex electromagnetic environment (such as in an airplane cabin), the Bluetooth connection is less stable and may become unstable or even disconnected due to electromagnetic interference. Therefore, in actual use, the existing Bluetooth connection stability detection technology can be used to detect in real time whether each terminal is consistently online.

[0026] The initial data update process includes:

[0027] S110: The current main communication terminal generates updated data information corresponding to the initial data information according to the acquired change operation information of any data group, and sends the updated data information to each current communication terminal.

[0028] The change operation information acquired by the primary communication terminal in S110 includes its own change operation information and the change operation information of other secondary communication terminals.

[0029] Specifically, the steps for obtaining the change operation information of other secondary communication terminals are as follows:

[0030] S111: The secondary communication terminal generates a change request message according to the current change operation on its own data group, and sends it to the primary communication terminal.

[0031] S112: The main communication terminal uses the change request information as the currently acquired change operation information.

[0032] The steps for obtaining the change operation information of the main communication terminal are as follows:

[0033] S113: The main communication terminal generates currently acquired change operation information according to the change operation currently performed on its own data group.

[0034] In this embodiment, when a change operation occurs in the secondary communication terminal, a corresponding request needs to be made to the main terminal. The main communication terminal confirms the updated content through the request, so that the main communication terminal can obtain the change information of the elements in each data group. And in this embodiment, when responding to the change request, only a single confirmation is required through the main communication terminal. Since the connection distance of Bluetooth is limited and the stability is low, in actual use, the Bluetooth connection between the communication terminals may require other terminals to be relayed between the two terminals due to the problem of too far distance. Usually, the connection between two communication terminals connected in the form of relay forwarding is more unstable. Therefore, in order to improve the success rate of communication in this embodiment, the number of communications and the complexity of communication when confirming information will be minimized as much as possible. Therefore, the main communication terminal is used to confirm the changed information in a single confirmation manner, thereby improving the success rate of each change information confirmation and change operation information acquisition.

[0035] S120: When the third communication terminal and / or the fourth communication terminal detects that their own Bluetooth connection is unstable, disconnect the Bluetooth connection between the third communication terminal and the fourth communication terminal. The third communication terminal and the fourth communication terminal are respectively the second and third secondary communication terminals located after the primary communication terminal according to the preset update sequence. The second communication terminal is a secondary communication terminal adjacent to the primary communication terminal according to the preset update sequence, and the primary communication terminal in this embodiment is the primary communication terminal determined for the first time.

[0036] In this embodiment, in order to ensure that each secondary communication terminal can obtain the updated data information, each secondary communication terminal will also forward the received updated data information, so when the connection is relatively stable, each communication terminal will be connected to the remaining three communication terminals via Bluetooth.

[0037] However, in actual use, Figure 2 As shown, the main communication terminal (O in the figure) and the second communication terminal (A in the figure) will both establish Bluetooth connections with the third communication terminal (B in the figure) and the fourth communication terminal (C in the figure), that is, under normal circumstances, the third communication terminal and the fourth communication terminal can both receive information sent between the main communication terminals and receive the same information forwarded by the second communication terminal again. As a result, the utilization rate of the Bluetooth connection between the third communication terminal and the fourth communication terminal is low, and usually does not have a significant impact on the synchronization of information. Therefore, when the third communication terminal and / or the fourth communication terminal detects that its own Bluetooth connection is unstable, the stability of the Bluetooth connection is improved by disconnecting the Bluetooth connection between the third communication terminal and the fourth communication terminal.

[0038] S200: When the primary communication terminal is disconnected from at least one secondary communication terminal, the next communication terminal adjacent to the primary communication terminal is used as a new primary communication terminal according to a preset update sequence.

[0039] S300: The new main communication terminal performs a data change process and an initial data update process on the offline terminal.

[0040] The data change processing of offline terminals includes:

[0041] S310: The new master communication terminal continues to perform a change operation on the data group corresponding to the disconnected master communication terminal according to a preset change operation rule, and generates trusteeship change information.

[0042] S320: The new primary communication terminal takes the hosting change information as the change operation information corresponding to the disconnected primary communication terminal.

[0043] The preset change operation rules can set the relevant automatic operation rules in advance according to the relevant rules (such as the card-playing rules of chess and card games). Through the trusteeship of the automatic operation rules, the change operation of the current data group of the offline terminal can be maintained, which can further ensure that the update operation can continue normally.

[0044] S330: When the secondary communication terminal obtains the updated data information, the updated data information is saved locally in the secondary communication terminal.

[0045] In this embodiment, each secondary communication terminal locally stores the latest global data group information in real time. Therefore, when the main communication terminal goes offline, each secondary communication terminal can use the latest global data group information locally to continue subsequent data synchronization update processing to ensure that this task can be completed completely and smoothly.

[0046] As another possible embodiment of the present invention, the change operation information includes the terminal ID of the communication terminal to which the data group belongs and the operation information of the elements in the data group.

[0047] S110: The current main communication terminal generates updated data information corresponding to the initial data information according to the acquired change operation information of any data group, including:

[0048] S114: The current main communication terminal combines the latest acquired change operation information and all historical change operation information to form current update data information.

[0049] Specifically, in order to ensure that detailed operation records can be obtained when the corresponding task is completed later, the specific operation behavior corresponding to each communication terminal will be used as change operation information in this embodiment. The specific change operation information includes at least the terminal ID of the communication terminal to which the data group belongs and the operation information of the elements in the data group.

[0050] Therefore, the updated data information generated by the main communication terminal each time is the collection of all the operation records currently performed. This collection can record all the operation information in more detail and comprehensively, making it more convenient for subsequent review, analysis and traceability.

[0051] In addition, each updated data message is correspondingly configured with the original sending terminal ID, the most recent forwarding terminal ID and the message generation timestamp.

[0052] After obtaining the updated data information, the secondary communication terminal also performs the following operations:

[0053] S400: Generate an identity identifier of the updated data information according to the original sending terminal ID corresponding to the updated data information and the information generation timestamp.

[0054] S500: Determine, based on the identity identifier, whether the secondary communication terminal receives the update data information for the first time.

[0055] S600: If the secondary communication terminal receives the updated data information for the first time, the updated data information is forwarded to the remaining communication terminals. The remaining communication terminals are the communication terminals other than the communication terminals corresponding to the original sending terminal ID and the most recently forwarded terminal ID among the four communication terminals.

[0056] S601: If the secondary communication terminal does not receive the update data information for the first time, the update data information is not forwarded.

[0057] In this embodiment, in order to ensure that each secondary communication terminal can receive the updated data information, the secondary communication terminal is also used to forward the updated data information. When forwarding, the secondary communication terminal first determines whether it has received the same information before based on the identity of the updated data information. If not, it forwards it again, thereby avoiding repeated forwarding of the same information and increasing the pressure on Bluetooth communication.

[0058] At the same time, when forwarding information, it will only be forwarded to the remaining communication terminals, thereby avoiding forwarding storms.

[0059] As another possible embodiment of the present invention, Figure 3 As shown, a multi-terminal data synchronization method based on Bluetooth communication is also provided, which is also applied to the first data update system. In this embodiment, the initial data information includes the current state information corresponding to each element in all data groups. The change operation information is the state information after the change operation changes any element in the data group. The multi-terminal data synchronization method based on Bluetooth communication specifically includes the following steps:

[0060] W100: The main communication terminal performs initial data update processing according to the acquired change operation information of any data group and generates corresponding update data information.

[0061] W200: The main communication terminal synchronously sends the updated data information to each current communication terminal, so that each communication terminal has the latest status information of all data groups.

[0062] W300: When the secondary communication terminal obtains the updated data information, it saves the updated data information locally in the secondary communication terminal.

[0063] In this embodiment, the operation mode of W200 is the same as that of S110, and the operation mode of W300 is the same as that of S330, which will not be described in detail here.

[0064] In addition, the general method of the initial data update processing is the same as that in the above-mentioned embodiment, and the only difference is that the content included in the change operation information and the update data information is different.

[0065] The initial data update process includes:

[0066] W110: The master communication terminal replaces the current state information of the corresponding element in the initial data information with the corresponding state information in the change operation information according to the acquired change operation information of any data group, so as to generate corresponding updated data information.

[0067] Specifically, if the number of all elements included in all data groups is less than the maximum number of bit sequences included in the Bluetooth communication data packet, the update data information can be updated and set in the following manner, and a unique corresponding mapping relationship is established between the corresponding bit sequence number in the Bluetooth communication data packet and each element. Different values ​​corresponding to each bit identify different states of the corresponding element. For example, the value corresponding to each bit includes 0 or 1.

[0068] The following example illustrates this:

[0069] A deck of playing cards consists of 13 cards of four suits, namely, hearts, spades, diamonds and clubs, and one king and one joker, totaling 54 cards. Among the 13 hearts, there are A2345678910JQK. If a certain chess and card game requires 2 decks of cards, totaling 108 cards. In the present embodiment, the information of these 108 cards is determined by establishing a mapping relationship with the sequence number of the position, such as the position of the first position represents the Ace of Hearts, the position of the second position represents the 2nd of Hearts, the position of the eighth position represents the 8th of Hearts, etc., wherein the numerical value on each position can represent the state of the card. For example, the corresponding value of each position includes 0 or 1, 1 represents playing and 0 represents not playing. If the value of the first position is 0, it means that the Ace of Hearts is not played.

[0070] When the game starts, the data group of each communication device will include 27 cards randomly assigned by the system. When the 27 cards are played, the generated change operation information can be used to change the value of which one or several bits to the corresponding value. For the main communication terminal, it only needs to maintain a 108-bit zero-one sequence according to the change operation information to generate the update data information after each update. At the same time, when sending the update data information, no matter how many times the operation changes are made, the update data information can be represented by this 108-bit sequence, and the storage space will not be increased. That is, in this embodiment, only the first 27 bits of 4 bytes are used, and the pre-stored hands can be combined to synchronize whether the player's hand is played, and only 108 bits (14 bytes) can be used to record the current global card information. Compared with the existing commonly used Bluetooth communication 182-byte data packet size, the memory usage of the update data information in this embodiment is extremely small, and there is still a large space to record other game information (such as playing cards, scoring, level cards, etc.). As a result, all the game information can be represented within 182 bytes. Therefore, there is no need to transmit data in packets, which can reduce the situation where synchronization information is lost and synchronization cannot be completed due to packet loss. At the same time, it will also improve data synchronization efficiency and improve the timeliness of data acquisition.

[0071] In addition, although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.

[0072] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the implementation of the present disclosure.

[0073] In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.

[0074] It will be appreciated by those skilled in the art that various aspects of the present invention may be implemented as a system, method or program product. Therefore, various aspects of the present invention may be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as a "circuit", "module" or "system".

[0075] The electronic device according to this embodiment of the present invention is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0076] The electronic device is presented in the form of a general-purpose computing device. The components of the electronic device may include, but are not limited to: the at least one processor mentioned above, the at least one storage device mentioned above, and a bus connecting different system components (including storage devices and processors).

[0077] The storage stores program codes, which can be executed by the processor, so that the processor executes the steps according to various exemplary embodiments of the present invention described in the above “Exemplary Method” section of this specification.

[0078] The memory may include readable media in the form of volatile memory, such as random access memory (RAM) and / or cache memory, and may further include read only memory (ROM).

[0079] The storage may also include a program / utility having a set (at least one) of program modules, such program modules including but not limited to: an operating system, one or more application programs, other program modules and program data, each of which or some combination may include the implementation of a network environment.

[0080] The bus may represent one or more of several types of bus structures including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures.

[0081] The electronic device may also communicate with one or more external devices (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may communicate with one or more devices that enable a user to interact with the electronic device, and / or may communicate with any device (e.g., routers, modems, etc.) that enables the electronic device to communicate with one or more other computing devices. Such communication may be performed through an input / output (I / O) interface. Furthermore, the electronic device may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) through a network adapter. The network adapter communicates with other modules of the electronic device through a bus. 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, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.

[0082] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present disclosure.

[0083] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of the present specification is stored. In some possible implementations, various aspects of the present invention may also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary embodiments of the present invention described in the above "Exemplary Method" section of the present specification.

[0084] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0085] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0086] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.

[0087] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).

[0088] In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to an exemplary embodiment of the present invention, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.

[0089] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.

[0090] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A multi-terminal data synchronization method based on Bluetooth communication, characterized in that: Applied to a first data update system, the data update system includes four communication terminals, each communication terminal is connected to the remaining three communication terminals via Bluetooth communication, one of the four communication terminals is a main communication terminal, the remaining communication terminals are all secondary communication terminals, each communication terminal has a data group, and the main communication terminal has initial data information of all data groups; all communication terminals perform change operations on their own data groups according to a preset update sequence; the method includes the following steps: The initial data information includes the current state information corresponding to each element in all data groups; the change operation information is the state information after the change operation changes any element in the data group; The main communication terminal performs initial data update processing according to the acquired change operation information of any data group, and generates corresponding update data information; The main communication terminal synchronously sends the updated update data information to each current communication terminal; So that each communication terminal has the latest status information of all data groups; When the secondary communication terminal obtains the updated data information, the updated data information is saved locally on the secondary communication terminal; The initial data update process includes: The master communication terminal replaces the current state information of the corresponding element in the initial data information with the corresponding state information in the change operation information according to the acquired change operation information of any data group, so as to generate corresponding updated data information.

2. The method according to claim 1, characterized in that The method further comprises: If the number of all elements included in all data groups is less than the maximum sequence number of bits included in the Bluetooth communication data packet, a unique mapping relationship is established between the corresponding bit sequence number in the Bluetooth communication data packet and each element; different values ​​corresponding to each bit identify different states of the corresponding element.

3. The method according to claim 2, characterized in that The value corresponding to each bit includes 0 or 1.

4. The method according to claim 1, characterized in that: The main communication terminal performs initial data update processing according to the acquired change operation information of any data group, including: When the main communication terminal maintains connection with each communication terminal, the main communication terminal performs initial data update processing according to the acquired change operation information of any data group.

5. The method according to claim 1, characterized in that The main communication terminal performs initial data update processing according to the acquired change operation information of any data group, including: When the primary communication terminal is disconnected from at least one secondary communication terminal, the next communication terminal adjacent to the primary communication terminal is used as a new primary communication terminal according to a preset update sequence; The new main communication terminal performs a data change process and an initial data update process for the offline terminal; The offline terminal data change process includes: The new master communication terminal continues to perform change operations on the data group corresponding to the disconnected master communication terminal according to the preset change operation rules, and generates custody change information.

6. The method according to claim 5, characterized in that After the new main communication terminal continues to perform a change operation on the data group corresponding to the disconnected main communication terminal according to the preset change operation rule and generates the trusteeship change information, the offline terminal data change processing further includes: The new main communication terminal uses the trusteeship change information as the change operation information corresponding to the disconnected main communication terminal.

7. The method according to claim 1, characterized in that The method further comprises: When the third communication terminal and / or the fourth communication terminal detects that their own Bluetooth connection is unstable, the Bluetooth connection between the third communication terminal and the fourth communication terminal is disconnected; the third communication terminal and the fourth communication terminal are respectively the second and third secondary communication terminals located after the primary communication terminal according to a preset update sequence.

8. The method according to claim 1, characterized in that Each of the updated data information is correspondingly configured with the original sending terminal ID and the most recent forwarding terminal ID; After obtaining the updated data information, the secondary communication terminal also performs the following operations: If the secondary communication terminal receives the updated data information for the first time, the updated data information is forwarded to the remaining communication terminals; the remaining communication terminals are the communication terminals other than the communication terminals corresponding to the original sending terminal ID and the most recent forwarding terminal ID among the four communication terminals; If the secondary communication terminal does not receive the update data information for the first time, the update data information is not forwarded.

9. A non-transitory computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, a multi-terminal data synchronization method based on Bluetooth communication as described in any one of claims 1 to 8 is implemented.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method for synchronizing multi-terminal data based on Bluetooth communication as described in any one of claims 1 to 8 is implemented.