File synchronization method, electronic device, storage medium and system
The file synchronization method through Bluetooth point-to-point connection and server arbitration solves the problem of low multi-device file synchronization efficiency and achieves efficient and fast file transfer. It is suitable for synchronization scenarios of large batches of devices and avoids traffic costs and hardware deployment.
Patent Information
- Application Number
- CN201910858601.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-09-11
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2039-09-11
AI Technical Summary
Existing multi-device file synchronization methods are inefficient, manual copying is time-consuming, and mobile network and WiFi methods are costly and inefficient, especially when using a large number of devices.
Adopting a file synchronization method, using Bluetooth transmission module and server arbitration, sub-devices perform file synchronization through Bluetooth point-to-point connection. After only one device has the specified file, other devices automatically connect to download and propagate synchronization, avoiding traffic costs and hardware deployment. .
It achieves efficient and fast file synchronization with high transmission efficiency and no increase in cost. It is suitable for centralized synchronization scenarios of large batches of devices.
Smart Images

Figure CN110807011B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data transmission, and in particular to a file synchronization method. Background Art
[0002] At present, with the rapid development of society, networking has become a major trend, and the interaction, transmission and synchronization of information is an important communication or network means.
[0003] There are several ways to synchronize files across multiple devices:
[0004] 1. Manual method: Copy files one by one through mobile storage devices. This method is feasible for a small number of devices, but it consumes too much manpower for a large number of devices.
[0005] 2. Mobile network method: Download the server file directly through the mobile network connection to achieve synchronization. This method will consume a lot of traffic costs when there are many devices.
[0006] 3. WiFi method: Build a WiFi hotspot, and then connect the devices to the WiFi hotspot in batches to download files. Because the number of devices that can be connected to the WiFi hotspot is limited, it is necessary to connect the devices in batches, and an arbitration control is required. Building a WiFi hotspot also requires hardware and network costs. Because it is necessary to queue updates from the same data source, if there are many devices, the update will be time-consuming and inefficient. Summary of the invention
[0007] In order to overcome the deficiencies of the prior art, one of the objectives of the present invention is to provide a file synchronization method that can solve the problem of low efficiency.
[0008] One of the purposes of the present invention is achieved by the following technical solution:
[0009] A file synchronization method is applied to a file synchronization system. The file synchronization system includes a plurality of sub-devices, a server and a configuration database. The sub-devices interact with each other. A Bluetooth transmission module is arranged on the sub-device. The configuration database interacts with the server. The method includes the following steps: a data request step: the sub-device reads a local file list, identifies itself and requests a server; an identification step: the server determines whether the file in the sub-device needs to be updated according to the request information. If so, it is determined to be a device client, and if not, it is determined to be a device server; a file synchronization step: both the device server and the device client turn on the Bluetooth transmission module, and the device client scans the Bluetooth device and connects to the device server; a synchronization completion step: after the synchronization is completed, the method returns to the data request step.
[0010] Furthermore, in the data request step, the configuration database interacts with the server and configures the files that the sub-device needs to update.
[0011] Furthermore, in the identification step, the server determines whether the local file list information read by the sub-device is consistent with the file list information to be updated on the server. If they are consistent, it is determined to be a device client; if they are inconsistent, it is determined to be a device server.
[0012] Furthermore, in the file synchronization step, the device server and the device client are connected after identity verification. If the identity verification fails, the connection is not made.
[0013] Furthermore, in the file synchronization step, the device client scans the Bluetooth device and connects to the device server with the largest signal value.
[0014] Furthermore, in the data request step, the configuration database pre-configures the files to be updated or synchronized.
[0015] An electronic device, comprising: a processor;
[0016] A memory; and a program, wherein the program is stored in the memory and is configured to be executed by a processor, the program including means for executing the file synchronization method.
[0017] A computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement the file synchronization method.
[0018] A file synchronization system, the file synchronization system includes a plurality of sub-devices, a server and a configuration database, the sub-devices interact with each other, a Bluetooth transmission module is arranged on each sub-device, the configuration database interacts with the server, the configuration database pre-configures files to be updated or synchronized, the configuration database synchronizes files with the server, the sub-device reads a local file list and requests the server, the server identifies whether the files in the sub-device need to be updated, if so, it is a device client, if not, it is determined to be a device server; the device server and the device client both turn on the Bluetooth transmission module, the device client scans Bluetooth devices and connects with the device server to synchronize files.
[0019] Compared with the prior art, the present invention has the following beneficial effects:
[0020] The sub-device reads the local file list, identifies itself and requests the server; the server determines whether the file in the sub-device needs to be updated based on the request information. If so, it is determined to be the device client, if not, it is determined to be the device server; the device server and the device client both turn on the Bluetooth transmission module, the device client scans the Bluetooth device and connects to the device server; after the synchronization is completed, it returns to the data request step. In the application process, only one sub-device needs to have a file that needs to be synchronized. After it reports to the server, other devices can connect to the sub-device to receive the file. After receiving the file, the sub-device can transfer the file to other devices. In this way of propagation synchronization, as more and more devices are synchronized, the synchronization speed will become faster and faster, and the cost will not increase. The transmission efficiency is high and the speed is fast.
[0021] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the following specifically cites a preferred embodiment and describes it in detail with the accompanying drawings as follows. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 The flowchart of a preferred embodiment of the file synchronization method of the present invention is shown in FIG. DETAILED DESCRIPTION
[0023] The present invention is further described below in conjunction with the accompanying drawings and specific implementation methods. It should be noted that, under the premise of no conflict, the various embodiments or technical features described below can be arbitrarily combined to form a new embodiment.
[0024] It should be noted that when a component is referred to as being "fixed to" another component, it may be directly on the other component or there may also be a component centered. When a component is considered to be "connected to" another component, it may be directly connected to the other component or there may also be a component centered. When a component is considered to be "set on" another component, it may be directly set on the other component or there may also be a component centered. The terms "vertical", "horizontal", "left", "right" and similar expressions used herein are for illustrative purposes only.
[0025] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used herein in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more related listed items.
[0026] See also Figure 1 A file synchronization method is applied to a file synchronization system, wherein the file synchronization system includes a plurality of sub-devices, a server and a configuration database, wherein the sub-devices interact with each other, a Bluetooth transmission module is provided on each sub-device, and the configuration database interacts with the server, including the following steps:
[0027] Data request step: the sub-device reads the local file list, identifies itself and requests the server; in the data request step, the configuration database interacts with the server and configures the files that the sub-device needs to update.
[0028] Identification step: The server determines whether the files in the sub-device need to be updated based on the request information. If so, it is determined to be a device client, if not, it is determined to be a device server; in the identification step, the server determines whether the local file list information read by the sub-device is consistent with the file list information to be updated on the server. If they are consistent, it is determined to be a device client, if not, it is determined to be a device server.
[0029] Preferably, in the data request step, the configuration database pre-configures the files to be updated or synchronized. The configuration database is connected to a control terminal, and the data is allocated through the control terminal. The operability is high.
[0030] File synchronization step: both the device server and the device client turn on the Bluetooth transmission module, and the device client scans the Bluetooth device and connects to the device server; in the file synchronization step, the device server and the device client connect after identity verification, and if the identity verification fails, the connection is not made. In actual use, the device client scans the Bluetooth device and connects to the device server with the largest signal value. This further improves the efficiency and speed of transmission.
[0031] Synchronization completion step: After synchronization is completed, return to the data request step. In the application process, only one sub-device needs to have files that need to be synchronized. After it reports to the server, other devices can connect to the sub-device to receive the files. After receiving the files, the sub-device can transfer files to other devices. In this propagation-based synchronization method, as more and more devices are synchronized, the synchronization speed will become faster and faster, and the cost will not increase. The transmission efficiency is high and the speed is fast.
[0032] Specifically, in practical application, this application has the following two outstanding features:
[0033] 1. Bluetooth point-to-point file transmission is adopted, and the transmission process does not generate traffic costs. And no additional hardware deployment is required. As long as the devices are concentrated together and within the connection range of Bluetooth, synchronization can be achieved. The more devices there are, the more obvious the cost and efficiency advantages are.
[0034] 2. Bluetooth and mobile network technology, through server arbitration to complete the technical solution of automatic file synchronization of large quantities (more than 100) of sub-devices, can be used in the scenario where a large number of devices are concentrated together and want to complete file synchronization. It only needs one device to have the specified file at the beginning. Through the arbitration of the server, other devices will automatically connect to it via Bluetooth and download the file, and then transmit it to other devices in need. After receiving the file, each device can transfer the file to other devices, realizing file transmission synchronization.
[0035] An electronic device, comprising: a processor;
[0036] A memory; and a program, wherein the program is stored in the memory and is configured to be executed by a processor, the program including means for executing the file synchronization method.
[0037] A computer-readable storage medium stores a computer program, wherein the computer program is executed by a processor to implement the file synchronization method.
[0038] A file synchronization system, the file synchronization system includes several sub-devices, a server and a configuration database, the sub-devices interact with each other, the sub-devices are provided with a Bluetooth transmission module, the configuration database interacts with the server, the configuration database pre-configures the files to be updated or synchronized, the configuration database synchronizes files with the server, the sub-device reads the local file list and requests the server, the server identifies whether the files in the sub-device need to be updated, if they need to be updated, it is the device client, if not, it is determined to be the device server; the device server and the device client both turn on the Bluetooth transmission module, the device client scans the Bluetooth device and connects with the device server to synchronize files. The structure is novel, the design is ingenious, the applicability is strong, and it is easy to promote.
[0039] The above-mentioned embodiments are only preferred embodiments of the present invention and cannot be used to limit the scope of protection of the present invention. Any non-substantial changes and substitutions made by technicians in this field on the basis of the present invention shall fall within the scope of protection required by the present invention.
Claims
1. A file synchronization method, applied to a file synchronization system, the file synchronization system comprising a plurality of sub-devices, a server and a configuration database, the sub-devices interacting with each other, the sub-devices being provided with a Bluetooth transmission module, the configuration database interacting with the server, characterized in that: The following steps are involved: Data request step: The sub-device reads the local file list, identifies itself and requests the server; Identification step: The server determines whether the file in the sub-device needs to be updated based on the request information. If yes, it is determined to be a device client. If not, it is determined to be a device server. File synchronization steps: both the device server and the device client turn on the Bluetooth transmission module, and the device client scans the Bluetooth device and connects to the device server for file synchronization; Synchronization completion step: After synchronization is completed, return to the data request step; In the data request step, the configuration database interacts with the server and configures the files that the sub-device needs to update.
2. The file synchronization method according to claim 1, characterized in that: In the identification step, the server determines whether the local file list information read by the sub-device is consistent with the file list information to be updated on the server. If they are consistent, it is determined to be a device client; if they are inconsistent, it is determined to be a device server.
3. The file synchronization method according to claim 1, characterized in that: In the file synchronization step, the device server and the device client are connected after identity verification. If the identity verification fails, the connection is not made.
4. The file synchronization method according to claim 1, characterized in that: In the file synchronization step, the device client scans the Bluetooth device and connects to the device server with the largest signal value.
5. The file synchronization method according to claim 1, characterized in that: In the data request step, the configuration database is pre-configured with the files to be updated or synchronized.
6. An electronic device, characterized in that include: processor; Memory; And a program, wherein the program is stored in the memory and configured to be executed by a processor, and the program includes instructions for executing the method according to any one of claims 1 to 5.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: The computer program is executed by a processor to perform the method according to any one of claims 1 to 5.
8. A file synchronization system, characterized in that: The file synchronization system includes several sub-devices, a server and a configuration database. The sub-devices interact with each other, a Bluetooth transmission module is set on the sub-device, the configuration database interacts with the server, the configuration database pre-configures the files to be updated or synchronized, the configuration database synchronizes files with the server, the sub-device reads the local file list and requests the server, the server identifies whether the files in the sub-device need to be updated, if so, it is the device client, if not, it is determined to be the device server; the device server and the device client both turn on the Bluetooth transmission module, the device client scans the Bluetooth device and connects to the device server for file synchronization.
