[go: up one dir, main page]

CN107105005A - The method and device of synchrodata - Google Patents

The method and device of synchrodata Download PDF

Info

Publication number
CN107105005A
CN107105005A CN201710129417.1A CN201710129417A CN107105005A CN 107105005 A CN107105005 A CN 107105005A CN 201710129417 A CN201710129417 A CN 201710129417A CN 107105005 A CN107105005 A CN 107105005A
Authority
CN
China
Prior art keywords
equipment
scanning signal
wireless scanning
signal
signal strength
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201710129417.1A
Other languages
Chinese (zh)
Other versions
CN107105005B (en
Inventor
林立
冯江
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201710129417.1A priority Critical patent/CN107105005B/en
Publication of CN107105005A publication Critical patent/CN107105005A/en
Application granted granted Critical
Publication of CN107105005B publication Critical patent/CN107105005B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本公开是关于一种同步数据的方法及装置,用于提高同步数据的效率,减少用户操作。所述方法包括:接收无线扫描信号;检测接收的所述无线扫描信号的信号强度是否大于预设的信号强度阈值;在接收的所述无线扫描信号的信号强度大于预设的信号强度阈值时,与发送所述无线扫描信号的第二设备建立数据连接;其中,所述第二设备与所述第一设备属于同类设备,具有相同的设备类型;通过所述数据连接,与所述第二设备同步数据。

The disclosure relates to a method and device for synchronizing data, which are used to improve the efficiency of synchronizing data and reduce user operations. The method includes: receiving a wireless scanning signal; detecting whether the signal strength of the received wireless scanning signal is greater than a preset signal strength threshold; when the received signal strength of the wireless scanning signal is greater than the preset signal strength threshold, Establish a data connection with the second device that sends the wireless scanning signal; wherein, the second device and the first device belong to the same type of device and have the same device type; through the data connection, the second device and the second device Synchronous Data.

Description

同步数据的方法及装置Method and device for synchronizing data

技术领域technical field

本公开涉及通信及计算机处理领域,尤其涉及同步数据的方法及装置。The present disclosure relates to the fields of communication and computer processing, and in particular to a method and device for synchronizing data.

背景技术Background technique

随着电子技术的发展,出现了移动终端、路由器、计算机等设备,并且更新换代很快。用户可能每几年就更换一部新的移动终端或计算机等。用户每次更换新设备时,需要将旧设备中存储的各种信息导入到新设备中,并且在新设备上要进行各种手动设置。上述操作给用户带来很大的不便With the development of electronic technology, equipment such as mobile terminals, routers, and computers have appeared, and they have been updated rapidly. The user may replace a new mobile terminal or computer, etc. every few years. Every time a user replaces a new device, various information stored in the old device needs to be imported into the new device, and various manual settings need to be performed on the new device. The above operation brings great inconvenience to the user

发明内容Contents of the invention

为克服相关技术中存在的问题,本公开提供一种同步数据的方法及装置。In order to overcome the problems existing in related technologies, the present disclosure provides a method and device for synchronizing data.

根据本公开实施例的第一方面,提供一种同步数据的方法,包括:According to a first aspect of an embodiment of the present disclosure, a method for synchronizing data is provided, including:

接收无线扫描信号;Receive wireless scanning signal;

检测接收的所述无线扫描信号的信号强度是否大于预设的信号强度阈值;Detecting whether the signal strength of the received wireless scanning signal is greater than a preset signal strength threshold;

在接收的所述无线扫描信号的信号强度大于预设的信号强度阈值时,与发送所述无线扫描信号的第二设备建立数据连接;其中,所述第二设备与所述第一设备属于同类设备,具有相同的设备类型;When the signal strength of the received wireless scanning signal is greater than a preset signal strength threshold, establish a data connection with a second device that sends the wireless scanning signal; wherein the second device is of the same type as the first device devices, with the same device type;

通过所述数据连接,与所述第二设备同步数据。Data is synchronized with the second device through the data connection.

本公开的实施例提供的技术方案可以包括以下有益效果:本实施例在检测到周围有特别强大的信号时,自动与该设备建立数据连接,并完成数据同步。实现了数据的自动同步,提高了同步效率,减少了用户操作。The technical solutions provided by the embodiments of the present disclosure may include the following beneficial effects: when the present embodiment detects that there is a particularly strong signal around, it automatically establishes a data connection with the device and completes data synchronization. The automatic synchronization of data is realized, the synchronization efficiency is improved, and user operations are reduced.

在一个实施例中,所述接收无线扫描信号,包括:In one embodiment, the receiving the wireless scanning signal includes:

通过第一无线接口,以扫描终端设备的方式,接收无线扫描信号。A wireless scanning signal is received through the first wireless interface in a manner of scanning terminal equipment.

本公开的实施例提供的技术方案可以包括以下有益效果:本实施例通过通用的第一无线接口接收无线扫描信号,可接收到较多设备发送的无线扫描信号,便于建立数据连接,并且兼容较多场景。The technical solutions provided by the embodiments of the present disclosure may include the following beneficial effects: this embodiment receives wireless scanning signals through the common first wireless interface, can receive wireless scanning signals sent by more devices, facilitates the establishment of data connections, and is compatible with Multiple scenes.

在一个实施例中,所述在接收的所述无线扫描信号的信号强度大于预设的信号强度阈值时,与发送所述无线扫描信号的第二设备建立数据连接,包括:In one embodiment, when the received signal strength of the wireless scanning signal is greater than a preset signal strength threshold, establishing a data connection with the second device sending the wireless scanning signal includes:

在接收的所述无线扫描信号的信号强度大于预设的信号强度阈值时,开启预设的第二无线接口的通信功能;When the signal strength of the received wireless scanning signal is greater than a preset signal strength threshold, enable a preset communication function of the second wireless interface;

通过所述第二无线接口与发送所述无线扫描信号的第二设备建立数据连接。Establishing a data connection with the second device sending the wireless scanning signal through the second wireless interface.

本公开的实施例提供的技术方案可以包括以下有益效果:本实施例通过开启预设的第二无线接口的通信功能与第二设备建立数据连接,提高了连接的安全性,并且可以不需要第二设备提供用户名和密码等,减少了用户操作。The technical solutions provided by the embodiments of the present disclosure may include the following beneficial effects: this embodiment establishes a data connection with the second device by enabling the communication function of the preset second wireless interface, which improves the security of the connection, and does not require the second The second device provides user names and passwords, etc., reducing user operations.

在一个实施例中,根据接收的所述无线扫描信号,获得所述第二设备的设备信息;In an embodiment, the device information of the second device is obtained according to the received wireless scanning signal;

根据所述设备信息判断所述第二设备是否与所述第一设备属于同类设备;judging whether the second device and the first device belong to the same type of device according to the device information;

在接收的所述无线扫描信号的信号强度大于预设的信号强度阈值时,以及在确定所述第二设备与所述第一设备属于同类设备时,与发送所述无线扫描信号的第二设备建立数据连接。When the signal strength of the received wireless scanning signal is greater than a preset signal strength threshold, and when it is determined that the second device and the first device belong to the same type of device, communicate with the second device that sent the wireless scanning signal Establish a data connection.

本公开的实施例提供的技术方案可以包括以下有益效果:本实施例在确定第二设备与第一设备属于同类设备,具有相同的设备类型时,与第二设备建立数据连接,提高了连接的安全性,有助于快捷的与第二设备同步数据,简化处理过程。The technical solutions provided by the embodiments of the present disclosure may include the following beneficial effects: In this embodiment, when it is determined that the second device and the first device belong to the same type of device and have the same device type, a data connection is established with the second device, which improves the reliability of the connection. Security, which helps to quickly and easily synchronize data with a second device, simplifying the process.

在一个实施例中,检测接收的所述无线扫描信号的信号强度是否大于预设的信号强度阈值之前,所述方法还包括:In one embodiment, before detecting whether the signal strength of the received wireless scanning signal is greater than a preset signal strength threshold, the method further includes:

接收同步数据指令。Receive synchronous data command.

本公开的实施例提供的技术方案可以包括以下有益效果:本实施例实现了由用户控制是否同步数据。The technical solutions provided by the embodiments of the present disclosure may include the following beneficial effects: this embodiment enables the user to control whether to synchronize data.

根据本公开实施例的第二方面,提供一种同步数据的装置,包括:According to a second aspect of an embodiment of the present disclosure, an apparatus for synchronizing data is provided, including:

第一接收模块,用于接收无线扫描信号;The first receiving module is used to receive wireless scanning signals;

检测模块,用于检测接收的所述无线扫描信号的信号强度是否大于预设的信号强度阈值;A detection module, configured to detect whether the signal strength of the received wireless scanning signal is greater than a preset signal strength threshold;

连接模块,用于在接收的所述无线扫描信号的信号强度大于预设的信号强度阈值时,与发送所述无线扫描信号的第二设备建立数据连接;其中,所述第二设备与所述第一设备属于同类设备,具有相同的设备类型;A connection module, configured to establish a data connection with a second device sending the wireless scanning signal when the received signal strength of the wireless scanning signal is greater than a preset signal strength threshold; wherein, the second device is connected to the The first device belongs to the same type of device and has the same device type;

同步模块,用于通过所述数据连接,与所述第二设备同步数据。A synchronization module, configured to synchronize data with the second device through the data connection.

在一个实施例中,所述第一接收模块包括:In one embodiment, the first receiving module includes:

第一接收子模块,用于通过第一无线接口,以扫描终端设备的方式,接收无线扫描信号。The first receiving sub-module is configured to receive wireless scanning signals in a manner of scanning terminal devices through the first wireless interface.

在一个实施例中,所述连接模块包括:In one embodiment, the connection module includes:

开启子模块,用于在接收的所述无线扫描信号的信号强度大于预设的信号强度阈值时,开启预设的第二无线接口的通信功能;Opening a submodule, configured to enable the communication function of the preset second wireless interface when the signal strength of the received wireless scanning signal is greater than a preset signal strength threshold;

建立子模块,用于通过所述第二无线接口与发送所述无线扫描信号的第二设备建立数据连接。The establishing submodule is configured to establish a data connection with the second device sending the wireless scanning signal through the second wireless interface.

在一个实施例中,所述连接模块包括:In one embodiment, the connection module includes:

获取子模块,用于根据接收的所述无线扫描信号,获得所述第二设备的设备信息;An obtaining submodule, configured to obtain device information of the second device according to the received wireless scanning signal;

判断子模块,用于根据所述设备信息判断所述第二设备是否与所述第一设备属于同类设备;A judging submodule, configured to judge whether the second device belongs to the same type of device as the first device according to the device information;

第二建立子模块,用于在接收的所述无线扫描信号的信号强度大于预设的信号强度阈值时,以及在确定所述第二设备与所述第一设备属于同类设备时,与发送所述无线扫描信号的第二设备建立数据连接。The second establishing submodule is configured to communicate with the sending device when the signal strength of the received wireless scanning signal is greater than a preset signal strength threshold and when it is determined that the second device and the first device belong to the same type of device A data connection is established with the second device receiving the wireless scanning signal.

在一个实施例中,所述装置还包括:In one embodiment, the device also includes:

第二接收模块,用于接收同步数据指令。The second receiving module is used for receiving synchronous data instructions.

根据本公开实施例的第三方面,提供一种同步数据的装置,包括:According to a third aspect of an embodiment of the present disclosure, an apparatus for synchronizing data is provided, including:

处理器;processor;

用于存储处理器可执行指令的存储器;memory for storing processor-executable instructions;

其中,所述处理器被配置为:Wherein, the processor is configured as:

接收无线扫描信号;Receive wireless scanning signal;

检测接收的所述无线扫描信号的信号强度是否大于预设的信号强度阈值;Detecting whether the signal strength of the received wireless scanning signal is greater than a preset signal strength threshold;

在接收的所述无线扫描信号的信号强度大于预设的信号强度阈值时,与发送所述无线扫描信号的第二设备建立数据连接;其中,所述第二设备与所述第一设备属于同类设备,具有相同的设备类型;When the signal strength of the received wireless scanning signal is greater than a preset signal strength threshold, establish a data connection with a second device that sends the wireless scanning signal; wherein the second device is of the same type as the first device devices, with the same device type;

通过所述数据连接,与所述第二设备同步数据。Data is synchronized with the second device through the data connection.

应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure.

附图说明Description of drawings

此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description serve to explain the principles of the disclosure.

图1是根据一示例性实施例示出的一种同步数据的方法的流程图。Fig. 1 is a flowchart showing a method for synchronizing data according to an exemplary embodiment.

图2是根据一示例性实施例示出的一种同步数据的方法的流程图。Fig. 2 is a flowchart showing a method for synchronizing data according to an exemplary embodiment.

图3是根据一示例性实施例示出的一种同步数据的方法的流程图。Fig. 3 is a flowchart showing a method for synchronizing data according to an exemplary embodiment.

图4是根据一示例性实施例示出的一种同步数据的装置的框图。Fig. 4 is a block diagram of an apparatus for synchronizing data according to an exemplary embodiment.

图5是根据一示例性实施例示出的一种第一接收模块的框图。Fig. 5 is a block diagram of a first receiving module according to an exemplary embodiment.

图6是根据一示例性实施例示出的一种连接模块的框图。Fig. 6 is a block diagram of a connection module according to an exemplary embodiment.

图7是根据一示例性实施例示出的一种连接模块的框图。Fig. 7 is a block diagram of a connection module according to an exemplary embodiment.

图8是根据一示例性实施例示出的一种同步数据的装置的框图。Fig. 8 is a block diagram of an apparatus for synchronizing data according to an exemplary embodiment.

图9是根据一示例性实施例示出的一种装置的框图。Fig. 9 is a block diagram of a device according to an exemplary embodiment.

图10是根据一示例性实施例示出的一种装置的框图。Fig. 10 is a block diagram of a device according to an exemplary embodiment.

具体实施方式detailed description

这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本公开相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本公开的一些方面相一致的装置和方法的例子。Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numerals in different drawings refer to the same or similar elements unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatuses and methods consistent with aspects of the present disclosure as recited in the appended claims.

相关技术中,路由器、移动终端等设备使用一定年限后,可能需要更换新的设备。但是旧设备中有用户的一些个人设置,以及存储了用户的个人信息等。在使用新设备时,用户需要在新设备上重复旧设备的个人设置,以及通过手动操作,将旧设备上的个人数据导出,再导入到新设备中。上述过程较为繁琐,给用户带来不便。In the related art, devices such as routers and mobile terminals may need to be replaced with new devices after a certain number of years of use. However, there are some personal settings of the user in the old device, and the personal information of the user is stored. When using a new device, the user needs to repeat the personal settings of the old device on the new device, and manually export the personal data on the old device and then import it into the new device. The above-mentioned process is comparatively loaded down with trivial details, brings inconvenience to the user.

为解决上述问题,本实施例中第一设备在检测到有信号特别强大的同类的第二设备时,自动与第二设备建立数据连接并进行数据同步。同步过程自动完成,同步效率较高,减少了用户操作。In order to solve the above problem, in this embodiment, when the first device detects a second device of the same type with a particularly strong signal, it automatically establishes a data connection with the second device and performs data synchronization. The synchronization process is automatically completed, the synchronization efficiency is high, and user operations are reduced.

图1是根据一示例性实施例示出的一种同步数据的方法的流程图,如图1所示,该方法可以由第一设备实现,包括以下步骤:Fig. 1 is a flow chart of a method for synchronizing data according to an exemplary embodiment. As shown in Fig. 1, the method may be implemented by a first device, and includes the following steps:

在步骤101中,接收无线扫描信号。In step 101, a wireless scanning signal is received.

在步骤102中,检测接收的所述无线扫描信号的信号强度是否大于预设的信号强度阈值。In step 102, it is detected whether the signal strength of the received wireless scanning signal is greater than a preset signal strength threshold.

在步骤103中,在接收的无线扫描信号的信号强度大于预设的信号强度阈值时,与发送无线扫描信号的第二设备建立数据连接;其中,第二设备与第一设备属于同类设备,具有相同的设备类型。同类设备是指设备类型相同,如相同的操作系统,具有相同类型的功能等。例如,第二设备与第一设备都为路由器,或都为手机,或者一个为手机一个为pad等。In step 103, when the signal strength of the received wireless scanning signal is greater than a preset signal strength threshold, a data connection is established with the second device that sends the wireless scanning signal; wherein, the second device and the first device belong to the same type of device and have same device type. Devices of the same type refer to devices of the same type, such as the same operating system and the same type of functions. For example, both the second device and the first device are routers, or both are mobile phones, or one is a mobile phone and the other is a pad, etc.

在接收的所述无线扫描信号的信号强度不大于预设的信号强度阈值时,结束本次流程。When the signal strength of the received wireless scanning signal is not greater than the preset signal strength threshold, this process ends.

在步骤104中,通过数据连接,与第二设备同步数据。In step 104, data is synchronized with the second device through the data connection.

本实施例中第一设备可以是接入点设备(如路由器等),或是开启热点功能的终端设备(如移动终端或计算机等)。In this embodiment, the first device may be an access point device (such as a router, etc.), or a terminal device (such as a mobile terminal or a computer, etc.) with a hotspot function enabled.

本实施例中所述数据至少包括下列一项数据:配置数据、用户数据和系统数据。The data in this embodiment includes at least one of the following data: configuration data, user data and system data.

以第一设备为路由器为例,那么第二设备也同为路由器。例如,第一设备为已使用路由器,已使用路由器存储有用户的个人设置,如路由器的用户名和密码,宽带帐户的用户名和密码,屏蔽设备的黑名单等。如果已使用路由器包括大存储量的硬盘等存储介质,已使用路由器还可能存储了用户数据,如图片、文档、音视频文件、电影等。第二设备为待使用路由器,用户未使用过,或已经恢复出厂设置。Taking the first device as a router as an example, the second device is also a router. For example, the first device is a used router, and the used router stores the user's personal settings, such as the user name and password of the router, the user name and password of the broadband account, the blacklist of shielded devices, and the like. If the used router includes storage media such as a hard disk with a large storage capacity, the used router may also store user data, such as pictures, documents, audio and video files, movies, etc. The second device is a router to be used, which has not been used by the user, or has been restored to factory settings.

已使用路由器与待使用路由器靠近放置,距离越近越容易扫描发现彼此。已使用路由器通过无线方式(如WiFi)广播信号,以扫描周边的终端设备。待使用路由器可接收到广播信号后,向已使用路由器发送响应信号。已使用路由器接收待使用路由器发送的响应信号,相当于执行步骤101。已使用路由器确定响应信号的信号强度(RSSI),判断该信号强度是否大于预设的信号强度阈值。一般使用时,两个路由器不会距离很近,因此相互检测到的信号强度有限。为了避免误操作,可以将该信号强度阈值设置的比较高,以便确定两个路由器之间需要执行数据同步。例如靠近放置(如20厘米以内)时才能满足该信号强度阈值。例如,已使用路由器检测出有信号超过预设的信号强度阈值的待使用路由器,并且属于同类设备,具有相同的设备类型时,确定需要进行同步处理。然后,已使用路由器发起与待使用路由器的数据连接,并通过该数据连接与待使用路由器同步数据。The used router and the router to be used are placed close to each other. The closer the distance, the easier it is to scan and find each other. Routers have been used to broadcast signals wirelessly (such as WiFi) to scan surrounding terminal devices. After the used router can receive the broadcast signal, a response signal is sent to the used router. The used router receives the response signal sent by the router to be used, which is equivalent to performing step 101 . The router has been used to determine the signal strength (RSSI) of the response signal and determine whether the signal strength is greater than a preset signal strength threshold. In general use, the distance between two routers will not be very close, so the signal strength detected by each other is limited. In order to avoid misoperation, the signal strength threshold can be set relatively high, so as to determine that data synchronization needs to be performed between two routers. For example, the signal strength threshold can only be met when placed close to each other (for example, within 20 centimeters). For example, when the router to be used detects that the router to be used whose signal exceeds the preset signal strength threshold belongs to the same type of device and has the same device type, it is determined that synchronization processing is required. Then, the used router initiates a data connection with the to-be-used router, and synchronizes data with the to-be-used router through the data connection.

同步过程中,已使用路由器将预先确定的同步数据打包,生成数据包。将数据包导出,通过所述连接发送给待使用路由器。待使用路由器导入数据包并加载同步数据,还可以完成各种配置。During synchronization, a router has been used to package predetermined synchronization data to generate a data packet. Export the data packet and send it to the router to be used through the connection. After using the router to import the data package and load the synchronization data, various configurations can also be completed.

同步过程还可以由待使用路由器发起。例如,待使用路由器通过无线方式(如WiFi)广播信号,以扫描周边的终端设备。已使用路由器可接收到广播信号后,向待使用路由器发送响应信号。待使用路由器接收已使用路由器发送的响应信号,相当于执行步骤101。待使用路由器确定响应信号的信号强度(RSSI),判断该信号强度是否大于预设的信号强度阈值。待使用路由器检测出有信号大于预设的信号强度阈值的已使用路由器时,并且属于同类设备,具有相同的设备类型(可通过响应信号获知设备类型)时,确定需要进行同步处理。则,待使用路由器发起与已使用路由器的连接,并通过该连接向已使用路由器发送同步请求,与已使用路由器同步数据。The synchronization process can also be initiated by the router to be used. For example, the router to be used broadcasts a signal in a wireless manner (such as WiFi) to scan surrounding terminal devices. After receiving the broadcast signal, the used router sends a response signal to the router to be used. The router to be used receives the response signal sent by the router in use, which is equivalent to performing step 101 . The router to be used determines the signal strength (RSSI) of the response signal, and determines whether the signal strength is greater than a preset signal strength threshold. When the used router detects that there is a used router with a signal greater than the preset signal strength threshold, and it belongs to the same type of device and has the same device type (the device type can be known through the response signal), it is determined that synchronization processing is required. Then, the router to be used initiates a connection with the used router, and sends a synchronization request to the used router through the connection to synchronize data with the used router.

以第一设备为移动终端为例,那么第二设备为同类型的移动终端。例如,第一设备为旧移动终端,第二设备为新移动终端。旧移动终端开启热点功能,通过无线方式(如WiFi)广播信号,以扫描周边的终端设备。新移动终端可接收到广播信号,向旧移动终端发送响应信号。旧移动终端接收新移动终端发送的响应信号,相当于执行步骤101。旧移动终端确定响应信号的信号强度(RSSI),判断该信号强度是否大于预设的信号强度阈值。旧移动终端检测出有信号如此强的新移动终端时,并且属于同类设备,具有相同的设备类型时,确定需要进行同步处理。则,旧移动终端与新移动终端建立数据连接,并通过该连接与新移动终端同步数据。同步过程与路由器的同步过程类似。Taking the first device as a mobile terminal as an example, then the second device is a mobile terminal of the same type. For example, the first device is an old mobile terminal, and the second device is a new mobile terminal. The old mobile terminal turns on the hotspot function, and broadcasts a signal through a wireless method (such as WiFi) to scan surrounding terminal devices. The new mobile terminal can receive the broadcast signal and send a response signal to the old mobile terminal. The old mobile terminal receives the response signal sent by the new mobile terminal, which is equivalent to executing step 101 . The old mobile terminal determines the signal strength (RSSI) of the response signal, and judges whether the signal strength is greater than a preset signal strength threshold. When the old mobile terminal detects that there is a new mobile terminal with such a strong signal, and it belongs to the same type of equipment and has the same equipment type, it is determined that synchronization processing is required. Then, the old mobile terminal establishes a data connection with the new mobile terminal, and synchronizes data with the new mobile terminal through the connection. The synchronization process is similar to that of a router.

还可以由新移动终端发起同步过程。新移动终端开启热点功能,新移动终端通过无线方式(如WiFi)广播信号,以扫描周边的终端设备。旧移动终端可接收到广播信号,向新移动终端发送响应信号。新移动终端接收旧移动终端发送的响应信号,相当于执行步骤101。新移动终端确定响应信号的信号强度(RSSI),判断该信号强度是否大于预设的信号强度阈值。新移动终端检测出有信号如此强的旧移动终端时,并且属于同类设备,具有相同的设备类型时,确定需要进行同步处理。则,新移动终端发起与旧移动终端的连接,并通过该连接向旧移动终端发送同步请求,与旧移动终端同步数据。The synchronization process can also be initiated by a new mobile terminal. The hotspot function is enabled on the new mobile terminal, and the new mobile terminal broadcasts signals through wireless means (such as WiFi) to scan surrounding terminal devices. The old mobile terminal can receive the broadcast signal and send a response signal to the new mobile terminal. The new mobile terminal receives the response signal sent by the old mobile terminal, which is equivalent to executing step 101 . The new mobile terminal determines the signal strength (RSSI) of the response signal, and judges whether the signal strength is greater than a preset signal strength threshold. When the new mobile terminal detects that there is an old mobile terminal with such a strong signal, and it belongs to the same type of equipment, it is determined that synchronization processing is required. Then, the new mobile terminal initiates a connection with the old mobile terminal, and sends a synchronization request to the old mobile terminal through the connection to synchronize data with the old mobile terminal.

在一个实施例中,步骤101包括:步骤A。In one embodiment, step 101 includes: step A.

在步骤A中,通过第一无线接口,以扫描终端设备的方式,接收无线扫描信号。In step A, a wireless scanning signal is received through the first wireless interface in a manner of scanning terminal devices.

例如,第一设备为路由器。路由器包括WiFi模块,WiFi模块包括至少两个端口。端口1(即第一无线接口)为常开状态,端口2为关闭状态。端口1用于与外部设备的通用连接。路由器可以通过端口1周期性的广播无线扫描信号,以便周围的设备可以较快的发现路由器并与路由器建立数据连接。For example, the first device is a router. The router includes a WiFi module, and the WiFi module includes at least two ports. Port 1 (that is, the first wireless interface) is normally open, and port 2 is closed. Port 1 is used for general purpose connection with external devices. The router can periodically broadcast wireless scanning signals through port 1, so that the surrounding devices can quickly discover the router and establish a data connection with the router.

本实施例通过通用的第一无线接口接收无线扫描信号,兼容大多数场景,便于较快的与第二设备建立数据连接。In this embodiment, the wireless scanning signal is received through the common first wireless interface, which is compatible with most scenarios and facilitates the establishment of a data connection with the second device quickly.

在一个实施例中,步骤103包括:步骤B1-步骤B2。In one embodiment, step 103 includes: step B1-step B2.

在步骤B1中,在接收的所述无线扫描信号的信号强度大于预设的信号强度阈值时,开启预设的第二无线接口的通信功能。In step B1, when the signal strength of the received wireless scanning signal is greater than a preset signal strength threshold, a preset communication function of the second wireless interface is enabled.

在步骤B2中,通过所述第二无线接口与发送所述无线扫描信号的第二设备建立数据连接。In step B2, a data connection is established with a second device sending the wireless scanning signal through the second wireless interface.

第二无线接口(如前述例子中的端口2)默认为关闭状态(或称隐藏状态),第一设备在通过第一无线接口发现第二设备,并确认第二设备为同类设备时,确定需要与第二设备进行同步操作,则将第二无线接口置为开启状态,通过第二无线接口与第二设备建立数据连接。The second wireless interface (such as port 2 in the previous example) is in the closed state (or hidden state) by default. When the first device discovers the second device through the first wireless interface and confirms that the second device is the same type of device, it needs to To perform a synchronous operation with the second device, the second wireless interface is turned on, and a data connection is established with the second device through the second wireless interface.

为了安全性,第一无线接口一般设有用户名和密码,第二设备向第一设备发送正确的用户名和密码后才可以与第一设备建立数据连接。而本实施例中第二无线接口可以不采用用户名和密码,用户也就不需要在第二设备上配置用户名和密码,减少了用户操作。第二无线接口在通常情况下为关闭状态,也保证了安全性。For security, the first wireless interface is generally provided with a user name and password, and the second device can establish a data connection with the first device only after sending the correct user name and password to the first device. However, in this embodiment, the second wireless interface may not use a user name and password, and the user does not need to configure the user name and password on the second device, which reduces user operations. The second wireless interface is usually closed, which also ensures safety.

在一个实施例中,步骤103包括:步骤C1-步骤C3。In one embodiment, step 103 includes: step C1-step C3.

在步骤C1中,根据接收的所述无线扫描信号,获得所述第二设备的设备信息。In step C1, device information of the second device is obtained according to the received wireless scanning signal.

在步骤C2中,根据所述设备信息判断所述第二设备是否与所述第一设备属于同类设备。In step C2, it is judged according to the device information whether the second device belongs to the same type of device as the first device.

在步骤C3中,在接收的所述无线扫描信号的信号强度大于预设的信号强度阈值时,以及在确定所述第二设备与所述第一设备属于同类设备时,与发送所述无线扫描信号的第二设备建立数据连接。In step C3, when the signal strength of the received wireless scanning signal is greater than a preset signal strength threshold, and when it is determined that the second device and the first device belong to the same type of device, send the wireless scanning signal to the second device to establish a data connection.

第一设备通过第一无线接口广播信号。第二设备接收该广播的信号后,向第一设备反馈无线扫描信号,反馈的无线扫描信号可以包括第二设备的设备信息,如设备类型、设备标识等。第一设备通过第一无线接口接收第二设备反馈的无线扫描信号,并获知第二设备的设备信息。根据第二设备的设备信息,判断第二设备是否与自身同属一类设备,如果是一类设备,信号强度又非常大,则确定需要进行同步操作。此时可以开启第二无线接口,通过第二无线接口与第二设备建立数据连接。然后通过第二无线接口同步数据。The first device broadcasts a signal through the first wireless interface. After receiving the broadcast signal, the second device feeds back a wireless scanning signal to the first device, and the fed back wireless scanning signal may include device information of the second device, such as device type and device identifier. The first device receives the wireless scanning signal fed back by the second device through the first wireless interface, and obtains device information of the second device. According to the device information of the second device, it is judged whether the second device belongs to the same type of device as itself. If it is a type of device and the signal strength is very high, it is determined that a synchronization operation is required. At this time, the second wireless interface may be turned on, and a data connection is established with the second device through the second wireless interface. The data is then synchronized via the second wireless interface.

在一个实施例中,检测接收的所述无线扫描信号的信号强度是否大于预设的信号强度阈值之前,所述方法还包括:步骤D。In one embodiment, before detecting whether the signal strength of the received wireless scanning signal is greater than a preset signal strength threshold, the method further includes: Step D.

在步骤D中,接收同步数据指令。In step D, a synchronization data command is received.

例如,第一设备和第二设备均为路由器。用户通过无线终端(如移动终端)与第一设备建立数据连接。无线终端安装有用于控制路由器的app(应用),用户在app上输入同步数据指令。无线终端将同步数据指令发送给第一设备,第一设备确定需要发起同步过程,开始执行步骤102。For example, both the first device and the second device are routers. The user establishes a data connection with the first device through a wireless terminal (such as a mobile terminal). The wireless terminal is installed with an app (application) for controlling the router, and the user inputs an instruction for synchronizing data on the app. The wireless terminal sends the synchronization data instruction to the first device, and the first device determines that a synchronization process needs to be initiated, and starts to execute step 102 .

又如,第一设备和第二设备均为移动终端。第一设备安装有用于控制路由器的app,用户在app上输入同步数据指令。第一设备确定需要发起同步过程,开始执行步骤102。In another example, both the first device and the second device are mobile terminals. The first device is installed with an app for controlling the router, and the user inputs an instruction for synchronizing data on the app. The first device determines that a synchronization process needs to be initiated, and starts to execute step 102 .

本实施例提供了由用户控制是否同步数据的接口。This embodiment provides an interface for the user to control whether to synchronize data.

下面通过几个实施例详细介绍实现过程。The implementation process will be described in detail below through several embodiments.

图2是根据一示例性实施例示出的一种同步数据的方法的流程图,如图2所示,该方法可以由第一设备实现,包括以下步骤:Fig. 2 is a flow chart showing a method for synchronizing data according to an exemplary embodiment. As shown in Fig. 2, the method may be implemented by a first device, and includes the following steps:

在步骤201中,接收同步数据指令。In step 201, a synchronization data command is received.

在步骤202中,接收无线扫描信号。In step 202, a wireless scanning signal is received.

在步骤203中,检测接收的所述无线扫描信号的信号强度是否大于预设的信号强度阈值。在接收的所述无线扫描信号的信号强度大于预设的信号强度阈值时,继续步骤204;在接收的所述无线扫描信号的信号强度不大于预设的信号强度阈值时,结束本次流程。In step 203, it is detected whether the signal strength of the received wireless scanning signal is greater than a preset signal strength threshold. When the received signal strength of the wireless scanning signal is greater than the preset signal strength threshold, continue to step 204; when the received signal strength of the wireless scanning signal is not greater than the preset signal strength threshold, end this procedure.

在步骤204中,根据接收的所述无线扫描信号,获得所述第二设备的设备信息。In step 204, device information of the second device is obtained according to the received wireless scanning signal.

在步骤205中,根据所述设备信息判断所述第二设备是否与所述第一设备属于同类设备。在确定所述第二设备与所述第一设备属于同类设备时,继续步骤206;在确定所述第二设备与所述第一设备不属于同类设备时,结束本次流程。In step 205, it is judged according to the device information whether the second device belongs to the same type of device as the first device. When it is determined that the second device and the first device belong to the same type of device, continue to step 206; when it is determined that the second device and the first device do not belong to the same type of device, this process ends.

在步骤206中,与发送所述无线扫描信号的第二设备建立数据连接。In step 206, a data connection is established with the second device sending the wireless scanning signal.

在步骤207中,通过所述数据连接,与所述第二设备同步数据。In step 207, data is synchronized with the second device through the data connection.

图3是根据一示例性实施例示出的一种同步数据的方法的流程图,如图3所示,该方法可以由第一设备实现,包括以下步骤:Fig. 3 is a flowchart of a method for synchronizing data according to an exemplary embodiment. As shown in Fig. 3, the method may be implemented by a first device, and includes the following steps:

在步骤301中,通过第一无线接口,以扫描终端设备的方式,接收无线扫描信号。In step 301, a wireless scanning signal is received through a first wireless interface in a manner of scanning terminal devices.

在步骤302中,根据接收的所述无线扫描信号,获得所述第二设备的设备信息。In step 302, device information of the second device is obtained according to the received wireless scanning signal.

在步骤303中,检测接收的所述无线扫描信号的信号强度是否大于预设的信号强度阈值。在接收的所述无线扫描信号的信号强度大于预设的信号强度阈值时,继续步骤304;在接收的所述无线扫描信号的信号强度不大于预设的信号强度阈值时,结束本次流程。In step 303, it is detected whether the signal strength of the received wireless scanning signal is greater than a preset signal strength threshold. When the received signal strength of the wireless scanning signal is greater than the preset signal strength threshold, continue to step 304; when the received signal strength of the wireless scanning signal is not greater than the preset signal strength threshold, end this procedure.

在步骤304中,开启预设的第二无线接口的通信功能。In step 304, a preset communication function of the second wireless interface is enabled.

在步骤305中,通过所述第二无线接口与发送所述无线扫描信号的第二设备建立数据连接。In step 305, a data connection is established with the second device sending the wireless scanning signal through the second wireless interface.

在步骤306中,通过所述数据连接,与所述第二设备同步数据。In step 306, data is synchronized with the second device through the data connection.

上述实施例可以根据实际需要进行各种组合。The foregoing embodiments can be combined in various ways according to actual needs.

通过以上介绍了解了同步数据的实现过程,该过程由移动终端或路由器等设备实现,下面针对设备的内部结构和功能进行介绍。Through the above introduction, we understand the implementation process of synchronous data, which is implemented by devices such as mobile terminals or routers. The internal structure and functions of the devices are introduced below.

图4是根据一示例性实施例示出的一种同步数据的装置示意图。参照图4,该装置包括:第一接收模块401、检测模块402、连接模块403和同步模块404。Fig. 4 is a schematic diagram of an apparatus for synchronizing data according to an exemplary embodiment. Referring to FIG. 4 , the device includes: a first receiving module 401 , a detection module 402 , a connection module 403 and a synchronization module 404 .

第一接收模块401,用于接收无线扫描信号。The first receiving module 401 is configured to receive wireless scanning signals.

检测模块402,用于检测接收的所述无线扫描信号的信号强度是否大于预设的信号强度阈值。The detection module 402 is configured to detect whether the signal strength of the received wireless scanning signal is greater than a preset signal strength threshold.

连接模块403,用于在接收的所述无线扫描信号的信号强度大于预设的信号强度阈值时,与发送所述无线扫描信号的第二设备建立数据连接;其中,所述第二设备与所述第一设备属于同类设备,具有相同的设备类型。A connection module 403, configured to establish a data connection with a second device sending the wireless scanning signal when the received signal strength of the wireless scanning signal is greater than a preset signal strength threshold; wherein, the second device is connected to the wireless scanning signal The first device belongs to the same type of device and has the same device type.

同步模块404,用于通过所述数据连接,与所述第二设备同步数据。A synchronization module 404, configured to synchronize data with the second device through the data connection.

在一个实施例中,如图5所示,所述第一接收模块401包括:第一接收子模块501。In one embodiment, as shown in FIG. 5 , the first receiving module 401 includes: a first receiving submodule 501 .

第一接收子模块501,用于通过第一无线接口,以扫描终端设备的方式,接收无线扫描信号。The first receiving submodule 501 is configured to receive a wireless scanning signal in a manner of scanning terminal devices through the first wireless interface.

在一个实施例中,如图6所示,所述连接模块403包括:开启子模块601和建立子模块602。In one embodiment, as shown in FIG. 6 , the connection module 403 includes: an opening submodule 601 and an establishment submodule 602 .

开启子模块601,用于在接收的所述无线扫描信号的信号强度大于预设的信号强度阈值时,开启预设的第二无线接口的通信功能。The enabling submodule 601 is configured to enable the preset communication function of the second wireless interface when the signal strength of the received wireless scanning signal is greater than a preset signal strength threshold.

建立子模块602,用于通过所述第二无线接口与发送所述无线扫描信号的第二设备建立数据连接。The establishing submodule 602 is configured to establish a data connection with the second device sending the wireless scanning signal through the second wireless interface.

在一个实施例中,如图7所示,所述连接模块403包括:In one embodiment, as shown in FIG. 7, the connection module 403 includes:

获取子模块701,用于根据接收的所述无线扫描信号,获得所述第二设备的设备信息。The obtaining submodule 701 is configured to obtain device information of the second device according to the received wireless scanning signal.

判断子模块702,用于根据所述设备信息判断所述第二设备是否与所述第一设备属于同类设备。The judging submodule 702 is configured to judge whether the second device and the first device belong to the same type of device according to the device information.

第二建立子模块703,用于在接收的所述无线扫描信号的信号强度大于预设的信号强度阈值时,以及在确定所述第二设备与所述第一设备属于同类设备时,与发送所述无线扫描信号的第二设备建立数据连接。The second establishing submodule 703 is configured to communicate with the sending device when the received signal strength of the wireless scanning signal is greater than a preset signal strength threshold and when it is determined that the second device and the first device belong to the same type of device The wireless scanning signal to the second device establishes a data connection.

在一个实施例中,如图8所示,所述装置还包括:第二接收模块801。In one embodiment, as shown in FIG. 8 , the device further includes: a second receiving module 801 .

第二接收模块801,用于接收同步数据指令。The second receiving module 801 is configured to receive a synchronization data instruction.

关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。Regarding the apparatus in the foregoing embodiments, the specific manner in which each module executes operations has been described in detail in the embodiments related to the method, and will not be described in detail here.

图9是根据一示例性实施例示出的一种用于同步数据的装置900的框图。例如,装置900可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等。Fig. 9 is a block diagram of an apparatus 900 for synchronizing data according to an exemplary embodiment. For example, the apparatus 900 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, and the like.

参照图9,装置900可以包括以下一个或多个组件:处理组件902,存储器904,电源组件906,多媒体组件908,音频组件910,输入/输出(I/O)的接口912,传感器组件914,以及通信组件916。9, device 900 may include one or more of the following components: processing component 902, memory 904, power supply component 906, multimedia component 908, audio component 910, input/output (I/O) interface 912, sensor component 914, and communication component 916 .

处理组件902通常控制装置900的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件902可以包括一个或多个处理器920来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件902可以包括一个或多个模块,便于处理组件902和其他组件之间的交互。例如,处理组件902可以包括多媒体模块,以方便多媒体组件908和处理组件902之间的交互。The processing component 902 generally controls the overall operations of the device 900, such as those associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 902 may include one or more processors 920 to execute instructions to complete all or part of the steps of the above method. Additionally, processing component 902 may include one or more modules that facilitate interaction between processing component 902 and other components. For example, processing component 902 may include a multimedia module to facilitate interaction between multimedia component 908 and processing component 902 .

存储器904被配置为存储各种类型的数据以支持在装置900的操作。这些数据的示例包括用于在装置900上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器904可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。The memory 904 is configured to store various types of data to support operations at the device 900 . Examples of such data include instructions for any application or method operating on device 900, contact data, phonebook data, messages, pictures, videos, and the like. The memory 904 can be implemented by any type of volatile or non-volatile memory device or their combination, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Magnetic Memory, Flash Memory, Magnetic or Optical Disk.

电源组件906为装置900的各种组件提供电源。电源组件906可以包括电源管理系统,一个或多个电源,及其他与为装置900生成、管理和分配电源相关联的组件。The power supply component 906 provides power to various components of the device 900 . Power components 906 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to device 900 .

多媒体组件908包括在所述装置900和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件908包括一个前置摄像头和/或后置摄像头。当装置900处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。The multimedia component 908 includes a screen that provides an output interface between the device 900 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may not only sense a boundary of a touch or swipe action, but also detect duration and pressure associated with the touch or swipe action. In some embodiments, the multimedia component 908 includes a front camera and/or a rear camera. When the device 900 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have focal length and optical zoom capability.

音频组件910被配置为输出和/或输入音频信号。例如,音频组件910包括一个麦克风(MIC),当装置900处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器904或经由通信组件916发送。在一些实施例中,音频组件910还包括一个扬声器,用于输出音频信号。The audio component 910 is configured to output and/or input audio signals. For example, the audio component 910 includes a microphone (MIC) configured to receive external audio signals when the device 900 is in operation modes, such as call mode, recording mode and voice recognition mode. Received audio signals may be further stored in memory 904 or sent via communication component 916 . In some embodiments, the audio component 910 also includes a speaker for outputting audio signals.

I/O接口912为处理组件902和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。The I/O interface 912 provides an interface between the processing component 902 and a peripheral interface module. The peripheral interface module may be a keyboard, a click wheel, a button, and the like. These buttons may include, but are not limited to: a home button, volume buttons, start button, and lock button.

传感器组件914包括一个或多个传感器,用于为装置900提供各个方面的状态评估。例如,传感器组件914可以检测到装置900的打开/关闭状态,组件的相对定位,例如所述组件为装置900的显示器和小键盘,传感器组件914还可以检测装置900或装置900的一个组件的位置改变,用户与装置900接触的存在或不存在,装置900方位或加速/减速和装置900的温度变化。传感器组件914可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件914还可以包括光传感器,如CMOS或CCD图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件914还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。Sensor assembly 914 includes one or more sensors for providing status assessments of various aspects of device 900 . For example, the sensor assembly 914 can detect the open/closed state of the device 900, the relative positioning of components such as the display and keypad of the device 900, the sensor assembly 914 can also detect the position of the device 900 or a component of the device 900 Changes, presence or absence of user contact with device 900, device 900 orientation or acceleration/deceleration and temperature changes of device 900. Sensor assembly 914 may include a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact. Sensor assembly 914 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor component 914 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor or a temperature sensor.

通信组件916被配置为便于装置900和其他设备之间有线或无线方式的通信。装置900可以接入基于通信标准的无线网络,如WiFi,2G或3G,或它们的组合。在一个示例性实施例中,通信组件916经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,所述通信组件916还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。The communication component 916 is configured to facilitate wired or wireless communication between the apparatus 900 and other devices. The device 900 can access wireless networks based on communication standards, such as WiFi, 2G or 3G, or a combination thereof. In one exemplary embodiment, the communication component 916 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 916 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wide Band (UWB) technology, Bluetooth (BT) technology and other technologies.

在示例性实施例中,装置900可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。In an exemplary embodiment, apparatus 900 may be programmed by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable A gate array (FPGA), controller, microcontroller, microprocessor or other electronic component implementation for performing the methods described above.

在示例性实施例中,还提供了一种包括指令的非临时性计算机可读存储介质,例如包括指令的存储器904,上述指令可由装置900的处理器920执行以完成上述方法。例如,所述非临时性计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。In an exemplary embodiment, there is also provided a non-transitory computer-readable storage medium including instructions, such as the memory 904 including instructions, which can be executed by the processor 920 of the device 900 to implement the above method. For example, the non-transitory computer readable storage medium may be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, and the like.

一种同步数据的装置,包括:A device for synchronizing data, comprising:

处理器;processor;

用于存储处理器可执行指令的存储器;memory for storing processor-executable instructions;

其中,所述处理器被配置为:Wherein, the processor is configured as:

接收无线扫描信号;Receive wireless scanning signal;

检测接收的所述无线扫描信号的信号强度是否大于预设的信号强度阈值;Detecting whether the signal strength of the received wireless scanning signal is greater than a preset signal strength threshold;

在接收的所述无线扫描信号的信号强度大于预设的信号强度阈值时,与发送所述无线扫描信号的第二设备建立数据连接;其中,所述第二设备与所述第一设备属于同类设备,具有相同的设备类型;When the signal strength of the received wireless scanning signal is greater than a preset signal strength threshold, establish a data connection with a second device that sends the wireless scanning signal; wherein the second device is of the same type as the first device devices, with the same device type;

通过所述数据连接,与所述第二设备同步数据。Data is synchronized with the second device through the data connection.

所述处理器还可以被配置为:The processor can also be configured to:

所述接收无线扫描信号,包括:The receiving wireless scanning signal includes:

通过第一无线接口,以扫描终端设备的方式,接收无线扫描信号。A wireless scanning signal is received through the first wireless interface in a manner of scanning terminal equipment.

所述处理器还可以被配置为:The processor can also be configured to:

所述在接收的所述无线扫描信号的信号强度大于预设的信号强度阈值时,与发送所述无线扫描信号的第二设备建立数据连接,包括:The establishing a data connection with the second device that sends the wireless scanning signal when the received signal strength of the wireless scanning signal is greater than a preset signal strength threshold includes:

在接收的所述无线扫描信号的信号强度大于预设的信号强度阈值时,开启预设的第二无线接口的通信功能;When the signal strength of the received wireless scanning signal is greater than a preset signal strength threshold, enable a preset communication function of the second wireless interface;

通过所述第二无线接口与发送所述无线扫描信号的第二设备建立数据连接。Establishing a data connection with the second device sending the wireless scanning signal through the second wireless interface.

所述处理器还可以被配置为:The processor can also be configured to:

所述在接收的所述无线扫描信号的信号强度大于预设的信号强度阈值时,与发送所述无线扫描信号的第二设备建立数据连接,包括:The establishing a data connection with the second device that sends the wireless scanning signal when the received signal strength of the wireless scanning signal is greater than a preset signal strength threshold includes:

根据接收的所述无线扫描信号,获得所述第二设备的设备信息;Obtain device information of the second device according to the received wireless scanning signal;

根据所述设备信息判断所述第二设备是否与所述第一设备属于同类设备;judging whether the second device and the first device belong to the same type of device according to the device information;

在接收的所述无线扫描信号的信号强度大于预设的信号强度阈值时,以及在确定所述第二设备与所述第一设备属于同类设备时,与发送所述无线扫描信号的第二设备建立数据连接。When the signal strength of the received wireless scanning signal is greater than a preset signal strength threshold, and when it is determined that the second device and the first device belong to the same type of device, communicate with the second device that sent the wireless scanning signal Establish a data connection.

所述处理器还可以被配置为:The processor can also be configured to:

检测接收的所述无线扫描信号的信号强度是否大于预设的信号强度阈值之前,所述方法还包括:Before detecting whether the signal strength of the received wireless scanning signal is greater than a preset signal strength threshold, the method further includes:

接收同步数据指令。Receive synchronous data command.

一种非临时性计算机可读存储介质,当所述存储介质中的指令由移动终端的处理器执行时,使得移动终端能够执行一种同步数据的方法,所述方法包括:A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of the mobile terminal, the mobile terminal is enabled to execute a method for synchronizing data, the method comprising:

接收无线扫描信号;Receive wireless scanning signal;

检测接收的所述无线扫描信号的信号强度是否大于预设的信号强度阈值;Detecting whether the signal strength of the received wireless scanning signal is greater than a preset signal strength threshold;

在接收的所述无线扫描信号的信号强度大于预设的信号强度阈值时,与发送所述无线扫描信号的第二设备建立数据连接;其中,所述第二设备与所述第一设备属于同类设备,具有相同的设备类型;When the signal strength of the received wireless scanning signal is greater than a preset signal strength threshold, establish a data connection with a second device that sends the wireless scanning signal; wherein the second device is of the same type as the first device devices, with the same device type;

通过所述数据连接,与所述第二设备同步数据。Data is synchronized with the second device through the data connection.

所述存储介质中的指令还可以包括:The instructions in the storage medium may also include:

所述接收无线扫描信号,包括:The receiving wireless scanning signal includes:

通过第一无线接口,以扫描终端设备的方式,接收无线扫描信号。A wireless scanning signal is received through the first wireless interface in a manner of scanning terminal equipment.

所述存储介质中的指令还可以包括:The instructions in the storage medium may also include:

所述在接收的所述无线扫描信号的信号强度大于预设的信号强度阈值时,与发送所述无线扫描信号的第二设备建立数据连接,包括:The establishing a data connection with the second device that sends the wireless scanning signal when the received signal strength of the wireless scanning signal is greater than a preset signal strength threshold includes:

在接收的所述无线扫描信号的信号强度大于预设的信号强度阈值时,开启预设的第二无线接口的通信功能;When the signal strength of the received wireless scanning signal is greater than a preset signal strength threshold, enable a preset communication function of the second wireless interface;

通过所述第二无线接口与发送所述无线扫描信号的第二设备建立数据连接。Establishing a data connection with the second device sending the wireless scanning signal through the second wireless interface.

所述存储介质中的指令还可以包括:The instructions in the storage medium may also include:

所述在接收的所述无线扫描信号的信号强度大于预设的信号强度阈值时,与发送所述无线扫描信号的第二设备建立数据连接,包括:The establishing a data connection with the second device that sends the wireless scanning signal when the received signal strength of the wireless scanning signal is greater than a preset signal strength threshold includes:

根据接收的所述无线扫描信号,获得所述第二设备的设备信息;Obtain device information of the second device according to the received wireless scanning signal;

根据所述设备信息判断所述第二设备是否与所述第一设备属于同类设备;judging whether the second device and the first device belong to the same type of device according to the device information;

在接收的所述无线扫描信号的信号强度大于预设的信号强度阈值时,以及在确定所述第二设备与所述第一设备属于同类设备时,与发送所述无线扫描信号的第二设备建立数据连接。When the signal strength of the received wireless scanning signal is greater than a preset signal strength threshold, and when it is determined that the second device and the first device belong to the same type of device, communicate with the second device that sent the wireless scanning signal Establish a data connection.

所述存储介质中的指令还可以包括:The instructions in the storage medium may also include:

检测接收的所述无线扫描信号的信号强度是否大于预设的信号强度阈值之前,所述方法还包括:Before detecting whether the signal strength of the received wireless scanning signal is greater than a preset signal strength threshold, the method further includes:

接收同步数据指令。Receive synchronous data command.

图10是根据一示例性实施例示出的一种用于同步数据的装置1000的框图。例如,装置1000可以被提供为一计算机。参照图10,装置1000包括处理组件1022,其进一步包括一个或多个处理器,以及由存储器1032所代表的存储器资源,用于存储可由处理组件1022的执行的指令,例如应用程序。存储器1032中存储的应用程序可以包括一个或一个以上的每一个对应于一组指令的模块。此外,处理组件1022被配置为执行指令,以执行上述方法同步数据。Fig. 10 is a block diagram of an apparatus 1000 for synchronizing data according to an exemplary embodiment. For example, apparatus 1000 may be provided as a computer. 10, apparatus 1000 includes processing component 1022, which further includes one or more processors, and memory resources represented by memory 1032 for storing instructions executable by processing component 1022, such as application programs. The application program stored in memory 1032 may include one or more modules each corresponding to a set of instructions. In addition, the processing component 1022 is configured to execute instructions to perform the above method for synchronizing data.

装置1000还可以包括一个电源组件1026被配置为执行装置1000的电源管理,一个有线或无线网络接口1050被配置为将装置1000连接到网络,和一个输入输出(I/O)接口1058。装置1000可以操作基于存储在存储器1032的操作系统,例如Windows ServerTM,MacOS XTM,UnixTM,LinuxTM,FreeBSDTM或类似。Device 1000 may also include a power component 1026 configured to perform power management of device 1000 , a wired or wireless network interface 1050 configured to connect device 1000 to a network, and an input-output (I/O) interface 1058 . The device 1000 can operate based on an operating system stored in the memory 1032, such as Windows Server™, MacOS X™, Unix™, Linux™, FreeBSD™ or the like.

本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本公开的其它实施方案。本申请旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由下面的权利要求指出。Other embodiments of the present disclosure will be readily apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any modification, use or adaptation of the present disclosure, and these modifications, uses or adaptations follow the general principles of the present disclosure and include common knowledge or conventional technical means in the technical field not disclosed in the present disclosure . The specification and examples are to be considered exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限制。It should be understood that the present disclosure is not limited to the precise constructions which have been described above and shown in the drawings, and various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (11)

1. a kind of method of synchrodata, it is characterised in that applied to the first equipment, including:
Receive wireless scanning signal;
Detect whether the signal intensity of the wireless scanning signal received is more than default signal strength threshold;
It is described wireless with sending when the signal intensity of the wireless scanning signal of reception is more than default signal strength threshold Second equipment of scanning signal sets up data cube computation;Wherein, second equipment belongs to same category of device with first equipment, has There is identical device type.;
By the data cube computation, with the second equipment synchrodata.
2. the method for synchrodata according to claim 1, it is characterised in that the reception wireless scanning signal, including:
By the first wave point, in the way of end of scan equipment, wireless scanning signal is received.
3. the method for synchrodata according to claim 1, it is characterised in that the radio scan in reception is believed Number signal intensity when being more than default signal strength threshold, set up data with the second equipment for sending the wireless scanning signal Connection, including:
When the signal intensity of the wireless scanning signal of reception is more than default signal strength threshold, default second is opened The communication function of wave point;
Data cube computation is set up with sending the second equipment of the wireless scanning signal by second wave point.
4. the method for synchrodata according to claim 1, it is characterised in that the radio scan in reception is believed Number signal intensity when being more than default signal strength threshold, set up data with the second equipment for sending the wireless scanning signal Connection, including:
According to the wireless scanning signal of reception, the facility information of second equipment is obtained;
Judge whether second equipment with first equipment belongs to same category of device according to the facility information;
When the signal intensity of the wireless scanning signal of reception is more than default signal strength threshold, and it is determined that described When second equipment belongs to same category of device with first equipment, data are set up with the second equipment of the transmission wireless scanning signal Connection.
5. the method for synchrodata according to claim 1, it is characterised in that the wireless scanning signal that detection is received Signal intensity whether be more than default signal strength threshold before, methods described also includes:
Receive synchrodata instruction.
6. a kind of device of synchrodata, it is characterised in that including:
First receiving module, for receiving wireless scanning signal;
Detection module, for detecting whether the signal intensity of the wireless scanning signal received is more than default signal intensity threshold Value;
Link block, when the signal intensity for the wireless scanning signal in reception is more than default signal strength threshold, Data cube computation is set up with the second equipment of the transmission wireless scanning signal;Wherein, second equipment and first equipment Belong to same category of device, with identical device type;
Synchronization module, for by the data cube computation, with the second equipment synchrodata.
7. the device of synchrodata according to claim 6, it is characterised in that first receiving module includes:
First receiving submodule, for by the first wave point, in the way of end of scan equipment, receives radio scan letter Number.
8. the device of synchrodata according to claim 6, it is characterised in that the link block includes:
Submodule is opened, the signal intensity for the wireless scanning signal in reception is more than default signal strength threshold When, open the communication function of default second wave point;
First setting up submodule, for being built by second wave point with sending the second equipment of the wireless scanning signal Vertical data cube computation.
9. the device of synchrodata according to claim 6, it is characterised in that the link block includes:
Acquisition submodule, for the wireless scanning signal according to reception, obtains the facility information of second equipment;
Judging submodule, for judging whether second equipment with first equipment belongs to similar according to the facility information Equipment;
Second setting up submodule, the signal intensity for the wireless scanning signal in reception is more than default signal intensity threshold During value, and when it is determined that second equipment belongs to same category of device with first equipment, believe with sending the radio scan Number the second equipment set up data cube computation.
10. the device of synchrodata according to claim 6, it is characterised in that described device also includes:
Second receiving module, for receiving synchrodata instruction.
11. a kind of device of synchrodata, it is characterised in that including:
Processor;
Memory for storing processor-executable instruction;
Wherein, the processor is configured as:
Receive wireless scanning signal;
Detect whether the signal intensity of the wireless scanning signal received is more than default signal strength threshold;
It is described wireless with sending when the signal intensity of the wireless scanning signal of reception is more than default signal strength threshold Second equipment of scanning signal sets up data cube computation;Wherein, second equipment belongs to same category of device with first equipment, has There is identical device type;
By the data cube computation, with the second equipment synchrodata.
CN201710129417.1A 2017-03-06 2017-03-06 Method and device for synchronizing data Active CN107105005B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710129417.1A CN107105005B (en) 2017-03-06 2017-03-06 Method and device for synchronizing data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710129417.1A CN107105005B (en) 2017-03-06 2017-03-06 Method and device for synchronizing data

Publications (2)

Publication Number Publication Date
CN107105005A true CN107105005A (en) 2017-08-29
CN107105005B CN107105005B (en) 2021-03-02

Family

ID=59675823

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710129417.1A Active CN107105005B (en) 2017-03-06 2017-03-06 Method and device for synchronizing data

Country Status (1)

Country Link
CN (1) CN107105005B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111800836A (en) * 2020-06-30 2020-10-20 北京小米移动软件有限公司 A communication method, device, electronic device and storage medium
CN112383642A (en) * 2021-01-16 2021-02-19 广州技象科技有限公司 Internet of things equipment data interaction method and device
CN114980187A (en) * 2021-02-23 2022-08-30 北京小米移动软件有限公司 Device connection method and device, electronic device, storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102149167A (en) * 2010-02-10 2011-08-10 正崴精密工业股份有限公司 Automatic pairing method for wireless network
CN102958048A (en) * 2011-08-26 2013-03-06 中国移动通信集团山东有限公司 Method for optimal selection between WiFi (wireless fidelity) network and TD-SCDMA (time division-synchronous code division multiple access) network
CN103259921A (en) * 2013-03-01 2013-08-21 衡阳加一电子科技有限公司 Device paring method and device
CN104159188A (en) * 2014-08-28 2014-11-19 吴宇 A pairing method of a wireless device
WO2014144058A3 (en) * 2013-03-15 2015-01-22 Whistle Labs, Inc. Detecting interaction among entities via proximity
CN104469735A (en) * 2014-10-30 2015-03-25 北京神州泰岳软件股份有限公司 SIM card application method and SIM card allocation method and device
CN105101467A (en) * 2015-07-14 2015-11-25 清华大学 Automatic equipment pairing method based on wireless signal intensity
CN106027807A (en) * 2016-07-26 2016-10-12 广东小天才科技有限公司 Data transmission method and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102149167A (en) * 2010-02-10 2011-08-10 正崴精密工业股份有限公司 Automatic pairing method for wireless network
CN102958048A (en) * 2011-08-26 2013-03-06 中国移动通信集团山东有限公司 Method for optimal selection between WiFi (wireless fidelity) network and TD-SCDMA (time division-synchronous code division multiple access) network
CN103259921A (en) * 2013-03-01 2013-08-21 衡阳加一电子科技有限公司 Device paring method and device
WO2014144058A3 (en) * 2013-03-15 2015-01-22 Whistle Labs, Inc. Detecting interaction among entities via proximity
CN104159188A (en) * 2014-08-28 2014-11-19 吴宇 A pairing method of a wireless device
CN104469735A (en) * 2014-10-30 2015-03-25 北京神州泰岳软件股份有限公司 SIM card application method and SIM card allocation method and device
CN105101467A (en) * 2015-07-14 2015-11-25 清华大学 Automatic equipment pairing method based on wireless signal intensity
CN106027807A (en) * 2016-07-26 2016-10-12 广东小天才科技有限公司 Data transmission method and device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111800836A (en) * 2020-06-30 2020-10-20 北京小米移动软件有限公司 A communication method, device, electronic device and storage medium
US11678391B2 (en) 2020-06-30 2023-06-13 Beijing Xiaomi Mobile Software Co., Ltd. Communication methods and electronic devices
CN112383642A (en) * 2021-01-16 2021-02-19 广州技象科技有限公司 Internet of things equipment data interaction method and device
CN114980187A (en) * 2021-02-23 2022-08-30 北京小米移动软件有限公司 Device connection method and device, electronic device, storage medium

Also Published As

Publication number Publication date
CN107105005B (en) 2021-03-02

Similar Documents

Publication Publication Date Title
EP3054717A1 (en) Methods and apparatuses for binding with device
EP3163803B1 (en) Method and device for establishing connection
CN111654354B (en) Method and device for detecting maximum transmission unit MTU and storage medium
CN113078921B (en) Data processing method, device and storage medium
CN106714214A (en) State control method and apparatus of user equipment, user equipment and base station
CN107635231A (en) Control method, device and mobile terminal of hotspot WIFI switch
CN105843708A (en) Data processing method and device
CN111277984A (en) Wireless local area network access method and device
CN106446653A (en) Application authority management method and device and electronic equipment
CN111800836A (en) A communication method, device, electronic device and storage medium
WO2023015535A1 (en) Method and apparatus for performing small data transmission, method and apparatus for determining random access message transmission mode, device, and storage medium
CN107105005A (en) The method and device of synchrodata
CN105787342B (en) A kind of method and apparatus of performance objective function
CN107968994A (en) Method for building up, the apparatus and system of LAN
CN108401519A (en) Internet of things network connection method and device
CN106559479A (en) Multimedia file downloading method, designated equipment and terminal
CN112492568B (en) Network information processing method, device, mobile terminal and storage medium
CN109041145A (en) Communication means, device, terminal and storage medium
CN106792570B (en) Positioning method and device
CN107070707A (en) Router initializes the determination method and apparatus of pattern
CN107371222A (en) Method and device for disabling virtual card
CN105554791A (en) Method, apparatus and system for setting channel for wireless local area network
CN106341872A (en) Router accessing method and apparatus
CN110945941B (en) Identification sending method, identification receiving method, information sending method and device
CN106533848B (en) Data acquisition method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant