A data synchronization method, device and system
By identifying active IP and MAC addresses on the large-screen client and performing data synchronization or device binding based on the MAC address, the problems of cumbersome data synchronization and privacy leaks on the large-screen client are solved, improving synchronization efficiency and ensuring privacy and security.
Patent Information
- Application Number
- CN202310423788.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-19
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2043-04-19
AI Technical Summary
In existing technologies, users need to scan a QR code or enter an account password to log in when watching videos on a large screen, which makes the data synchronization process cumbersome, reduces efficiency, and poses a risk of privacy leakage when the same account is used on multiple devices.
By determining the active IP address and MAC address of the large-screen client, the system records the bound MAC addresses in the local database, displays data synchronization prompts, and performs data synchronization based on the active MAC address after the user responds, or performs device binding and synchronization when not bound.
It enables data synchronization without requiring users to manually perform operations each time they log in, improving efficiency, and avoids privacy leaks by synchronizing data across multiple devices.
Smart Images

Figure CN116366674B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of communication, in particular to a data synchronization method, device and system. BACKGROUND
[0002] With the popularity and development of smart terminals such as smart phones and tablet computers, it is common for one account to have multiple smart terminals. However, existing applications (APP, mini program, website) record user behavior based on accounts. Application service providers generally record user behavior (such as viewing records, etc.) and display the record on the application client logged in to the account for the user to view.
[0003] Currently, when a user wants to watch a video on a large screen terminal, he needs to scan a two-dimensional code through a mobile terminal or input an account password on the large screen terminal to log in to the corresponding account on the large screen terminal for data synchronization. Even if the user has logged in to the account on the large screen terminal before, he still needs to go through the account login process again when the login information expires, which is too cumbersome and reduces the efficiency of data synchronization. SUMMARY
[0004] Therefore, the purpose of the present application is to provide a data synchronization method, device and system to improve the efficiency of data synchronization and avoid the problem of privacy leakage caused by multiple devices owned by the same account. The specific technical solutions are as follows:
[0005] In a first aspect, the present application provides a data synchronization method applied to a large screen client, comprising:
[0006] determining an active Internet Protocol (IP) address under a current local area network (LAN), wherein the current LAN is the LAN where the large screen client is located;
[0007] obtaining an active Media Access Control (MAC) address corresponding to the active IP address;
[0008] if the active MAC address is recorded in a local database, displaying a first data synchronization prompt information, wherein the local database records MAC addresses that have been bound with the large screen client;
[0009] receiving a first response information of the user to the first data synchronization prompt information;
[0010] if the first response information indicates to perform data synchronization, performing data synchronization based on the active MAC address.
[0011] In a possible implementation, the determination of the active IP address under the current LAN comprises:
[0012] receiving a PING result through a PING command.
[0013] parsing the PING result to obtain the active IP address.
[0014] In a possible implementation, the determining of the active Internet Protocol (IP) address under the current local area network comprises:
[0015] sending a response request to the IP address under the current local area network through a socket;
[0016] determining the IP address corresponding to the received request response message as the active IP address.
[0017] In a possible implementation, the data synchronization based on the active MAC address comprises:
[0018] determining a first device identifier corresponding to the active MAC address;
[0019] sending, to a server, a synchronization data request carrying the first device identifier;
[0020] receiving, from the server, to-be-synchronized data corresponding to the first device identifier;
[0021] performing data synchronization based on the to-be-synchronized data.
[0022] In a possible implementation, after the obtaining of the active MAC address corresponding to the active IP address, the method further comprises:
[0023] if the active MAC address is not recorded in the local database, displaying device binding prompt information;
[0024] receiving second response information of the user to the device binding prompt information;
[0025] if the second response information indicates that device binding is to be performed, displaying device binding information, the device binding information being used for device binding between the mobile client and the large-screen client;
[0026] receiving a device binding request sent by the mobile client based on the device binding information, the device binding request comprising network information and device information of the mobile client;
[0027] if the network information comprises the active IP address, generating a second device identifier corresponding to the active MAC address according to the network information and the device information;
[0028] sending the second device identifier to the mobile client, and displaying second data synchronization prompt information;
[0029] receiving third response information of the user to the second data synchronization prompt information;
[0030] if the third response information indicates to perform data synchronization, performing data synchronization based on the active MAC address.
[0031] In a second aspect, the present application further provides a data synchronization device applied to a large-screen client, the device comprising:
[0032] a determining module configured to determine an active Internet Protocol (IP) address under a current local area network, the current local area network being a local area network where the large-screen client is located;
[0033] a obtaining module configured to obtain an active Media Access Control (MAC) address corresponding to the active IP address;
[0034] a displaying module configured to display first data synchronization prompt information if the active MAC address is recorded in a local database, the local database recording MAC addresses that have been bound with the large-screen client;
[0035] a receiving module configured to receive first response information of a user to the first data synchronization prompt information;
[0036] a synchronizing module configured to perform data synchronization based on the active MAC address if the first response information indicates to perform data synchronization.
[0037] In a possible implementation, the determining module is specifically configured to:
[0038] receive a PING result through an Internet Control Message Protocol (ICMP) echo request command;
[0039] analyze the PING result to obtain the active IP address.
[0040] In a possible implementation, the determining module is specifically configured to:
[0041] send a response request to IP addresses under the current local area network through a socket;
[0042] determine an IP address corresponding to a received request response message as the active IP address.
[0043] In a possible implementation, the synchronizing module is specifically configured to:
[0044] determine a first device identifier corresponding to the active MAC address;
[0045] send a synchronization data request carrying the first device identifier to a server;
[0046] receive the to-be-synchronized data corresponding to the first device identifier sent by the server;
[0047] perform data synchronization based on the to-be-synchronized data.
[0048] In a third aspect, the present application further provides a data synchronization system, comprising: a large-screen client, a mobile client, and a server;
[0049] The large-screen client is configured to perform the method in the first aspect or any one of the first aspect.
[0050] The mobile client is configured to:
[0051] send a device binding request to the large-screen client, wherein the device binding request comprises network information and device information, and the device binding request is sent by the mobile client based on device binding information, and the device binding information is used for device binding by the mobile client.
[0052] receive a second device identifier sent by the large-screen client.
[0053] The server is configured to:
[0054] receive a synchronization data request carrying a first device identifier sent by the large-screen client.
[0055] send to-be-synchronized data corresponding to the first device identifier to the large-screen client.
[0056] In the embodiments of the present application, the large-screen client determines an active Internet Protocol (IP) address under a current local area network, the current local area network being a local area network in which the large-screen client is located; an active Media Access Control (MAC) address corresponding to the active IP address is obtained; if the active MAC address is recorded in a local database, a first data synchronization prompt information is displayed; a first response information of the user to the first data synchronization prompt information is received; if the first response information indicates that data synchronization is to be performed, data synchronization is performed based on the active MAC address. The large-screen client in the embodiments of the present application can directly perceive a mobile terminal that can be communicatively connected, and when the MAC address of the mobile terminal is recorded in the local database, the mobile terminal does not need to perform any operation, and data synchronization can be directly performed, thereby improving the efficiency of data synchronization. In addition, data synchronization based on the MAC address can obtain data on a device-by-device basis, thereby avoiding the problem of privacy leakage caused by a same account having multiple devices. BRIEF DESCRIPTION OF DRAWINGS
[0057] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the accompanying drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced. Obviously, the accompanying drawings in the following description are some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor.
[0058] Figure 1 A flow chart of an embodiment of a data synchronization method provided by the present application is shown;
[0059] Figure 2 A code diagram for determining an active IP address provided by an embodiment of the present application is shown;
[0060] Figure 3 An ARP protocol network communication diagram provided by an embodiment of the present application is shown;
[0061] Figure 4 An IP address and MAC address correspondence table provided by an embodiment of the present application is shown;
[0062] Figure 5 An ARP protocol message structure diagram provided by an embodiment of the present application is shown;
[0063] Figure 6 A flow chart of a large screen client first binding a mobile client provided by an embodiment of the present application is shown;
[0064] Figure 7 A structure diagram of a data synchronization device provided by an embodiment of the present application is shown;
[0065] Figure 8 A structure diagram of a data synchronization system provided by an embodiment of the present application is shown. DETAILED DESCRIPTION
[0066] In order to make the purpose, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are some embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0067] The existing video application (including application APP, applet and website) is based on the video viewing record recorded by the account system and the user behavior for updating, which will interfere with the viewing record and user behavior of multiple people using the same account, resulting in poor user experience and privacy security problems. The embodiment of the application marks the behavior data of the user by using the WLAN information of the device with the user identifier, intelligently prompts the user to update and synchronize based on the convenient way of location discovery, solves the pain point that the large-screen device (such as a television) cannot accurately distinguish the user identifier as a public screen, and can quickly and intelligently display the viewing record and role behavior data of the user private screen (such as a mobile client) on the television application. Compared with the existing method of synchronizing the mobile viewing record to the television terminal through the mobile phone, the method is more intelligent and scientific.
[0068] Firstly, some terms that may appear in the embodiments of the application are explained.
[0069] Internet Packet Explorer (Ping) command: a command under Windows, Unix and Linux systems. Ping also belongs to a communication protocol, which is part of the TCP / IP protocol. The "Ping" command can check whether the network is connected, which can help us analyze and determine network faults, and can also be used for testing network connection programs.
[0070] Internet Control Message Protocol (ICMP) : a sub-protocol of the TCP / IP protocol cluster, used to transmit control messages between IP hosts and routers. Control messages refer to messages about the network itself, such as network connectivity, host reachability and route availability.
[0071] Address Resolution Protocol (ARP) : a TCP / IP protocol for obtaining physical addresses based on IP addresses.
[0072] Media Access Control (Media Access Control or Medium Access Control MAC) : or called physical address, hardware address, used to define the location of network devices.
[0073] Internet Protocol Address (IP Address) : also known as Internet Protocol Address IP Address, is a unified address format provided by IP protocol, which allocates a logical address for each network and each host on the Internet, so as to shield the difference of physical address.
[0074] BSSID: A special Ad-hoc LAN application, also known as Basic Service Set (BSS), a group of computers set the same BSS name, that is, a group. Each BSS will be assigned a BSSID, which is a 48-bit binary identifier, used to identify different BSS. Its main advantage is that it can be used as a filter. Refers to the MAC address of the station (STA) in an access point (AP) in a basic framework mode, BSS is defined by IEEE 802.11-1999 wireless local area network specification.
[0075] SDK: Software Development Kit (SDK) is a collection of development tools for software engineers to develop applications for a specific software package, software framework, hardware platform, operating system, etc.
[0076] Account user playback record: refers to the record of watching videos according to the account system binding on a video website, APP and other applications.
[0077] Wireless Local Area Network (WLAN): refers to the application of wireless communication technology to interconnect computer equipment, forming a network system that can communicate with each other and realize resource sharing. The essential feature of wireless local area network is no longer to connect computers and networks with communication cables, but to connect them through wireless means, so that the construction of network and the movement of terminal are more flexible.
[0078] WifiManager: a class provided by the android system to obtain WLAN information.
[0079] NetworkInterface: a class provided by the android system to obtain WLAN information.
[0080] WebSocket: a protocol for full-duplex communication over a single TCP connection. It enables full-duplex communication between browsers and servers--allowing servers to send information to clients proactively.
[0081] Socket: two programs on the network exchange data through a two-way communication connection, one end of the connection is called a socket. Application programs usually make requests to the network or respond to network requests through "sockets".
[0082] Wireless Fidelity (WIFI): the most widely used wireless network transmission technology today.
[0083] SeeFigure 1 FIG. 1 shows a flowchart of an embodiment of a data synchronization method provided by the present application, which is applied to a large-screen client in a data synchronization system, the data synchronization system further comprising a mobile client and a server, and the embodiment of the present application comprises at least the following steps:
[0084] S1, determining an active Internet Protocol (IP) address under a current local area network (LAN), the current LAN being a LAN in which the large-screen client is located.
[0085] When a user starts the large-screen client, the large-screen client starts a discovery component SDK to determine an active IP address under the current LAN. The discovery SDK is integrated in the large-screen client. The discovery SDK can be started automatically after the large-screen client is started, or can be started after a certain key is triggered after the large-screen client is started. The manner of starting the discovery SDK is not limited.
[0086] The discovery SDK can trigger a PING command or a Socket active connection to determine the active IP address under the current LAN.
[0087] One implementation manner of determining the active IP address can be that a PING result is received through a PING command, and the active IP address is obtained by analyzing the PING result. The PING result is generated according to an ICMP protocol message received, and through the PING command, it can be determined whether the IP addresses under the current LAN are all PINGable. If the IP addresses are PINGable, the ICMP protocol message corresponding to the IP addresses will be received, and if the IP addresses are not PINGable, the ICMP protocol message corresponding to the IP addresses will not be received. The ICMP protocol message can be analyzed based on the network layer IP / TCP protocol principle, and of course, it can also be analyzed through other manners, which is not limited herein. After the PING command is executed, the PING result received can be used to indicate the PING state of all IP addresses under the current LAN, and the PING state includes PINGable and not PINGable.
[0088] Suppose that the discovery SDK connects other IP addresses under the LAN environment through the PING command, from 192.168.0.1, to 192.168.0.254 in turn, and records the PINGable IP addresses, except for the router IP address and the large-screen device itself IP address corresponding to the large-screen client, and the specific code is as follows:
[0089] Runtime.getRuntime().exec(“ping-s56-w 30 192.168.0.2”).
[0090] In order to improve the execution efficiency of the PING command, multiple threads are started at the same time to perform concurrent scanning connection of 253 IP addresses. If no IP address is active, the process is exited, indicating that there is no mobile device in the surrounding area.
[0091] As shown in Figure 2 , the active IP address bound to the large-screen client can be directly obtained by receiving the ICMP protocol packet through the PING command.
[0092] The process of determining the active IP address does not require the user to open the mobile client. Only the mobile client corresponding device and the large-screen client corresponding device are in the same LAN environment, such as connecting to the same WIFI.
[0093] Another implementation of determining the active IP address can be to send a response request to all IP addresses in the current LAN through Socket, and determine the IP address corresponding to the received request response message as the active IP address. When the IP address is in an active state, the response request is received, and a request response message is fed back to facilitate communication connection.
[0094] It should be noted that in addition to the above-mentioned method of determining the active IP address, other methods can be used to determine the active IP address according to the actual scene, and the embodiments of the present application are not limited.
[0095] S2, obtaining the active media access control (MAC) address corresponding to the active IP address.
[0096] After determining the active IP address, the active MAC address corresponding to the active IP address needs to be obtained. As shown in Figure 3 , an ARP protocol network communication diagram is provided, and the MAC address can be obtained by analyzing the ARP protocol packet.
[0097] One implementation of obtaining the active MAC address can be to directly read the ARP protocol packet through BufferedReader br = new BufferedReader (new FileReader (" / proc / net / arp")) ; command, and obtain the active MAC address corresponding to the active IP address by analyzing the ARP protocol packet.
[0098] Another implementation of obtaining the active MAC address can be to execute Process exec = Runtime.getRuntime().exec("ip neigh show") ;
[0099] exec.waitFor() ;
[0100] BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(exec.getInputStream ()));
[0101] The BufferedReader (new InputStreamReader (exec.getInputStream ())) command reads the ARP protocol message, and the active IP address corresponding to the active MAC address is obtained by analyzing the ARP protocol message.
[0102] Another implementation of obtaining the active MAC address can be that the ARP protocol message is obtained by the Runtime.getRuntime (). exec (arp-a) command, and the active IP address corresponding to the active MAC address is obtained by analyzing the ARP protocol message. This command can return the corresponding table of IP addresses and MAC addresses cached in the large screen device in advance, that is, the ARP protocol message. The IP addresses in the ARP protocol message include all IP addresses connected to the large screen device, and the corresponding table is as shown in Figure 4 The structure of the ARP protocol message is as shown in Figure 5 .
[0103] It should be noted that in addition to the above-mentioned way of obtaining the active MAC address, other ways of obtaining the active MAC address can also be used according to actual scenes, and the embodiments of the present application are not limited.
[0104] S3, if the active MAC address is recorded in the local database, a first data synchronization prompt information is displayed.
[0105] The local database of the large screen client is used to store the mobile client that has been bound or identified by the large screen client, that is, the MAC address that has been bound with the large screen client is recorded in the local database. The main fields of the local database are {wifi_mac, device_name, wlan_ip, bssid}, wifi_mac represents the MAC address of the mobile client corresponding device, device_name represents the device name of the mobile client corresponding device, wlan_ip represents the IP address of the mobile client corresponding device, and bssid represents the MAC address of the router.
[0106] If the active MAC address is recorded in the local database, it means that the mobile client corresponding to the active MAC address has been bound or identified with the large screen client, and then the first data synchronization prompt information is directly displayed to prompt the user whether to perform data synchronization of the mobile client behavior data.
[0107] S4, receiving a first response information of the user to the first data synchronization prompt information.
[0108] After the first data synchronization prompt information is displayed, a first response information of the user to the first data synchronization prompt information can be received. The first response information can indicate to perform data synchronization or not to perform data synchronization.
[0109] If the first response information indicates to perform data synchronization, data synchronization is performed based on the active MAC address.
[0110] If the first response information indicates to perform data synchronization, it means that the user wants to synchronize the user behavior data in the mobile client to the large-screen client. Then, the large-screen client performs data synchronization based on the active MAC address.
[0111] One implementation manner of performing data synchronization can be that a first device identifier corresponding to the active MAC address is determined, a synchronization data request carrying the first device identifier is sent to a server, the server sends the to-be-synchronized data corresponding to the first device identifier, and data synchronization is performed based on the to-be-synchronized data. The first device identifier is a unique identifier used to represent the device corresponding to the active MAC address.
[0112] The to-be-synchronized data is uploaded to the server when the mobile client obtains new user behavior data. Therefore, when the local database records the obtained active MAC address, the large-screen client can directly perform data synchronization without starting the mobile client, thereby improving the efficiency of data synchronization. The to-be-synchronized data corresponds to the device identifier, which is different from the current data corresponding to the account, and can more quickly and accurately display the information that the user wants to obtain.
[0113] In the embodiment of the application, the large-screen client determines an active Internet Protocol (IP) address under a current local area network, the current local area network being a local area network in which the large-screen client is located. The active IP address corresponding to an active Media Access Control (MAC) address is obtained. If the local database records the active MAC address, a first data synchronization prompt information is displayed. A first response information of the user to the first data synchronization prompt information is received. If the first response information indicates to perform data synchronization, data synchronization is performed based on the active MAC address. The large-screen client in the embodiment of the application can directly perceive the mobile terminal that can be communicatively connected, and when the local database records the MAC address of the mobile terminal, the large-screen client can directly perform data synchronization without any operation of the mobile terminal, thereby improving the efficiency of data synchronization. In addition, data synchronization based on the MAC address can obtain data on a device-by-device basis, thereby avoiding the problem of privacy leakage caused by the same account having multiple devices.
[0114] As shown in FIG. 2, a flowchart of a large-screen client binding a mobile client for the first time is shown. In another embodiment of the application, after the active IP address corresponding to the active MAC address is obtained in S2, the following steps are further included: Figure 6
[0115] S6, if the active MAC address is not recorded in the local database, the device binding prompt information is displayed.
[0116] If the active MAC address is not recorded in the local database, it indicates that the mobile client corresponding to the active MAC address has not been bound with the large-screen client at present, and the device binding prompt information is displayed on the screen of the large-screen client to prompt the user whether to perform device binding.
[0117] S7, receiving the second response information of the user to the device binding prompt information.
[0118] After the device binding prompt information is displayed, the second response information of the user to the device binding prompt information can be received, which can indicate to perform device binding or not to perform device binding.
[0119] S8, if the second response information indicates to perform device binding, the device binding information is displayed, and the device binding information is used for device binding between the mobile client and the large-screen client.
[0120] If the second response information indicates to perform device binding, the device binding information is displayed, and the device binding information is used for device binding between the mobile client and the large-screen client. The device binding information can include two-dimensional code information and a connectable list, the connectable list being a list of peripheral devices discovered by the large-screen client, including IP addresses and MAC addresses of the peripheral devices, and the two-dimensional code information being used for the mobile client to establish a long connection with the large-screen client after scanning. An attribute example of the two-dimensional code information is shown in Table 1.
[0121] Table 1 Attribute example of two-dimensional code information
[0122]
[0123] The device binding information can also include IP address information of the large-screen client corresponding device and the connectable list. In the embodiment of the application, the IP address of the large-screen device corresponding to the large-screen client is displayed on the screen, so that the user uses the mobile device corresponding to the mobile client to connect with the large-screen device corresponding to the large-screen client.
[0124] It should be noted that the specific content of the device binding information can be set according to actual conditions, as long as the device binding information can be used for device binding between the mobile client and the large-screen client.
[0125] S9, receiving the device binding request sent by the mobile client based on the device binding information, the device binding request including network information and device information of the mobile client.
[0126] The large-screen client displays the device binding information on the screen. The mobile client scans the two-dimensional code on the screen to establish a long connection with the large-screen client, and sends a device binding request including the network information and device information of the mobile device corresponding to the mobile client to the large-screen client. The network information includes the mac address (i.e. BBSID) of the router and the IP address of the mobile device corresponding to the mobile client, and the device information includes the device name customized by the user for the mobile device corresponding to the mobile client.
[0127] S10, if the network information includes an active IP address, a second device identifier corresponding to the active MAC address is generated according to the network information and the device information.
[0128] If the network information includes the active IP address determined by the large-screen client, a second device identifier corresponding to the active MAC address is generated according to the network information and the device information. If the network information does not include the active IP address or the IP address in the connectable list, the process of generating the second device identifier is not performed.
[0129] One implementation of generating the device identifier can be to encrypt the MAC address, and use the encrypted MAC address as the device identifier.
[0130] Another implementation of generating the device identifier can be to directly use the MAC address as the device identifier.
[0131] It should be noted that the encryption method can be a symmetric encryption algorithm or an asymmetric encryption algorithm, and the encryption method can be set according to actual conditions, and the embodiments of the present application are not limited.
[0132] S11, sending the second device identifier to the mobile client and displaying the second data synchronization prompt information.
[0133] After generating the second device identifier, the large-screen client sends the second device identifier to the mobile client, so that the mobile client sends the user behavior data and the second device identifier to the server after receiving the second device identifier, and associates the new user behavior data with the second device identifier when new user behavior data is generated, to establish a basis for subsequent device-based data synchronization. After the server receives the user behavior data and the second device identifier, the server establishes a corresponding relationship between the user behavior data and the second device identifier, and can store the user behavior data of different device identifiers under the same account, so that the large-screen client can obtain the to-be-synchronized data from the server according to the device identifier.
[0134] S12, receiving a third response information of the user to the second data synchronization prompt information.
[0135] After the second data synchronization prompt information is displayed, third response information of the user to the second data synchronization prompt information can be received, and the third response information can indicate that data synchronization is performed or that data synchronization is not performed.
[0136] In S13, if the third response information indicates that data synchronization is performed, data synchronization is performed based on the active MAC address.
[0137] If the third response information indicates that data synchronization is performed, it indicates that the user wants to synchronize the user behavior data in the mobile client to the large-screen client, and the large-screen client performs data synchronization based on the active MAC address.
[0138] When the large-screen client is a video application, after data synchronization is performed on the large-screen client, the user can click a specific position on the home page of the large-screen client, and the historical viewing information corresponding to the device identifier can be displayed on the page of the large-screen client. The specific position can be "view all play records" on the home page or other positions on the home page, which are not limited herein.
[0139] When the user opens the large-screen client, the embodiment of the application can actively discover the nearby mobile devices, intelligently recommend switching the user role or the user viewing data with the device identifier according to the WLAN information of the nearby mobile devices, the local query of the television end, and the cloud portrait matching, and prompt the user whether to switch the role or to synchronize the update record to continue watching, so as to achieve intelligent synchronization of the viewing data and intelligent switching of the role of the user in the mobile scene and the home scene. The solution solves the pain points that multiple people share the same account, multiple people use the large-screen device, the large-screen device is used as a public screen user role, and the viewing records interfere with each other. The solution actively searches the WLAN MAC address, the router BSSID, and the IP address of the nearby mobile devices (such as mobile phones, smart watches, and tablet computers), intelligently synchronizes the viewing data or switches the role of the mobile phone end application (such as Mango TV) that has been bound according to the user portrait matching, and realizes the intelligent sensing and prompting function of accurately identifying the user based on the WLAN information of the mobile device.
[0140] Next, a data synchronization device provided by the embodiment of the application is introduced. The data synchronization device introduced below can be correspondingly referred to the data synchronization method introduced above.
[0141] Please refer to Figure 7 , which shows a structure schematic diagram of a data synchronization device provided by the embodiment of the application, applied to a large-screen client, and the device includes:
[0142] A determination module 701 is configured to determine an active Internet Protocol (IP) address in a current local area network, and the current local area network is a local area network where the large-screen client is located.
[0143] The acquisition module 702 is configured to acquire an active media access control (MAC) address corresponding to the active IP address.
[0144] The display module 703 is configured to display first data synchronization prompt information if the active MAC address is recorded in a local database.
[0145] The receiving module 704 is configured to receive first response information of the user to the first data synchronization prompt information.
[0146] The synchronization module 705 is configured to perform data synchronization based on the active MAC address if the first response information indicates that data synchronization is to be performed.
[0147] In an embodiment of the present application, the determination module 701 is specifically configured to:
[0148] receive a PING result through an Internet Control Message Protocol (ICMP) echo request (PING) command;
[0149] analyze the PING result to obtain the active IP address.
[0150] In an embodiment of the present application, the determination module 701 is specifically configured to:
[0151] send a response request to the IP address under the current local area network through a socket;
[0152] determine an IP address corresponding to a received request response message as the active IP address.
[0153] In an embodiment of the present application, the synchronization module 705 is specifically configured to:
[0154] determine a first device identifier corresponding to the active MAC address;
[0155] send a synchronization data request carrying the first device identifier to a server;
[0156] receive to-be-synchronized data corresponding to the first device identifier sent by the server;
[0157] perform data synchronization based on the to-be-synchronized data.
[0158] In an embodiment of the present application, the apparatus further includes a generation module and a sending module.
[0159] The display module 703 is further configured to display device binding prompt information if the active MAC address is not recorded in the local database.
[0160] The receiving module 704 is further configured to receive second response information of the user to the device binding prompt information.
[0161] The display module 703 is further configured to display device binding information if the second response information indicates to perform device binding, the device binding information being used for device binding between the mobile client and the large-screen client.
[0162] The receiving module 704 is further configured to receive a device binding request sent by the mobile client based on the device binding information, the device binding request comprising network information and device information of the mobile client.
[0163] The generating module is configured to generate a second device identifier corresponding to the active MAC address according to the network information and the device information if the network information comprises the active IP address.
[0164] The sending module is configured to send the second device identifier to the mobile client.
[0165] The display module 703 is further configured to display second data synchronization prompt information.
[0166] The receiving module 704 is further configured to receive third response information of the user to the second data synchronization prompt information.
[0167] The synchronization module 705 is further configured to perform data synchronization based on the active MAC address if the third response information indicates to perform data synchronization.
[0168] Please refer to Figure 8 , which shows a structural schematic diagram of a data synchronization system provided by an embodiment of the present application, the system comprising a large-screen client 81, a mobile client 82 and a server 83.
[0169] The large-screen client 81 is configured to perform the method described in the method embodiment.
[0170] The mobile client 82 is configured to:
[0171] send a device binding request to the large-screen client, the device binding request comprising network information and device information, the device binding request being sent by the mobile client based on device binding information, the device binding information being used for device binding by the mobile client.
[0172] receive a second device identifier sent by the large-screen client.
[0173] The server 83 is configured to:
[0174] receive the synchronization data request carrying the first device identifier sent by the large-screen client;
[0175] send the to-be-synchronized data corresponding to the first device identifier to the large-screen client.
[0176] In the embodiment of the present application, the large-screen client determines an active Internet Protocol (IP) address under a current local area network, the current local area network being a local area network in which the large-screen client is located; an active Media Access Control (MAC) address corresponding to the active IP address is acquired; if the active MAC address is recorded in a local database, a first data synchronization prompt information is displayed; a first response information of the user to the first data synchronization prompt information is received; if the first response information indicates to perform data synchronization, data synchronization is performed based on the active MAC address. The large-screen client of the embodiment of the present application can directly perceive a mobile terminal capable of communication connection, and when the MAC address of the mobile terminal is recorded in the local database, the mobile terminal does not need to perform any operation to directly perform data synchronization, thereby improving the efficiency of data synchronization. In addition, data synchronization based on the MAC address can acquire data on a device-by-device basis, thereby avoiding the problem of privacy leakage caused by a same account having multiple devices.
[0177] It should be noted that the same or similar parts among various embodiments can be mutually referred to. For the device embodiments and system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the part of the method embodiments.
[0178] For the foregoing embodiments, in order to simply describe, they are all expressed as a series of action combinations, but those skilled in the art should know that the present application is not limited to the action sequence described, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should know that the embodiments described in the specification all belong to preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0179] Finally, it should be noted that in this document, relationship terms such as first and second are used only to distinguish one entity or operation from another, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. Without more limitations, the element defined by the statement "including a" does not exclude the presence of another identical element in the process, method, article or device including the element.
[0180] The above description of disclosed embodiments enables one of ordinary skill in the art to make or use the application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein can be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
[0181] The above description is merely that of preferred embodiments of the present application and is not intended to limit the application to the precise forms disclosed. Rather, modifications and alterations do occur to those possessing the appropriate skills in light of the above teachings it is therefore intended that the application not be limited to the disclosed embodiments but rather be accorded the widest scope in the art accordingly.
Claims
1. A method of data synchronization, the method comprising: The method is applied to a large-screen client and comprises the following steps: determining an active Internet Protocol (IP) address under a current local area network (LAN), wherein the current LAN is a LAN in which the large-screen client is located; obtaining an active Media Access Control (MAC) address corresponding to the active IP address; if the active MAC address is recorded in a local database, displaying a first data synchronization prompt information, wherein the local database records MAC addresses that have been bound with the large-screen client; receiving a first response information of the user to the first data synchronization prompt information; if the first response information indicates to perform data synchronization, performing data synchronization based on the active MAC address; if the active MAC address is not recorded in the local database, displaying a device binding prompt information; receiving a second response information of the user to the device binding prompt information; if the second response information indicates to perform device binding, displaying a device binding information, wherein the device binding information is used for device binding between a mobile client and the large-screen client; receiving a device binding request sent by the mobile client based on the device binding information, wherein the device binding request comprises network information and device information of the mobile client; if the network information comprises the active IP address, generating a second device identifier corresponding to the active MAC address according to the network information and the device information; sending the second device identifier to the mobile client and displaying a second data synchronization prompt information; receiving a third response information of the user to the second data synchronization prompt information; if the third response information indicates to perform data synchronization, performing data synchronization based on the active MAC address.
2. The method of claim 1, wherein, The method comprises the following steps: receiving a PING result through an Internet Protocol (IP) address; parsing the PING result to obtain the active IP address.
3. The method of claim 1, wherein, The method comprises the following steps: sending a response request to an IP address under the current LAN through a socket; determining an IP address corresponding to a received request response message as an active IP address.
4. The method of claim 1, wherein, The method comprises the following steps: determining a first device identifier corresponding to the active MAC address; sending a synchronization data request carrying the first device identifier to a server; receiving data to be synchronized corresponding to the first device identifier sent by the server; performing data synchronization based on the data to be synchronized.
5. A data synchronization apparatus, characterized by comprising: The device is applied to a large-screen client and comprises the following modules: a determining module, configured to determine an active Internet Protocol (IP) address under a current local area network (LAN), wherein the current LAN is a LAN in which the large-screen client is located; an obtaining module, configured to obtain an active Media Access Control (MAC) address corresponding to the active IP address; a displaying module, configured to display a first data synchronization prompt information if the active MAC address is recorded in a local database, wherein the local database records MAC addresses that have been bound with the large-screen client; receive a first response information of the user to the first data synchronization prompt information; the synchronization module is used for, if the first response information indicates to perform data synchronization, performing data synchronization based on the active MAC address; the display module is further used for, if the active MAC address is not recorded in the local database, displaying device binding prompt information; the receiving module is further used for receiving a second response information of the user to the device binding prompt information; if the second response information indicates to perform device binding, displaying device binding information, the device binding information being used for device binding of the mobile client and the large-screen client; receiving a device binding request sent by the mobile client based on the device binding information, the device binding request comprising network information and device information of the mobile client; if the network information comprises the active IP address, generating a second device identifier corresponding to the active MAC address according to the network information and the device information; sending the second device identifier to the mobile client, and displaying second data synchronization prompt information; receiving a third response information of the user to the second data synchronization prompt information; the synchronization module is further used for, if the third response information indicates to perform data synchronization, performing data synchronization based on the active MAC address.
6. The apparatus of claim 5, wherein, The determination module is specifically used for: receiving a PING result through an Internet Control Message Protocol (ICMP) echo request (PING) command; parsing the PING result to obtain the active IP address.
7. The apparatus of claim 5, wherein, The determination module is specifically used for: sending a response request to the IP address under the current local area network through a socket; determining an IP address corresponding to a received request response message as the active IP address.
8. The apparatus of claim 5, wherein, The synchronization module is specifically used for: determining a first device identifier corresponding to the active MAC address; sending a synchronization data request carrying the first device identifier to a server; receiving to-be-synchronized data corresponding to the first device identifier sent by the server; performing data synchronization based on the to-be-synchronized data.
9. A data synchronization system, characterized by comprise: a large-screen client, a mobile client, and a server; the large-screen client is used for executing the method in any one of claims 1 to 4; the mobile client is used for: sending a device binding request to the large-screen client, the device binding request comprising network information and device information, the device binding request being sent by the mobile client based on device binding information, the device binding information being used for device binding of the mobile client; receiving a second device identifier sent by the large-screen client; the server is used for: receiving a synchronization data request carrying a first device identifier sent by the large-screen client; sending to-be-synchronized data corresponding to the first device identifier to the large-screen client.
Citation Information
Patent Citations
Message synchronization method, device and system, related equipment and storage medium
CN115102918A